Skip to content

Commit

Permalink
Fix CMake Install: Find*.cmake Modules
Browse files Browse the repository at this point in the history
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`).
  • Loading branch information
ax3l committed Aug 18, 2023
1 parent d0594f5 commit a802230
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Blosc2Config.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -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@)
Expand Down
6 changes: 6 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit a802230

Please sign in to comment.