aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Neumann <30894796+Neumann-A@users.noreply.github.com>2019-05-24 18:49:36 +0200
committerPhil Christensen <philc@microsoft.com>2019-05-24 09:49:36 -0700
commitba39468c5871960915c35ef4c04e7cd62c9054d1 (patch)
tree104e86f42598df76c037548d8aa4abb967d4eef7
parent31ff85a7171b25ee9248675db0db1c865830c1ce (diff)
downloadvcpkg-ba39468c5871960915c35ef4c04e7cd62c9054d1.tar.gz
vcpkg-ba39468c5871960915c35ef4c04e7cd62c9054d1.zip
[smpeg2] make sdl2 linkage more robust (#6604)
-rw-r--r--ports/smpeg2/CMakeLists.txt8
-rw-r--r--ports/smpeg2/CONTROL2
2 files changed, 7 insertions, 3 deletions
diff --git a/ports/smpeg2/CMakeLists.txt b/ports/smpeg2/CMakeLists.txt
index 87a3586be..b0e284b05 100644
--- a/ports/smpeg2/CMakeLists.txt
+++ b/ports/smpeg2/CMakeLists.txt
@@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 2.6)
project(SMPEG2 CXX)
find_path(SDL_INCLUDE_DIR SDL2/SDL.h)
-find_library(SDL_LIBRARY NAMES SDL2d SDL2)
+find_package(SDL2 CONFIG REQUIRED)
include_directories(${SDL_INCLUDE_DIR})
include_directories(${SDL_INCLUDE_DIR}/SDL2)
@@ -46,7 +46,11 @@ add_library(smpeg2
smpeg.cpp)
set_target_properties(smpeg2 PROPERTIES DEFINE_SYMBOL SDL2_EXPORTS)
-target_link_libraries(smpeg2 ${SDL_LIBRARY})
+if(BUILD_SHARED_LIBS)
+ target_link_libraries(smpeg2 SDL2::SDL2)
+else()
+ target_link_libraries(smpeg2 SDL2::SDL2-static)
+endif()
install(TARGETS smpeg2
RUNTIME DESTINATION bin
diff --git a/ports/smpeg2/CONTROL b/ports/smpeg2/CONTROL
index 0de1c4700..fc1e1604c 100644
--- a/ports/smpeg2/CONTROL
+++ b/ports/smpeg2/CONTROL
@@ -1,4 +1,4 @@
Source: smpeg2
-Version: 2.0.0-5
+Version: 2.0.0-6
Description: SDL MPEG Player Library
Build-Depends: sdl2