Skip to content

Comments

build: remove duplicate data directory installation in cmake#8112

Open
scarf005 wants to merge 1 commit intocataclysmbn:mainfrom
scarf005:fix/cmake-install-data-duplication
Open

build: remove duplicate data directory installation in cmake#8112
scarf005 wants to merge 1 commit intocataclysmbn:mainfrom
scarf005:fix/cmake-install-data-duplication

Conversation

@scarf005
Copy link
Member

@scarf005 scarf005 commented Feb 11, 2026

Purpose

CMake was installing data/ twice:

  1. Main CMakeLists.txt: install(DIRECTORY data ...)
  2. data/CMakeLists.txt: explicit subdirectory list

Prerequisite for Flathub CMake migration.

Solution

  1. Removed data/ install from main CMakeLists.txt
  2. Simplified data/CMakeLists.txt to copy entire directory with exclusions

Verification

# System install (USE_PREFIX_DATA_DIR=ON)
ls /tmp/cbn-test-system/share/cataclysm-bn/
# → font/ json/ lua/ mods/ etc. (no XDG/, no CMakeLists.txt)

# Portable install (USE_PREFIX_DATA_DIR=OFF)  
ls /tmp/cbn-test-portable/data/
# → font/ json/ lua/ mods/ etc. (no XDG/, no CMakeLists.txt)

Both modes work correctly.

@scarf005 scarf005 marked this pull request as ready for review February 11, 2026 05:53
@RobbieNeko
Copy link
Collaborator

Happy to see that this should let us drop the bandaid fixes in the future, in particular for whenever next stable is made. For now, the CMake migration in the flatpak can (likely) go on thanks to bandaid fixes.

@scarf005 scarf005 changed the title fix: remove duplicate data directory installation in cmake build: remove duplicate data directory installation in cmake Feb 11, 2026
@scarf005 scarf005 force-pushed the fix/cmake-install-data-duplication branch from a6a88f8 to 7e17b97 Compare February 11, 2026 06:17
@github-actions github-actions bot added the JSON related to game datas in JSON format. label Feb 11, 2026
Instead of maintaining explicit list of subdirectories, copy entire data/
directory and exclude unwanted files (CMakeLists.txt, XDG/, READMEs).
@scarf005 scarf005 force-pushed the fix/cmake-install-data-duplication branch 3 times, most recently from b858944 to 5887869 Compare February 15, 2026 18:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

JSON related to game datas in JSON format.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants