diff options
author | José Bollo <jose.bollo@iot.bzh> | 2019-10-04 17:28:24 +0200 |
---|---|---|
committer | José Bollo <jose.bollo@iot.bzh> | 2019-10-04 21:30:12 +0200 |
commit | 2db8fa8c75a173ad49b06a97aefe16b279e5bbee (patch) | |
tree | 96d3495d2df0e59c207322f2d4517c2920e0fccc /src | |
parent | 175e632803f9d40e019e6e7a8b3190b649b2f877 (diff) |
Add DIRECT_CYNARA_COMPAT to dissociate libs
The flag DIRECT_CYNARA_COMPAT remove the dependency
of libcynara-compat to libcynagora.
Change-Id: Ib8ded68fc799a7cdb53acd4416b255abdf765311
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
fixup! 9d08a0b
Diffstat (limited to 'src')
-rw-r--r-- | src/CMakeLists.txt | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 8fdb9e7..b69c15f 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -61,13 +61,18 @@ set_target_properties(cynagora-core PROPERTIES install(TARGETS cynagora-core LIBRARY DESTINATION ${CMAKE_INSTALL_FULL_LIBDIR}) ########################################### -# build and install libcynagora-client +# build client-objects ########################################### -add_library(cynagora SHARED ${LIBCLI_SOURCES}) -target_include_directories(cynagora PUBLIC .) -target_compile_definitions(cynagora PRIVATE +add_library(client-objects OBJECT ${LIBCLI_SOURCES}) +target_compile_definitions(client-objects PRIVATE DEFAULT_SOCKET_DIR="${DEFAULT_SOCKET_DIR}" ) +target_compile_options(client-objects PRIVATE -fPIC) + +########################################### +# build and install libcynagora-client +########################################### +add_library(cynagora SHARED $<TARGET_OBJECTS:client-objects>) set_target_properties(cynagora PROPERTIES VERSION ${CYNAGORA_VERSION} SOVERSION ${CYNAGORA_SOVERSION} |