Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -411,6 +411,9 @@ else()
if(asimage)
message(SEND_ERROR "minimal=ON is not compatible with asimage=ON. Consider setting instead gminimal=ON")
endif()
if(asimage_tiff)
message(SEND_ERROR "minimal=ON is not compatible with asimage_tiff=ON. Consider setting instead gminimal=ON")
endif()
if(x11)
message(SEND_ERROR "minimal=ON is not compatible with x11=ON. Consider setting instead gminimal=ON")
endif()
Expand Down
26 changes: 15 additions & 11 deletions cmake/modules/SearchInstalledSoftware.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -109,16 +109,18 @@ foreach(suffix FOUND INCLUDE_DIR LIBRARY LIBRARY_DEBUG LIBRARY_RELEASE LIBRARIES
endforeach()

# Request explicit user opt-in for required dependencies
ROOT_FIND_REQUIRED_DEP(Freetype builtin_freetype)
ROOT_FIND_REQUIRED_DEP(GIF builtin_gif)
ROOT_FIND_REQUIRED_DEP(JPEG builtin_jpeg)
if(asimage)
ROOT_FIND_REQUIRED_DEP(Freetype builtin_freetype)
ROOT_FIND_REQUIRED_DEP(GIF builtin_gif)
ROOT_FIND_REQUIRED_DEP(JPEG builtin_jpeg)
# We cannot PNG here because while searching PNG, CMake will also find ZLIB.
# If found, CMake will define the default variables and target:
# see https://cmake.org/cmake/help/latest/module/FindZLIB.html).
# For this reason, the check has to be put below, after ZLIB is searched for.
#ROOT_FIND_REQUIRED_DEP(PNG builtin_png)
endif()
ROOT_FIND_REQUIRED_DEP(LZ4 builtin_lz4)
ROOT_FIND_REQUIRED_DEP(LibLZMA builtin_lzma)
# We cannot PNG here because while searching PNG, CMake will also find ZLIB.
# If found, CMake will define the default variables and target:
# see https://cmake.org/cmake/help/latest/module/FindZLIB.html).
# For this reason, the check has to be put below, after ZLIB is searched for.
#ROOT_FIND_REQUIRED_DEP(PNG builtin_png)
ROOT_FIND_REQUIRED_DEP(ZLIB builtin_zlib)
ROOT_FIND_REQUIRED_DEP(ZSTD builtin_zstd)

Expand Down Expand Up @@ -170,9 +172,11 @@ else()
message(STATUS "Zlib detected")
endif()

# This check can be added only now because of the reasons explained above, where all
# other required dependencies are checked.
ROOT_FIND_REQUIRED_DEP(PNG builtin_png)
if(asimage)
# This check can be added only now because of the reasons explained above, where all
# other required dependencies are checked.
ROOT_FIND_REQUIRED_DEP(PNG builtin_png)
endif()

#---Check for nlohmann/json.hpp---------------------------------------------------------
if(NOT builtin_nlohmannjson)
Expand Down
Loading