summaryrefslogtreecommitdiff
path: root/Modules/FindXalanC.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2016-08-03 11:12:01 -0400
committerBrad King <brad.king@kitware.com>2016-08-03 11:14:29 -0400
commitff386d1121ec52854d522d3bb9c86fab286d58ef (patch)
tree3b1d9d71f628227661992346e791ebdd9f07fa80 /Modules/FindXalanC.cmake
parent382c4fca6b895c2c7a68445918a8fd73a15e1f91 (diff)
downloadcmake-ff386d1121ec52854d522d3bb9c86fab286d58ef.tar.gz
Modules: Make imported targets fall back to `Release`
Find modules only detect Debug and Release configurations. All other configurations will fall back to the configuration listed as the first entry in `IMPORTED_CONFIGURATIONS`. Switch the order so that `Release` is listed first, as this is a better fallback than `Debug` for the `RelWithDebInfo` and `MinSizeRel` configurations. See issue #16091. This approach is recommended by documentation in `cmake-developer(7)` added by commit v3.2.0-rc1~286^2~1 (Help: Document IMPORTED_CONFIGURATIONS target property for Find modules, 2014-12-04).
Diffstat (limited to 'Modules/FindXalanC.cmake')
-rw-r--r--Modules/FindXalanC.cmake14
1 files changed, 7 insertions, 7 deletions
diff --git a/Modules/FindXalanC.cmake b/Modules/FindXalanC.cmake
index 016b7aabd2..f5061d3078 100644
--- a/Modules/FindXalanC.cmake
+++ b/Modules/FindXalanC.cmake
@@ -143,13 +143,6 @@ if(XalanC_FOUND)
IMPORTED_LINK_INTERFACE_LANGUAGES "CXX"
IMPORTED_LOCATION "${XalanC_LIBRARY}")
endif()
- if(EXISTS "${XalanC_LIBRARY_DEBUG}")
- set_property(TARGET XalanC::XalanC APPEND PROPERTY
- IMPORTED_CONFIGURATIONS DEBUG)
- set_target_properties(XalanC::XalanC PROPERTIES
- IMPORTED_LINK_INTERFACE_LANGUAGES_DEBUG "CXX"
- IMPORTED_LOCATION_DEBUG "${XalanC_LIBRARY_DEBUG}")
- endif()
if(EXISTS "${XalanC_LIBRARY_RELEASE}")
set_property(TARGET XalanC::XalanC APPEND PROPERTY
IMPORTED_CONFIGURATIONS RELEASE)
@@ -157,6 +150,13 @@ if(XalanC_FOUND)
IMPORTED_LINK_INTERFACE_LANGUAGES_RELEASE "CXX"
IMPORTED_LOCATION_RELEASE "${XalanC_LIBRARY_RELEASE}")
endif()
+ if(EXISTS "${XalanC_LIBRARY_DEBUG}")
+ set_property(TARGET XalanC::XalanC APPEND PROPERTY
+ IMPORTED_CONFIGURATIONS DEBUG)
+ set_target_properties(XalanC::XalanC PROPERTIES
+ IMPORTED_LINK_INTERFACE_LANGUAGES_DEBUG "CXX"
+ IMPORTED_LOCATION_DEBUG "${XalanC_LIBRARY_DEBUG}")
+ endif()
set_target_properties(XalanC::XalanC PROPERTIES INTERFACE_LINK_LIBRARIES XercesC::XercesC)
endif()
endif()