Fix shared library suffix on OSX

This commit is contained in:
Flamefire 2020-03-17 08:46:34 +01:00
parent 3154d92473
commit ccc8c5d2cf

View File

@ -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()