From ccc8c5d2cf7ad1d771a1c6de7dadf6f8f27071bb Mon Sep 17 00:00:00 2001 From: Flamefire Date: Tue, 17 Mar 2020 08:46:34 +0100 Subject: [PATCH] Fix shared library suffix on OSX --- sdl2-config.cmake.in | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sdl2-config.cmake.in b/sdl2-config.cmake.in index 110c605d9..de54e9aad 100644 --- a/sdl2-config.cmake.in +++ b/sdl2-config.cmake.in @@ -22,18 +22,18 @@ if(NOT TARGET SDL2::SDL2) set_target_properties(SDL2::SDL2 PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "@includedir@/SDL2" IMPORTED_LINK_INTERFACE_LANGUAGES "C" - IMPORTED_LOCATION "@libdir@/libSDL2.so" + IMPORTED_LOCATION "@libdir@/${CMAKE_SHARED_LIBRARY_PREFIX}SDL2${CMAKE_SHARED_LIBRARY_SUFFIX}" INTERFACE_LINK_LIBRARIES "${SDL2_EXTRA_LINK_FLAGS}") add_library(SDL2::SDL2-static STATIC IMPORTED) set_target_properties(SDL2::SDL2-static PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "@includedir@/SDL2" IMPORTED_LINK_INTERFACE_LANGUAGES "C" - IMPORTED_LOCATION "@libdir@/libSDL2.a" + IMPORTED_LOCATION "@libdir@/${CMAKE_STATIC_LIBRARY_PREFIX}SDL2${CMAKE_STATIC_LIBRARY_SUFFIX}" INTERFACE_LINK_LIBRARIES "${SDL2_EXTRA_LINK_FLAGS_STATIC}") add_library(SDL2::SDL2main STATIC IMPORTED) set_target_properties(SDL2::SDL2main PROPERTIES IMPORTED_LINK_INTERFACE_LANGUAGES "C" - IMPORTED_LOCATION "@libdir@/libSDL2main.a") + IMPORTED_LOCATION "@libdir@/${CMAKE_STATIC_LIBRARY_PREFIX}SDL2main${CMAKE_STATIC_LIBRARY_SUFFIX}") endif()