mirror of
https://git.code.sf.net/p/zint/code
synced 2025-12-17 09:57:02 +00:00
Optionalize the PNG and the Qt dependencies
Expose the ability to turn these dependencies off, which results in reduced functionality. However, it enables a developer using the zint library to instruct cmake to build a libzint as deployed by e.g. build servers which don't have png/zint installed, without having to uninstall those libraries from the development system
This commit is contained in:
@@ -23,6 +23,8 @@ option(ZINT_DEBUG "Set debug compile flag" OFF)
|
||||
option(ZINT_SANITIZE "Set sanitize compile/link flags" OFF)
|
||||
option(ZINT_TEST "Set test compile flag" OFF)
|
||||
option(ZINT_STATIC "Build static library" OFF)
|
||||
option(ZINT_USE_PNG "Build with PNG support" ON)
|
||||
option(ZINT_USE_QT "Build with QT support" ON)
|
||||
|
||||
include(SetPaths.cmake)
|
||||
|
||||
@@ -90,7 +92,9 @@ ENDIF(APPLE)
|
||||
add_subdirectory(backend)
|
||||
add_subdirectory(frontend)
|
||||
|
||||
if($ENV{CMAKE_PREFIX_PATH} MATCHES "6[.][0-9][.][0-9]")
|
||||
if(NOT ZINT_USE_QT)
|
||||
message(STATUS "Qt support was disabled for this build")
|
||||
elseif($ENV{CMAKE_PREFIX_PATH} MATCHES "6[.][0-9][.][0-9]")
|
||||
set(USE_QT6 TRUE)
|
||||
message(STATUS "Using Qt6")
|
||||
cmake_policy(SET CMP0012 NEW) # Recognize constants in if()
|
||||
|
||||
Reference in New Issue
Block a user