diff options
Diffstat (limited to 'Build/source/libs/gd/libgd-src/CMakeLists.txt')
-rw-r--r-- | Build/source/libs/gd/libgd-src/CMakeLists.txt | 37 |
1 files changed, 25 insertions, 12 deletions
diff --git a/Build/source/libs/gd/libgd-src/CMakeLists.txt b/Build/source/libs/gd/libgd-src/CMakeLists.txt index fc76868a940..bf7836f35dd 100644 --- a/Build/source/libs/gd/libgd-src/CMakeLists.txt +++ b/Build/source/libs/gd/libgd-src/CMakeLists.txt @@ -51,6 +51,8 @@ SET (CMAKE_ARCHIVE_OUTPUT_DIRECTORY "Single Directory for all static libraries." ) +SET(PKG_REQUIRES_PRIVATES "") + if (USE_EXT_GD) message("Using GD at: ${USE_EXT_GD}") INCLUDE_DIRECTORIES(BEFORE ${GD_INCLUDE_DIR}) @@ -94,15 +96,18 @@ else (USE_EXT_GD) GV_LT(VERSION GDLIB_LIB_VERSION) MESSAGE(STATUS "gd shared lib version ${GDLIB_LIB_SOVERSION} (${GDLIB_LIB_VERSION})") - SET(CMAKE_REQUIRED_INCLUDES "/usr/include" "/usr/local/include") - include(CheckIncludeFiles) include(CheckIncludeFile) include(AC_HEADER_STDC) include(CheckPrototypeExists) + if (ENABLE_GD_FORMATS) + FIND_PACKAGE(ZLIB REQUIRED) + endif (ENABLE_GD_FORMATS) + if (ENABLE_PNG) + FIND_PACKAGE(ZLIB REQUIRED) FIND_PACKAGE(PNG REQUIRED) endif (ENABLE_PNG) @@ -110,14 +115,12 @@ else (USE_EXT_GD) FIND_PACKAGE(ICONV REQUIRED) endif (ENABLE_ICONV) - FIND_PACKAGE(ZLIB) - IF (ENABLE_WEBP) - FIND_PACKAGE(WEBP) + FIND_PACKAGE(WEBP REQUIRED) ENDIF (ENABLE_WEBP) IF (ENABLE_LIQ) - FIND_PACKAGE(LIQ) + FIND_PACKAGE(LIQ REQUIRED) ENDIF (ENABLE_LIQ) IF (NOT WIN32) @@ -125,27 +128,27 @@ else (USE_EXT_GD) ENDIF (NOT WIN32) if (ENABLE_JPEG) - FIND_PACKAGE(JPEG) + FIND_PACKAGE(JPEG REQUIRED) endif (ENABLE_JPEG) if (ENABLE_TIFF) - FIND_PACKAGE(TIFF) + FIND_PACKAGE(TIFF REQUIRED) endif (ENABLE_TIFF) if (ENABLE_FREETYPE) - FIND_PACKAGE(Freetype) + FIND_PACKAGE(Freetype REQUIRED) endif (ENABLE_FREETYPE) if (ENABLE_XPM) - FIND_PACKAGE(XPM) + FIND_PACKAGE(XPM REQUIRED) endif (ENABLE_XPM) if (ENABLE_FONTCONFIG) - FIND_PACKAGE(FontConfig) + FIND_PACKAGE(FontConfig REQUIRED) endif (ENABLE_FONTCONFIG) if (ENABLE_RAQM) - FIND_PACKAGE(RAQM) + FIND_PACKAGE(RAQM REQUIRED) endif (ENABLE_RAQM) SET(ENABLE_GD_FORMATS ${ENABLE_GD_FORMATS}) @@ -154,11 +157,13 @@ else (USE_EXT_GD) INCLUDE_DIRECTORIES(${FREETYPE_INCLUDE_DIRS}) SET(HAVE_FT2BUILD_H 1) SET(HAVE_LIBFREETYPE 1) + LIST(APPEND PKG_REQUIRES_PRIVATES freetype2) ENDIF(FREETYPE_FOUND) IF(ZLIB_FOUND) INCLUDE_DIRECTORIES(${ZLIB_INCLUDE_DIR}) SET(HAVE_LIBZ 1) + LIST(APPEND PKG_REQUIRES_PRIVATES zlib) ENDIF(ZLIB_FOUND) IF(WEBP_FOUND) @@ -169,6 +174,7 @@ else (USE_EXT_GD) IF(PNG_FOUND) INCLUDE_DIRECTORIES(${PNG_INCLUDE_DIR}) SET(HAVE_LIBPNG 1) + LIST(APPEND PKG_REQUIRES_PRIVATES libpng) ENDIF(PNG_FOUND) IF(ICONV_FOUND) @@ -185,21 +191,25 @@ else (USE_EXT_GD) IF(XPM_FOUND) INCLUDE_DIRECTORIES(${XPM_INCLUDE_DIR}) SET(HAVE_LIBXPM 1) + LIST(APPEND PKG_REQUIRES_PRIVATES xpm) ENDIF(XPM_FOUND) IF(JPEG_FOUND) INCLUDE_DIRECTORIES(${JPEG_INCLUDE_DIR}) SET(HAVE_LIBJPEG 1) + LIST(APPEND PKG_REQUIRES_PRIVATES libjpeg) ENDIF(JPEG_FOUND) IF(TIFF_FOUND) INCLUDE_DIRECTORIES(${TIFF_INCLUDE_DIR}) SET(HAVE_LIBTIFF 1) + LIST(APPEND PKG_REQUIRES_PRIVATES libtiff-4) ENDIF(TIFF_FOUND) IF(FONTCONFIG_FOUND) INCLUDE_DIRECTORIES(${FONTCONFIG_INCLUDE_DIR}) SET(HAVE_LIBFONTCONFIG 1) + LIST(APPEND PKG_REQUIRES_PRIVATES fontconfig) ELSE (FONTCONFIG_FOUND) SET(FONTCONFIG_LIBRARY "") SET(FONTCONFIG_INCLUDE_DIR "") @@ -208,8 +218,11 @@ else (USE_EXT_GD) IF(RAQM_FOUND) INCLUDE_DIRECTORIES(${RAQM_INCLUDE_DIR}) + SET(HAVE_RAQM 1) + LIST(APPEND PKG_REQUIRES_PRIVAES raqm) ENDIF(RAQM_FOUND) + string(REPLACE ";" ", " PKG_REQUIRES_PRIVATES "${PKG_REQUIRES_PRIVATES}") SET(HAVE_CONFIG_H 1) ADD_DEFINITIONS(-DHAVE_CONFIG_H) |