pkgconfig: Update pkgconfig file to include -framework directives
These are now necessary to build against static library
Change-Id: Ia03e3279a7583e8f387e864edcbb2ed32786f622
diff --git a/libndn-cpp-dev.pc.in b/libndn-cpp-dev.pc.in
index 0e31949..4b0e793 100644
--- a/libndn-cpp-dev.pc.in
+++ b/libndn-cpp-dev.pc.in
@@ -6,5 +6,5 @@
Name: libndn-cpp-dev
Description: Development version of C++ API for NDN (NDN-TLV packet format)
Version: @VERSION@
-Libs: -L${libdir} @EXTRA_LDFLAGS@ -lndn-cpp-dev @EXTRA_LIBS@
+Libs: -L${libdir} @EXTRA_LDFLAGS@ -lndn-cpp-dev @EXTRA_LIBS@ @EXTRA_FRAMEWORKS@
Cflags: -I${includedir} @EXTRA_INCLUDES@
diff --git a/wscript b/wscript
index fdf8615..daa09ee 100644
--- a/wscript
+++ b/wscript
@@ -136,6 +136,10 @@
if bld.env['INCLUDES_%s' % lib]:
pkgconfig_includes += Utils.to_list(bld.env['INCLUDES_%s' % lib])
+ EXTRA_FRAMEWORKS = "";
+ if Utils.unversioned_sys_platform () == "darwin":
+ EXTRA_FRAMEWORKS = "-framework CoreFoundation -framework Security"
+
def uniq(alist):
set = {}
return [set.setdefault(e,e) for e in alist if e not in set]
@@ -151,6 +155,7 @@
EXTRA_LIBS = " ".join([('-l%s' % i) for i in uniq(pkgconfig_libs)]),
EXTRA_LDFLAGS = " ".join([('-L%s' % i) for i in uniq(pkgconfig_ldflags)]),
EXTRA_INCLUDES = " ".join([('-I%s' % i) for i in uniq(pkgconfig_includes)]),
+ EXTRA_FRAMEWORKS = EXTRA_FRAMEWORKS,
)
# Unit tests