From 9b668d310902b67f57b13b5b730b3500116809cb Mon Sep 17 00:00:00 2001 From: crueter Date: Mon, 6 Jul 2026 15:12:08 -0400 Subject: [PATCH] [cmake] Simplify DetectPlatform and normalize platform names Since 3.25 introduced `LINUX`, standard everything to that style. It also introduced BSD so use that. Signed-off-by: crueter --- CMakeLists.txt | 30 +++--- CMakeModules/find/FindOpus.cmake | 2 +- CMakeModules/find/Findenet.cmake | 2 +- CMakeModules/find/Findlibusb.cmake | 2 +- CMakeModules/find/Findlz4.cmake | 2 +- externals/CMakeLists.txt | 2 +- externals/cmake-modules/DetectPlatform.cmake | 103 +++++-------------- externals/ffmpeg/CMakeLists.txt | 10 +- externals/libusb/CMakeLists.txt | 2 +- src/CMakeLists.txt | 2 +- src/core/CMakeLists.txt | 2 +- src/dynarmic/CMakeLists.txt | 2 +- src/dynarmic/src/dynarmic/CMakeLists.txt | 2 +- src/network/CMakeLists.txt | 2 +- src/video_core/host_shaders/CMakeLists.txt | 2 +- src/yuzu/CMakeLists.txt | 2 +- 16 files changed, 56 insertions(+), 113 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 1039ddfed4..828c0bbf95 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -28,23 +28,23 @@ if (NOT DEFINED ARCHITECTURE) endif() # Needed for FFmpeg w/ VAAPI and DRM -if (PLATFORM_OPENBSD) +if (OPENBSD) # OpenBSD 7.8 broke libcxx when upgrading, so we must define the PSTL backend manually set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -I${CMAKE_SYSROOT}/usr/X11R6/include -D_LIBCPP_PSTL_BACKEND_SERIAL=1") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -I${CMAKE_SYSROOT}/usr/X11R6/include -D_LIBCPP_PSTL_BACKEND_SERIAL=1") set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -L${CMAKE_SYSROOT}/usr/X11R6/lib") -elseif (PLATFORM_NETBSD) +elseif (NETBSD) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -I${CMAKE_SYSROOT}/usr/X11R7/include -I${CMAKE_SYSROOT}/usr/pkg/include/c++/v1") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -I${CMAKE_SYSROOT}/usr/X11R7/include -I${CMAKE_SYSROOT}/usr/pkg/include/c++/v1") set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -L${CMAKE_SYSROOT}/usr/X11R7/lib") endif() # NetBSD: Fun for the whole family! -if (PLATFORM_NETBSD) +if (NETBSD) set(ENV{PKG_CONFIG_PATH} "${PKG_CONFIG_PATH}:${CMAKE_SYSROOT}/usr/pkg/lib/ffmpeg7/pkgconfig") endif() -cmake_dependent_option(YUZU_STATIC_ROOM "Build a static room executable only (CI only)" OFF "PLATFORM_LINUX" OFF) +cmake_dependent_option(YUZU_STATIC_ROOM "Build a static room executable only (CI only)" OFF "LINUX" OFF) if (YUZU_STATIC_ROOM) set(YUZU_ROOM ON) set(YUZU_ROOM_STANDALONE ON) @@ -210,7 +210,7 @@ endif() # ffmpeg option(YUZU_USE_BUNDLED_FFMPEG "Download bundled FFmpeg" ${EXT_DEFAULT}) -cmake_dependent_option(YUZU_USE_EXTERNAL_FFMPEG "Build FFmpeg from external source" "${PLATFORM_SUN}" "NOT WIN32 AND NOT ANDROID" OFF) +cmake_dependent_option(YUZU_USE_EXTERNAL_FFMPEG "Build FFmpeg from external source" "${SOLARIS}" "NOT WIN32 AND NOT ANDROID" OFF) # sirit set(BUNDLED_SIRIT_DEFAULT OFF) @@ -221,7 +221,7 @@ endif() option(YUZU_USE_BUNDLED_SIRIT "Download bundled sirit" ${BUNDLED_SIRIT_DEFAULT}) # FreeBSD 15+ has libusb, versions below should disable it -cmake_dependent_option(ENABLE_LIBUSB "Enable the use of LibUSB" ON "WIN32 OR PLATFORM_LINUX OR PLATFORM_FREEBSD OR APPLE" OFF) +cmake_dependent_option(ENABLE_LIBUSB "Enable the use of LibUSB" ON "WIN32 OR LINUX OR FREEBSD OR APPLE" OFF) cmake_dependent_option(ENABLE_OPENGL "Enable OpenGL" ON "NOT (WIN32 AND ARCHITECTURE_arm64) AND NOT APPLE" OFF) mark_as_advanced(FORCE ENABLE_OPENGL) @@ -235,7 +235,7 @@ option(YUZU_TESTS "Compile tests" "${BUILD_TESTING}") # Install udev rules on Linux (mainly for gyros) # Only acts on joysticks and nothing else. -cmake_dependent_option(YUZU_INSTALL_UDEV_RULES "Install udev rules for gyro access" OFF "PLATFORM_LINUX" OFF) +cmake_dependent_option(YUZU_INSTALL_UDEV_RULES "Install udev rules for gyro access" OFF "LINUX" OFF) option(YUZU_DOWNLOAD_ANDROID_VVL "Download validation layer binary for android" ON) @@ -248,7 +248,7 @@ cmake_dependent_option(YUZU_ROOM_STANDALONE "Enable standalone room executable" cmake_dependent_option(YUZU_CMD "Compile the eden-cli executable" ON "NOT ANDROID" OFF) -cmake_dependent_option(YUZU_CRASH_DUMPS "Compile crash dump (Minidump) support" OFF "WIN32 OR PLATFORM_LINUX" OFF) +cmake_dependent_option(YUZU_CRASH_DUMPS "Compile crash dump (Minidump) support" OFF "WIN32 OR LINUX" OFF) option(YUZU_DOWNLOAD_TIME_ZONE_DATA "Always download time zone binaries" ON) set(YUZU_TZDB_PATH "" CACHE STRING "Path to a pre-downloaded timezone database") @@ -258,7 +258,7 @@ cmake_dependent_option(YUZU_USE_BUNDLED_MOLTENVK "Download bundled MoltenVK lib" option(YUZU_DISABLE_LLVM "Disable LLVM (useful for CI)" OFF) set(DEFAULT_YUZU_USE_BUNDLED_OPENSSL OFF) -if (EXT_DEFAULT OR PLATFORM_SUN OR PLATFORM_OPENBSD) +if (EXT_DEFAULT OR SOLARIS OR OPENBSD) set(DEFAULT_YUZU_USE_BUNDLED_OPENSSL ON) endif() @@ -281,7 +281,7 @@ if(EXISTS ${PROJECT_SOURCE_DIR}/hooks/pre-commit AND NOT EXISTS ${PROJECT_SOURCE endif() endif() -if (ARCHITECTURE_arm64 AND (ANDROID OR PLATFORM_LINUX)) +if (ARCHITECTURE_arm64 AND (ANDROID OR LINUX)) set(HAS_NCE 1) add_compile_definitions(HAS_NCE=1) endif() @@ -290,7 +290,7 @@ if (YUZU_ROOM) add_compile_definitions(YUZU_ROOM) endif() -if (UNIX AND NOT (PLATFORM_LINUX OR WIN32)) +if (UNIX AND NOT (LINUX OR WIN32)) if(CXX_APPLE OR CXX_CLANG) # libc++ has stop_token and jthread as experimental set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fexperimental-library") @@ -404,7 +404,7 @@ if (Boost_ADDED) if (NOT MSVC OR CXX_CLANG) # boost sucks - if (PLATFORM_SUN) + if (SOLARIS) add_compile_options($<$:-pthreads>) endif() @@ -508,9 +508,9 @@ elseif (WIN32) # PSAPI is the Process Status API set(PLATFORM_LIBRARIES ${PLATFORM_LIBRARIES} psapi imm32 version crypt32 rpcrt4 gdi32 wldap32 mswsock) endif() -elseif (PLATFORM_MANAGARM) +elseif (MANAGARM) set(PLATFORM_LIBRARIES iconv intl) -elseif (PLATFORM_HAIKU) +elseif (HAIKUOS) # Haiku is so special :) set(PLATFORM_LIBRARIES bsd /boot/system/lib/libnetwork.so) elseif (CMAKE_SYSTEM_NAME MATCHES "^(Linux|kFreeBSD|GNU|SunOS)$") @@ -604,7 +604,7 @@ if (ENABLE_QT) # Best practice is to ask for all components at once, so they are from the same version set(YUZU_QT_COMPONENTS Core Widgets Charts Concurrent Gui) - if (PLATFORM_LINUX OR PLATFORM_FREEBSD) + if (LINUX OR FREEBSD) list(APPEND YUZU_QT_COMPONENTS DBus) # yes Qt, we get it set(QT_NO_PRIVATE_MODULE_WARNING ON) diff --git a/CMakeModules/find/FindOpus.cmake b/CMakeModules/find/FindOpus.cmake index a4247f06db..257642682e 100644 --- a/CMakeModules/find/FindOpus.cmake +++ b/CMakeModules/find/FindOpus.cmake @@ -13,7 +13,7 @@ find_package_handle_standard_args(Opus VERSION_VAR OPUS_VERSION ) -if (PLATFORM_MSYS) +if (MSYS2) FixMsysPath(PkgConfig::OPUS) endif() diff --git a/CMakeModules/find/Findenet.cmake b/CMakeModules/find/Findenet.cmake index 2a2d1d807d..0b366542fe 100644 --- a/CMakeModules/find/Findenet.cmake +++ b/CMakeModules/find/Findenet.cmake @@ -14,7 +14,7 @@ find_package_handle_standard_args(enet VERSION_VAR ENET_VERSION ) -if (PLATFORM_MSYS) +if (MSYS2) FixMsysPath(PkgConfig::ENET) endif() diff --git a/CMakeModules/find/Findlibusb.cmake b/CMakeModules/find/Findlibusb.cmake index dee8187d81..65f19ea958 100644 --- a/CMakeModules/find/Findlibusb.cmake +++ b/CMakeModules/find/Findlibusb.cmake @@ -14,7 +14,7 @@ find_package_handle_standard_args(libusb VERSION_VAR LIBUSB_VERSION ) -if (PLATFORM_MSYS) +if (MSYS2) FixMsysPath(PkgConfig::LIBUSB) endif() diff --git a/CMakeModules/find/Findlz4.cmake b/CMakeModules/find/Findlz4.cmake index 13235d7ac8..d4f2153162 100644 --- a/CMakeModules/find/Findlz4.cmake +++ b/CMakeModules/find/Findlz4.cmake @@ -13,7 +13,7 @@ else() find_package(PkgConfig QUIET) pkg_search_module(LZ4 QUIET IMPORTED_TARGET liblz4) - if (PLATFORM_MSYS) + if (MSYS2) FixMsysPath(PkgConfig::LZ4) endif() diff --git a/externals/CMakeLists.txt b/externals/CMakeLists.txt index aafa518ed2..f190f68b9d 100644 --- a/externals/CMakeLists.txt +++ b/externals/CMakeLists.txt @@ -164,7 +164,7 @@ if (NOT ANDROID) AddJsonPackage(sdl3) else() message(STATUS "Using bundled SDL3") - if (PLATFORM_FREEBSD) + if (FREEBSD) set(BUILD_SHARED_LIBS ON) endif() AddJsonPackage(sdl3-ci) diff --git a/externals/cmake-modules/DetectPlatform.cmake b/externals/cmake-modules/DetectPlatform.cmake index de1a85b793..0f7cdfcf46 100644 --- a/externals/cmake-modules/DetectPlatform.cmake +++ b/externals/cmake-modules/DetectPlatform.cmake @@ -1,45 +1,46 @@ -# SPDX-FileCopyrightText: Copyright 2025 crueter +# SPDX-FileCopyrightText: Copyright 2026 crueter # SPDX-License-Identifier: LGPL-3.0-or-later ## DetectPlatform ## -# This is a small helper that sets PLATFORM_ variables for various +# This is a small helper that sets platform variables for various # operating systems and distributions. Note that Apple, Windows, Android, etc. # are not covered, as CMake already does that for us. # It also sets CXX_ for the C++ compiler. -# Furthermore, some platforms have really silly requirements/quirks, so this -# also does a few of those. - # This module contains contributions from the Eden Emulator Project, # notably from crueter and Lizzie. if (${CMAKE_SYSTEM_NAME} STREQUAL "SunOS") - set(PLATFORM_SUN ON) + set(SOLARIS ON) elseif (${CMAKE_SYSTEM_NAME} STREQUAL "OpenOrbis") - set(PLATFORM_PS4 ON) + set(OPENORBIS ON) elseif (${CMAKE_SYSTEM_NAME} STREQUAL "managarm") - set(PLATFORM_MANAGARM ON) -elseif (${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD") - set(PLATFORM_FREEBSD ON) -elseif (${CMAKE_SYSTEM_NAME} STREQUAL "OpenBSD") - set(PLATFORM_OPENBSD ON) -elseif (${CMAKE_SYSTEM_NAME} STREQUAL "NetBSD") - set(PLATFORM_NETBSD ON) -elseif (${CMAKE_SYSTEM_NAME} STREQUAL "DragonFly") - set(PLATFORM_DRAGONFLYBSD ON) + set(MANAGARM ON) elseif (${CMAKE_SYSTEM_NAME} STREQUAL "Haiku") - set(PLATFORM_HAIKU ON) -elseif (${CMAKE_SYSTEM_NAME} STREQUAL "Linux") - set(PLATFORM_LINUX ON) + set(HAIKUOS ON) +endif() + +# BSD +if (DEFINED BSD) + if ("${BSD}" STREQUAL "DragonFlyBSD") + set(DRAGONFLYBSD ON) + elseif ("${BSD}" STREQUAL "FreeBSD") + set(FREEBSD ON) + elseif ("${BSD}" STREQUAL "OpenBSD") + set(OPENBSD ON) + elseif ("${BSD}" STREQUAL "NetBSD") + set(NETBSD ON) + endif() endif() # dumb heuristic to detect msys2 if (CMAKE_COMMAND MATCHES "msys64") - set(PLATFORM_MSYS ON) + set(MSYS2 ON) endif() +# compiler checks if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang") set(CXX_CLANG ON) if (MSVC) @@ -47,8 +48,6 @@ if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang") endif() elseif (CMAKE_CXX_COMPILER_ID STREQUAL "GNU") set(CXX_GCC ON) -elseif (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") - set(CXX_CL ON) elseif (CMAKE_CXX_COMPILER_ID STREQUAL "IntelLLVM") set(CXX_ICC ON) elseif (CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang") @@ -61,37 +60,13 @@ if(MINGW AND CXX_CLANG) set(CMAKE_SYSTEM_VERSION 10.0.0) endif() -# NB: this does not account for SPARC -if (PLATFORM_SUN) - # Terrific OpenIndiana pkg shenanigans - list(APPEND CMAKE_PREFIX_PATH - "${CMAKE_SYSROOT}/usr/lib/qt/6.6/lib/amd64/cmake") - list(APPEND CMAKE_MODULE_PATH - "${CMAKE_SYSROOT}/usr/lib/qt/6.6/lib/amd64/cmake") - - # Amazing - absolutely incredible - list(APPEND CMAKE_PREFIX_PATH "${CMAKE_SYSROOT}/usr/lib/amd64/cmake") - list(APPEND CMAKE_MODULE_PATH "${CMAKE_SYSROOT}/usr/lib/amd64/cmake") - - # For some mighty reason, doing a normal release build sometimes - # may not trigger the proper -O3 switch to materialize - if (CMAKE_BUILD_TYPE MATCHES "Release") - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O3") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3") - endif() - if (CMAKE_BUILD_TYPE MATCHES "RelWithDebInfo") - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O2") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O2") - endif() -endif() - # MSYS2 utilities # Sometimes, PkgConfig modules will incorrectly reference / when CMake # wants you to reference it as C:/msys64/. This function corrects that. # Example in a Find module: #[[ - if (PLATFORM_MSYS) + if (MSYS2) FixMsysPath(PkgConfig::OPUS) endif() ]] @@ -116,41 +91,9 @@ function(FixMsysPath target) INTERFACE_INCLUDE_DIRECTORIES ${include_dir}) endfunction() -# MSYSTEM handling + program_path -if (PLATFORM_MSYS) - # really, really dumb heuristic to detect what environment we are in - macro(system var) - if (CMAKE_COMMAND MATCHES ${var}) - set(MSYSTEM ${var}) - endif() - endmacro() - - system(mingw64) - system(clang64) - system(clangarm64) - system(ucrt64) - - if (NOT DEFINED MSYSTEM) - set(MSYSTEM msys2) - endif() - - # We generally want to prioritize environment-specific binaries if possible - # some, like autoconf, are not present on environments besides msys2 though - set(CMAKE_PROGRAM_PATH C:/msys64/${MSYSTEM}/bin C:/msys64/usr/bin) - set(ENV{PKG_CONFIG_PATH} C:/msys64/${MSYSTEM}/lib/pkgconfig) -endif() - -# This saves a truly ridiculous amount of time during linking -# In my tests, without this, Eden takes 2 mins, with this, it takes 3-5 seconds -# or on GitHub Actions, 10 minutes -> 3 seconds +# Saves linking time if (MINGW) set(MINGW_FLAGS "-Wl,--strip-all -Wl,--gc-sections") set(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} ${MINGW_FLAGS}") endif() - -# awesome -if (PLATFORM_FREEBSD OR PLATFORM_DRAGONFLYBSD) - set(CMAKE_EXE_LINKER_FLAGS - "${CMAKE_EXE_LINKER_FLAGS} -L${CMAKE_SYSROOT}/usr/local/lib") -endif() diff --git a/externals/ffmpeg/CMakeLists.txt b/externals/ffmpeg/CMakeLists.txt index 0baff02c84..6e3f675f2b 100644 --- a/externals/ffmpeg/CMakeLists.txt +++ b/externals/ffmpeg/CMakeLists.txt @@ -56,7 +56,7 @@ if (NOT YUZU_USE_BUNDLED_FFMPEG) endif() endif() -if (PLATFORM_PS4 OR PLATFORM_MANAGARM) +if (OPENORBIS OR MANAGARM) # Doesn't support VA-API, don't go thru the embarrassment of trying to enable it list(APPEND FFmpeg_HWACCEL_FLAGS --disable-vaapi) elseif (ANDROID) @@ -75,7 +75,7 @@ elseif (UNIX AND NOT DEFINED FFmpeg_IS_CROSS_COMPILING AND NOT ANDROID) if(X11_FOUND) if (NOT APPLE) # In Solaris needs explicit linking for ffmpeg which links to /lib/amd64/libX11.so - if(PLATFORM_SUN) + if(SOLARIS) list(APPEND FFmpeg_HWACCEL_LIBRARIES X11 "${CMAKE_SYSROOT}/usr/lib/xorg/amd64/libdrm.so") @@ -158,7 +158,7 @@ elseif (UNIX AND NOT DEFINED FFmpeg_IS_CROSS_COMPILING AND NOT ANDROID) endif() endif() -if (PLATFORM_PS4) +if (OPENORBIS) list(APPEND FFmpeg_CROSS_COMPILE_LIBS -lkernel -lSceUserService @@ -172,7 +172,7 @@ if (PLATFORM_PS4) --extra-cxxflags=${CMAKE_SYSROOT}/usr/include --extra-libs="${FFmpeg_CROSS_COMPILE_LIBS}" ) -elseif (PLATFORM_MANAGARM) +elseif (MANAGARM) # Required for proper stuff list(APPEND FFmpeg_CROSS_COMPILE_FLAGS --disable-pthreads @@ -299,7 +299,7 @@ else() set(FFmpeg_BUILD_LIBRARIES ${FFmpeg_LIBRARIES}) # BSD make or Solaris make don't support ffmpeg make-j8 - if (PLATFORM_LINUX OR ANDROID OR APPLE OR WIN32 OR PLATFORM_FREEBSD) + if (LINUX OR ANDROID OR APPLE OR WIN32 OR FREEBSD) set(FFmpeg_MAKE_ARGS -j${SYSTEM_THREADS}) else() set(FFmpeg_MAKE_ARGS "") diff --git a/externals/libusb/CMakeLists.txt b/externals/libusb/CMakeLists.txt index 47b54f43cc..f33b5d1646 100644 --- a/externals/libusb/CMakeLists.txt +++ b/externals/libusb/CMakeLists.txt @@ -11,7 +11,7 @@ if (NOT libusb_ADDED) endif() # TODO: *BSD fails to compile--may need different configs/symbols -if (MINGW OR PLATFORM_LINUX OR APPLE) +if (MINGW OR LINUX OR APPLE) set(LIBUSB_FOUND ON CACHE BOOL "libusb is present" FORCE) set(LIBUSB_VERSION "1.0.24" CACHE STRING "libusb version string" FORCE) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index a6d526c5eb..44cdf9afe1 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -181,7 +181,7 @@ else() if (ARCHITECTURE_x86_64) add_compile_options($<$:-mcx16>) - if (PLATFORM_LINUX OR PLATFORM_FREEBSD) + if (LINUX OR FREEBSD) add_compile_options($<$:-mtls-dialect=gnu2>) endif() endif() diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt index 16806ff0c0..f90032a24d 100644 --- a/src/core/CMakeLists.txt +++ b/src/core/CMakeLists.txt @@ -1173,7 +1173,7 @@ add_library(core STATIC if (ENABLE_WIFI_SCAN) target_sources(core PRIVATE internal_network/wifi_scanner.cpp) - if (PLATFORM_LINUX) + if (LINUX) target_link_libraries(core PRIVATE iw) endif() else() diff --git a/src/dynarmic/CMakeLists.txt b/src/dynarmic/CMakeLists.txt index 46b0b618e8..d733dc6a09 100644 --- a/src/dynarmic/CMakeLists.txt +++ b/src/dynarmic/CMakeLists.txt @@ -25,7 +25,7 @@ endif() # Dynarmic project options option(DYNARMIC_ENABLE_CPU_FEATURE_DETECTION "Turning this off causes dynarmic to assume the host CPU doesn't support anything later than SSE3" ON) -if (PLATFORM_OPENBSD OR PLATFORM_DRAGONFLY OR PLATFORM_NETBSD) +if (OPENBSD OR DRAGONFLY OR NETBSD) set(REQUIRE_WX ON) else() set(REQUIRE_WX OFF) diff --git a/src/dynarmic/src/dynarmic/CMakeLists.txt b/src/dynarmic/src/dynarmic/CMakeLists.txt index 98fcea6333..ff5c4e7608 100644 --- a/src/dynarmic/src/dynarmic/CMakeLists.txt +++ b/src/dynarmic/src/dynarmic/CMakeLists.txt @@ -363,7 +363,7 @@ elseif (APPLE) backend/exception_handler_macos_mig.c ) endif() -elseif (UNIX AND NOT PLATFORM_HAIKU) +elseif (UNIX AND NOT HAIKUOS) # Haiku lacks if (CMAKE_SYSTEM_NAME STREQUAL "Linux") target_link_libraries(dynarmic PRIVATE rt) diff --git a/src/network/CMakeLists.txt b/src/network/CMakeLists.txt index 24b752ccc5..a0573b3b1f 100644 --- a/src/network/CMakeLists.txt +++ b/src/network/CMakeLists.txt @@ -28,6 +28,6 @@ if (ENABLE_WEB_SERVICE) endif() # Solaris uses /lib/amd64/libsocket.so and /lib/amd64/libnsl.so -if (PLATFORM_SUN) +if (SOLARIS) target_link_libraries(network PRIVATE socket nsl) endif() diff --git a/src/video_core/host_shaders/CMakeLists.txt b/src/video_core/host_shaders/CMakeLists.txt index 0d342c463d..5b8f47a7a6 100644 --- a/src/video_core/host_shaders/CMakeLists.txt +++ b/src/video_core/host_shaders/CMakeLists.txt @@ -88,7 +88,7 @@ set(SHADER_FILES ${CMAKE_CURRENT_SOURCE_DIR}/sgsr1_shader_mobile_edge_direction.frag ) -if (PLATFORM_HAIKU) +if (HAIKUOS) # glslangValidator WILL crash, glslang will not set(GLSLANGVALIDATOR "glslang") else() diff --git a/src/yuzu/CMakeLists.txt b/src/yuzu/CMakeLists.txt index 9fa3f3c85d..021ed9ee3e 100644 --- a/src/yuzu/CMakeLists.txt +++ b/src/yuzu/CMakeLists.txt @@ -8,7 +8,7 @@ set(CMAKE_INCLUDE_CURRENT_DIR ON) # Set the RPATH for Qt Libraries # This must be done before the `yuzu` target is created -if (YUZU_USE_BUNDLED_QT AND PLATFORM_LINUX) +if (YUZU_USE_BUNDLED_QT AND LINUX) set(CMAKE_BUILD_RPATH "${CMAKE_BINARY_DIR}/bin/lib/") endif()