From 937c4e26b074d7ddb603e16186e4efe271e8c230 Mon Sep 17 00:00:00 2001 From: Patrick Bader Date: Fri, 6 Jan 2017 22:05:22 +0100 Subject: fixed findWEBP.cmake to select debug version of webp for debug builds. --- ports/sdl2-image/FindWEBP.cmake | 15 ++++++++++----- 1 file 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 # 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) -- cgit v1.2.3