aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/afm-main-plugin
diff options
context:
space:
mode:
authorJosé Bollo <jose.bollo@iot.bzh>2016-05-18 17:29:26 +0200
committerJosé Bollo <jose.bollo@iot.bzh>2016-05-18 17:29:26 +0200
commit9481b4f2960c560ec8297bdc37d8014230072a5c (patch)
treeb076d389746ae8e33f68855146fa5c58318764c4 /plugins/afm-main-plugin
parentceb2e567b5f26ff148fbc0e9526f7e7e99464000 (diff)
improves the build system
Change-Id: Idad84e88cd8c21d111ce7ed44340f6d2b0fccb37 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
Diffstat (limited to 'plugins/afm-main-plugin')
-rw-r--r--plugins/afm-main-plugin/CMakeLists.txt17
-rw-r--r--plugins/afm-main-plugin/export.map1
2 files changed, 16 insertions, 2 deletions
diff --git a/plugins/afm-main-plugin/CMakeLists.txt b/plugins/afm-main-plugin/CMakeLists.txt
index 5ed1d4b2..6da0e915 100644
--- a/plugins/afm-main-plugin/CMakeLists.txt
+++ b/plugins/afm-main-plugin/CMakeLists.txt
@@ -1,7 +1,20 @@
+INCLUDE(FindPkgConfig)
+PKG_CHECK_MODULES(libsystemd REQUIRED libsystemd>=222)
+
+INCLUDE_DIRECTORIES(
+ ${INCLUDE_DIRS}
+ ${libsystemd_INCLUDE_DIRS}
+)
+
+
ADD_LIBRARY(afm-main-api MODULE afm-main-plugin.c utils-jbus.c)
-SET_TARGET_PROPERTIES(afm-main-api PROPERTIES PREFIX "")
-TARGET_LINK_LIBRARIES(afm-main-api ${link_libraries})
+SET_TARGET_PROPERTIES(afm-main-api PROPERTIES
+ PREFIX ""
+ LINK_FLAGS "-Wl,--version-script=${CMAKE_CURRENT_SOURCE_DIR}/export.map"
+)
+
+TARGET_LINK_LIBRARIES(afm-main-api ${link_libraries} ${libsystemd_LIBRARIES})
INCLUDE_DIRECTORIES(${include_dirs})
INSTALL(TARGETS afm-main-api
LIBRARY DESTINATION ${plugin_install_dir})
diff --git a/plugins/afm-main-plugin/export.map b/plugins/afm-main-plugin/export.map
new file mode 100644
index 00000000..e2da85ca
--- /dev/null
+++ b/plugins/afm-main-plugin/export.map
@@ -0,0 +1 @@
+{ global: pluginAfbV1Register; local: *; };