Fix zlib link error on Windows for the latest vcpkg (#545)

This commit is contained in:
An Tao 2020-08-19 22:23:47 +08:00 committed by GitHub
parent 321405a93a
commit 2aebba9cc1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 9 deletions

View File

@ -194,11 +194,6 @@ if(BUILD_ORM)
set(DROGON_SOURCES ${DROGON_SOURCES}
orm_lib/src/mysql_impl/MysqlConnection.cc
orm_lib/src/mysql_impl/MysqlResultImpl.cc)
else(MySQL_FOUND)
if(MSVC)
find_package(ZLIB REQUIRED)
target_link_libraries(${PROJECT_NAME} PRIVATE ZLIB::ZLIB)
endif(MSVC)
endif(MySQL_FOUND)
# Find sqlite3.
@ -211,10 +206,8 @@ if(BUILD_ORM)
endif(SQLite3_FOUND)
endif(BUILD_ORM)
if((NOT MSVC) OR (NOT BUILD_ORM))
find_package(ZLIB REQUIRED)
target_link_libraries(${PROJECT_NAME} PRIVATE ZLIB::ZLIB)
endif((NOT MSVC) OR (NOT BUILD_ORM))
find_package(ZLIB REQUIRED)
target_link_libraries(${PROJECT_NAME} PRIVATE ZLIB::ZLIB)
find_package(OpenSSL)
if(OpenSSL_FOUND)