Skip to content

Commit

Permalink
Generate config file
Browse files Browse the repository at this point in the history
  • Loading branch information
ascii255 committed Apr 19, 2023
1 parent b996df0 commit 722d3b7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
12 changes: 8 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,17 @@ install (FILES ${PROJECT_SOURCE_DIR}/AudioFile.h
)

install (EXPORT ${PROJECT_NAME}Targets
FILE ${PROJECT_NAME}Targets.cmake
NAMESPACE ${PROJECT_NAME}::
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}
FILE ${PROJECT_NAME}Targets.cmake
NAMESPACE ${PROJECT_NAME}::
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}
)

file (WRITE ${PROJECT_BINARY_DIR}/Config.cmake.in
"@PACKAGE_INIT@\n\ninclude(\"\${CMAKE_CURRENT_LIST_DIR}/@PROJECT_NAME@Targets.cmake\")\n\ncheck_required_components(@PROJECT_NAME@)\n"
)

configure_package_config_file (
${PROJECT_SOURCE_DIR}/Config.cmake.in
${PROJECT_BINARY_DIR}/Config.cmake.in
${PROJECT_BINARY_DIR}/${PROJECT_NAME}Config.cmake
INSTALL_DESTINATION
${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}
Expand Down
5 changes: 0 additions & 5 deletions Config.cmake.in

This file was deleted.

0 comments on commit 722d3b7

Please sign in to comment.