Skip to content

Commit

Permalink
Use linker optiomns to get libzmq and libsodium
Browse files Browse the repository at this point in the history
  • Loading branch information
Per Sandberg committed Oct 30, 2016
1 parent 7b6f2f8 commit 5366e14
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 48 deletions.
26 changes: 2 additions & 24 deletions libsodium.gpr.in
Expand Up @@ -30,32 +30,10 @@
-- --
------------------------------------------------------------------------------

library project libSodium is

type ZMQ_Kind_Type is ("static", "relocatable");
ZMQ_Kind : ZMQ_Kind_Type := external ("LIBRARY_TYPE", "static");
For Languages use ("C");
for Library_Name use "sodium";
VERSION := "%(withzmqversion)s";
--LIBZMQ_ROOT := "%(withzmq)s";

for Library_Kind use ZMQ_Kind;
for Library_Dir use "%(withzmqlib)s";
for externally_built use "True";
for Source_Dirs use ("%(withzmqinclude)s");

--for Source_Files use ("zmq.h",
-- "zmq_utils.h");

abstract project libSodium is

package Linker is
for Linker_Options use ("-lrt", "-lpthread");
case ZMQ_Kind is
when "relocatable" =>
null;
when "static" =>
for Linker_Options use Linker'Linker_Options & ("-lstdc++");
end case;
for Linker_Options use Linker'Linker_Options & ("-lsodium" );
end Linker;

end libSodium;
26 changes: 2 additions & 24 deletions libzmq.gpr.in
Expand Up @@ -30,32 +30,10 @@
-- --
------------------------------------------------------------------------------
with "libsodium.gpr";
library project libZMQ is

type ZMQ_Kind_Type is ("static", "relocatable");
ZMQ_Kind : ZMQ_Kind_Type := external ("LIBRARY_TYPE", "static");
For Languages use ("C");
for Library_Name use "zmq";
VERSION := "%(withzmqversion)s";
LIBZMQ_ROOT := "%(withzmq)s";

for Library_Kind use ZMQ_Kind;
for Library_Dir use "%(withzmqlib)s";
for externally_built use "True";
for Source_Dirs use ("%(withzmqinclude)s");

for Source_Files use ("zmq.h",
"zmq_utils.h");

abstract project libZMQ is

package Linker is
for Linker_Options use ("-lrt", "-lpthread");
case ZMQ_Kind is
when "relocatable" =>
null;
when "static" =>
for Linker_Options use Linker'Linker_Options & ("-lstdc++");
end case;
for Linker_Options use ("-lzmq");
end Linker;

end libZMQ;

0 comments on commit 5366e14

Please sign in to comment.