diff options
author | Kornel Lesiński <kornel@geekhood.net> | 2013-03-27 19:41:21 +0000 |
---|---|---|
committer | Kornel Lesiński <kornel@geekhood.net> | 2013-03-27 19:41:21 +0000 |
commit | 03a41b1ad2cdf85daef73c1b5cb8037b5468c6ba (patch) | |
tree | f74b413f90b7016a50edd0dd027ed8efff7e71de /cmake | |
parent | f26dffb68ba542f357a3f3a28bb1e2260d00ecf1 (diff) | |
download | libgd-03a41b1ad2cdf85daef73c1b5cb8037b5468c6ba.tar.gz |
Use cmake external project only if cmake version is new enough
--HG--
extra : rebase_source : 13014b78f6d6e58279ada75bd3d4ed009158b183
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/modules/FindLIQ.cmake | 32 |
1 files changed, 17 insertions, 15 deletions
diff --git a/cmake/modules/FindLIQ.cmake b/cmake/modules/FindLIQ.cmake index 4a9ab25..19f490d 100644 --- a/cmake/modules/FindLIQ.cmake +++ b/cmake/modules/FindLIQ.cmake @@ -33,24 +33,26 @@ IF (LIQ_FOUND) 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 - 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 - ) + 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 + ) - SET(LIQ_FOUND "SORTOF") - SET(LIQ_BUILD "YES") + 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_H 1) + SET(HAVE_LIBIMAGEQUANT_H 1) + ENDIF(CMAKE_VERSION VERSION_GREATER "2.8.1") ENDIF(NOT WIN32 OR CYGWIN OR MINGW) ENDIF (LIQ_FOUND) |