Skip to content

Commit

Permalink
Refactor CMake config file
Browse files Browse the repository at this point in the history
  • Loading branch information
FabienPean committed Apr 21, 2024
1 parent 42fbb9a commit 8afda82
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ install(EXPORT YOMM2Targets
)
# Configure package config (tells using code about dependencies)
configure_package_config_file(
cmake/Config.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/YOMM2Config.cmake
cmake/YOMM2Config.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/YOMM2Config.cmake
INSTALL_DESTINATION lib/cmake/YOMM2
)
# Copy config files to install directory
Expand Down
4 changes: 4 additions & 0 deletions cmake/Config.cmake.in → cmake/YOMM2Config.cmake.in
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
@PACKAGE_INIT@

include(CMakeFindDependencyMacro)

# Tell library users about the Boost dependency
find_dependency(Boost 1.74 REQUIRED)

# Add the targets file
include("${CMAKE_CURRENT_LIST_DIR}/YOMM2Targets.cmake")

check_required_components(YOMM2)

0 comments on commit 8afda82

Please sign in to comment.