mirror of
https://github.com/LizardByte/Sunshine.git
synced 2025-08-10 00:52:16 +00:00
CMake: win32: fix API version, disable boost-cmake detection (#732)
This commit is contained in:
@@ -69,6 +69,11 @@ pkg_check_modules (CURL REQUIRED libcurl)
|
||||
if(NOT APPLE)
|
||||
set(Boost_USE_STATIC_LIBS ON) # cmake-lint: disable=C0103
|
||||
endif()
|
||||
if(WIN32)
|
||||
# workaround to prevent link errors against icudata, icui18n
|
||||
set(Boost_NO_BOOST_CMAKE ON) # cmake-lint: disable=C0103
|
||||
endif()
|
||||
|
||||
find_package(Boost COMPONENTS log filesystem program_options REQUIRED)
|
||||
|
||||
list(APPEND SUNSHINE_COMPILE_OPTIONS -Wall -Wno-missing-braces -Wno-maybe-uninitialized -Wno-sign-compare)
|
||||
@@ -79,10 +84,6 @@ if(WIN32)
|
||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -static")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CURL_STATIC_LDFLAGS} ${CURL_STATIC_CFLAGS}")
|
||||
|
||||
# WORKAROUND: /mingw64/include/_mingw.h r186 defines _WIN32_WINNT=0x601, but boost
|
||||
# is built against version 0x603 (BOOST_WINAPI_VERSION_WINBLUE) from r157 header.
|
||||
ADD_DEFINITIONS(-DBOOST_USE_WINAPI_VERSION=BOOST_WINAPI_VERSION_WINBLUE)
|
||||
|
||||
add_compile_definitions(SUNSHINE_PLATFORM="windows")
|
||||
add_subdirectory(tools) # This is temporary, only tools for Windows are needed, for now
|
||||
|
||||
|
||||
Reference in New Issue
Block a user