mirror of
https://github.com/Syping/dtranslatebot.git
synced 2024-12-03 19:00:26 +01:00
CMake: msys compatibility added/fixed
This commit is contained in:
parent
dd2de72f94
commit
6220277305
2 changed files with 15 additions and 5 deletions
|
@ -98,12 +98,13 @@ if (WITH_DPP_AS_EXTERNAL_PROJECT)
|
|||
add_dependencies(dtranslatebot DPP)
|
||||
endif()
|
||||
target_compile_definitions(dtranslatebot PRIVATE
|
||||
${DPP_DEFINITIONS}
|
||||
$<$<BOOL:${DTRANSLATEBOT_USE_BOOST_REGEX}>:DTRANSLATEBOT_USE_BOOST_REGEX>
|
||||
)
|
||||
if (MSVC AND MSVC_VERSION GREATER_EQUAL 1914)
|
||||
target_compile_options(dtranslatebot PRIVATE $<$<COMPILE_LANGUAGE:CXX>:/Zc:__cplusplus>)
|
||||
endif()
|
||||
target_link_libraries(dtranslatebot PRIVATE ${DPP_LIBRARIES} ${DTRANSLATEBOT_LIBRARIES} Threads::Threads)
|
||||
target_link_libraries(dtranslatebot PRIVATE ${DTRANSLATEBOT_LIBRARIES} ${DPP_LIBRARIES} Threads::Threads)
|
||||
target_include_directories(dtranslatebot PRIVATE ${DPP_INCLUDE_DIR})
|
||||
set_target_properties(dtranslatebot PROPERTIES
|
||||
CXX_STANDARD 17
|
||||
|
|
|
@ -77,6 +77,7 @@ ExternalProject_Add(DPP
|
|||
-DBUILD_VOICE_SUPPORT=OFF
|
||||
"${CMAKE_PASSTHROUGH_ARGS}"
|
||||
"-DCMAKE_INSTALL_PREFIX=<INSTALL_DIR>"
|
||||
-DDPP_BUILD_TEST=OFF
|
||||
-DDPP_NO_VCPKG=ON
|
||||
-DRUN_LDCONFIG=OFF
|
||||
"-DOpenSSL_ROOT=${OpenSSL_INSTALL_DIR}"
|
||||
|
@ -91,13 +92,21 @@ set(DPP_LIBRARIES
|
|||
-Wl,-Bstatic
|
||||
"-L${DPP_INSTALL_DIR}/lib"
|
||||
"-L${DPP_INSTALL_DIR}/lib64"
|
||||
-ldpp
|
||||
dpp
|
||||
"-L${OpenSSL_INSTALL_DIR}/lib"
|
||||
"-L${OpenSSL_INSTALL_DIR}/lib64"
|
||||
-lssl
|
||||
-lcrypto
|
||||
ssl
|
||||
crypto
|
||||
"-L${ZLIB_INSTALL_DIR}/lib"
|
||||
"-L${ZLIB_INSTALL_DIR}/lib64"
|
||||
-lz
|
||||
$<IF:$<BOOL:WIN32>,zlibstatic,z>
|
||||
-Wl,-Bdynamic
|
||||
)
|
||||
if (WIN32)
|
||||
set(DPP_DEFINITIONS DPP_STATIC)
|
||||
list(APPEND DPP_LIBRARIES
|
||||
ws2_32
|
||||
gdi32
|
||||
crypt32
|
||||
)
|
||||
endif()
|
||||
|
|
Loading…
Reference in a new issue