move setting of default CMAKE_INSTALL_{BIN,INCLUDE,LIB}DIR before first use #979
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.
One of the things I had misdiagnosed in #876 was how I was getting
lib64
and other such things into the build, when nothing should have been setting them like that.Now after rebasing the patches to 0.2.0, I realize that this is simply due to the fact that the default values (in case the various
CMAKE_INSTALL_*
quantities are not explicitly overriden) are defined after their first use further up inCMakeLists.txt
:sentencepiece/CMakeLists.txt
Lines 60 to 66 in 17d7580
Fix this by moving the setting of the default values up before they're first used.
Also rename
CMAKE_INSTALL_INCDIR
->CMAKE_INSTALL_INCLUDEDIR
, which corresponds to the GNUInstallDirs default that CMake itself documents.