mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-06 15:01:28 +12:00
Fixed compilation with cmake on Windows (#16184)
* Fixed compilation with cmake on Windows * cleanup on post build actions for Windows on cmake solution + minor cleanup * fix link error on IntelJITEvents
This commit is contained in:
parent
4cd1d639ed
commit
18c01f7151
5 changed files with 137 additions and 58 deletions
4
3rdparty/OpenAL/CMakeLists.txt
vendored
4
3rdparty/OpenAL/CMakeLists.txt
vendored
|
@ -5,8 +5,8 @@ if(USE_SYSTEM_OPENAL)
|
|||
target_include_directories(3rdparty_openal INTERFACE ${OPENAL_INCLUDE_DIR})
|
||||
target_link_libraries(3rdparty_openal INTERFACE ${OPENAL_LIBRARY})
|
||||
else()
|
||||
option(ALSOFT_UTILS "Build utility programs" OFF)
|
||||
option(ALSOFT_EXAMPLES "Build example programs" OFF)
|
||||
option(ALSOFT_UTILS "Build utility programs" OFF)
|
||||
option(ALSOFT_EXAMPLES "Build example programs" OFF)
|
||||
add_subdirectory(openal-soft EXCLUDE_FROM_ALL)
|
||||
add_library(3rdparty_openal INTERFACE)
|
||||
target_link_libraries(3rdparty_openal INTERFACE OpenAL::OpenAL)
|
||||
|
|
13
3rdparty/llvm/CMakeLists.txt
vendored
13
3rdparty/llvm/CMakeLists.txt
vendored
|
@ -17,7 +17,10 @@ if(WITH_LLVM)
|
|||
option(LLVM_CCACHE_BUILD OFF)
|
||||
set(LLVM_ENABLE_WARNINGS OFF CACHE BOOL "Enable compiler warnings.")
|
||||
|
||||
if(WIN32 AND COMPILER_X86)
|
||||
# For Windows x86 (not Windows AArch64).
|
||||
# Check on MSVC is needed due to COMPILER_X86, COMPILER_ARM etc. are not set/supported by the MSVC compiler, if used.
|
||||
# Furthermore, the MSVC compiler is not available/supported on Windows AArch64
|
||||
if(WIN32 AND (COMPILER_X86 OR MSVC))
|
||||
set(LLVM_USE_INTEL_JITEVENTS ON)
|
||||
endif()
|
||||
|
||||
|
@ -70,12 +73,18 @@ if(WITH_LLVM)
|
|||
set(LLVM_TARGETS_TO_BUILD "X86" CACHE STRING "Semicolon-separated list of targets to build, or \"all\".")
|
||||
endif()
|
||||
endif()
|
||||
if((WIN32 AND BUILD_LLVM) OR (CMAKE_SYSTEM_NAME STREQUAL "Linux" AND COMPILER_X86))
|
||||
|
||||
# For Windows x86 (not Windows AArch64) only when BUILD_LLVM is enabled and
|
||||
# for Linux x86 (not Linux AArch64) even if BUILD_LLVM is disabled (precompiled llvm used)
|
||||
if(LLVM_USE_INTEL_JITEVENTS OR (CMAKE_SYSTEM_NAME STREQUAL "Linux" AND COMPILER_X86))
|
||||
list (APPEND LLVM_ADDITIONAL_LIBS IntelJITEvents)
|
||||
endif()
|
||||
|
||||
# For Linux even if BUILD_LLVM is disabled (precompiled llvm used)
|
||||
if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
||||
list (APPEND LLVM_ADDITIONAL_LIBS PerfJITEvents)
|
||||
endif()
|
||||
|
||||
llvm_map_components_to_libnames(LLVM_LIBS
|
||||
${LLVM_TARGETS_TO_BUILD}
|
||||
${LLVM_ADDITIONAL_LIBS}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue