fix(cmake): correct install dirs and use GNUInstallDirs#20
Merged
Conversation
find_package(EduceLabCore) could not locate the package because the config files were installed to lib/cmake/EduceLab, which does not match CMake's <prefix>/<libdir>/cmake/EduceLabCore* search glob. Install them to lib/cmake/EduceLabCore instead. Replace hardcoded lib/include destinations with GNUInstallDirs (CMAKE_INSTALL_LIBDIR/INCLUDEDIR/BINDIR). Drop the PUBLIC_HEADER install, which flattened all headers into a single directory and broke nested includes like "educelab/core/io/MeshIO.hpp". Install the include tree directly so the io/, types/, and utils/ subdirectories are preserved. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Builds, installs to a prefix, then configures and builds a small consumer project via find_package(EduceLabCore) to guard against broken install layouts and packaging regressions. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
Summary
find_package(EduceLabCore)failed because the package config was installed tolib/cmake/EduceLab, which does not match CMake's search glob<prefix>/<libdir>/cmake/EduceLabCore*. Config files now install tolib/cmake/EduceLabCore.lib/includeinstall destinations with GNUInstallDirs (CMAKE_INSTALL_LIBDIR/INCLUDEDIR/BINDIR).PUBLIC_HEADERinstall rule, which flattened every header into a single directory and broke nested includes such as"educelab/core/io/MeshIO.hpp". Headers are now installed via a directory copy that preserves theio/,types/, andutils/subdirectories.Testing
include/educelab/core/{io,types,utils}/...and config underlib/cmake/EduceLabCore/.find_package(EduceLabCore REQUIRED)+target_link_libraries(... educelab::core)configures and builds against the install.🤖 Generated with Claude Code