mirror of
https://gitee.com/acl-dev/acl.git
synced 2024-11-29 10:27:39 +08:00
build shared acl can be set from cmake args
This commit is contained in:
parent
6aeeb6dc8c
commit
2998681abc
@ -78,9 +78,11 @@ endif()
|
||||
|
||||
add_subdirectory(lib_acl acl)
|
||||
add_subdirectory(lib_protocol protocol)
|
||||
add_dependencies(protocol acl)
|
||||
add_subdirectory(lib_acl_cpp acl_cpp)
|
||||
add_dependencies(acl_cpp protocol acl)
|
||||
if (ACL_BUILD_SHARED MATCHES "YES")
|
||||
add_dependencies(protocol acl)
|
||||
add_dependencies(acl_cpp protocol acl)
|
||||
endif()
|
||||
|
||||
#if (CMAKE_SYSTEM_NAME MATCHES "Linux" OR CMAKE_SYSTEM_NAME MATCHES "Android")
|
||||
if (CMAKE_SYSTEM_NAME MATCHES "Linux")
|
||||
|
@ -15,11 +15,12 @@
|
||||
cmake -DCMAKE_TOOLCHAIN_FILE=~/Library/Android/ndk-bundle-r20/build/cmake/android.toolchain.cmake \
|
||||
-DANDROID_ABI="armeabi-v7a" \
|
||||
-DANDROID_ARM_NEON=ON \
|
||||
-DANDROID_PLATFORM=android-14 \
|
||||
-DANDROID_PLATFORM=android-28 \
|
||||
-DCMAKE_SYSTEM_NAME=Android \
|
||||
-DACL_CLIENT_ONLY=YES \
|
||||
-DDISABLE_DB=YES \
|
||||
-DHAS_POLARSSL_DLL=NO \
|
||||
-DCMAKE_BUILD_TYPE=RELEASE \
|
||||
-DCMAKE_VERBOSE_MAKEFILE=ON \
|
||||
-DACL_BUILD_SHARED=NO \
|
||||
..
|
||||
|
@ -171,6 +171,8 @@ if (${UNIX_OS})
|
||||
target_compile_options(acl_static PRIVATE -fvisibility=hidden)
|
||||
endif()
|
||||
|
||||
add_library(acl SHARED ${lib_src})
|
||||
if (ACL_BUILD_SHARED MATCHES "YES")
|
||||
add_library(acl SHARED ${lib_src})
|
||||
endif()
|
||||
|
||||
##############################################################################
|
||||
|
@ -227,8 +227,10 @@ elseif (${UNIX_OS})
|
||||
endif()
|
||||
|
||||
if(NOT CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
|
||||
add_library(acl_cpp SHARED ${lib_src})
|
||||
target_link_libraries(acl_cpp protocol acl)
|
||||
if (ACL_BUILD_SHARED MATCHES "YES")
|
||||
add_library(acl_cpp SHARED ${lib_src})
|
||||
target_link_libraries(acl_cpp protocol acl)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
##############################################################################
|
||||
|
@ -132,8 +132,10 @@ elseif (${UNIX_OS})
|
||||
endif()
|
||||
|
||||
if (NOT CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
|
||||
add_library(protocol SHARED ${lib_src})
|
||||
target_link_libraries(protocol acl)
|
||||
if (ACL_BUILD_SHARED MATCHES "YES")
|
||||
add_library(protocol SHARED ${lib_src})
|
||||
target_link_libraries(protocol acl)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
##############################################################################
|
||||
|
@ -117,8 +117,8 @@ if not is_plat("windows") then
|
||||
add_defines("acl_cpp_EXPORTS")
|
||||
add_cflags("fno-addrsig")
|
||||
add_cxxflags("fno-addrsig")
|
||||
add_cflags("-MD", "-MT", "-MF")
|
||||
add_cxxflags("-MD", "-MT", "-MF")
|
||||
--add_cflags("-MD", "-MT", "-MF")
|
||||
--add_cxxflags("-MD", "-MT", "-MF")
|
||||
add_cflags("-no-canonical-prefixes")
|
||||
add_cxxflags("-no-canonical-prefixes")
|
||||
add_cflags("-fno-addrsig")
|
||||
|
Loading…
Reference in New Issue
Block a user