Properly handle libcurl flags in CMakeLists.txt on Windows (#1079)

This commit is contained in:
ns6089 2023-03-28 01:59:35 +03:00 committed by GitHub
parent 014ca7e8a1
commit be74b740f5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -149,7 +149,10 @@ if(WIN32)
enable_language(RC) enable_language(RC)
set(CMAKE_RC_COMPILER windres) set(CMAKE_RC_COMPILER windres)
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -static") 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_compile_definitions(SUNSHINE_PLATFORM="windows")
add_subdirectory(tools) # This is temporary, only tools for Windows are needed, for now add_subdirectory(tools) # This is temporary, only tools for Windows are needed, for now