diff options
| author | Patrick Bader <mail@patrickbader.eu> | 2017-01-06 22:05:22 +0100 |
|---|---|---|
| committer | Patrick Bader <mail@patrickbader.eu> | 2017-01-06 22:05:22 +0100 |
| commit | 937c4e26b074d7ddb603e16186e4efe271e8c230 (patch) | |
| tree | dd0d3348f05e0b273a44b5ef4678349ebec663d7 | |
| parent | 30a1f0bff09990147b487c981e9adcdc4b249db8 (diff) | |
| download | vcpkg-937c4e26b074d7ddb603e16186e4efe271e8c230.tar.gz vcpkg-937c4e26b074d7ddb603e16186e4efe271e8c230.zip | |
fixed findWEBP.cmake to select debug version of webp for debug builds.
| -rw-r--r-- | ports/sdl2-image/FindWEBP.cmake | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/ports/sdl2-image/FindWEBP.cmake b/ports/sdl2-image/FindWEBP.cmake index ddabe71fe..a74814026 100644 --- a/ports/sdl2-image/FindWEBP.cmake +++ b/ports/sdl2-image/FindWEBP.cmake @@ -7,6 +7,7 @@ # # Copyright (C) 2012 Raphael Kubo da Costa <rakuco@webkit.org> # Copyright (C) 2013 Igalia S.L. +# Copyright (C) 2017 Patrick Bader # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions @@ -39,12 +40,16 @@ find_path(WEBP_INCLUDE_DIRS ) mark_as_advanced(WEBP_INCLUDE_DIRS) +if(CMAKE_BUILD_TYPE MATCHES DEBUG) + message("debug mode") +endif(CMAKE_BUILD_TYPE MATCHES DEBUG) + # Look for the library. -find_library( - WEBP_LIBRARIES - NAMES webp - HINTS ${PC_WEBP_LIBDIR} ${PC_WEBP_LIBRARY_DIRS} -) +find_library(WEBP_LIBRARY_RELEASE NAMES webp HINTS ${PC_WEBP_LIBDIR} ${PC_WEBP_LIBRARY_DIRS}) +find_library(WEBP_LIBRARY_DEBUG NAMES webpd HINTS ${PC_WEBP_LIBDIR} ${PC_WEBP_LIBRARY_DIRS}) + +select_library_configurations(WEBP) + mark_as_advanced(WEBP_LIBRARIES) include(FindPackageHandleStandardArgs) |
