From a802230f3b38e50bac1cb4aaa26b6677ed7f8b32 Mon Sep 17 00:00:00 2001 From: Axel Huebl Date: Fri, 18 Aug 2023 11:24:47 -0400 Subject: [PATCH] Fix CMake Install: Find*.cmake Modules Install the CMake modules in `cmake/` into our install prefix. If we build with external dependencies for LZ4 and ZLIB_NG, will need those Modules to populate our CMake import targets in `Blosc2Config.cmake` during the `find_dependency` calls (which are just wrappers for `find_package`). --- Blosc2Config.cmake.in | 2 +- CMakeLists.txt | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/Blosc2Config.cmake.in b/Blosc2Config.cmake.in index f5685767..59274855 100644 --- a/Blosc2Config.cmake.in +++ b/Blosc2Config.cmake.in @@ -9,7 +9,7 @@ if(POLICY CMP0074) endif() # locate the installed FindABC.cmake modules -list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake") +list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/Modules") # this section stores which configuration options were set set(HAVE_THREADS @Threads_FOUND@) diff --git a/CMakeLists.txt b/CMakeLists.txt index e9ddb40c..72d99d3e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -520,6 +520,12 @@ if(BLOSC_INSTALL) DESTINATION ${Blosc2_INSTALL_CMAKEDIR} ) + # CMake Find*.cmake files used in BLosc2Config.cmake + install( + DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/cmake/ + DESTINATION ${Blosc2_INSTALL_CMAKEDIR}/Modules + ) + # pkg-config .pc file configure_file( "${CMAKE_CURRENT_SOURCE_DIR}/blosc2.pc.in"