Make zint-static build optional

This commit is contained in:
gitlost 2020-03-30 10:54:21 +01:00
parent e2cd96924d
commit 9b771dba3a
2 changed files with 4 additions and 1 deletions

View File

@ -20,6 +20,7 @@ set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/modules" )
set(ZINT_DEBUG FALSE CACHE BOOL "Set debug compile flag")
set(ZINT_SANITIZE FALSE CACHE BOOL "Set sanitize compile/link flags")
set(ZINT_TEST FALSE CACHE BOOL "Set test compile flag")
set(ZINT_STATIC FALSE CACHE BOOL "Build static library")
include (SetPaths.cmake)

View File

@ -18,7 +18,9 @@ else(PNG_FOUND)
endif(PNG_FOUND)
add_library(zint SHARED ${zint_SRCS})
if(ZINT_STATIC)
add_library(zint-static STATIC ${zint_SRCS})
endif(ZINT_STATIC)
set_target_properties(zint PROPERTIES SOVERSION "${ZINT_VERSION_MAJOR}.${ZINT_VERSION_MINOR}"
VERSION ${ZINT_VERSION})