vcpkg/ports/forge/fix-usage.patch

30 lines
1.1 KiB
Diff
Raw Normal View History

diff --git a/CMakeModules/ForgeConfig.cmake.in b/CMakeModules/ForgeConfig.cmake.in
index e4c7737..6429069 100644
--- a/CMakeModules/ForgeConfig.cmake.in
+++ b/CMakeModules/ForgeConfig.cmake.in
@@ -52,16 +52,18 @@ set(Forge_FOUND OFF)
if (NOT TARGET Forge::forge AND
NOT TARGET forge AND
- EXISTS @PACKAGE_CMAKE_DIR@/ForgeTargets.cmake)
- include(@PACKAGE_CMAKE_DIR@/ForgeTargets.cmake)
+ EXISTS ${CMAKE_CURRENT_LIST_DIR}/ForgeTargets.cmake)
+ include(${CMAKE_CURRENT_LIST_DIR}/ForgeTargets.cmake)
endif ()
if (TARGET Forge::forge)
- get_property(config TARGET Forge::forge PROPERTY IMPORTED_CONFIGURATIONS)
- if(NOT config)
- set(config "NOCONFIG")
+ get_property(configs TARGET Forge::forge PROPERTY IMPORTED_CONFIGURATIONS)
+ if(NOT configs)
+ set(configs "NOCONFIG")
endif()
- get_property(loc TARGET Forge::forge PROPERTY IMPORTED_LOCATION_${config})
+ foreach(config ${configs})
+ get_property(loc TARGET Forge::forge PROPERTY IMPORTED_LOCATION_${config})
+ endforeach()
endif ()
if ((TARGET Forge::forge AND EXISTS ${loc})