mirror of
https://github.com/libretro/pcsx2.git
synced 2024-11-23 17:29:46 +00:00
CMake: Fix issues with linkers failing on Linux
This commit is contained in:
parent
1b3c3efcd5
commit
a346cff472
@ -1,6 +1,6 @@
|
||||
# Setting it to a range tells it that it supports the features on the newer
|
||||
# versions as well, avoiding setting policies.
|
||||
cmake_minimum_required(VERSION 3.11...3.22)
|
||||
cmake_minimum_required(VERSION 3.12...3.24)
|
||||
|
||||
if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR})
|
||||
message(FATAL_ERROR "PCSX2 does not support in-tree builds. Please make a build directory that is not the PCSX2 source directory and generate your CMake project there using either `cmake -B build_directory` or by running cmake from the build directory.")
|
||||
|
@ -6,7 +6,12 @@ add_library(PCSX2_FLAGS INTERFACE)
|
||||
if (NOT PCSX2_CORE)
|
||||
add_executable(PCSX2)
|
||||
else()
|
||||
add_library(PCSX2)
|
||||
if(DISABLE_ADVANCE_SIMD OR LTO_PCSX2_CORE)
|
||||
# Fixes issues with some compiler + linker combinations
|
||||
add_library(PCSX2 OBJECT)
|
||||
else()
|
||||
add_library(PCSX2)
|
||||
endif()
|
||||
target_compile_definitions(PCSX2_FLAGS INTERFACE
|
||||
"PCSX2_CORE"
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user