mirror of
https://github.com/yhirose/cpp-httplib
synced 2024-11-21 14:29:10 -07:00
Fix Cmake build for MinGW (#580)
Seems certain targets/hosts failed without these, as "_MSC_VER" is undefined on MinGW, which caused the 'pragma comment(lib "libname")' to fail. Fixes #575
This commit is contained in:
parent
9f5db2d1aa
commit
8c501022b3
1 changed files with 4 additions and 0 deletions
|
@ -181,6 +181,10 @@ target_include_directories(${PROJECT_NAME} ${_INTERFACE_OR_PUBLIC}
|
||||||
# Always require threads
|
# Always require threads
|
||||||
target_link_libraries(${PROJECT_NAME} ${_INTERFACE_OR_PUBLIC}
|
target_link_libraries(${PROJECT_NAME} ${_INTERFACE_OR_PUBLIC}
|
||||||
Threads::Threads
|
Threads::Threads
|
||||||
|
# Needed for Windows libs on Mingw, as the pragma comment(lib, "xyz") aren't triggered.
|
||||||
|
$<$<PLATFORM_ID:Windows>:ws2_32>
|
||||||
|
$<$<PLATFORM_ID:Windows>:crypt32>
|
||||||
|
$<$<PLATFORM_ID:Windows>:cryptui>
|
||||||
)
|
)
|
||||||
|
|
||||||
# We check for the target when using IF_AVAILABLE since it's possible we didn't find it.
|
# We check for the target when using IF_AVAILABLE since it's possible we didn't find it.
|
||||||
|
|
Loading…
Reference in a new issue