From 471ae458bc32a5498f48e4c9102cb9279bf57daa Mon Sep 17 00:00:00 2001 From: Caio Renato Bedulli do Carmo Date: Wed, 4 Oct 2023 04:25:40 -0300 Subject: [PATCH] Remove hardcoded dynamic and static library names --- sdl2_image-config.cmake.in | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/sdl2_image-config.cmake.in b/sdl2_image-config.cmake.in index 111aef13..49221ac1 100644 --- a/sdl2_image-config.cmake.in +++ b/sdl2_image-config.cmake.in @@ -64,32 +64,32 @@ unset(libdir) include(CMakeFindDependencyMacro) -if(NOT TARGET SDL2_image::SDL2_image) - add_library(SDL2_image::SDL2_image SHARED IMPORTED) - set_target_properties(SDL2_image::SDL2_image +if(NOT TARGET ${SDL2_IMAGE_LIBRARIES}) + add_library(${SDL2_IMAGE_LIBRARIES} SHARED IMPORTED) + set_target_properties(${SDL2_IMAGE_LIBRARIES} PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${_sdl2image_incdir}" COMPATIBLE_INTERFACE_BOOL "SDL2_SHARED" INTERFACE_SDL2_SHARED "ON" ) if(WIN32) - set_target_properties(SDL2_image::SDL2_image + set_target_properties(${SDL2_IMAGE_LIBRARIES} PROPERTIES IMPORTED_LOCATION "${_sdl2image_bindir}/SDL2_image.dll" IMPORTED_IMPLIB "${_sdl2image_libdir}/${CMAKE_STATIC_LIBRARY_PREFIX}SDL2_image.dll${CMAKE_STATIC_LIBRARY_SUFFIX}" ) else() - set_target_properties(SDL2_image::SDL2_image + set_target_properties(${SDL2_IMAGE_LIBRARIES} PROPERTIES IMPORTED_LOCATION "${_sdl2image_libdir}/${CMAKE_SHARED_LIBRARY_PREFIX}SDL2_image${CMAKE_SHARED_LIBRARY_SUFFIX}" ) endif() endif() -if(NOT TARGET SDL2_image::SDL2_image-static) - add_library(SDL2_image::SDL2_image-static STATIC IMPORTED) +if(NOT TARGET ${SDL2_IMAGE_STATIC_LIBRARIES}) + add_library(${SDL2_IMAGE_STATIC_LIBRARIES} STATIC IMPORTED) - set_target_properties(SDL2_image::SDL2_image-static + set_target_properties(${SDL2_IMAGE_STATIC_LIBRARIES} PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${_sdl2image_incdir}" IMPORTED_LOCATION "${_sdl2image_libdir}/${CMAKE_STATIC_LIBRARY_PREFIX}SDL2_image${CMAKE_STATIC_LIBRARY_SUFFIX}"