Created
December 19, 2017 19:04
-
-
Save zethon/858b20b4d94e47f11c80995348481d43 to your computer and use it in GitHub Desktop.
CMake, Curl and Visual Studio
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This was required in my project's CMake in order to properly link and build against curl | |
if (MSVC) | |
add_definitions( | |
-D_SCL_SECURE_NO_WARNINGS | |
-DWIN32_LEAN_AND_MEAN | |
-DCURL_STATICLIB | |
) | |
list(APPEND CURL_LIBRARIES | |
"Crypt32.lib" | |
"Ws2_32.lib" | |
) | |
SET(CMAKE_EXE_LINKER_FLAGS "/NODEFAULTLIB:library") | |
endif() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This had to be called before the above else
CURL_LIBRARIES
gets reset.