Skip to content

Commit

Permalink
Fixed libgd#472: Adjusting CMakeLists.txt (libgd#582)
Browse files Browse the repository at this point in the history
Add REQUIRED to FIND_PACKAGE
  • Loading branch information
willson-chen authored May 10, 2020
1 parent 2ba27b5 commit 450fd2e
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 9 deletions.
16 changes: 8 additions & 8 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -114,39 +114,39 @@ else (USE_EXT_GD)
endif (ENABLE_ICONV)

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)
FIND_PACKAGE(PTHREAD)
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})
Expand Down
4 changes: 4 additions & 0 deletions cmake/modules/FindLIQ.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ 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 (LIQ_FIND_REQUIRED)
MESSAGE(FATAL_ERROR "Could not find LIQ library")
ENDIF (LIQ_FIND_REQUIRED)
ENDIF (LIQ_FOUND)

MARK_AS_ADVANCED(LIQ_INCLUDE_DIR LIQ_LIBRARIES LIQ_BUILD)
7 changes: 6 additions & 1 deletion travis/main.sh
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,14 @@ cmake_args=(
-DENABLE_PNG=1
-DENABLE_TIFF=1
-DENABLE_WEBP=1
-DENABLE_XPM=1
)

# libxpm-dev is unavaible in brew repo
# Once it gets avaible, please modify this code block.
if [ "${TRAVIS_OS_NAME}" == "linux" ]; then
cmake_args[${#cmake_args[@]}]="-DENABLE_XPM=1"
fi

build_cmake() {
# First try building out of tree.
mkdir build
Expand Down

0 comments on commit 450fd2e

Please sign in to comment.