diff options
| author | Antonio Maiorano <amaiorano@gmail.com> | 2019-05-01 16:36:57 -0400 |
|---|---|---|
| committer | Curtis J Bezault <curtbezault@gmail.com> | 2019-05-01 13:36:57 -0700 |
| commit | df753fbcf502574e182e302607d5db0fe9188cfd (patch) | |
| tree | 05070df9d343992718f80836638b42b7a1b2dc11 /ports/sdl2-image | |
| parent | 3468013fcd4014ab7a40b2b5355e86cbe4cbcf07 (diff) | |
| download | vcpkg-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.
Diffstat (limited to 'ports/sdl2-image')
| -rw-r--r-- | ports/sdl2-image/CMakeLists.txt | 11 |
1 files changed, 3 insertions, 8 deletions
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}) |
