summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authoryangwei <[email protected]>2020-09-07 12:54:42 +0800
committeryangwei <[email protected]>2020-09-07 12:54:42 +0800
commit19911a962cbb83250e6ba1ecc7d8c1ee86d5db02 (patch)
treeb8ba3c7dc70e62cbad2376c17f5c60295f41e63c /CMakeLists.txt
parentc21cdcb3f0f923e25da7d1a918218c6ef870aba9 (diff)
更新zlog目录,改为tar包使用ExternalProject编译解压
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt5
1 files changed, 3 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 69364bd..9ff3645 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -40,9 +40,10 @@ file(GLOB SRC
# Shared Library Output
add_library(${lib_name}_shared SHARED ${SRC})
-target_link_libraries(${lib_name}_shared -Wl,--whole-archive zlog_static -Wl,--no-whole-archive)
+target_link_libraries(${lib_name}_shared zlog-static)
set_target_properties(${lib_name}_shared PROPERTIES LINK_FLAGS
"-Wl,--version-script=${PROJECT_SOURCE_DIR}/src/version.map")
+
if(DEFINED MESA_SHARED_INSTALL_DIR)
set_target_properties(${lib_name}_shared PROPERTIES OUTPUT_NAME ${lib_name} LIBRARY_OUTPUT_DIRECTORY ${MESA_SHARED_INSTALL_DIR})
else()
@@ -51,7 +52,7 @@ endif()
# static Library Output
add_library(${lib_name}_static STATIC ${SRC})
-target_link_libraries(${lib_name}_static -Wl,--whole-archive zlog_static -Wl,--no-whole-archive)
+target_link_libraries(${lib_name}_static -Wl,--whole-archive zlog-static -Wl,--no-whole-archive)
set_target_properties(${lib_name}_static PROPERTIES OUTPUT_NAME ${lib_name})
set(CMAKE_INSTALL_PREFIX /opt/MESA)