From 39b205b957e0685b233b1f0fb84ec98a5f418276 Mon Sep 17 00:00:00 2001 From: "Azamat H. Hackimov" Date: Sun, 20 Oct 2024 21:55:46 +0300 Subject: [PATCH 1/5] Optimize building of HOG files and netgames libraries Don't force building HOG files if dependency files are up-to-date. Simplify building libraries by copying them into Descent3 directory. --- CMakeLists.txt | 11 ++++ Descent3/CMakeLists.txt | 29 +++++++++- cmake/HogMaker.cmake | 58 ++++++++++++++++++++ netcon/descent3onlineclient/CMakeLists.txt | 18 +++--- netcon/descent3onlineclient/d3online.d3c.txt | 1 - netcon/lanclient/CMakeLists.txt | 18 +++--- netcon/mtclient/CMakeLists.txt | 19 +++---- netgames/CMakeLists.txt | 13 ----- netgames/anarchy/CMakeLists.txt | 1 + netgames/coop/CMakeLists.txt | 1 + netgames/ctf/CMakeLists.txt | 1 + netgames/entropy/CMakeLists.txt | 1 + netgames/hoard/CMakeLists.txt | 1 + netgames/hyperanarchy/CMakeLists.txt | 1 + netgames/monsterball/CMakeLists.txt | 1 + netgames/roboanarchy/CMakeLists.txt | 1 + netgames/tanarchy/CMakeLists.txt | 1 + scripts/CMakeLists.txt | 34 ++++-------- 18 files changed, 141 insertions(+), 69 deletions(-) create mode 100644 cmake/HogMaker.cmake diff --git a/CMakeLists.txt b/CMakeLists.txt index 953373b5..1a81742f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -78,6 +78,8 @@ if(FORCE_COLORED_OUTPUT) endif() endif() +list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake") + include(GNUInstallDirs) if(FORCE_PORTABLE_INSTALL) set(CMAKE_INSTALL_BINDIR ".") @@ -110,6 +112,15 @@ if(BUILD_TESTING) add_subdirectory(tests) endif() +# Define names for HOG files +if(CMAKE_SYSTEM_NAME STREQUAL "Linux" OR CMAKE_SYSTEM_NAME STREQUAL "OpenBSD") + set(HOG_NAME "linux") +elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin") + set(HOG_NAME "osx") +elseif(CMAKE_SYSTEM_NAME STREQUAL "Windows") + set(HOG_NAME "win") +endif() + # rebuild d3_version.h every time add_custom_target(get_git_hash ALL) diff --git a/Descent3/CMakeLists.txt b/Descent3/CMakeLists.txt index 8cdd2755..4e29fd6e 100644 --- a/Descent3/CMakeLists.txt +++ b/Descent3/CMakeLists.txt @@ -344,7 +344,34 @@ target_link_libraries(Descent3 PRIVATE ${PLATFORM_LIBS}) target_include_directories(Descent3 PRIVATE ${PROJECT_BINARY_DIR}/lib) target_link_options(Descent3 PRIVATE $<$:/DEBUG:FULL>) -add_dependencies(Descent3 get_git_hash Direct_TCP_IP_Hog Descent3_Online_TCP_IP_Hog HogFull NetgamesDir Parallax_Online_Hog) +add_dependencies(Descent3 + get_git_hash + Direct_TCP_IP_Hog + Descent3_Online_TCP_IP_Hog + HogFull + Parallax_Online_Hog + anarchy + coop + ctf + entropy + hoard + hyperanarchy + monsterball + roboanarchy + tanarchy +) + +# Custom command for copying custom targets such HOG files +# We cannot use here TARGET_FILE_DIR generated expressions since custom target don't have one +add_custom_command(TARGET Descent3 POST_BUILD + COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_BINARY_DIR}/scripts/$/d3-${HOG_NAME}.hog" "$" + COMMAND ${CMAKE_COMMAND} -E make_directory "$/online" + COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_BINARY_DIR}/netcon/descent3onlineclient/$/Descent3 Online.d3c" "$/online" + COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_BINARY_DIR}/netcon/lanclient/$/Direct TCP~IP.d3c" "$/online" + COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_BINARY_DIR}/netcon/mtclient/$/Parallax Online.d3c" "$/online" + COMMENT "Copying HOG-files into Descent3 work dir" +) + install(TARGETS Descent3 RUNTIME BUNDLE DESTINATION .) if(MSVC) install(FILES $ DESTINATION ${CMAKE_INSTALL_BINDIR}) diff --git a/cmake/HogMaker.cmake b/cmake/HogMaker.cmake new file mode 100644 index 00000000..4f58acc8 --- /dev/null +++ b/cmake/HogMaker.cmake @@ -0,0 +1,58 @@ +# Descent 3 +# Copyright (C) 2024 Descent Developers +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + + +# - Function making a HOG file based on supplied filelist. +# +# This module provides function MakeHog() used for building HOG files. +# MakeHog() registers custom target TARGET which can be used as dependency. +# +# MakeHog( +# +# +# +# [SEARCH_PATH additional_dirs] +# [DEPENDS additional_dependencies] +# ) +# + +function(MakeHog) + set(options) + set(oneValueArgs INPUT_FILE OUTPUT TARGET) + set(multiValueArgs DEPENDS SEARCH_PATH) + + cmake_parse_arguments(PARSE_ARGV 0 + "HOG" + "${options}" + "${oneValueArgs}" + "${multiValueArgs}" + ) + + # Register custom target for tracking dependencies + add_custom_target("${HOG_TARGET}" + DEPENDS "${HOG_OUTPUT}" + ) + + add_custom_command(OUTPUT "${HOG_OUTPUT}" + COMMAND $ + "${HOG_OUTPUT}" + "${HOG_INPUT_FILE}" + "${HOG_SEARCH_PATH}" + DEPENDS HogMaker ${HOG_INPUT_FILE} ${HOG_DEPENDS} + COMMENT "Generate ${HOG_OUTPUT}" + COMMAND_EXPAND_LISTS + ) +endfunction() diff --git a/netcon/descent3onlineclient/CMakeLists.txt b/netcon/descent3onlineclient/CMakeLists.txt index 2fcdd697..fbf3255e 100644 --- a/netcon/descent3onlineclient/CMakeLists.txt +++ b/netcon/descent3onlineclient/CMakeLists.txt @@ -26,14 +26,12 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Darwin") set_target_properties(Descent3_Online_TCP_IP PROPERTIES SUFFIX ".dylib") endif() -add_custom_target(Descent3_Online_TCP_IP_Hog - COMMAND $ - "$/online/Descent3 Online.d3c" - "${CMAKE_SOURCE_DIR}/netcon/descent3onlineclient/d3online.d3c.txt" - "${CMAKE_SOURCE_DIR}/scripts/data/fullhog/" - "$" - - DEPENDS Descent3_Online_TCP_IP HogMaker - COMMENT "Generate 'Descent3 Online.d3c'" +include(HogMaker) +MakeHog( + TARGET Descent3_Online_TCP_IP_Hog + OUTPUT "$/Descent3 Online.d3c" + INPUT_FILE "${CMAKE_SOURCE_DIR}/netcon/descent3onlineclient/d3online.d3c.txt" + SEARCH_PATH "$" "${CMAKE_SOURCE_DIR}/scripts/data/fullhog/" + DEPENDS Descent3_Online_TCP_IP ) -install(FILES "$/online/Descent3 Online.d3c" DESTINATION ${CMAKE_INSTALL_DATADIR}/online) +install(FILES "${CMAKE_CURRENT_BINARY_DIR}/$/Descent3 Online.d3c" DESTINATION ${CMAKE_INSTALL_DATADIR}/online) diff --git a/netcon/descent3onlineclient/d3online.d3c.txt b/netcon/descent3onlineclient/d3online.d3c.txt index b9480aff..6ca42f50 100644 --- a/netcon/descent3onlineclient/d3online.d3c.txt +++ b/netcon/descent3onlineclient/d3online.d3c.txt @@ -4,4 +4,3 @@ Descent3 Online.dll Descent3 Online.dylib d3online_main.ogf d3online_game.ogf - diff --git a/netcon/lanclient/CMakeLists.txt b/netcon/lanclient/CMakeLists.txt index f6237c66..e8edf223 100644 --- a/netcon/lanclient/CMakeLists.txt +++ b/netcon/lanclient/CMakeLists.txt @@ -19,14 +19,12 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Darwin") set_target_properties(Direct_TCP_IP PROPERTIES SUFFIX ".dylib") endif() -add_custom_target(Direct_TCP_IP_Hog - COMMAND $ - "$/online/Direct TCP~IP.d3c" - "${CMAKE_SOURCE_DIR}/netcon/lanclient/TCP_IP.d3c.txt" - "${CMAKE_SOURCE_DIR}/scripts/data/fullhog/" - "$" - - DEPENDS Direct_TCP_IP HogMaker - COMMENT "Generate 'Direct TCP~IP.d3c'" +include(HogMaker) +MakeHog( + TARGET Direct_TCP_IP_Hog + OUTPUT "$/Direct TCP~IP.d3c" + INPUT_FILE "${CMAKE_SOURCE_DIR}/netcon/lanclient/TCP_IP.d3c.txt" + SEARCH_PATH "$" "${CMAKE_SOURCE_DIR}/scripts/data/fullhog/" + DEPENDS Direct_TCP_IP ) -install(FILES "$/online/Direct TCP~IP.d3c" DESTINATION ${CMAKE_INSTALL_DATADIR}/online) +install(FILES "${CMAKE_CURRENT_BINARY_DIR}/$/Direct TCP~IP.d3c" DESTINATION ${CMAKE_INSTALL_DATADIR}/online) diff --git a/netcon/mtclient/CMakeLists.txt b/netcon/mtclient/CMakeLists.txt index 5a85ad0a..81a689d9 100644 --- a/netcon/mtclient/CMakeLists.txt +++ b/netcon/mtclient/CMakeLists.txt @@ -29,14 +29,13 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Darwin") set_target_properties(Parallax_Online PROPERTIES SUFFIX ".dylib") endif() -add_custom_target(Parallax_Online_Hog - COMMAND $ - "$/online/Parallax Online.d3c" - "${CMAKE_SOURCE_DIR}/netcon/mtclient/Parallax_Online.d3c.txt" - "${CMAKE_SOURCE_DIR}/scripts/data/fullhog/" - "$" - - DEPENDS Parallax_Online HogMaker - COMMENT "Generate 'Parallax Online.d3c'" +include(HogMaker) +MakeHog( + TARGET Parallax_Online_Hog + OUTPUT "$/Parallax Online.d3c" + INPUT_FILE "${CMAKE_SOURCE_DIR}/netcon/mtclient/Parallax_Online.d3c.txt" + SEARCH_PATH "$" "${CMAKE_SOURCE_DIR}/scripts/data/fullhog/" + DEPENDS Parallax_Online ) -install(FILES "$/online/Parallax Online.d3c" DESTINATION ${CMAKE_INSTALL_DATADIR}/online) + +install(FILES "${CMAKE_CURRENT_BINARY_DIR}/$/Parallax Online.d3c" DESTINATION ${CMAKE_INSTALL_DATADIR}/online) diff --git a/netgames/CMakeLists.txt b/netgames/CMakeLists.txt index 18de0e0a..479a40d1 100644 --- a/netgames/CMakeLists.txt +++ b/netgames/CMakeLists.txt @@ -11,16 +11,3 @@ add_subdirectory(hyperanarchy) add_subdirectory(monsterball) add_subdirectory(roboanarchy) add_subdirectory(tanarchy) - -add_custom_target(NetgamesDir - COMMAND ${CMAKE_COMMAND} -E copy $ "$/netgames/Anarchy.d3m" - COMMAND ${CMAKE_COMMAND} -E copy $ "$/netgames/Co-op.d3m" - COMMAND ${CMAKE_COMMAND} -E copy $ "$/netgames/CTF.d3m" - COMMAND ${CMAKE_COMMAND} -E copy $ "$/netgames/Entropy.d3m" - COMMAND ${CMAKE_COMMAND} -E copy $ "$/netgames/Hoard.d3m" - COMMAND ${CMAKE_COMMAND} -E copy $ "$/netgames/Hyper-Anarchy.d3m" - COMMAND ${CMAKE_COMMAND} -E copy $ "$/netgames/Monsterball.d3m" - COMMAND ${CMAKE_COMMAND} -E copy $ "$/netgames/Robo-Anarchy.d3m" - COMMAND ${CMAKE_COMMAND} -E copy $ "$/netgames/Team Anarchy.d3m" - COMMENT "Create netgames/ directory" -) diff --git a/netgames/anarchy/CMakeLists.txt b/netgames/anarchy/CMakeLists.txt index 7783b4ca..96454d09 100644 --- a/netgames/anarchy/CMakeLists.txt +++ b/netgames/anarchy/CMakeLists.txt @@ -7,6 +7,7 @@ add_library(${NETGAME_MODULE} MODULE ${CPPS} ${HEADERS}) set_target_properties(${NETGAME_MODULE} PROPERTIES CXX_VISIBILITY_PRESET "hidden") set_target_properties(${NETGAME_MODULE} PROPERTIES PREFIX "") set_target_properties(${NETGAME_MODULE} PROPERTIES SUFFIX ".d3m") +set_target_properties(${NETGAME_MODULE} PROPERTIES LIBRARY_OUTPUT_DIRECTORY "$/netgames") target_link_libraries(${NETGAME_MODULE} PRIVATE dmfc diff --git a/netgames/coop/CMakeLists.txt b/netgames/coop/CMakeLists.txt index c69e2996..43111250 100644 --- a/netgames/coop/CMakeLists.txt +++ b/netgames/coop/CMakeLists.txt @@ -9,6 +9,7 @@ add_library(${NETGAME_MODULE} MODULE ${CPPS} ${HEADERS}) set_target_properties(${NETGAME_MODULE} PROPERTIES CXX_VISIBILITY_PRESET "hidden") set_target_properties(${NETGAME_MODULE} PROPERTIES PREFIX "") set_target_properties(${NETGAME_MODULE} PROPERTIES SUFFIX ".d3m") +set_target_properties(${NETGAME_MODULE} PROPERTIES LIBRARY_OUTPUT_DIRECTORY "$/netgames") target_link_libraries(${NETGAME_MODULE} PRIVATE dmfc diff --git a/netgames/ctf/CMakeLists.txt b/netgames/ctf/CMakeLists.txt index 211cd7a7..d226d1ee 100644 --- a/netgames/ctf/CMakeLists.txt +++ b/netgames/ctf/CMakeLists.txt @@ -7,6 +7,7 @@ add_library(${NETGAME_MODULE} MODULE ${CPPS} ${HEADERS}) set_target_properties(${NETGAME_MODULE} PROPERTIES CXX_VISIBILITY_PRESET "hidden") set_target_properties(${NETGAME_MODULE} PROPERTIES PREFIX "") set_target_properties(${NETGAME_MODULE} PROPERTIES SUFFIX ".d3m") +set_target_properties(${NETGAME_MODULE} PROPERTIES LIBRARY_OUTPUT_DIRECTORY "$/netgames") target_link_libraries(${NETGAME_MODULE} PRIVATE dmfc diff --git a/netgames/entropy/CMakeLists.txt b/netgames/entropy/CMakeLists.txt index ce4f7481..7a759f47 100644 --- a/netgames/entropy/CMakeLists.txt +++ b/netgames/entropy/CMakeLists.txt @@ -7,6 +7,7 @@ add_library(${NETGAME_MODULE} MODULE ${CPPS} ${HEADERS}) set_target_properties(${NETGAME_MODULE} PROPERTIES CXX_VISIBILITY_PRESET "hidden") set_target_properties(${NETGAME_MODULE} PROPERTIES PREFIX "") set_target_properties(${NETGAME_MODULE} PROPERTIES SUFFIX ".d3m") +set_target_properties(${NETGAME_MODULE} PROPERTIES LIBRARY_OUTPUT_DIRECTORY "$/netgames") target_link_libraries(${NETGAME_MODULE} PRIVATE dmfc diff --git a/netgames/hoard/CMakeLists.txt b/netgames/hoard/CMakeLists.txt index e5b5c779..523098d3 100644 --- a/netgames/hoard/CMakeLists.txt +++ b/netgames/hoard/CMakeLists.txt @@ -7,6 +7,7 @@ add_library(${NETGAME_MODULE} MODULE ${CPPS} ${HEADERS}) set_target_properties(${NETGAME_MODULE} PROPERTIES CXX_VISIBILITY_PRESET "hidden") set_target_properties(${NETGAME_MODULE} PROPERTIES PREFIX "") set_target_properties(${NETGAME_MODULE} PROPERTIES SUFFIX ".d3m") +set_target_properties(${NETGAME_MODULE} PROPERTIES LIBRARY_OUTPUT_DIRECTORY "$/netgames") target_link_libraries(${NETGAME_MODULE} PRIVATE dmfc diff --git a/netgames/hyperanarchy/CMakeLists.txt b/netgames/hyperanarchy/CMakeLists.txt index 4364cd7b..ee80cb3d 100644 --- a/netgames/hyperanarchy/CMakeLists.txt +++ b/netgames/hyperanarchy/CMakeLists.txt @@ -7,6 +7,7 @@ add_library(${NETGAME_MODULE} MODULE ${CPPS} ${HEADERS}) set_target_properties(${NETGAME_MODULE} PROPERTIES CXX_VISIBILITY_PRESET "hidden") set_target_properties(${NETGAME_MODULE} PROPERTIES PREFIX "") set_target_properties(${NETGAME_MODULE} PROPERTIES SUFFIX ".d3m") +set_target_properties(${NETGAME_MODULE} PROPERTIES LIBRARY_OUTPUT_DIRECTORY "$/netgames") target_link_libraries(${NETGAME_MODULE} PRIVATE dmfc diff --git a/netgames/monsterball/CMakeLists.txt b/netgames/monsterball/CMakeLists.txt index bfffff2d..b94037fa 100644 --- a/netgames/monsterball/CMakeLists.txt +++ b/netgames/monsterball/CMakeLists.txt @@ -7,6 +7,7 @@ add_library(${NETGAME_MODULE} MODULE ${CPPS} ${HEADERS}) set_target_properties(${NETGAME_MODULE} PROPERTIES CXX_VISIBILITY_PRESET "hidden") set_target_properties(${NETGAME_MODULE} PROPERTIES PREFIX "") set_target_properties(${NETGAME_MODULE} PROPERTIES SUFFIX ".d3m") +set_target_properties(${NETGAME_MODULE} PROPERTIES LIBRARY_OUTPUT_DIRECTORY "$/netgames") target_link_libraries(${NETGAME_MODULE} PRIVATE dmfc diff --git a/netgames/roboanarchy/CMakeLists.txt b/netgames/roboanarchy/CMakeLists.txt index aea13703..49dabd5e 100644 --- a/netgames/roboanarchy/CMakeLists.txt +++ b/netgames/roboanarchy/CMakeLists.txt @@ -7,6 +7,7 @@ add_library(${NETGAME_MODULE} MODULE ${CPPS} ${HEADERS}) set_target_properties(${NETGAME_MODULE} PROPERTIES CXX_VISIBILITY_PRESET "hidden") set_target_properties(${NETGAME_MODULE} PROPERTIES PREFIX "") set_target_properties(${NETGAME_MODULE} PROPERTIES SUFFIX ".d3m") +set_target_properties(${NETGAME_MODULE} PROPERTIES LIBRARY_OUTPUT_DIRECTORY "$/netgames") target_link_libraries(${NETGAME_MODULE} PRIVATE dmfc diff --git a/netgames/tanarchy/CMakeLists.txt b/netgames/tanarchy/CMakeLists.txt index 1d48e936..42ce3796 100644 --- a/netgames/tanarchy/CMakeLists.txt +++ b/netgames/tanarchy/CMakeLists.txt @@ -7,6 +7,7 @@ add_library(${NETGAME_MODULE} MODULE ${CPPS} ${HEADERS}) set_target_properties(${NETGAME_MODULE} PROPERTIES CXX_VISIBILITY_PRESET "hidden") set_target_properties(${NETGAME_MODULE} PROPERTIES PREFIX "") set_target_properties(${NETGAME_MODULE} PROPERTIES SUFFIX ".d3m") +set_target_properties(${NETGAME_MODULE} PROPERTIES LIBRARY_OUTPUT_DIRECTORY "$/netgames") target_link_libraries(${NETGAME_MODULE} PRIVATE dmfc diff --git a/scripts/CMakeLists.txt b/scripts/CMakeLists.txt index 7c09cc35..ece3ee7d 100644 --- a/scripts/CMakeLists.txt +++ b/scripts/CMakeLists.txt @@ -67,12 +67,8 @@ set(SCRIPTS SewerRat testscript TrainingMission - Y2K) - -#add_custom_target(HogDemo-copy -# COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_SOURCE_DIR}/scripts/data/demohog ${CMAKE_BINARY_DIR}/scripts/data/demohog/ -# COMMENT "Copy script/data/demohog directory" -#) + Y2K +) add_library(dallas STATIC DallasFuncs.cpp osiris_import.cpp osiris_vector.cpp) set_target_properties(dallas PROPERTIES PREFIX "") @@ -94,25 +90,15 @@ foreach(SCRIPT ${SCRIPTS}) endif() endforeach() -if(CMAKE_SYSTEM_NAME STREQUAL "Linux" OR CMAKE_SYSTEM_NAME STREQUAL "OpenBSD") - set(HOG_NAME "linux") -elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin") - set(HOG_NAME "osx") -elseif(CMAKE_SYSTEM_NAME STREQUAL "Windows") - set(HOG_NAME "win") -endif() - -add_custom_target(HogFull - COMMAND $ - "$/d3-${HOG_NAME}.hog" - "${CMAKE_SOURCE_DIR}/scripts/data/fullhog/d3-${HOG_NAME}-fullhog.txt" - "$" - DEPENDS ${SCRIPTS} HogMaker data/fullhog/d3-${HOG_NAME}-fullhog.txt - COMMENT "Generate fullhog/d3-${HOG_NAME}.hog" +include(HogMaker) +MakeHog( + TARGET HogFull + OUTPUT "$/d3-${HOG_NAME}.hog" + INPUT_FILE "${CMAKE_SOURCE_DIR}/scripts/data/fullhog/d3-${HOG_NAME}-fullhog.txt" + SEARCH_PATH "$" + DEPENDS ${SCRIPTS} ) - -# Place file next to Descent3 executable on installation -install(FILES "$/d3-${HOG_NAME}.hog" DESTINATION ${CMAKE_INSTALL_DATADIR}) +install(FILES "${CMAKE_CURRENT_BINARY_DIR}/$/d3-${HOG_NAME}.hog" DESTINATION ${CMAKE_INSTALL_DATADIR}) # FIXME: there may be only one d3-linux.hog, need deal with demo somehow. # add_custom_target(HogLinuxDemo From 46c6b55f5c62cd3570be48441347d9d0bf571088 Mon Sep 17 00:00:00 2001 From: "Azamat H. Hackimov" Date: Mon, 21 Oct 2024 18:13:49 +0300 Subject: [PATCH 2/5] Enable cross-compile environment for HogMaker Add CMAKE_CROSSCOMPILING conditional for HogMaker that makes it "external" tool in cross-compile environment, so we can use native HogMaker for cross-compiled targets. --- BUILD.md | 25 ++++++++++++++++++++++++- tools/CMakeLists.txt | 19 ++++++++++++------- 2 files changed, 36 insertions(+), 8 deletions(-) diff --git a/BUILD.md b/BUILD.md index f1d213a0..19a826b8 100644 --- a/BUILD.md +++ b/BUILD.md @@ -40,7 +40,7 @@ The build process uses [**CMake**](https://cmake.org/) and, by default, [**Ninja git clone --recurse-submodules https://github.com/DescentDevelopers/Descent3 ``` -4. **Build Descent3.** +3. **Build Descent3.** ```batch cd Descent3 @@ -149,6 +149,29 @@ Once CMake finishes, the built files will be put in `builds/mac/Descent3/Debug` Once CMake finishes, the built files will be put in `builds/linux/Descent3/Debug` or `builds/linux/Descent3/Release`. +## Cross-compilation + +In order to cross-compile Descent3 to another platform (for example, Linux ARM64), you'll need to build auxiliary +tools which needed to build data files. First create build-native directory and configure project in it: + +```shell +mkdir build-native +cd build-native +cmake .. +make HogMaker +``` + +Now you ready for cross-compilation. Create cross-compile directory and configure project in it, but this time add +`-DCMAKE_TOOLCHAIN_FILE=MyToolchain.cmake` and `-DHogMaker_DIR= Date: Mon, 21 Oct 2024 18:20:32 +0300 Subject: [PATCH 3/5] Don't rebuild HogMaker on each commit Remove configure-time dependency get_git_hash that cause to rebuild whole graph of dependencies (like HOG files). --- tools/CMakeLists.txt | 1 - tools/HogMaker/HogMaker.cpp | 3 +-- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt index 96dc070b..e1e98bec 100644 --- a/tools/CMakeLists.txt +++ b/tools/CMakeLists.txt @@ -6,7 +6,6 @@ else() HogMaker/HogFormat.cpp HogMaker/HogMaker.cpp ) - add_dependencies(HogMaker get_git_hash) target_include_directories(HogMaker PRIVATE ${PROJECT_BINARY_DIR}/lib) export(TARGETS HogMaker FILE "${CMAKE_BINARY_DIR}/HogMakerConfig.cmake") endif() diff --git a/tools/HogMaker/HogMaker.cpp b/tools/HogMaker/HogMaker.cpp index 0fde353e..1e1ee0ef 100644 --- a/tools/HogMaker/HogMaker.cpp +++ b/tools/HogMaker/HogMaker.cpp @@ -22,7 +22,6 @@ #include #include -#include "d3_version.h" #include "HogFormat.h" // TODO: To our descendants from the future: remove it when code will support C++20 @@ -48,7 +47,7 @@ int main(int argc, char *argv[]) { std::vector input_files; if (argc < 3) { - std::cout << "HogMaker v" << D3_MAJORVER << "." << D3_MINORVER << "." << D3_BUILD << "-g" << D3_GIT_HASH << "\n" + std::cout << "HogMaker - tool for creating Descent3 HOG2 files.\n" << "Usage:\n" << " " << argv[0] << " [search_path]\n" << std::endl; From 72e8347fe17369167b0a5c058e8402791e203254 Mon Sep 17 00:00:00 2001 From: "Azamat H. Hackimov" Date: Sat, 26 Oct 2024 15:36:37 +0300 Subject: [PATCH 4/5] Move Descent3 built targets into "${CMAKE_BINARY_DIR}/build" directory This solves problem of inability determine generated output directory of libraries targets. Now `add_custom_command()`, used on HOG generation, correctly locates all needed paths and not depends on generated variables. --- BUILD.md | 6 +- CMakeLists.txt | 9 +++ Descent3/CMakeLists.txt | 12 +--- USAGE.md | 73 +++++++++++++++++----- netcon/descent3onlineclient/CMakeLists.txt | 8 ++- netcon/lanclient/CMakeLists.txt | 8 ++- netcon/mtclient/CMakeLists.txt | 7 ++- scripts/CMakeLists.txt | 8 ++- 8 files changed, 95 insertions(+), 36 deletions(-) diff --git a/BUILD.md b/BUILD.md index 19a826b8..84522335 100644 --- a/BUILD.md +++ b/BUILD.md @@ -49,7 +49,7 @@ The build process uses [**CMake**](https://cmake.org/) and, by default, [**Ninja ``` See [Build Options](#build-options) below for more information on `Debug` vs `Release`. -Once CMake finishes, the built files will be put in `builds\win\Descent3\Debug` or `builds\win\Descent3\Release`. +Once CMake finishes, the built files will be put in `builds\win\build\Debug` or `builds\win\build\Release`. ## Building - macOS 1. **Install the prerequisite build tools.** @@ -87,7 +87,7 @@ Once CMake finishes, the built files will be put in `builds\win\Descent3\Debug` ``` See [Build Options](#build-options) below for more information on `Debug` vs `Release`. -Once CMake finishes, the built files will be put in `builds/mac/Descent3/Debug` or `builds/mac/Descent3/Release`. +Once CMake finishes, the built files will be put in `builds/mac/build/Debug` or `builds/mac/build/Release`. ## Building - Linux 1. **Install the prerequisite build tools.** @@ -147,7 +147,7 @@ Once CMake finishes, the built files will be put in `builds/mac/Descent3/Debug` ``` See [Build Options](#build-options) below for more information on `Debug` vs `Release`. -Once CMake finishes, the built files will be put in `builds/linux/Descent3/Debug` or `builds/linux/Descent3/Release`. +Once CMake finishes, the built files will be put in `builds/linux/build/Debug` or `builds/linux/build/Release`. ## Cross-compilation diff --git a/CMakeLists.txt b/CMakeLists.txt index 1a81742f..0188de3c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -88,6 +88,15 @@ if(FORCE_PORTABLE_INSTALL) set(CMAKE_INSTALL_DOCDIR ".") endif() +# Get info about multi-config environment +get_property(IS_MULTI_CONFIG GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) +# Properly determine output directory for generated files +if(IS_MULTI_CONFIG) + set(D3_GENERATED_FILES_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/build/$") +else () + set(D3_GENERATED_FILES_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/build") +endif() + if (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) set(CMAKE_INSTALL_PREFIX "${CMAKE_BINARY_DIR}/installed" CACHE PATH "Default install path" FORCE) endif() diff --git a/Descent3/CMakeLists.txt b/Descent3/CMakeLists.txt index 4e29fd6e..838e1591 100644 --- a/Descent3/CMakeLists.txt +++ b/Descent3/CMakeLists.txt @@ -344,6 +344,7 @@ target_link_libraries(Descent3 PRIVATE ${PLATFORM_LIBS}) target_include_directories(Descent3 PRIVATE ${PROJECT_BINARY_DIR}/lib) target_link_options(Descent3 PRIVATE $<$:/DEBUG:FULL>) +set_target_properties(Descent3 PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/build") add_dependencies(Descent3 get_git_hash Direct_TCP_IP_Hog @@ -361,17 +362,6 @@ add_dependencies(Descent3 tanarchy ) -# Custom command for copying custom targets such HOG files -# We cannot use here TARGET_FILE_DIR generated expressions since custom target don't have one -add_custom_command(TARGET Descent3 POST_BUILD - COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_BINARY_DIR}/scripts/$/d3-${HOG_NAME}.hog" "$" - COMMAND ${CMAKE_COMMAND} -E make_directory "$/online" - COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_BINARY_DIR}/netcon/descent3onlineclient/$/Descent3 Online.d3c" "$/online" - COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_BINARY_DIR}/netcon/lanclient/$/Direct TCP~IP.d3c" "$/online" - COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_BINARY_DIR}/netcon/mtclient/$/Parallax Online.d3c" "$/online" - COMMENT "Copying HOG-files into Descent3 work dir" -) - install(TARGETS Descent3 RUNTIME BUNDLE DESTINATION .) if(MSVC) install(FILES $ DESTINATION ${CMAKE_INSTALL_BINDIR}) diff --git a/USAGE.md b/USAGE.md index 956f03f0..73b45905 100644 --- a/USAGE.md +++ b/USAGE.md @@ -1,31 +1,74 @@ # Descent 3 Open source usage instructions -**Important note**: This open source distribution of Descent 3 DOES NOT CONTAIN GAME ASSETS. Assets must be acquired separately from an official copy of the game, and copied as describe in the next section. +**Important note**: This open source distribution of Descent 3 DOES NOT CONTAIN +GAME ASSETS. Assets must be acquired separately from an official copy of the +game, and copied as describe in the next section. -This is the first release of the Descent 3 open source engine, that should be considered a beta version. If you find a bug that has not been reported before, please open a new ticket it on our [online issue tracker](https://github.com/DescentDevelopers/Descent3/issues). +This is the first release of the Descent 3 open source engine, that should be +considered a beta version. If you find a bug that has not been reported before, +please open a new ticket it on our [online issue tracker](https://github.com/DescentDevelopers/Descent3/issues). + +1. Make sure that you have a copy of Descent 3. You can purchase a copy of +Descent 3 from [GOG](https://www.gog.com/game/descent_3_expansion) or +[Steam](https://store.steampowered.com/app/273590/Descent_3/). -1. Make sure that you have a copy of Descent 3. You can purchase a copy of Descent 3 from [GOG](https://www.gog.com/game/descent_3_expansion) or [Steam](https://store.steampowered.com/app/273590/Descent_3/). 2. Install Descent 3. - **Note for Steam users:** If you own Descent 3 on Steam, then it’s recommended that you install the Windows version of the game even if you’re running macOS or Linux, otherwise movies will not work due to [current lack of Ogv support](https://github.com/DescentDevelopers/Descent3/issues/240). You can use either [Steam Play](https://help.steampowered.com/en/faqs/view/08F7-5D56-9654-39AF) or [SteamCMD](https://developer.valvesoftware.com/wiki/SteamCMD#Cross-Platform_Installation) to install the Windows version of the game on macOS or Linux. -3. If your version of Descent 3 is older than v1.4, then [update it to v1.4](http://descent3.com/downloads.php). -4. Find the installation location of Descent 3. Using the Steam client, you can find it from the library page using the `Manage > Browse local files` context menu. +**Note for Steam users:** If you own Descent 3 on Steam, then it’s recommended +that you install the Windows version of the game even if you’re running macOS +or Linux, otherwise movies will not work due to +[current lack of OGV support](https://github.com/DescentDevelopers/Descent3/issues/240). +You can use either [Steam Play](https://help.steampowered.com/en/faqs/view/08F7-5D56-9654-39AF) +or [SteamCMD](https://developer.valvesoftware.com/wiki/SteamCMD#Cross-Platform_Installation) +to install the Windows version of the game on macOS or Linux. + +3. If your version of Descent 3 is older than v1.4, then +[update it to v1.4](http://descent3.com/downloads.php). + +4. Find the installation location of Descent 3. Using the Steam client, you can +find it from the library page using the `Manage > Browse local files` +context menu. + 5. Create a new folder named `D3-open-source`. + 6. Copy the following files from your installation of Descent 3 to `D3-open-source`: - All `.hog` files - The `missions` folder - _(Optional)_ All `.pld` files - _(Optional)_ The `movies` folder + 7. Create the `custom/` folder in `D3-open-source` + 8. Obtain new Descent 3 engine files: - - If you want to use pre-built binaries, then download the latest [release](https://github.com/DescentDevelopers/Descent3/releases). For a more cutting-edge experience with the latest features, use the artifacts from the latest automated build. You can find the list of automated builds [here](https://github.com/DescentDevelopers/Descent3/actions/workflows/build.yml?query=branch%3Amain+event%3Apush). - - If you want to build the engine files yourself, the follow the instructions in [BUILD.md](BUILD.md). Once you build the engine files, they’ll be put in `builds//Descent3//`. For example, if you’re using Linux and you create a “Release” build, then the files will be located at `builds/linux/Descent3/Release`. -9. Copy all of the new engine files into `D3-open-source` and overwrite any conflicts. + - If you want to use pre-built binaries, then download the latest + [release](https://github.com/DescentDevelopers/Descent3/releases). For a + more cutting-edge experience with the latest features, use the artifacts + from the latest automated build. You can find the list of automated + builds [here](https://github.com/DescentDevelopers/Descent3/actions/workflows/build.yml?query=branch%3Amain+event%3Apush). + - If you want to build the engine files yourself, the follow the + instructions in [BUILD.md](BUILD.md). Once you build the engine files, + they’ll be put in `builds///`. For example, if + you’re using Linux and you create a “Release” build, then the files will + be located at `builds/linux/Release`. + +9. Copy all the new engine files into `D3-open-source` and overwrite any +conflicts. + 10. Special notes: - - D3 Open Source compiles level scripts in their own hogfiles. Make sure you copy and overwrite `d3-{platform}.hog`. + - D3 Open Source compiles level scripts in their own hogfiles. Make sure + you copy and overwrite `d3-{platform}.hog`. + 11. Run the game: - - On Windows, run `D3-open-source\Descent3.exe` from a command-line or double-click on the `Descent3` executable. - - On Linux, `cd` to `D3-open-source` and run `./Descent3`. Wayland users may need to set environement variable `SDL_VIDEODRIVER=wayland` before launching the game. - - On MacOS, the `.app` bundle is currently not signed, so your operating system will not let you run it by double-clicking it. To remediate that, open your terminal and `cd` to `D3-open-source`. Run `xattr -c ./Descent3.app` and then `chmod +x ./Descent3.app/Content/MacOS/Descent3`, then run the game using `./Descent3.app/Content/MacOS/Descent3` + - On Windows, run `D3-open-source\Descent3.exe` from a command-line or + double-click on the `Descent3` executable. + - On Linux, `cd` to `D3-open-source` and run `./Descent3`. Wayland users + may need to set environment variable `SDL_VIDEODRIVER=wayland` before + launching the game. + - On macOS, the `.app` bundle is currently not signed, so your operating + system will not let you run it by double-clicking it. To remediate that, + open your terminal and `cd` to `D3-open-source`. Run + `xattr -c ./Descent3.app` and then + `chmod +x ./Descent3.app/Content/MacOS/Descent3`, then run the game + using `./Descent3.app/Content/MacOS/Descent3` ## Troubleshooting @@ -33,7 +76,9 @@ This is the first release of the Descent 3 open source engine, that should be co Descent 3 Message(Error: Couldn't find the string table.) ``` -This error means that game data could not be found. Make sure you copied all game files to the `D3-open-source` folder, and that you're running the game from this same folder. +This error means that game data could not be found. Make sure you copied all +game files to the `D3-open-source` folder, and that you're running the game +from this same folder. ## Command line options diff --git a/netcon/descent3onlineclient/CMakeLists.txt b/netcon/descent3onlineclient/CMakeLists.txt index fbf3255e..85b2bd9d 100644 --- a/netcon/descent3onlineclient/CMakeLists.txt +++ b/netcon/descent3onlineclient/CMakeLists.txt @@ -29,9 +29,13 @@ endif() include(HogMaker) MakeHog( TARGET Descent3_Online_TCP_IP_Hog - OUTPUT "$/Descent3 Online.d3c" + OUTPUT "${D3_GENERATED_FILES_OUTPUT_DIRECTORY}/online/Descent3 Online.d3c" INPUT_FILE "${CMAKE_SOURCE_DIR}/netcon/descent3onlineclient/d3online.d3c.txt" SEARCH_PATH "$" "${CMAKE_SOURCE_DIR}/scripts/data/fullhog/" DEPENDS Descent3_Online_TCP_IP ) -install(FILES "${CMAKE_CURRENT_BINARY_DIR}/$/Descent3 Online.d3c" DESTINATION ${CMAKE_INSTALL_DATADIR}/online) + +install( + FILES "${D3_GENERATED_FILES_OUTPUT_DIRECTORY}/online/Descent3 Online.d3c" + DESTINATION ${CMAKE_INSTALL_DATADIR}/online +) diff --git a/netcon/lanclient/CMakeLists.txt b/netcon/lanclient/CMakeLists.txt index e8edf223..1ef045ab 100644 --- a/netcon/lanclient/CMakeLists.txt +++ b/netcon/lanclient/CMakeLists.txt @@ -22,9 +22,13 @@ endif() include(HogMaker) MakeHog( TARGET Direct_TCP_IP_Hog - OUTPUT "$/Direct TCP~IP.d3c" + OUTPUT "${D3_GENERATED_FILES_OUTPUT_DIRECTORY}/online/Direct TCP~IP.d3c" INPUT_FILE "${CMAKE_SOURCE_DIR}/netcon/lanclient/TCP_IP.d3c.txt" SEARCH_PATH "$" "${CMAKE_SOURCE_DIR}/scripts/data/fullhog/" DEPENDS Direct_TCP_IP ) -install(FILES "${CMAKE_CURRENT_BINARY_DIR}/$/Direct TCP~IP.d3c" DESTINATION ${CMAKE_INSTALL_DATADIR}/online) + +install( + FILES "${D3_GENERATED_FILES_OUTPUT_DIRECTORY}/online/Direct TCP~IP.d3c" + DESTINATION ${CMAKE_INSTALL_DATADIR}/online +) diff --git a/netcon/mtclient/CMakeLists.txt b/netcon/mtclient/CMakeLists.txt index 81a689d9..98e64e32 100644 --- a/netcon/mtclient/CMakeLists.txt +++ b/netcon/mtclient/CMakeLists.txt @@ -32,10 +32,13 @@ endif() include(HogMaker) MakeHog( TARGET Parallax_Online_Hog - OUTPUT "$/Parallax Online.d3c" + OUTPUT "${D3_GENERATED_FILES_OUTPUT_DIRECTORY}/online/Parallax Online.d3c" INPUT_FILE "${CMAKE_SOURCE_DIR}/netcon/mtclient/Parallax_Online.d3c.txt" SEARCH_PATH "$" "${CMAKE_SOURCE_DIR}/scripts/data/fullhog/" DEPENDS Parallax_Online ) -install(FILES "${CMAKE_CURRENT_BINARY_DIR}/$/Parallax Online.d3c" DESTINATION ${CMAKE_INSTALL_DATADIR}/online) +install( + FILES "${D3_GENERATED_FILES_OUTPUT_DIRECTORY}/online/Parallax Online.d3c" + DESTINATION ${CMAKE_INSTALL_DATADIR}/online +) diff --git a/scripts/CMakeLists.txt b/scripts/CMakeLists.txt index ece3ee7d..039a6424 100644 --- a/scripts/CMakeLists.txt +++ b/scripts/CMakeLists.txt @@ -93,12 +93,16 @@ endforeach() include(HogMaker) MakeHog( TARGET HogFull - OUTPUT "$/d3-${HOG_NAME}.hog" + OUTPUT "${D3_GENERATED_FILES_OUTPUT_DIRECTORY}/d3-${HOG_NAME}.hog" INPUT_FILE "${CMAKE_SOURCE_DIR}/scripts/data/fullhog/d3-${HOG_NAME}-fullhog.txt" SEARCH_PATH "$" DEPENDS ${SCRIPTS} ) -install(FILES "${CMAKE_CURRENT_BINARY_DIR}/$/d3-${HOG_NAME}.hog" DESTINATION ${CMAKE_INSTALL_DATADIR}) + +install( + FILES "${D3_GENERATED_FILES_OUTPUT_DIRECTORY}/d3-${HOG_NAME}.hog" + DESTINATION ${CMAKE_INSTALL_DATADIR} +) # FIXME: there may be only one d3-linux.hog, need deal with demo somehow. # add_custom_target(HogLinuxDemo From 44806e77f0ed75ba57d2f9db027cdbfdc06d9144 Mon Sep 17 00:00:00 2001 From: "Azamat H. Hackimov" Date: Sat, 26 Oct 2024 21:54:30 +0300 Subject: [PATCH 5/5] Restore proper module names for netgames Using names as defined in Steam installation. --- netgames/anarchy/CMakeLists.txt | 1 + netgames/coop/CMakeLists.txt | 1 + netgames/ctf/CMakeLists.txt | 1 + netgames/entropy/CMakeLists.txt | 1 + netgames/hoard/CMakeLists.txt | 1 + netgames/hyperanarchy/CMakeLists.txt | 1 + netgames/monsterball/CMakeLists.txt | 1 + netgames/roboanarchy/CMakeLists.txt | 1 + netgames/tanarchy/CMakeLists.txt | 1 + 9 files changed, 9 insertions(+) diff --git a/netgames/anarchy/CMakeLists.txt b/netgames/anarchy/CMakeLists.txt index 96454d09..370ddd3e 100644 --- a/netgames/anarchy/CMakeLists.txt +++ b/netgames/anarchy/CMakeLists.txt @@ -7,6 +7,7 @@ add_library(${NETGAME_MODULE} MODULE ${CPPS} ${HEADERS}) set_target_properties(${NETGAME_MODULE} PROPERTIES CXX_VISIBILITY_PRESET "hidden") set_target_properties(${NETGAME_MODULE} PROPERTIES PREFIX "") set_target_properties(${NETGAME_MODULE} PROPERTIES SUFFIX ".d3m") +set_target_properties(${NETGAME_MODULE} PROPERTIES LIBRARY_OUTPUT_NAME "anarchy") set_target_properties(${NETGAME_MODULE} PROPERTIES LIBRARY_OUTPUT_DIRECTORY "$/netgames") target_link_libraries(${NETGAME_MODULE} PRIVATE diff --git a/netgames/coop/CMakeLists.txt b/netgames/coop/CMakeLists.txt index 43111250..0d7de4e8 100644 --- a/netgames/coop/CMakeLists.txt +++ b/netgames/coop/CMakeLists.txt @@ -9,6 +9,7 @@ add_library(${NETGAME_MODULE} MODULE ${CPPS} ${HEADERS}) set_target_properties(${NETGAME_MODULE} PROPERTIES CXX_VISIBILITY_PRESET "hidden") set_target_properties(${NETGAME_MODULE} PROPERTIES PREFIX "") set_target_properties(${NETGAME_MODULE} PROPERTIES SUFFIX ".d3m") +set_target_properties(${NETGAME_MODULE} PROPERTIES LIBRARY_OUTPUT_NAME "co-op") set_target_properties(${NETGAME_MODULE} PROPERTIES LIBRARY_OUTPUT_DIRECTORY "$/netgames") target_link_libraries(${NETGAME_MODULE} PRIVATE diff --git a/netgames/ctf/CMakeLists.txt b/netgames/ctf/CMakeLists.txt index d226d1ee..3d207459 100644 --- a/netgames/ctf/CMakeLists.txt +++ b/netgames/ctf/CMakeLists.txt @@ -7,6 +7,7 @@ add_library(${NETGAME_MODULE} MODULE ${CPPS} ${HEADERS}) set_target_properties(${NETGAME_MODULE} PROPERTIES CXX_VISIBILITY_PRESET "hidden") set_target_properties(${NETGAME_MODULE} PROPERTIES PREFIX "") set_target_properties(${NETGAME_MODULE} PROPERTIES SUFFIX ".d3m") +set_target_properties(${NETGAME_MODULE} PROPERTIES LIBRARY_OUTPUT_NAME "ctf") set_target_properties(${NETGAME_MODULE} PROPERTIES LIBRARY_OUTPUT_DIRECTORY "$/netgames") target_link_libraries(${NETGAME_MODULE} PRIVATE diff --git a/netgames/entropy/CMakeLists.txt b/netgames/entropy/CMakeLists.txt index 7a759f47..f11fed78 100644 --- a/netgames/entropy/CMakeLists.txt +++ b/netgames/entropy/CMakeLists.txt @@ -7,6 +7,7 @@ add_library(${NETGAME_MODULE} MODULE ${CPPS} ${HEADERS}) set_target_properties(${NETGAME_MODULE} PROPERTIES CXX_VISIBILITY_PRESET "hidden") set_target_properties(${NETGAME_MODULE} PROPERTIES PREFIX "") set_target_properties(${NETGAME_MODULE} PROPERTIES SUFFIX ".d3m") +set_target_properties(${NETGAME_MODULE} PROPERTIES LIBRARY_OUTPUT_NAME "entropy") set_target_properties(${NETGAME_MODULE} PROPERTIES LIBRARY_OUTPUT_DIRECTORY "$/netgames") target_link_libraries(${NETGAME_MODULE} PRIVATE diff --git a/netgames/hoard/CMakeLists.txt b/netgames/hoard/CMakeLists.txt index 523098d3..47790a7d 100644 --- a/netgames/hoard/CMakeLists.txt +++ b/netgames/hoard/CMakeLists.txt @@ -7,6 +7,7 @@ add_library(${NETGAME_MODULE} MODULE ${CPPS} ${HEADERS}) set_target_properties(${NETGAME_MODULE} PROPERTIES CXX_VISIBILITY_PRESET "hidden") set_target_properties(${NETGAME_MODULE} PROPERTIES PREFIX "") set_target_properties(${NETGAME_MODULE} PROPERTIES SUFFIX ".d3m") +set_target_properties(${NETGAME_MODULE} PROPERTIES LIBRARY_OUTPUT_NAME "hoard") set_target_properties(${NETGAME_MODULE} PROPERTIES LIBRARY_OUTPUT_DIRECTORY "$/netgames") target_link_libraries(${NETGAME_MODULE} PRIVATE diff --git a/netgames/hyperanarchy/CMakeLists.txt b/netgames/hyperanarchy/CMakeLists.txt index ee80cb3d..ebd78109 100644 --- a/netgames/hyperanarchy/CMakeLists.txt +++ b/netgames/hyperanarchy/CMakeLists.txt @@ -7,6 +7,7 @@ add_library(${NETGAME_MODULE} MODULE ${CPPS} ${HEADERS}) set_target_properties(${NETGAME_MODULE} PROPERTIES CXX_VISIBILITY_PRESET "hidden") set_target_properties(${NETGAME_MODULE} PROPERTIES PREFIX "") set_target_properties(${NETGAME_MODULE} PROPERTIES SUFFIX ".d3m") +set_target_properties(${NETGAME_MODULE} PROPERTIES LIBRARY_OUTPUT_NAME "hyper-anarchy") set_target_properties(${NETGAME_MODULE} PROPERTIES LIBRARY_OUTPUT_DIRECTORY "$/netgames") target_link_libraries(${NETGAME_MODULE} PRIVATE diff --git a/netgames/monsterball/CMakeLists.txt b/netgames/monsterball/CMakeLists.txt index b94037fa..437b1e42 100644 --- a/netgames/monsterball/CMakeLists.txt +++ b/netgames/monsterball/CMakeLists.txt @@ -7,6 +7,7 @@ add_library(${NETGAME_MODULE} MODULE ${CPPS} ${HEADERS}) set_target_properties(${NETGAME_MODULE} PROPERTIES CXX_VISIBILITY_PRESET "hidden") set_target_properties(${NETGAME_MODULE} PROPERTIES PREFIX "") set_target_properties(${NETGAME_MODULE} PROPERTIES SUFFIX ".d3m") +set_target_properties(${NETGAME_MODULE} PROPERTIES LIBRARY_OUTPUT_NAME "monsterball") set_target_properties(${NETGAME_MODULE} PROPERTIES LIBRARY_OUTPUT_DIRECTORY "$/netgames") target_link_libraries(${NETGAME_MODULE} PRIVATE diff --git a/netgames/roboanarchy/CMakeLists.txt b/netgames/roboanarchy/CMakeLists.txt index 49dabd5e..9b3a2a11 100644 --- a/netgames/roboanarchy/CMakeLists.txt +++ b/netgames/roboanarchy/CMakeLists.txt @@ -7,6 +7,7 @@ add_library(${NETGAME_MODULE} MODULE ${CPPS} ${HEADERS}) set_target_properties(${NETGAME_MODULE} PROPERTIES CXX_VISIBILITY_PRESET "hidden") set_target_properties(${NETGAME_MODULE} PROPERTIES PREFIX "") set_target_properties(${NETGAME_MODULE} PROPERTIES SUFFIX ".d3m") +set_target_properties(${NETGAME_MODULE} PROPERTIES LIBRARY_OUTPUT_NAME "robo-anarchy") set_target_properties(${NETGAME_MODULE} PROPERTIES LIBRARY_OUTPUT_DIRECTORY "$/netgames") target_link_libraries(${NETGAME_MODULE} PRIVATE diff --git a/netgames/tanarchy/CMakeLists.txt b/netgames/tanarchy/CMakeLists.txt index 42ce3796..6b924d8d 100644 --- a/netgames/tanarchy/CMakeLists.txt +++ b/netgames/tanarchy/CMakeLists.txt @@ -7,6 +7,7 @@ add_library(${NETGAME_MODULE} MODULE ${CPPS} ${HEADERS}) set_target_properties(${NETGAME_MODULE} PROPERTIES CXX_VISIBILITY_PRESET "hidden") set_target_properties(${NETGAME_MODULE} PROPERTIES PREFIX "") set_target_properties(${NETGAME_MODULE} PROPERTIES SUFFIX ".d3m") +set_target_properties(${NETGAME_MODULE} PROPERTIES LIBRARY_OUTPUT_NAME "team anarchy") set_target_properties(${NETGAME_MODULE} PROPERTIES LIBRARY_OUTPUT_DIRECTORY "$/netgames") target_link_libraries(${NETGAME_MODULE} PRIVATE