aboutsummaryrefslogtreecommitdiffstats
path: root/libparc/parc
diff options
context:
space:
mode:
authorMauro Sardara <msardara+fdio@cisco.com>2017-06-05 15:06:32 +0200
committerMauro Sardara <msardara+fdio@cisco.com>2017-06-05 15:13:47 +0200
commitc3cd37a462a2a2ae1fa3a98b10bb2a070a988af5 (patch)
treeef849770879c9381435dde8203874a67457bed55 /libparc/parc
parent6ebe28e33cd0eadd6f707251194803cf34f5678e (diff)
- Adding support for iOS
- Adding build type: DEBUG, RELEASE, RELEASE with debug symbols, RELEASE with min size executable Change-Id: I3a52af68445264824476eab3d9f39b6f23f634b4 Signed-off-by: Mauro Sardara <msardara+fdio@cisco.com>
Diffstat (limited to 'libparc/parc')
-rw-r--r--libparc/parc/CMakeLists.txt57
1 files changed, 34 insertions, 23 deletions
diff --git a/libparc/parc/CMakeLists.txt b/libparc/parc/CMakeLists.txt
index 04abfac9..09b73e17 100644
--- a/libparc/parc/CMakeLists.txt
+++ b/libparc/parc/CMakeLists.txt
@@ -352,25 +352,34 @@ source_group(testing FILES ${LIBPARC_TESTING_SOURCE_FILES} ${LIBPARC_TESTING_HEA
source_group(statistics FILES ${LIBPARC_STATISTICS_SOURCE_FILES} ${LIBPARC_STATISTICS_HEADER_FILES})
source_group(memory FILES ${LIBPARC_MEMORY_SOURCE_FILES} ${LIBPARC_MEMORY_HEADER_FILES})
-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()
+if(COMPILE_FOR_IOS OR ANDROID_API)
+ add_library(parc STATIC ${LIBPARC_SOURCE_FILES} ${LIBEVENT_LIBRARIES} ${OPENSSL_LIBRARIES})
+ target_link_libraries(parc ${LIBEVENT_LIBRARIES})
+ target_link_libraries(parc ${OPENSSL_LIBRARIES})
+ set(libparcLibraries
+ parc
+ )
+else()
+ add_library(parc STATIC ${LIBPARC_SOURCE_FILES})
+ add_library(parc.shared SHARED ${LIBPARC_SOURCE_FILES})
+ target_link_libraries(parc.shared ${LIBEVENT_LIBRARIES})
+ target_link_libraries(parc.shared ${OPENSSL_LIBRARIES})
+ set_target_properties(parc.shared PROPERTIES
+ C_STANDARD 99
+ SOVERSION 1
+ VERSION 1.0
+ OUTPUT_NAME parc )
+ set(libparcLibraries
+ parc
+ parc.shared
+ )
-add_library(parc STATIC ${LIBPARC_SOURCE_FILES})
-add_library(parc.shared SHARED ${LIBPARC_SOURCE_FILES})
-target_link_libraries(parc.shared ${LIBEVENT_LIBRARIES})
-target_link_libraries(parc.shared ${OPENSSL_LIBRARIES})
-set_target_properties(parc.shared PROPERTIES
- C_STANDARD 99
- SOVERSION 1
- VERSION 1.0
- OUTPUT_NAME parc )
+endif()
-set(libparcLibraries
- parc
- parc.shared
- )
foreach(lib ${libparcLibraries})
install(TARGETS ${lib} COMPONENT library LIBRARY DESTINATION lib ARCHIVE DESTINATION lib)
@@ -387,12 +396,14 @@ install(FILES ${LIBPARC_BASE_HEADER_FILES} DESTINATION include/parc COMPON
install(FILES ${LIBPARC_STATISTICS_HEADER_FILES} DESTINATION include/parc/statistics COMPONENT headers)
install(FILES ${LIBPARC_MEMORY_HEADER_FILES} DESTINATION include/parc/memory COMPONENT headers)
-add_subdirectory(security/command-line)
-add_subdirectory(algol/test)
-add_subdirectory(concurrent/test)
-add_subdirectory(developer/test)
-add_subdirectory(security/test)
-add_subdirectory(logging/test)
-add_subdirectory(testing/test)
-add_subdirectory(statistics/test)
-add_subdirectory(memory/test)
+if(NOT COMPILE_FOR_IOS)
+ add_subdirectory(security/command-line)
+ add_subdirectory(algol/test)
+ add_subdirectory(concurrent/test)
+ add_subdirectory(developer/test)
+ add_subdirectory(security/test)
+ add_subdirectory(logging/test)
+ add_subdirectory(testing/test)
+ add_subdirectory(statistics/test)
+ add_subdirectory(memory/test)
+endif()