mirror of
https://github.com/panda3d/panda3d.git
synced 2025-09-30 16:58:40 -04:00
CMake: Fix exported packages on Windows
This commit is contained in:
parent
ad6cc0f21f
commit
f01303a0b3
@ -335,7 +335,10 @@ function(export_packages filename)
|
|||||||
get_target_property(type "${head}" TYPE)
|
get_target_property(type "${head}" TYPE)
|
||||||
if(NOT type STREQUAL "INTERFACE_LIBRARY")
|
if(NOT type STREQUAL "INTERFACE_LIBRARY")
|
||||||
get_target_property(imported_location "${head}" IMPORTED_LOCATION)
|
get_target_property(imported_location "${head}" IMPORTED_LOCATION)
|
||||||
if(imported_location)
|
get_target_property(imported_implib "${head}" IMPORTED_IMPLIB)
|
||||||
|
if(imported_implib)
|
||||||
|
list(APPEND libraries ${imported_implib})
|
||||||
|
elseif(imported_location)
|
||||||
list(APPEND libraries ${imported_location})
|
list(APPEND libraries ${imported_location})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
@ -343,6 +346,13 @@ function(export_packages filename)
|
|||||||
if(configs AND NOT imported_location)
|
if(configs AND NOT imported_location)
|
||||||
foreach(config ${configs})
|
foreach(config ${configs})
|
||||||
get_target_property(imported_location "${head}" IMPORTED_LOCATION_${config})
|
get_target_property(imported_location "${head}" IMPORTED_LOCATION_${config})
|
||||||
|
|
||||||
|
# Prefer IMPORTED_IMPLIB where present
|
||||||
|
get_target_property(imported_implib "${head}" IMPORTED_IMPLIB_${config})
|
||||||
|
if(imported_implib)
|
||||||
|
set(imported_location "${imported_implib}")
|
||||||
|
endif()
|
||||||
|
|
||||||
if(imported_location)
|
if(imported_location)
|
||||||
if(configs MATCHES ".*;.*")
|
if(configs MATCHES ".*;.*")
|
||||||
set(_bling "$<1:$>") # genex-escaped $
|
set(_bling "$<1:$>") # genex-escaped $
|
||||||
@ -353,7 +363,16 @@ function(export_packages filename)
|
|||||||
endif()
|
endif()
|
||||||
endforeach(config)
|
endforeach(config)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
else()
|
||||||
|
# This is an INTERFACE_LIBRARY
|
||||||
|
get_target_property(imported_libname "${head}" IMPORTED_LIBNAME)
|
||||||
|
if(imported_libname)
|
||||||
|
list(APPEND libraries ${imported_libname})
|
||||||
|
endif()
|
||||||
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
elseif("${head}" MATCHES "\\$<TARGET_NAME:\([^>]+\)>")
|
elseif("${head}" MATCHES "\\$<TARGET_NAME:\([^>]+\)>")
|
||||||
string(REGEX REPLACE ".*\\$<TARGET_NAME:\([^>]+\)>.*" "\\1" match "${head}")
|
string(REGEX REPLACE ".*\\$<TARGET_NAME:\([^>]+\)>.*" "\\1" match "${head}")
|
||||||
list(APPEND stack "${match}")
|
list(APPEND stack "${match}")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user