From 779906812a9ae3503a8cbd58eb7a57c7ce7a66eb Mon Sep 17 00:00:00 2001 From: Thomas Debesse Date: Wed, 8 Jan 2025 01:06:36 +0100 Subject: [PATCH] fixup: cmake: set variables before using them --- cmake/DaemonGame.cmake | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/cmake/DaemonGame.cmake b/cmake/DaemonGame.cmake index c9bfc751cf..70ca46a26c 100644 --- a/cmake/DaemonGame.cmake +++ b/cmake/DaemonGame.cmake @@ -26,17 +26,6 @@ include_directories(${MOUNT_DIR} ${LIB_DIR} ${LIB_DIR}/zlib) -# Do not report unused native compiler if native vms are not built. -# If only NACL vms are built, this will be reported in chainloaded build. -if (BUILD_GAME_NATIVE_DLL OR BUILD_GAME_NATIVE_EXE OR NACL) - include(DaemonPlatform) - include(DaemonNacl) - include(DaemonFlags) -endif() - -# Function to setup all the Sgame/Cgame libraries -include(CMakeParseArguments) - ## About the different ways to host/play games: ## Native DLL: no sandboxing, no cleaning up but debugger support. Use for dev. ## NaCl exe: sandboxing, no leaks, slightly slower, hard to debug. Use for regular players. @@ -49,6 +38,18 @@ option(BUILD_GAME_NATIVE_DLL "Build the shared library files, mostly useful for # can be loaded by daemon with vm.[sc]game.type 2 option(BUILD_GAME_NATIVE_EXE "Build native executable, which might be used for better performances by server owners" OFF) +include(DaemonPlatform) + +# Do not report unused native compiler if native vms are not built. +# If only NACL vms are built, this will be reported in chainloaded build. +if (BUILD_GAME_NATIVE_DLL OR BUILD_GAME_NATIVE_EXE OR NACL) + include(DaemonNacl) + include(DaemonFlags) +endif() + +# Function to setup all the Sgame/Cgame libraries +include(CMakeParseArguments) + # The NaCl SDK only runs on amd64 or i686. if (CMAKE_SYSTEM_NAME STREQUAL CMAKE_HOST_SYSTEM_NAME AND (ARCH STREQUAL "amd64" OR ARCH STREQUAL "i686"))