Update for https://fedoraproject.org/wiki/Changes/CMake_drop_install_vars#973
Merged
BYVoid merged 1 commit intoBYVoid:masterfrom Jan 14, 2026
Merged
Update for https://fedoraproject.org/wiki/Changes/CMake_drop_install_vars#973BYVoid merged 1 commit intoBYVoid:masterfrom
BYVoid merged 1 commit intoBYVoid:masterfrom
Conversation
Owner
|
Sorry, can you rebase and send the PR again? |
Contributor
Author
|
No problem. I just rebased and updated the PR. |
There was a problem hiding this comment.
Pull request overview
This PR updates the CMake configuration to comply with Fedora's "CMake_drop_install_vars" policy, which standardizes library installation directories using CMake's GNUInstallDirs module instead of custom variables.
Changes:
- Added
include(GNUInstallDirs)to import standard CMake directory variables - Introduced
LIB_INSTALL_DIRbased onCMAKE_INSTALL_LIBDIR - Added logic to detect lib64 and set
LIB_SUFFIXaccordingly for backwards compatibility
Comments suppressed due to low confidence (2)
CMakeLists.txt:91
- The LIB_SUFFIX variable is not initialized when CMAKE_INSTALL_LIBDIR doesn't end with 'lib64'. This will cause an error or unexpected behavior. Initialize LIB_SUFFIX to an empty string before the conditional check, e.g.,
set(LIB_SUFFIX \"\")before line 83.
set (DIR_LIBRARY ${DIR_PREFIX}/lib${LIB_SUFFIX})
CMakeLists.txt:107
- The conditional check at line 105-107 will always evaluate to true since LIB_INSTALL_DIR is unconditionally set at line 82, causing DIR_LIBRARY to always be overridden to CMAKE_INSTALL_LIBDIR and ignoring the lib${LIB_SUFFIX} construction at line 91. Consider using an absolute path from GNUInstallDirs (e.g.,
${CMAKE_INSTALL_FULL_LIBDIR}) instead of the relativeCMAKE_INSTALL_LIBDIR, or restructure the logic to avoid this conflict.
if (DEFINED LIB_INSTALL_DIR)
set (DIR_LIBRARY ${LIB_INSTALL_DIR})
endif (DEFINED LIB_INSTALL_DIR)
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
frankslin
pushed a commit
to frankslin/OpenCC
that referenced
this pull request
Jan 15, 2026
…vars (BYVoid#973) Co-authored-by: Peng Wu <pwu@redhat.com>
Contributor
Author
|
Thanks! |
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.
No description provided.