diff options
| author | crueter <crueter@eden-emu.dev> | 2026-08-10 04:57:38 +0200 |
|---|---|---|
| committer | crueter <crueter@eden-emu.dev> | 2026-08-10 04:57:38 +0200 |
| commit | 8648c27cbb4c17b176076b09ac245271829cbd9f (patch) | |
| tree | f3607735dbd240e9fedf6d10d1b910de81d7bcda /src | |
| parent | def76946f06dca0faecef4d33f308e2ed357f501 (diff) | |
[cmake] Simplify DetectPlatform and normalize platform names (#4183)
Since 3.25 introduced `LINUX` and `BSD`, use them, and standardize other platforms to that style
Signed-off-by: crueter <crueter@eden-emu.dev>
Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4183
Reviewed-by: Samuel <lizzie@eden-emu.dev>
Reviewed-by: CamilleLaVey <camillelavey99@gmail.com>
Diffstat (limited to 'src')
| -rw-r--r-- | src/CMakeLists.txt | 2 | ||||
| -rw-r--r-- | src/core/CMakeLists.txt | 2 | ||||
| -rw-r--r-- | src/dynarmic/CMakeLists.txt | 2 | ||||
| -rw-r--r-- | src/dynarmic/src/dynarmic/CMakeLists.txt | 2 | ||||
| -rw-r--r-- | src/network/CMakeLists.txt | 4 | ||||
| -rw-r--r-- | src/video_core/host_shaders/CMakeLists.txt | 2 | ||||
| -rw-r--r-- | src/yuzu/CMakeLists.txt | 2 |
7 files changed, 8 insertions, 8 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 882aff70f0..a2abc7d1b3 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -193,7 +193,7 @@ else() if (ARCHITECTURE_x86_64) add_compile_options($<$<COMPILE_LANGUAGE:C,CXX>:-mcx16>) - if (PLATFORM_LINUX OR PLATFORM_FREEBSD) + if (LINUX OR FREEBSD) add_compile_options($<$<COMPILE_LANGUAGE:C,CXX>:-mtls-dialect=gnu2>) endif() endif() diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt index 8e01a67c20..087fd796c6 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 <ucontext.h> 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..bb9c58e0a8 100644 --- a/src/network/CMakeLists.txt +++ b/src/network/CMakeLists.txt @@ -1,4 +1,4 @@ -# SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project +# SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project # SPDX-License-Identifier: GPL-3.0-or-later # SPDX-FileCopyrightText: 2022 yuzu Emulator Project @@ -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() |
