cmake/modules/FindLIBOPENJPEG2.cmake | 22 +++++++--------------- 1 file changed, 7 insertions(+), 15 deletions(-)
New commits: commit 08a4ac65d202742209bca6cf3806c4d111a5522c Author: Albert Astals Cid <[email protected]> Date: Fri May 4 15:51:18 2018 +0200 FindLIBOPENJPEG2.cmake: Remove cache code It wasn't working since the if mentioned LIBOPENJPEG2_INCLUDE_DIR instead of LIBOPENJPEG2_INCLUDE_DIRS and when fixing the typo it broke the build because we were not defining USE_OPENJPEG2, so better just remove the broken if code diff --git a/cmake/modules/FindLIBOPENJPEG2.cmake b/cmake/modules/FindLIBOPENJPEG2.cmake index f18bd3ce..654620eb 100644 --- a/cmake/modules/FindLIBOPENJPEG2.cmake +++ b/cmake/modules/FindLIBOPENJPEG2.cmake @@ -11,20 +11,12 @@ # For details see the accompanying COPYING-CMAKE-SCRIPTS file. -if (LIBOPENJPEG2_LIBRARIES AND LIBOPENJPEG2_INCLUDE_DIR) +set(LIBOPENJPEG2_FOUND FALSE) +set(LIBOPENJPEG2_INCLUDE_DIRS) +set(LIBOPENJPEG2_LIBRARIES) - # in cache already - set(LIBOPENJPEG2_FOUND TRUE) - -else () - - set(LIBOPENJPEG2_FOUND FALSE) - set(LIBOPENJPEG2_INCLUDE_DIRS) - set(LIBOPENJPEG2_LIBRARIES) - - find_package(PkgConfig REQUIRED) - pkg_check_modules(LIBOPENJPEG2 libopenjp2) - if (LIBOPENJPEG2_FOUND) - add_definitions(-DUSE_OPENJPEG2) - endif () +find_package(PkgConfig REQUIRED) +pkg_check_modules(LIBOPENJPEG2 libopenjp2) +if (LIBOPENJPEG2_FOUND) + add_definitions(-DUSE_OPENJPEG2) endif () _______________________________________________ poppler mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/poppler
