diff --git a/CMakeLists.txt b/CMakeLists.txt index 0437c0ebb..b05a175bb 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -8,7 +8,7 @@ set(CMAKE_CXX_STANDARD 23) set(CMAKE_CXX_STANDARD_REQUIRED True) if(APPLE) - enable_language(OBJC) + list(APPEND ADDITIONAL_LANGUAGES OBJC) set(CMAKE_OSX_DEPLOYMENT_TARGET 14) endif() @@ -16,7 +16,7 @@ if (NOT CMAKE_BUILD_TYPE) set(CMAKE_BUILD_TYPE Release) endif() -project(shadPS4 CXX C ASM) +project(shadPS4 CXX C ASM ${ADDITIONAL_LANGUAGES}) # Forcing PIE makes sure that the base address is high enough so that it doesn't clash with the PS4 memory. if(UNIX AND NOT APPLE) diff --git a/externals/CMakeLists.txt b/externals/CMakeLists.txt index 4ce5636d8..bb434677d 100644 --- a/externals/CMakeLists.txt +++ b/externals/CMakeLists.txt @@ -18,8 +18,6 @@ endif() # Boost if (NOT TARGET Boost::headers) - set(BOOST_ROOT "${CMAKE_SOURCE_DIR}/externals/ext-boost" CACHE STRING "") - set(Boost_NO_SYSTEM_PATHS ON CACHE BOOL "") add_subdirectory(ext-boost) endif() @@ -77,6 +75,7 @@ endif() # SDL3 if (NOT TARGET SDL3::SDL3) + set(SDL_TEST_LIBRARY OFF) set(SDL_PIPEWIRE OFF) add_subdirectory(sdl3) endif() @@ -131,6 +130,14 @@ endif() # Toml11 if (NOT TARGET toml11::toml11) add_subdirectory(toml11) + + if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang") + if (CMAKE_CXX_COMPILER_FRONTEND_VARIANT STREQUAL "MSVC") + get_target_property(_toml11_compile_options toml11 INTERFACE_COMPILE_OPTIONS) + list(REMOVE_ITEM _toml11_compile_options "/Zc:preprocessor") + set_target_properties(toml11 PROPERTIES INTERFACE_COMPILE_OPTIONS ${_toml11_compile_options}) + endif() + endif() endif() # xxHash diff --git a/externals/gcn/CMakeLists.txt b/externals/gcn/CMakeLists.txt index 592f28d0d..f5c612be1 100644 --- a/externals/gcn/CMakeLists.txt +++ b/externals/gcn/CMakeLists.txt @@ -3,6 +3,10 @@ project(gcn LANGUAGES CXX) -add_library(gcn dummy.cpp) +add_library(gcn INTERFACE) +target_sources(gcn PRIVATE + "include/gcn/si_ci_vi_merged_offset.h" + "include/gcn/si_ci_vi_merged_pm4_it_opcodes.h" +) target_include_directories(gcn INTERFACE include) diff --git a/externals/gcn/dummy.cpp b/externals/gcn/dummy.cpp deleted file mode 100644 index 4fd1bb62d..000000000 --- a/externals/gcn/dummy.cpp +++ /dev/null @@ -1,2 +0,0 @@ -// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project -// SPDX-License-Identifier: GPL-2.0-or-later