Skip to content

Commit

Permalink
Check package components in gw-config.cmake.in
Browse files Browse the repository at this point in the history
Signed-off-by: Martin Stump <11492152+globberwops@users.noreply.github.com>
  • Loading branch information
globberwops committed Dec 27, 2023
1 parent 511742e commit 239ccf9
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions cmake/gw-config.cmake.in
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
@PACKAGE_INIT@

if(NOT TARGET gw::StrongType)
include("${CMAKE_CURRENT_LIST_DIR}/gw-targets.cmake")
endif()
include("${CMAKE_CURRENT_LIST_DIR}/gw-targets.cmake")

macro(check_available_components _NAME)
foreach(comp ${${_NAME}_FIND_COMPONENTS})
if(TARGET ${_NAME}::${comp})
set(${_NAME}_${comp}_FOUND TRUE)
endif()
endforeach()
endmacro()

check_available_components(gw)
check_required_components(gw)

0 comments on commit 239ccf9

Please sign in to comment.