Skip to content
Merged
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ build
external_deps/*
!external_deps/build.sh
!external_deps/sdk-build.sh
!external_deps/versions.cmake
!external_deps/cygtar.py
!external_deps/*.patch

Expand Down
4 changes: 1 addition & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -204,9 +204,7 @@ else()
set(FULL_OUTPUT_DIR ${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR})
endif()

# Dependencies versions
set(DEPS_VERSION 11) # This must match the number in external_deps/build.sh
set(SAIGOSDK_VERSION 20261030) # This must match the number in external_deps/sdk-build.sh
include(${CMAKE_CURRENT_SOURCE_DIR}/external_deps/versions.cmake)

option(USE_EXTERNAL_DEPS "Download or reuse dependencies from EXTERNAL_DEPS_DIR (mandatory for building and running NaCl .nexe binaries)." ON)

Expand Down
7 changes: 3 additions & 4 deletions external_deps/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,9 @@ set -u -e -o pipefail
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)"
WORK_DIR="${PWD}"

# This should match the DEPS_VERSION in CMakeLists.txt.
# This is mostly to ensure the path the files end up at if you build deps yourself
# are the same as the ones when extracting from the downloaded packages.
DEPS_VERSION=11
# Define DEPS_VERSION
versions_out="$(cmake -P "${SCRIPT_DIR}/versions.cmake" 2>&1)"
eval "${versions_out}"

# Package download pages
PKGCONFIG_BASEURL='https://pkg-config.freedesktop.org/releases'
Expand Down
9 changes: 3 additions & 6 deletions external_deps/sdk-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,9 @@ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)"
WORK_DIR="${PWD}"
DOWNLOAD_DIR="${WORK_DIR}/download_cache"

# This should match the SAIGOSDK_VERSION in CMakeLists.txt.
# This is mostly to ensure the path the files end up at if you build deps yourself
# are the same as the ones when extracting from the downloaded packages.
SAIGOSDK_VERSION=20261030
# Can be a tag like v${SAIGOSDK_VERSION}, or a full commit hash
SAIGOSDK_REF="v${SAIGOSDK_VERSION}"
# Define SAIGOSDK_VERSION/SAIGOSDK_REF
versions_out="$(cmake -P "${SCRIPT_DIR}/versions.cmake" 2>&1)"
eval "${versions_out}"

REPO_BASENAME=saigo-nacl-sdk
REPO_URL="https://github.com/DaemonEngine/${REPO_BASENAME}"
Expand Down
49 changes: 49 additions & 0 deletions external_deps/versions.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# Daemon BSD Source Code
# Copyright (c) 2026, Daemon Developers
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# * Neither the name of the Daemon developers nor the
# names of its contributors may be used to endorse or promote products
# derived from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
# DISCLAIMED. IN NO EVENT SHALL DAEMON DEVELOPERS BE LIABLE FOR ANY
# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

macro(DefineVersionConstant name value)
set(${name} "${value}")
if (CMAKE_SCRIPT_MODE_FILE MATCHES versions.cmake)
# For use by shell scripts via cmake -P mode
message("${name}='${value}'")
endif()
endmacro()


# DEPS_VERSION and SAIGOSDK_VERSION are used to version packages which may be auto-downloaded
# by CMake. The numbers are also included in the install path if you use the scripts to build them
# yourself, so that they end up in the same path used by the download.

# Version for the target-specific library and runtime dependencies package.
# Can be auto-downloaded by CMake or built with build.sh.
DefineVersionConstant(DEPS_VERSION 11)

# Version for the host mode Saigo NaCl SDK package.
# Can be auto-downloaded by CMake (when building NaCl gamelogic) or built with sdk-build.sh.
DefineVersionConstant(SAIGOSDK_VERSION 20261030)
# Only used by sdk-build.sh, but it's closely coupled to SAIGOSDK_VERSION.
# Can be a tag like v${SAIGOSDK_VERSION}, or a full commit hash.
DefineVersionConstant(SAIGOSDK_REF "v${SAIGOSDK_VERSION}")
Loading