Fix invalid CMake package config files when using different build types

As we try to copy the different location target properties from the
corrosion target into the package config file, we need to take all the
usual build types into account, not only Debug/Release.

Especially RelWithDebInfo is popular among packagers.
This commit is contained in:
Simon Hausmann 2021-07-06 22:39:08 +02:00 committed by Simon Hausmann
parent 23708a4a12
commit 9784415a7e

View file

@ -130,6 +130,7 @@ install(PROGRAMS $<TARGET_FILE:sixtyfps-compiler> TYPE BIN)
set(SIXTYFPS_LIB_PROPERTIES "")
foreach(prop
IMPORTED_LOCATION IMPORTED_LOCATION_DEBUG IMPORTED_LOCATION_RELEASE
IMPORTED_LOCATION_RELWITHDEBINFO IMPORTED_LOCATION_MINSIZEREL
IMPORTED_IMPLIB IMPORTED_IMPLIB_DEBUG IMPORTED_IMPLIB_RELEASE)
get_target_property(value sixtyfps-cpp-shared ${prop})
if(value)