Fix make install failing after CMAKE_INSTALL_PREFIX is changed#708
Open
pvutov wants to merge 2 commits into
Open
Fix make install failing after CMAKE_INSTALL_PREFIX is changed#708pvutov wants to merge 2 commits into
make install failing after CMAKE_INSTALL_PREFIX is changed#708pvutov wants to merge 2 commits into
Conversation
added 2 commits
May 15, 2026 12:13
zlib is using absolute paths with the install command, which is bad practice. Installation paths should be relative, allowing cmake to resolve them relative to CMAKE_INSTALL_PREFIX.
CMake is not a generic programming language. Unnecessary variables should be avoided. For example, if a variable name is misspelled, cmake will happily resolve it to an empty string. In addition, unnecessary cache variables make it difficult for users to configure the project (tyranny of choice). Cache variables should be limited to things that a user might reasonably want to customize. It makes no sense to offer installing libs to a place other than "lib", or binaries to a place other than "bin". "make install" is supposed to provide a standard install structure.
Author
|
@microsoft-github-policy-service agree company="RUAG AG" |
Author
|
I am noticing that this project more generally does not support installing; the main msix-packaging binary and lib do not show up in the install folder even with my fix. But that can be fixed separately by adding an |
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.
The zlib subproject is setting several unnecessary cache variables:
INSTALL_BIN_DIRetc. The values for these variables are only derived once, during the initial configuration, from CMAKE_INSTALL_PREFIX.The specific bug this causes is:
The first commit on my fork merely fixes the bug. The second commit also fixes an IMO bad design decision by removing the unnecessary cache variables involved in the bug.