mirror of
https://github.com/melonDS-emu/melonDS.git
synced 2025-06-28 01:49:42 -06:00
fix non static LTO windows build
This commit is contained in:
@ -75,9 +75,18 @@ if (CMAKE_BUILD_TYPE STREQUAL Release)
|
|||||||
add_link_options(-s)
|
add_link_options(-s)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if (WIN32)
|
||||||
|
option(BUILD_STATIC "Statically link dependencies" OFF)
|
||||||
|
endif()
|
||||||
|
|
||||||
if (ENABLE_LTO)
|
if (ENABLE_LTO)
|
||||||
add_compile_options(-flto -fPIC)
|
if (WIN32)
|
||||||
add_link_options(-flto -fuse-linker-plugin -pie)
|
add_compile_options(-flto)
|
||||||
|
add_link_options(-flto)
|
||||||
|
else()
|
||||||
|
add_compile_options(-flto -fPIC)
|
||||||
|
add_link_options(-flto -fuse-linker-plugin -pie)
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
||||||
@ -94,10 +103,6 @@ endif()
|
|||||||
|
|
||||||
option(BUILD_QT_SDL "Build Qt/SDL frontend" ON)
|
option(BUILD_QT_SDL "Build Qt/SDL frontend" ON)
|
||||||
|
|
||||||
if (WIN32)
|
|
||||||
option(BUILD_STATIC "Statically link dependencies" OFF)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
add_subdirectory(src)
|
add_subdirectory(src)
|
||||||
|
|
||||||
if (BUILD_QT_SDL)
|
if (BUILD_QT_SDL)
|
||||||
|
Reference in New Issue
Block a user