CMake Improvements#1551
Open
theoparis wants to merge 1 commit into
Open
Conversation
ec90c86 to
cd1e614
Compare
cd1e614 to
6710b86
Compare
6710b86 to
a6ca3f3
Compare
a6ca3f3 to
8ff7707
Compare
1c60ef3 to
1f4e91b
Compare
Add a cmake install target and fix utf-8 issues. Signed-off-by: Theo Paris <theo@theoparis.com>
1f4e91b to
4d1af06
Compare
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.
I added a cmake install target that installs the libraries, headers and the CLI binaries to CMAKE_INSTALL_PREFIX.
This is how I built and installed luau with this PR (on a linux machine):
Differences from #926 and #1317:
I added a step in the CMakeLists.txt to install a pkgconfig file so that this can be used in other build systems (e.g. Meson). I can also add the cmake-only LuauConfig file back in, however this is still useable from other cmake projects using pkgconfig.
The version is also detected from the latest git tag. Not sure if this is right way to automate it but it should allow installing the pkgconfig file with the correct version after a tag is created.
The minimum cmake requirement had to be bumped to 3.20, see https://github.com/jtojnar/cmake-snips#concatenating-paths-when-building-pkg-config-files