remove zlib from third_party, find it by cmake find_package()
This commit is contained in:
+3
-21
@@ -6,36 +6,18 @@ set(AT_SRCS
|
||||
main.cc
|
||||
)
|
||||
|
||||
set(AT_TARGET_NAME webcc_autotest)
|
||||
|
||||
# Common libraries to link.
|
||||
set(AT_LIBS
|
||||
webcc
|
||||
${Boost_LIBRARIES}
|
||||
jsoncpp
|
||||
GTest::GTest
|
||||
"${CMAKE_THREAD_LIBS_INIT}")
|
||||
|
||||
if(WEBCC_ENABLE_SSL)
|
||||
set(AT_LIBS ${AT_LIBS} ${OPENSSL_LIBRARIES})
|
||||
|
||||
if(WIN32)
|
||||
set(AT_LIBS ${AT_LIBS} crypt32)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(WEBCC_ENABLE_GZIP)
|
||||
if(WIN32)
|
||||
set(AT_LIBS ${AT_LIBS} zlibstatic)
|
||||
else()
|
||||
set(AT_LIBS ${AT_LIBS} ${ZLIB_LIBRARIES})
|
||||
endif()
|
||||
endif()
|
||||
GTest::GTest)
|
||||
|
||||
if(UNIX)
|
||||
# Add `-ldl` for Linux to avoid "undefined reference to `dlopen'".
|
||||
set(AT_LIBS ${AT_LIBS} ${CMAKE_DL_LIBS})
|
||||
endif()
|
||||
|
||||
set(AT_TARGET_NAME webcc_autotest)
|
||||
|
||||
add_executable(${AT_TARGET_NAME} ${AT_SRCS})
|
||||
target_link_libraries(${AT_TARGET_NAME} ${AT_LIBS})
|
||||
|
||||
Reference in New Issue
Block a user