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

Allow build and run in repo folder in CMake #52976

Merged
merged 1 commit into from
Nov 24, 2021

Conversation

BrettDong
Copy link
Member

Summary

Build "Allow build and run in repo folder in CMake"

Purpose of change

When compiling a -O2 build, DATA_DIR_PREFIX macro is defined in CMake build script and there is no way to configure this behaviour. It makes running the game in repo impossible, because C++ code sets internal prefix path to <base_path>/share/cataclysm-dda when the macro is defined, and only a few sub directories can be manually override via launch parameters.

Describe the solution

Add USE_PREFIX_DATA_DIR CMake option defaults to true that controls the behaviour of defining DATA_DIR_PREFIX macro in Release build.

Describe alternatives you've considered

Testing

Additional context

@BrettDong BrettDong added the Code: Build Issues regarding different builds and build environments label Nov 23, 2021
@kevingranade kevingranade merged commit 256ef33 into CleverRaven:master Nov 24, 2021
@BrettDong BrettDong deleted the cmake branch November 24, 2021 11:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Code: Build Issues regarding different builds and build environments
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants