From fbc8833e99d4fd9a8c31e8aef62b9e02f6ab5ebd Mon Sep 17 00:00:00 2001 From: willson-chen <53104026+willson-chen@users.noreply.github.com> Date: Tue, 5 Nov 2019 15:48:27 +0800 Subject: FindLIQ.cmake: delete libimagequant source code download logic * FindLIQ.cmake: add comment of LIQ_BUILD which is used in CMakeLists.txt And fixed some indent error. * FindLIQ.cmake: delete download libimagequant source code logic. * And delete the LIQ_BUILD logic in CMakeLists.txt correspondingly. * Fixed some indent errors. * FindLIQ.cmake: Delete libimagequant download path --- cmake/modules/FindLIQ.cmake | 36 +++++------------------------------- 1 file changed, 5 insertions(+), 31 deletions(-) (limited to 'cmake') diff --git a/cmake/modules/FindLIQ.cmake b/cmake/modules/FindLIQ.cmake index bf17fcf..4f730f0 100644 --- a/cmake/modules/FindLIQ.cmake +++ b/cmake/modules/FindLIQ.cmake @@ -4,56 +4,30 @@ # This module defines # LIQ_INCLUDE_DIR, where to find libimagequant.h # LIQ_LIBRARIES, the libraries to link against to use libimagequant. -# LIQ_FOUND, If false, do not try to use libimagequant. +# LIQ_FOUND, if false, do not try to use libimagequant. SET(LIQ_FOUND "NO") FIND_PATH(LIQ_INCLUDE_DIR libimagequant.h -"${PROJECT_SOURCE_DIR}/libimagequant" -"${PROJECT_SOURCE_DIR}/pngquant/lib" -/usr/local/include -/usr/include + /usr/local/include + /usr/include ) FIND_LIBRARY(LIQ_LIBRARY NAMES libimagequant imagequant - PATHS "${PROJECT_SOURCE_DIR}/libimagequant" "${PROJECT_SOURCE_DIR}/pngquant/lib" /usr/lib64 /usr/lib /usr/local/lib + PATHS /usr/lib64 /usr/lib /usr/local/lib ) IF (LIQ_LIBRARY AND LIQ_INCLUDE_DIR) SET(LIQ_FOUND "YES") SET(LIQ_LIBRARIES ${LIQ_LIBRARY}) - SET(HAVE_LIBIMAGEQUANT 1) + SET(HAVE_LIBIMAGEQUANT 1) ENDIF (LIQ_LIBRARY AND LIQ_INCLUDE_DIR) IF (LIQ_FOUND) IF (NOT LIQ_FIND_QUIETLY) MESSAGE(STATUS "Found LIQ: ${LIQ_LIBRARY} ${LIQ_INCLUDE_DIR}") ENDIF (NOT LIQ_FIND_QUIETLY) -ELSE (LIQ_FOUND) - # if existing library not found, then download and build it - IF (NOT WIN32 OR CYGWIN OR MINGW) # MSVC's C compiler is too old to compile libimagequant - IF (CMAKE_VERSION VERSION_GREATER "2.8.1") - MESSAGE(STATUS "LIQ will be built") - INCLUDE(ExternalProject) - EXTERNALPROJECT_ADD( - libimagequant - URL "http://pngquant.org/libimagequant-2.0.0-src.tar.bz2" - SOURCE_DIR libimagequant - BUILD_IN_SOURCE 1 - INSTALL_DIR libimagequant - INSTALL_COMMAND true - CONFIGURE_COMMAND true - BUILD_COMMAND make static CFLAGSADD='-fPIC' - ) - - SET(LIQ_FOUND "SORTOF") - SET(LIQ_BUILD "YES") - SET(LIQ_LIBRARIES "${PROJECT_BINARY_DIR}/libimagequant/libimagequant.a") - SET(LIQ_INCLUDE_DIR "${PROJECT_BINARY_DIR}/libimagequant/") - SET(HAVE_LIBIMAGEQUANT 1) - ENDIF(CMAKE_VERSION VERSION_GREATER "2.8.1") - ENDIF(NOT WIN32 OR CYGWIN OR MINGW) ENDIF (LIQ_FOUND) MARK_AS_ADVANCED(LIQ_INCLUDE_DIR LIQ_LIBRARIES LIQ_BUILD) -- cgit v1.2.1