aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntonio Maiorano <amaiorano@gmail.com>2019-05-01 16:36:57 -0400
committerCurtis J Bezault <curtbezault@gmail.com>2019-05-01 13:36:57 -0700
commitdf753fbcf502574e182e302607d5db0fe9188cfd (patch)
tree05070df9d343992718f80836638b42b7a1b2dc11
parent3468013fcd4014ab7a40b2b5355e86cbe4cbcf07 (diff)
downloadvcpkg-df753fbcf502574e182e302607d5db0fe9188cfd.tar.gz
vcpkg-df753fbcf502574e182e302607d5db0fe9188cfd.zip
Fix sdl2-gfx, sdl2-image, sdl2-mixer, sdl2-net, and sdl2-ttf forcing debug lib first (SDL2d) (#5948)
Prevent SDL2 dependent libraries from always linking against debug.
-rw-r--r--ports/sdl2-gfx/CMakeLists.txt4
-rw-r--r--ports/sdl2-gfx/CONTROL2
-rw-r--r--ports/sdl2-image/CMakeLists.txt11
-rw-r--r--ports/sdl2-mixer/CMakeLists.txt5
-rw-r--r--ports/sdl2-mixer/CONTROL2
-rw-r--r--ports/sdl2-net/CMakeLists.txt6
-rw-r--r--ports/sdl2-net/CONTROL2
-rw-r--r--ports/sdl2-ttf/CMakeLists.txt6
-rw-r--r--ports/sdl2-ttf/CONTROL2
9 files changed, 18 insertions, 22 deletions
diff --git a/ports/sdl2-gfx/CMakeLists.txt b/ports/sdl2-gfx/CMakeLists.txt
index 6a0ecf24e..1a63d7f8b 100644
--- a/ports/sdl2-gfx/CMakeLists.txt
+++ b/ports/sdl2-gfx/CMakeLists.txt
@@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.0)
project(SDL2_GFX C)
find_path(SDL_INCLUDE_DIR SDL2/SDL.h)
-find_library(SDL_LIBRARY NAMES SDL2d SDL2)
+find_package(SDL2 CONFIG REQUIRED)
# builtin formats
set(SDL_GFX_DEFINES WIN32)
@@ -18,7 +18,7 @@ add_library(SDL2_gfx
target_compile_definitions(SDL2_gfx PRIVATE ${SDL_GFX_DEFINES})
target_include_directories(SDL2_gfx PRIVATE ${SDL_INCLUDE_DIR}/SDL2)
-target_link_libraries(SDL2_gfx PRIVATE ${SDL_LIBRARY})
+target_link_libraries(SDL2_gfx PRIVATE SDL2::SDL2)
install(TARGETS SDL2_gfx
RUNTIME DESTINATION bin
diff --git a/ports/sdl2-gfx/CONTROL b/ports/sdl2-gfx/CONTROL
index 950afc00f..96a4d2776 100644
--- a/ports/sdl2-gfx/CONTROL
+++ b/ports/sdl2-gfx/CONTROL
@@ -1,4 +1,4 @@
Source: sdl2-gfx
-Version: 1.0.4
+Version: 1.0.4-1
Build-Depends: sdl2
Description: Graphics primitives (line, circle, rectangle etc.) with AA support, rotozoomer and other drawing related support functions wrapped up in a C based add-on library for the Simple Direct Media (SDL) cross-platform API layer.
diff --git a/ports/sdl2-image/CMakeLists.txt b/ports/sdl2-image/CMakeLists.txt
index 5b7627a61..9cc82de7a 100644
--- a/ports/sdl2-image/CMakeLists.txt
+++ b/ports/sdl2-image/CMakeLists.txt
@@ -65,18 +65,13 @@ endforeach(FORMAT)
# SDL
find_path(SDL_INCLUDE_DIR SDL2/SDL.h)
-find_library(SDL_LIBRARY_RELEASE NAMES SDL2)
-find_library(SDL_LIBRARY_DEBUG NAMES SDL2d)
-SET(SDL_LIBRARY
- debug ${SDL_LIBRARY_DEBUG}
- optimized ${SDL_LIBRARY_RELEASE}
- )
+find_package(SDL2 CONFIG REQUIRED)
include_directories(${SDL_INCLUDE_DIR})
include_directories(${SDL_INCLUDE_DIR}/SDL2)
include_directories(${CMAKE_SOURCE_DIR})
-target_link_libraries(SDL2_image ${SDL_LIBRARY})
+target_link_libraries(SDL2_image SDL2::SDL2)
# external dependencies
foreach(DEPENDENCY IN LISTS DEPENDENCIES)
@@ -123,7 +118,7 @@ install(EXPORT SDL2_image
message(STATUS "Link-time dependencies:")
-message(STATUS " " ${SDL_LIBRARY})
+message(STATUS " " SDL2::SDL2)
foreach(DEPENDENCY ${DEPENDENCIES})
if(${DEPENDENCY}_FOUND)
message(STATUS " " ${DEPENDENCY})
diff --git a/ports/sdl2-mixer/CMakeLists.txt b/ports/sdl2-mixer/CMakeLists.txt
index b38847fbb..f9912346c 100644
--- a/ports/sdl2-mixer/CMakeLists.txt
+++ b/ports/sdl2-mixer/CMakeLists.txt
@@ -2,9 +2,10 @@ cmake_minimum_required(VERSION 3.1)
project(SDL2_MIXER C)
find_path(SDL_INCLUDE_DIR SDL.h PATH_SUFFIXES SDL2)
-find_library(SDL_LIBRARY NAMES SDL2d SDL2)
+find_package(SDL2 CONFIG REQUIRED)
set(SDL_MIXER_INCLUDES ${SDL_INCLUDE_DIR})
-set(SDL_MIXER_LIBRARIES ${SDL_LIBRARY})
+
+set(SDL_MIXER_LIBRARIES SDL2::SDL2)
# builtin formats
set(SDL_MIXER_DEFINES MUSIC_WAV)
diff --git a/ports/sdl2-mixer/CONTROL b/ports/sdl2-mixer/CONTROL
index 206e922a6..4c55575f4 100644
--- a/ports/sdl2-mixer/CONTROL
+++ b/ports/sdl2-mixer/CONTROL
@@ -1,5 +1,5 @@
Source: sdl2-mixer
-Version: 2.0.4-1
+Version: 2.0.4-2
Description: Multi-channel audio mixer library for SDL.
Build-Depends: sdl2
diff --git a/ports/sdl2-net/CMakeLists.txt b/ports/sdl2-net/CMakeLists.txt
index bb697bb46..053093643 100644
--- a/ports/sdl2-net/CMakeLists.txt
+++ b/ports/sdl2-net/CMakeLists.txt
@@ -6,7 +6,7 @@ if (MSVC)
endif()
find_path(SDL_INCLUDE_DIR SDL2/SDL.h)
-find_library(SDL_LIBRARY NAMES SDL2d SDL2)
+find_package(SDL2 CONFIG REQUIRED)
add_library(SDL2_net SDLnet.c SDLnetselect.c SDLnetTCP.c SDLnetUDP.c version.rc)
@@ -15,7 +15,7 @@ target_compile_definitions(SDL2_net PRIVATE _WINSOCK_DEPRECATED_NO_WARNINGS)
target_include_directories(SDL2_net PRIVATE ${SDL_INCLUDE_DIR}/SDL2)
if (WIN32)
- target_link_libraries(SDL2_net ${SDL_LIBRARY} ws2_32 iphlpapi)
+ target_link_libraries(SDL2_net SDL2::SDL2 ws2_32 iphlpapi)
endif()
install(TARGETS SDL2_net
@@ -35,4 +35,4 @@ if(NOT DEFINED SDL_NET_SKIP_HEADERS)
endif()
message(STATUS "Link-time dependencies:")
-message(STATUS " " ${SDL_LIBRARY})
+message(STATUS " " SDL2::SDL2)
diff --git a/ports/sdl2-net/CONTROL b/ports/sdl2-net/CONTROL
index 56ee980be..e855e2656 100644
--- a/ports/sdl2-net/CONTROL
+++ b/ports/sdl2-net/CONTROL
@@ -1,4 +1,4 @@
Source: sdl2-net
-Version: 2.0.1-5
+Version: 2.0.1-6
Description: Networking library for SDL
Build-Depends: sdl2
diff --git a/ports/sdl2-ttf/CMakeLists.txt b/ports/sdl2-ttf/CMakeLists.txt
index 94e14e391..8d34a413a 100644
--- a/ports/sdl2-ttf/CMakeLists.txt
+++ b/ports/sdl2-ttf/CMakeLists.txt
@@ -2,14 +2,14 @@ cmake_minimum_required(VERSION 3.0)
project(SDL2_TTF C)
find_path(SDL_INCLUDE_DIR SDL2/SDL.h)
-find_library(SDL_LIBRARY NAMES SDL2d SDL2)
+find_package(SDL2 CONFIG REQUIRED)
find_package(Freetype REQUIRED)
add_library(SDL2_ttf SDL_ttf.c version.rc)
set_target_properties(SDL2_ttf PROPERTIES DEFINE_SYMBOL SDL2_EXPORTS)
target_include_directories(SDL2_ttf PRIVATE ${SDL_INCLUDE_DIR}/SDL2 ${FREETYPE_INCLUDE_DIRS})
-target_link_libraries(SDL2_ttf ${SDL_LIBRARY} ${FREETYPE_LIBRARIES})
+target_link_libraries(SDL2_ttf SDL2::SDL2 ${FREETYPE_LIBRARIES})
install(TARGETS SDL2_ttf
EXPORT SDL2_ttf
@@ -28,5 +28,5 @@ if(NOT DEFINED SDL_TTF_SKIP_HEADERS)
endif()
message(STATUS "Link-time dependencies:")
-message(STATUS " " ${SDL_LIBRARY})
+message(STATUS " " SDL2::SDL2)
message(STATUS " " ${FREETYPE_LIBRARIES})
diff --git a/ports/sdl2-ttf/CONTROL b/ports/sdl2-ttf/CONTROL
index d2c77ea42..22598164e 100644
--- a/ports/sdl2-ttf/CONTROL
+++ b/ports/sdl2-ttf/CONTROL
@@ -1,4 +1,4 @@
Source: sdl2-ttf
-Version: 2.0.15-1
+Version: 2.0.15-2
Description: A library for rendering TrueType fonts with SDL
Build-Depends: sdl2, freetype