diff options
author | Mauro Sardara <msardara+fdio@cisco.com> | 2017-06-05 15:45:33 +0200 |
---|---|---|
committer | Mauro Sardara <msardara+fdio@cisco.com> | 2017-06-05 16:46:09 +0200 |
commit | b9969fb070049f4c9319ab1465481a9709525e6e (patch) | |
tree | 12578cb76fc0db9d1fbad5ce64516dadd70a0aad /libccnx-common/ccnx/common | |
parent | 5e7ad51c32a92b84e2e42741d96c68ec834e6f8b (diff) |
- Adding support for iOS
- Adding build type: DEBUG, RELEASE, RELEASE with debug symbols, RELEASE with min size executable
Change-Id: Idd76bc93af6a90e9e491c53373d845f49b6b3b45
Signed-off-by: Mauro Sardara <msardara+fdio@cisco.com>
Diffstat (limited to 'libccnx-common/ccnx/common')
-rw-r--r-- | libccnx-common/ccnx/common/CMakeLists.txt | 37 |
1 files changed, 22 insertions, 15 deletions
diff --git a/libccnx-common/ccnx/common/CMakeLists.txt b/libccnx-common/ccnx/common/CMakeLists.txt index 81a7054e..f333a4ea 100644 --- a/libccnx-common/ccnx/common/CMakeLists.txt +++ b/libccnx-common/ccnx/common/CMakeLists.txt @@ -232,25 +232,32 @@ set(PUBLIC_HDRS configure_file("config.h.in" "config.h" @ONLY) -if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "AppleClang") +if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "AppleClang" OR COMPILE_FOR_IOS) set(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "${CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS} -undefined dynamic_lookup") message( "-- Set \"-undefined dynamic_lookup\" for shared libraries") endif() -add_library(ccnx_common STATIC ${ALL_SRCS} ${ALL_HDRS}) -add_library(ccnx_common.shared SHARED ${ALL_SRCS}) - -target_link_libraries(ccnx_common.shared ${LIBPARC_LIBRARIES}) -set_target_properties(ccnx_common.shared PROPERTIES - C_STANDARD 99 - SOVERSION 1 - VERSION 1.0 - OUTPUT_NAME ccnx_common ) - -set(libccnx_commonLibraries - ccnx_common - ccnx_common.shared - ) +if(COMPILE_FOR_IOS OR ANDROID_API) + add_library(ccnx_common STATIC ${ALL_SRCS} ${ALL_HDRS}) + set(libccnx_commonLibraries + ccnx_common + ) +else() + add_library(ccnx_common STATIC ${ALL_SRCS} ${ALL_HDRS}) + add_library(ccnx_common.shared SHARED ${ALL_SRCS}) + + target_link_libraries(ccnx_common.shared ${LIBPARC_LIBRARIES}) + set_target_properties(ccnx_common.shared PROPERTIES + C_STANDARD 99 + SOVERSION 1 + VERSION 1.0 + OUTPUT_NAME ccnx_common ) + + set(libccnx_commonLibraries + ccnx_common + ccnx_common.shared + ) +endif() foreach(lib ${libccnx_commonLibraries}) install(TARGETS ${lib} COMPONENT library LIBRARY DESTINATION lib ARCHIVE DESTINATION lib) |