diff --git a/.gitignore b/.gitignore index 9dc07073..286544f3 100644 --- a/.gitignore +++ b/.gitignore @@ -173,6 +173,9 @@ compile_commands.json .clangd/ .cache/ +# CLion/IDEA files +.idea/ + # Project files bin/ external/boost/ diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index dbb47dbe..79d43cc1 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -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) diff --git a/src/include/CMakeLists.txt b/src/include/CMakeLists.txt index e1652fdd..e8aea8bf 100644 --- a/src/include/CMakeLists.txt +++ b/src/include/CMakeLists.txt @@ -41,4 +41,7 @@ target_sources(kp_logger PRIVATE kompute/logger/Logger.hpp ) -install(DIRECTORY logger DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) \ No newline at end of file +# 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}) \ No newline at end of file