summaryrefslogtreecommitdiffstats
path: root/lib/src/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'lib/src/CMakeLists.txt')
-rw-r--r--lib/src/CMakeLists.txt34
1 files changed, 23 insertions, 11 deletions
diff --git a/lib/src/CMakeLists.txt b/lib/src/CMakeLists.txt
index d7c39831a..29fc5d865 100644
--- a/lib/src/CMakeLists.txt
+++ b/lib/src/CMakeLists.txt
@@ -55,17 +55,29 @@ set (COMPILER_DEFINITIONS "-DWITH_MAPME -DWITH_MAPME_FIXES")
include(BuildMacros)
include(WindowsMacros)
-build_library(${LIBHICN}
- SHARED STATIC
- SOURCES ${LIBHICN_SOURCE_FILES} ${LIBHICN_HEADER_FILES} ${LIBHICN_HEADER_FILES_PROTOCOL}
- COMPONENT lib${LIBHICN}
- INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/..
- DEFINITIONS ${COMPILER_DEFINITIONS}
- INSTALL_ROOT_DIR hicn
- INSTALL_HEADERS ${LIBHICN_HEADER_FILES} ${LIBHICN_HEADER_FILES_PROTOCOL}
- LINK_LIBRARIES ${WSOCK32_LIBRARY} ${WS2_32_LIBRARY}
-)
-
+if (ANDROID_API)
+ build_library(${LIBHICN}
+ STATIC
+ SOURCES ${LIBHICN_SOURCE_FILES} ${LIBHICN_HEADER_FILES} ${LIBHICN_HEADER_FILES_PROTOCOL}
+ COMPONENT lib${LIBHICN}
+ INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/..
+ DEFINITIONS ${COMPILER_DEFINITIONS}
+ INSTALL_ROOT_DIR hicn
+ INSTALL_HEADERS ${LIBHICN_HEADER_FILES} ${LIBHICN_HEADER_FILES_PROTOCOL}
+ LINK_LIBRARIES ${WSOCK32_LIBRARY} ${WS2_32_LIBRARY}
+ )
+else ()
+ build_library(${LIBHICN}
+ SHARED STATIC
+ SOURCES ${LIBHICN_SOURCE_FILES} ${LIBHICN_HEADER_FILES} ${LIBHICN_HEADER_FILES_PROTOCOL}
+ COMPONENT lib${LIBHICN}
+ INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/..
+ DEFINITIONS ${COMPILER_DEFINITIONS}
+ INSTALL_ROOT_DIR hicn
+ INSTALL_HEADERS ${LIBHICN_HEADER_FILES} ${LIBHICN_HEADER_FILES_PROTOCOL}
+ LINK_LIBRARIES ${WSOCK32_LIBRARY} ${WS2_32_LIBRARY}
+ )
+endif ()
add_custom_command(TARGET hicn PRE_BUILD
COMMAND ${CMAKE_COMMAND} -E remove_directory ${PROJECT_BINARY_DIR}/hicn
)