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

Add support for building via CMake #6

Open
wants to merge 16 commits into
base: dev
Choose a base branch
from
Open

Conversation

Hagb
Copy link
Contributor

@Hagb Hagb commented Oct 10, 2024

The way to load embedded files is also changed, to avoid potential confusion.

@Hagb Hagb marked this pull request as draft October 10, 2024 17:28
@Hagb
Copy link
Contributor Author

Hagb commented Oct 10, 2024

(It still has some problems, so I make it a draft until I fix it.)

@Hagb Hagb marked this pull request as ready for review October 10, 2024 19:54
@Hagb
Copy link
Contributor Author

Hagb commented Oct 10, 2024

(Change Debug to Release if you expect a release build)
Build on *nix (and Windows?):

mkdir build-tmp; cd build-tmp
# --install-prefix=/path/to/th155/ is optional.
# On Debian based distro you might need to add also -DCLANG_SUFFIX=-18 argument.
cmake --install-prefix="/path/to/th155/" -DCMAKE_BUILD_TYPE=Debug ..
cmake --build . --parallel
# (optional) copy files to th155 directory. (`--prefix=/path/to/th155/` is optional if it has been correctly set.)
cmake --install . --prefix="/path/to/th155/"

Build on with multi-config generators such as Visual Studio Generator:

mkdir build-tmp; cd build-tmp
cmake --install-prefix="/path/to/th155/" ..
cmake --build . --config Debug --parallel
cmake --install . --config Debug --prefix="/path/to/th155/"

(Change Debugs to Release to get release builds.)
edited: add --parallel for cmake --build
edited: --toolchain= and -T ClangCL -A Win32 are no longer needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants