File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -178,6 +178,15 @@ if(asimage)
178178 # This check can be added only now because of the reasons explained above, where all
179179 # other required dependencies are checked.
180180 ROOT_FIND_REQUIRED_DEP (PNG builtin_png )
181+ # special check for opensuse which does not provide RelWithDebInfo for PNG
182+ if (NOT builtin_png AND NOT WIN32 AND CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo" AND TARGET PNG::PNG)
183+ get_target_property (PNG_RELWITHDEB_LOC PNG::PNG IMPORTED_LOCATION_RELWITHDEBINFO )
184+ get_target_property (PNG_RELEASE_LOC PNG::PNG IMPORTED_LOCATION_RELEASE )
185+ if (NOT PNG_RELWITHDEB_LOC AND PNG_RELEASE_LOC)
186+ message (STATUS "PNG::PNG misses RelWithDebInfo. Use Release as fallback." )
187+ set_target_properties (PNG::PNG PROPERTIES MAP_IMPORTED_CONFIG_RELWITHDEBINFO Release)
188+ endif ()
189+ endif ()
181190 ROOT_FIND_REQUIRED_DEP (TIFF builtin_tiff )
182191endif ()
183192
@@ -369,7 +378,7 @@ if(asimage)
369378 get_target_property (JPEG_LIBRARY_LOCATION JPEG::JPEG IMPORTED_LOCATION )
370379 endif ()
371380 list (APPEND ASEXTRA_LIBRARIES JPEG::JPEG)
372-
381+
373382 if (builtin_tiff)
374383 add_subdirectory (builtins/libtiff )
375384 get_target_property (TIFF_INCLUDE_DIR TIFF::TIFF INTERFACE_INCLUDE_DIRECTORIES )
You can’t perform that action at this time.
0 commit comments