From be74b740f50af4db788537bddf8d6e37263e6ffc Mon Sep 17 00:00:00 2001 From: ns6089 <61738816+ns6089@users.noreply.github.com> Date: Tue, 28 Mar 2023 01:59:35 +0300 Subject: [PATCH] Properly handle libcurl flags in CMakeLists.txt on Windows (#1079) --- CMakeLists.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 0eaefdb6..e672839c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -149,7 +149,10 @@ if(WIN32) enable_language(RC) set(CMAKE_RC_COMPILER windres) set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -static") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CURL_STATIC_LDFLAGS} ${CURL_STATIC_CFLAGS}") + + add_definitions(-DCURL_STATICLIB) + include_directories(${CURL_STATIC_INCLUDE_DIRS}) + link_directories(${CURL_STATIC_LIBRARY_DIRS}) add_compile_definitions(SUNSHINE_PLATFORM="windows") add_subdirectory(tools) # This is temporary, only tools for Windows are needed, for now