Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix cmake installation #334

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,9 @@ compile_commands.json
.clangd/
.cache/

# CLion/IDEA files
.idea/

# Project files
bin/
external/boost/
Expand Down
8 changes: 8 additions & 0 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,14 @@ configure_package_config_file(${PROJECT_SOURCE_DIR}/cmake/komputeConfig.cmake.in
"${PROJECT_BINARY_DIR}/kompute/komputeConfig.cmake"
INSTALL_DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/kompute)

# Generated komputeConfigVersion.cmake that is required in the following install command
# This will fix issue #324
write_basic_package_version_file(
"${PROJECT_BINARY_DIR}/kompute/komputeConfigVersion.cmake"
VERSION ${CMAKE_PROJECT_VERSION}
COMPATIBILITY AnyNewerVersion # Other possible values: SameMajorVersion, SameMinorVersion, ExactVersion
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably limiting to Major version would make sense

)

install(FILES ${PROJECT_BINARY_DIR}/kompute/komputeConfig.cmake
${PROJECT_BINARY_DIR}/kompute/komputeConfigVersion.cmake DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/kompute)

Expand Down
5 changes: 4 additions & 1 deletion src/include/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,7 @@ target_sources(kp_logger PRIVATE
kompute/logger/Logger.hpp
)

install(DIRECTORY logger DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
# This installation requires non-existing dir logger,
# but previous installation at line 30 has already installed kompute/logger
# This will cause an error during installation
# install(DIRECTORY logger DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
Loading