Skip to content

Commit

Permalink
Extracted configs into separate files.
Browse files Browse the repository at this point in the history
  • Loading branch information
xvitaly committed Apr 22, 2023
1 parent 6428cff commit c0017de
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 18 deletions.
20 changes: 2 additions & 18 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -74,15 +74,7 @@ install(TARGETS ${QRCODEGEN_NAME}
PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${QRCODEGEN_NAME}
)

file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/${QRCODEGEN_NAME}-config.cmake.in [=[
@PACKAGE_INIT@

include("${CMAKE_CURRENT_LIST_DIR}/qrcodegen-targets.cmake")

check_required_components(qrcodegen)
]=]
)
configure_package_config_file(${CMAKE_CURRENT_BINARY_DIR}/${QRCODEGEN_NAME}-config.cmake.in
configure_package_config_file(cmake/${QRCODEGEN_NAME}-config.cmake.in
${QRCODEGEN_NAME}-config.cmake
INSTALL_DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${QRCODEGEN_NAME}
)
Expand Down Expand Up @@ -193,15 +185,7 @@ install(TARGETS ${QRCODEGENCPP_NAME}
PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${QRCODEGENCPP_NAME}
)

file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/qrcodegencpp-config.cmake.in [=[
@PACKAGE_INIT@

include("${CMAKE_CURRENT_LIST_DIR}/qrcodegencpp-targets.cmake")

check_required_components(qrcodegencpp)
]=]
)
configure_package_config_file(${CMAKE_CURRENT_BINARY_DIR}/${QRCODEGENCPP_NAME}-config.cmake.in
configure_package_config_file(cmake/${QRCODEGENCPP_NAME}-config.cmake.in
${QRCODEGENCPP_NAME}-config.cmake
INSTALL_DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${QRCODEGENCPP_NAME}
)
Expand Down
4 changes: 4 additions & 0 deletions cmake/qrcodegen-config.cmake.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
@PACKAGE_INIT@

include("${CMAKE_CURRENT_LIST_DIR}/@[email protected]")
check_required_components(@QRCODEGEN_NAME@)
4 changes: 4 additions & 0 deletions cmake/qrcodegencpp-config.cmake.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
@PACKAGE_INIT@

include("${CMAKE_CURRENT_LIST_DIR}/@[email protected]")
check_required_components(@QRCODEGENCPP_NAME@)

0 comments on commit c0017de

Please sign in to comment.