Skip to content

Commit

Permalink
Merge pull request #337 from SlopeCraft/fix-cmake-install2
Browse files Browse the repository at this point in the history
Fix cmake install2 (with sign off)
  • Loading branch information
axsaucedo authored Oct 26, 2023
2 parents a8feda4 + 8be2544 commit 0fe2343
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
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 SameMajorVersion# All possible values: SameMajorVersion, SameMinorVersion, ExactVersion, AnyNewerVersion
)

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})

0 comments on commit 0fe2343

Please sign in to comment.