diff options
author | José Bollo <jose.bollo@iot.bzh> | 2016-05-18 17:29:26 +0200 |
---|---|---|
committer | José Bollo <jose.bollo@iot.bzh> | 2016-05-18 17:29:26 +0200 |
commit | 9481b4f2960c560ec8297bdc37d8014230072a5c (patch) | |
tree | b076d389746ae8e33f68855146fa5c58318764c4 /plugins/media | |
parent | ceb2e567b5f26ff148fbc0e9526f7e7e99464000 (diff) |
improves the build system
Change-Id: Idad84e88cd8c21d111ce7ed44340f6d2b0fccb37
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
Diffstat (limited to 'plugins/media')
-rw-r--r-- | plugins/media/CMakeLists.txt | 14 | ||||
-rw-r--r-- | plugins/media/export.map | 1 | ||||
-rw-r--r-- | plugins/media/media-api.c | 2 |
3 files changed, 13 insertions, 4 deletions
diff --git a/plugins/media/CMakeLists.txt b/plugins/media/CMakeLists.txt index a6fc34ed..5febc02d 100644 --- a/plugins/media/CMakeLists.txt +++ b/plugins/media/CMakeLists.txt @@ -1,9 +1,17 @@ +INCLUDE(FindPkgConfig) +PKG_CHECK_MODULES(gupnp gupnp-1.0 gupnp-av-1.0 gssdp-1.0 gobject-2.0 gio-2.0) + IF(gupnp_FOUND) + MESSAGE(STATUS "gupnp found ; will compile Media plugin... (PLUGIN)") + + INCLUDE_DIRECTORIES( ${include_dirs} ${gupnp_INCLUDE_DIRS}) ADD_LIBRARY(media-api MODULE media-api.c media-rygel.c) - SET_TARGET_PROPERTIES(media-api PROPERTIES PREFIX "") - TARGET_LINK_LIBRARIES(media-api ${link_libraries}) - INCLUDE_DIRECTORIES(${include_dirs}) + SET_TARGET_PROPERTIES(media-api PROPERTIES + PREFIX "" + LINK_FLAGS "-Wl,--version-script=${CMAKE_CURRENT_SOURCE_DIR}/export.map" + ) + TARGET_LINK_LIBRARIES(media-api ${link_libraries} ${gupnp_LIBRARIES}) INSTALL(TARGETS media-api LIBRARY DESTINATION ${plugin_install_dir}) diff --git a/plugins/media/export.map b/plugins/media/export.map new file mode 100644 index 00000000..e2da85ca --- /dev/null +++ b/plugins/media/export.map @@ -0,0 +1 @@ +{ global: pluginAfbV1Register; local: *; }; diff --git a/plugins/media/media-api.c b/plugins/media/media-api.c index dace151f..6ba8d1e0 100644 --- a/plugins/media/media-api.c +++ b/plugins/media/media-api.c @@ -323,7 +323,7 @@ static const struct AFB_plugin pluginDesc = { } }; -const struct AFB_plugin *pluginAfbV1Entry (const struct AFB_interface *itf) +const struct AFB_plugin *pluginAfbV1Register (const struct AFB_interface *itf) { return &pluginDesc; } |