Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixup: cmake: set variables before using them #1490

Merged
merged 1 commit into from
Jan 8, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 12 additions & 11 deletions cmake/DaemonGame.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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"))
Expand Down
Loading