mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-12 04:39:02 +08:00
d329368fd4
* [forge] Fix usage * update version record
30 lines
1.1 KiB
Diff
30 lines
1.1 KiB
Diff
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})
|