Skip to content
Permalink
Browse files

Fix shared library suffix on OSX

  • Loading branch information
Flamefire committed Mar 17, 2020
1 parent 3154d92 commit ccc8c5d2cf7ad1d771a1c6de7dadf6f8f27071bb
Showing with 3 additions and 3 deletions.
  1. +3 −3 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()

0 comments on commit ccc8c5d

Please sign in to comment.