mirror of
https://gitee.com/acl-dev/acl.git
synced 2024-12-02 03:47:53 +08:00
optimize compiling options
This commit is contained in:
parent
60f98235cd
commit
f66472cadf
@ -192,8 +192,6 @@ if (ACL_CLIENT_ONLY MATCHES "YES")
|
||||
endif()
|
||||
|
||||
if (CMAKE_SYSTEM_NAME MATCHES "Android")
|
||||
set(CMAKE_SHARED_LINKER_FLAGS "-shared -lz -flto")
|
||||
|
||||
set(lib_output_path ${CMAKE_CURRENT_SOURCE_DIR}/../android/lib/${ANDROID_ABI})
|
||||
else()
|
||||
set(lib_output_path ${PROJECT_BINARY_DIR}/lib)
|
||||
@ -207,6 +205,7 @@ SET_TARGET_PROPERTIES(acl_cpp_static PROPERTIES OUTPUT_NAME "acl_cpp")
|
||||
link_directories(${lib_output_path})
|
||||
|
||||
if (${UNIX_OS})
|
||||
set(CMAKE_SHARED_LINKER_FLAGS "-shared -lz -flto")
|
||||
target_compile_options(acl_cpp_static PRIVATE
|
||||
-fvisibility=hidden
|
||||
-fvisibility-inlines-hidden)
|
||||
|
@ -117,7 +117,7 @@ link_directories(${lib_output_path})
|
||||
|
||||
if (${UNIX_OS})
|
||||
set(CMAKE_SHARED_LINKER_FLAGS "-shared -flto")
|
||||
set(CMAKE_SHARED_LINKER_FLAGS "-Wl,-rpath,. -L${lib_output_path} -lacl")
|
||||
set(CMAKE_SHARED_LINKER_FLAGS "${lib_output_path}/libacl.a")
|
||||
target_compile_options(protocol_static PRIVATE
|
||||
-fvisibility=hidden
|
||||
-fvisibility-inlines-hidden)
|
||||
|
Loading…
Reference in New Issue
Block a user