Skip to content

Commit

Permalink
CMake install(): Fix namespaced targets detections (#19)
Browse files Browse the repository at this point in the history
  • Loading branch information
leha-bot committed Apr 22, 2023
1 parent c57623d commit eb0827c
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,14 @@ 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@")
file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/${QRCODEGEN_NAME}-config.cmake.in [=[
@PACKAGE_INIT@

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

check_required_components("${QRCODEGEN_NAME}")
]=]
)
configure_package_config_file(${CMAKE_CURRENT_BINARY_DIR}/${QRCODEGEN_NAME}-config.cmake.in
${QRCODEGEN_NAME}-config.cmake
INSTALL_DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${QRCODEGEN_NAME}
Expand Down

0 comments on commit eb0827c

Please sign in to comment.