added backwards compatibility for POCO_STATIC setting

This commit is contained in:
Günter Obiltschnig 2020-02-13 20:07:47 +01:00
parent e5afb2fa89
commit 13d0bd7f0b

View File

@ -53,12 +53,16 @@ endif()
# Include some common macros to simpilfy the Poco CMake files
include(PocoMacros)
option(BUILD_SHARED_LIBS "Build shared libraries" ON)
if(POCO_STATIC)
option(BUILD_SHARED_LIBS "Build shared libraries" OFF)
else()
option(BUILD_SHARED_LIBS "Build shared libraries" ON)
endif()
if(MSVC)
option(POCO_MT "Set to OFF|ON (default is OFF) to control build of POCO as /MT instead of /MD" OFF)
option(ENABLE_MSVC_MP "Set to OFF|ON (default is OFF) to control parallel build of POCO with MSVC" ON)
if(BUILD_SHARED_LIBS AND POCO_MT)
message(FATAL_ERROR "Cannot have both BUILD_SHARED_LIBS and POCO_MT")
endif()