mirror of
https://github.com/pocoproject/poco.git
synced 2024-12-12 10:13:51 +01:00
remove POCO_STATIC
This commit is contained in:
parent
bb63b28121
commit
75a86ad868
@ -53,20 +53,12 @@ endif()
|
||||
# Include some common macros to simpilfy the Poco CMake files
|
||||
include(PocoMacros)
|
||||
|
||||
option(POCO_STATIC
|
||||
"Set to OFF|ON (default is OFF) to control build of POCO as STATIC library" OFF)
|
||||
if(POCO_STATIC)
|
||||
option(BUILD_SHARED_LIBS "Build shared libraries" OFF)
|
||||
else()
|
||||
option(BUILD_SHARED_LIBS "Build shared libraries" ON)
|
||||
endif()
|
||||
option(BUILD_SHARED_LIBS "Build shared libraries" ON)
|
||||
|
||||
if(MSVC)
|
||||
option(POCO_MT
|
||||
"Set to OFF|ON (default is OFF) to control build of POCO as /MT instead of /MD" OFF)
|
||||
option(POCO_MT "Set to OFF|ON (default is OFF) to control build of POCO as /MT instead of /MD" ON)
|
||||
|
||||
option(ENABLE_MSVC_MP
|
||||
"Set to OFF|ON (default is OFF) to control parallel build of POCO with MSVC" OFF)
|
||||
option(ENABLE_MSVC_MP "Set to OFF|ON (default is OFF) to control parallel build of POCO with MSVC" ON)
|
||||
|
||||
# allow disabling of internally built OpenSSL# (see below for details)
|
||||
# if POCO pre-built OpenSSL directory is found, and POCO_DISABLE_INTERNAL_OPENSSL=OFF,
|
||||
|
@ -7,7 +7,7 @@ file(GLOB_RECURSE HDRS_G "include/*.h" )
|
||||
POCO_HEADERS_AUTO( SRCS ${HDRS_G})
|
||||
|
||||
# Version Resource
|
||||
if(MSVC AND NOT POCO_STATIC)
|
||||
if(MSVC AND BUILD_SHARED_LIBS)
|
||||
source_group("Resources" FILES ${PROJECT_SOURCE_DIR}/DLLVersion.rc)
|
||||
list(APPEND SRCS ${PROJECT_SOURCE_DIR}/DLLVersion.rc)
|
||||
endif()
|
||||
|
@ -7,7 +7,7 @@ file(GLOB_RECURSE HDRS_G "include/*.h" )
|
||||
POCO_HEADERS_AUTO( SRCS ${HDRS_G})
|
||||
|
||||
# Version Resource
|
||||
if(MSVC AND NOT POCO_STATIC)
|
||||
if(MSVC AND BUILD_SHARED_LIBS)
|
||||
source_group("Resources" FILES ${PROJECT_SOURCE_DIR}/DLLVersion.rc)
|
||||
list(APPEND SRCS ${PROJECT_SOURCE_DIR}/DLLVersion.rc)
|
||||
endif()
|
||||
@ -26,7 +26,7 @@ target_include_directories(Crypto
|
||||
PUBLIC
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
|
||||
$<INSTALL_INTERFACE:include>
|
||||
PRIVATE
|
||||
PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src
|
||||
)
|
||||
|
||||
|
@ -12,7 +12,7 @@ if(MSVC AND NOT(MSVC_VERSION LESS 1400))
|
||||
endif()
|
||||
|
||||
# Version Resource
|
||||
if(MSVC AND NOT POCO_STATIC)
|
||||
if(MSVC AND BUILD_SHARED_LIBS)
|
||||
source_group("Resources" FILES ${PROJECT_SOURCE_DIR}/DLLVersion.rc)
|
||||
list(APPEND SRCS ${PROJECT_SOURCE_DIR}/DLLVersion.rc)
|
||||
endif()
|
||||
|
@ -7,7 +7,7 @@ file(GLOB_RECURSE HDRS_G "include/*.h" )
|
||||
POCO_HEADERS_AUTO( MYSQL_SRCS ${HDRS_G})
|
||||
|
||||
# Version Resource
|
||||
if(MSVC AND NOT POCO_STATIC)
|
||||
if(MSVC AND BUILD_SHARED_LIBS)
|
||||
source_group("Resources" FILES ${PROJECT_SOURCE_DIR}/DLLVersion.rc)
|
||||
list(APPEND MYSQL_SRCS ${PROJECT_SOURCE_DIR}/DLLVersion.rc)
|
||||
endif()
|
||||
|
@ -7,7 +7,7 @@ file(GLOB_RECURSE HDRS_G "include/*.h" )
|
||||
POCO_HEADERS_AUTO( ODBC_SRCS ${HDRS_G})
|
||||
|
||||
# Version Resource
|
||||
if(MSVC AND NOT POCO_STATIC)
|
||||
if(MSVC AND BUILD_SHARED_LIBS)
|
||||
source_group("Resources" FILES ${PROJECT_SOURCE_DIR}/DLLVersion.rc)
|
||||
list(APPEND ODBC_SRCS ${PROJECT_SOURCE_DIR}/DLLVersion.rc)
|
||||
endif()
|
||||
|
@ -7,7 +7,7 @@ file(GLOB_RECURSE HDRS_G "include/*.h" )
|
||||
POCO_HEADERS_AUTO( POSTGRESQL_SRCS ${HDRS_G})
|
||||
|
||||
# Version Resource
|
||||
if(MSVC AND NOT POCO_STATIC)
|
||||
if(MSVC AND BUILD_SHARED_LIBS)
|
||||
source_group("Resources" FILES ${PROJECT_SOURCE_DIR}/DLLVersion.rc)
|
||||
list(APPEND POSTGRESQL_SRCS ${PROJECT_SOURCE_DIR}/DLLVersion.rc)
|
||||
endif()
|
||||
|
@ -20,7 +20,7 @@ else()
|
||||
endif()
|
||||
|
||||
# Version Resource
|
||||
if(MSVC AND NOT POCO_STATIC)
|
||||
if(MSVC AND BUILD_SHARED_LIBS)
|
||||
source_group("Resources" FILES ${PROJECT_SOURCE_DIR}/DLLVersion.rc)
|
||||
list(APPEND SQLITE_SRCS ${PROJECT_SOURCE_DIR}/DLLVersion.rc)
|
||||
endif()
|
||||
|
@ -7,7 +7,7 @@ file(GLOB_RECURSE HDRS_G "include/*.h" )
|
||||
POCO_HEADERS( SRCS Encodings ${HDRS_G})
|
||||
|
||||
# Version Resource
|
||||
if(MSVC AND NOT POCO_STATIC)
|
||||
if(MSVC AND BUILD_SHARED_LIBS)
|
||||
source_group("Resources" FILES ${PROJECT_SOURCE_DIR}/DLLVersion.rc)
|
||||
list(APPEND SRCS ${PROJECT_SOURCE_DIR}/DLLVersion.rc)
|
||||
endif()
|
||||
|
@ -24,7 +24,7 @@ POCO_SOURCES_AUTO_PLAT( SRCS WIN32
|
||||
endif()
|
||||
|
||||
# Version Resource
|
||||
if(MSVC AND NOT POCO_STATIC)
|
||||
if(MSVC AND BUILD_SHARED_LIBS)
|
||||
source_group("Resources" FILES ${PROJECT_SOURCE_DIR}/DLLVersion.rc)
|
||||
list(APPEND SRCS ${PROJECT_SOURCE_DIR}/DLLVersion.rc)
|
||||
endif()
|
||||
@ -226,7 +226,7 @@ POCO_INSTALL(Foundation)
|
||||
POCO_GENERATE_PACKAGE(Foundation)
|
||||
|
||||
if (ENABLE_TESTS)
|
||||
if(POCO_STATIC)
|
||||
if(NOT BUILD_SHARED_LIBS)
|
||||
set_property(TARGET Foundation PROPERTY POSITION_INDEPENDENT_CODE ON) # This is needed to build TestLibrary.so as shared.
|
||||
endif()
|
||||
add_subdirectory(samples)
|
||||
|
@ -8,7 +8,7 @@ POCO_HEADERS_AUTO( SRCS ${HDRS_G})
|
||||
POCO_SOURCES(SRCS pdjson src/pdjson.c)
|
||||
|
||||
# Version Resource
|
||||
if(MSVC AND NOT POCO_STATIC)
|
||||
if(MSVC AND BUILD_SHARED_LIBS)
|
||||
source_group("Resources" FILES ${PROJECT_SOURCE_DIR}/DLLVersion.rc)
|
||||
list(APPEND SRCS ${PROJECT_SOURCE_DIR}/DLLVersion.rc)
|
||||
endif()
|
||||
|
@ -7,7 +7,7 @@ file(GLOB_RECURSE HDRS_G "include/*.h" )
|
||||
POCO_HEADERS_AUTO( SRCS ${HDRS_G})
|
||||
|
||||
# Version Resource
|
||||
if(MSVC AND NOT POCO_STATIC)
|
||||
if(MSVC AND BUILD_SHARED_LIBS)
|
||||
source_group("Resources" FILES ${PROJECT_SOURCE_DIR}/DLLVersion.rc)
|
||||
list(APPEND SRCS ${PROJECT_SOURCE_DIR}/DLLVersion.rc)
|
||||
endif()
|
||||
|
@ -7,7 +7,7 @@ file(GLOB_RECURSE HDRS_G "include/*.h" )
|
||||
POCO_HEADERS_AUTO( SRCS ${HDRS_G})
|
||||
|
||||
# Version Resource
|
||||
if(MSVC AND NOT POCO_STATIC)
|
||||
if(MSVC AND BUILD_SHARED_LIBS)
|
||||
source_group("Resources" FILES ${PROJECT_SOURCE_DIR}/DLLVersion.rc)
|
||||
list(APPEND SRCS ${PROJECT_SOURCE_DIR}/DLLVersion.rc)
|
||||
endif()
|
||||
|
@ -7,7 +7,7 @@ file(GLOB_RECURSE HDRS_G "include/*.h" )
|
||||
POCO_HEADERS_AUTO( SRCS ${HDRS_G})
|
||||
|
||||
# Version Resource
|
||||
if(MSVC AND NOT POCO_STATIC)
|
||||
if(MSVC AND BUILD_SHARED_LIBS)
|
||||
source_group("Resources" FILES ${PROJECT_SOURCE_DIR}/DLLVersion.rc)
|
||||
list(APPEND SRCS ${PROJECT_SOURCE_DIR}/DLLVersion.rc)
|
||||
endif()
|
||||
|
@ -7,7 +7,7 @@ file(GLOB_RECURSE HDRS_G "include/*.h" )
|
||||
POCO_HEADERS_AUTO( SRCS ${HDRS_G})
|
||||
|
||||
# Version Resource
|
||||
if(MSVC AND NOT POCO_STATIC)
|
||||
if(MSVC AND BUILD_SHARED_LIBS)
|
||||
source_group("Resources" FILES ${PROJECT_SOURCE_DIR}/DLLVersion.rc)
|
||||
list(APPEND SRCS ${PROJECT_SOURCE_DIR}/DLLVersion.rc)
|
||||
endif()
|
||||
|
@ -7,7 +7,7 @@ file(GLOB_RECURSE HDRS_G "include/*.h" )
|
||||
POCO_HEADERS_AUTO( SRCS ${HDRS_G})
|
||||
|
||||
# Version Resource
|
||||
if(MSVC AND NOT POCO_STATIC)
|
||||
if(MSVC AND BUILD_SHARED_LIBS)
|
||||
source_group("Resources" FILES ${PROJECT_SOURCE_DIR}/DLLVersion.rc)
|
||||
list(APPEND SRCS ${PROJECT_SOURCE_DIR}/DLLVersion.rc)
|
||||
endif()
|
||||
|
@ -114,7 +114,7 @@ POCO_SOURCES( SRCS libpng
|
||||
)
|
||||
|
||||
# Version Resource
|
||||
if(MSVC AND NOT POCO_STATIC)
|
||||
if(MSVC AND BUILD_SHARED_LIBS)
|
||||
source_group("Resources" FILES ${PROJECT_SOURCE_DIR}/DLLVersion.rc)
|
||||
list(APPEND SRCS ${PROJECT_SOURCE_DIR}/DLLVersion.rc)
|
||||
endif()
|
||||
|
@ -7,7 +7,7 @@ file(GLOB_RECURSE HDRS_G "include/*.h" )
|
||||
POCO_HEADERS_AUTO( SRCS ${HDRS_G})
|
||||
|
||||
# Version Resource
|
||||
if(MSVC AND NOT POCO_STATIC)
|
||||
if(MSVC AND BUILD_SHARED_LIBS)
|
||||
source_group("Resources" FILES ${PROJECT_SOURCE_DIR}/DLLVersion.rc)
|
||||
list(APPEND SRCS ${PROJECT_SOURCE_DIR}/DLLVersion.rc)
|
||||
endif()
|
||||
|
@ -48,7 +48,7 @@ POCO_SOURCES( SRCS 7z
|
||||
)
|
||||
|
||||
# Version Resource
|
||||
if(MSVC AND NOT POCO_STATIC)
|
||||
if(MSVC AND BUILD_SHARED_LIBS)
|
||||
source_group("Resources" FILES ${PROJECT_SOURCE_DIR}/DLLVersion.rc)
|
||||
list(APPEND SRCS ${PROJECT_SOURCE_DIR}/DLLVersion.rc)
|
||||
endif()
|
||||
|
@ -7,7 +7,7 @@ file(GLOB_RECURSE HDRS_G "include/*.h" )
|
||||
POCO_HEADERS_AUTO( SRCS ${HDRS_G})
|
||||
|
||||
# Version Resource
|
||||
if(MSVC AND NOT POCO_STATIC)
|
||||
if(MSVC AND BUILD_SHARED_LIBS)
|
||||
source_group("Resources" FILES ${PROJECT_SOURCE_DIR}/DLLVersion.rc)
|
||||
list(APPEND SRCS ${PROJECT_SOURCE_DIR}/DLLVersion.rc)
|
||||
endif()
|
||||
|
@ -12,7 +12,7 @@ file(GLOB_RECURSE HDRS_G "include/*.h" )
|
||||
POCO_HEADERS_AUTO( SRCS ${HDRS_G})
|
||||
|
||||
# Version Resource
|
||||
if(MSVC AND NOT POCO_STATIC)
|
||||
if(MSVC AND BUILD_SHARED_LIBS)
|
||||
source_group("Resources" FILES ${PROJECT_SOURCE_DIR}/DLLVersion.rc)
|
||||
list(APPEND SRCS ${PROJECT_SOURCE_DIR}/DLLVersion.rc)
|
||||
endif()
|
||||
|
@ -7,7 +7,7 @@ file(GLOB_RECURSE HDRS_G "include/*.h" )
|
||||
POCO_HEADERS_AUTO( SRCS ${HDRS_G})
|
||||
|
||||
# Version Resource
|
||||
if(MSVC AND NOT POCO_STATIC)
|
||||
if(MSVC AND BUILD_SHARED_LIBS)
|
||||
source_group("Resources" FILES ${PROJECT_SOURCE_DIR}/DLLVersion.rc)
|
||||
list(APPEND SRCS ${PROJECT_SOURCE_DIR}/DLLVersion.rc)
|
||||
endif()
|
||||
|
@ -53,16 +53,16 @@ endif(MSVC)
|
||||
|
||||
|
||||
# Add a d postfix to the debug libraries
|
||||
if(POCO_STATIC)
|
||||
set(CMAKE_DEBUG_POSTFIX "${STATIC_POSTFIX}d" CACHE STRING "Set Debug library postfix" FORCE)
|
||||
set(CMAKE_RELEASE_POSTFIX "${STATIC_POSTFIX}" CACHE STRING "Set Release library postfix" FORCE)
|
||||
set(CMAKE_MINSIZEREL_POSTFIX "${STATIC_POSTFIX}" CACHE STRING "Set MinSizeRel library postfix" FORCE)
|
||||
set(CMAKE_RELWITHDEBINFO_POSTFIX "${STATIC_POSTFIX}" CACHE STRING "Set RelWithDebInfo library postfix" FORCE)
|
||||
else(POCO_STATIC)
|
||||
if(BUILD_SHARED_LIBS)
|
||||
set(CMAKE_DEBUG_POSTFIX "d" CACHE STRING "Set Debug library postfix" FORCE)
|
||||
set(CMAKE_RELEASE_POSTFIX "" CACHE STRING "Set Release library postfix" FORCE)
|
||||
set(CMAKE_MINSIZEREL_POSTFIX "" CACHE STRING "Set MinSizeRel library postfix" FORCE)
|
||||
set(CMAKE_RELWITHDEBINFO_POSTFIX "" CACHE STRING "Set RelWithDebInfo library postfix" FORCE)
|
||||
else(BUILD_SHARED_LIBS)
|
||||
set(CMAKE_DEBUG_POSTFIX "${STATIC_POSTFIX}d" CACHE STRING "Set Debug library postfix" FORCE)
|
||||
set(CMAKE_RELEASE_POSTFIX "${STATIC_POSTFIX}" CACHE STRING "Set Release library postfix" FORCE)
|
||||
set(CMAKE_MINSIZEREL_POSTFIX "${STATIC_POSTFIX}" CACHE STRING "Set MinSizeRel library postfix" FORCE)
|
||||
set(CMAKE_RELWITHDEBINFO_POSTFIX "${STATIC_POSTFIX}" CACHE STRING "Set RelWithDebInfo library postfix" FORCE)
|
||||
endif()
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user