CMakeLists.txt proposed fixes for building on Gentoo Linux - #85
Open
Anoncheg1 wants to merge 1 commit into
Open
CMakeLists.txt proposed fixes for building on Gentoo Linux #85Anoncheg1 wants to merge 1 commit into
Anoncheg1 wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hi! I created Ebuild file for Gentoo Linu with instruction to compile package from sources.
https://github.com/Anoncheg1/anonch-overlay/blob/main/dev-games/tempest/tempest-20251214.ebuild
it is for 2025-12-14 58477f3
In this ebuild I use system Gentoo packages, instead of built-in, with partial success (for libsquish built-in include headers .h still used)
I tested it with working OpenGothic
https://github.com/Anoncheg1/anonch-overlay/blob/main/games-engines/opengothic/opengothic-1.0.3549.ebuild
Suggested improvements for CMakeLists.txt file:
Use
GNUInstallDirsfor Installation PathsReplace hardcoded
libandincludedestinations in theinstall()directive with${CMAKE_INSTALL_LIBDIR}and${CMAKE_INSTALL_INCLUDEDIR}. This ensures correct multilib directory handling (e.g., installing tolib64on Gentoo/Arch systems) without requiring downstream patches.Remove Hardcoded macOS Tool Paths
Change
find_program(GLSLANGVALIDATOR glslangValidator "/opt/homebrew/bin")tofind_program(GLSLANGVALIDATOR glslangValidator REQUIRED). This allows the system's standardPATHresolution to work correctly on all platforms, rather than forcing a macOS-specific fallback that can cause confusion or failures on Linux.Adopt Standard CMake Vulkan Find Module
Replace manual
$ENV{VULKAN_SDK}path injections and directvulkan/vulkan-1linking with the standardfind_package(Vulkan REQUIRED)and the modern imported targetVulkan::Vulkan. This is more robust, cross-platform, and respects system-wide Vulkan SDK installations managed by distribution package managers.Add Options for System Third-Party Libraries
Introduce CMake options (e.g.,
TEMPEST_USE_SYSTEM_ZLIB,TEMPEST_USE_SYSTEM_LIBPNG,TEMPEST_USE_SYSTEM_SQUISH). When enabled, these should usefind_package()and expose the expected target names (zlibstatic,png_static,squish-tempest) asINTERFACElibraries.Why this matters: Downstream packagers prefer using system libraries for security and deduplication. By providing
INTERFACEtargets with the same names, internaltarget_link_librariescalls remain intact, and we avoid CMake errors caused by applyingPRIVATEcompile options to system/INTERFACE targets.Fix Relative Includes in Public Headers
Update public headers in
include/Tempest/that currently use#include "../"to use#include "./"or#include "Tempest/". When headers are installed to a system directory (e.g.,/usr/include/Tempest/), a../relative path points outside the valid include root, causing compilation failures for downstream users.Benefits to the Project:
GNUInstallDirs, properfind_packageusage), making the codebase easier to maintain.