mirror of
https://github.com/pocoproject/poco.git
synced 2024-12-12 10:13:51 +01:00
make CMake files style (more) consistent
This commit is contained in:
parent
4f59aef815
commit
4de9a21187
@ -1,26 +1,26 @@
|
|||||||
# Sources
|
# Sources
|
||||||
file(GLOB SRCS_G "src/*.cpp")
|
file(GLOB SRCS_G "src/*.cpp")
|
||||||
POCO_SOURCES_AUTO( SRCS ${SRCS_G})
|
POCO_SOURCES_AUTO(SRCS ${SRCS_G})
|
||||||
|
|
||||||
# Headers
|
# Headers
|
||||||
file(GLOB_RECURSE HDRS_G "include/*.h" )
|
file(GLOB_RECURSE HDRS_G "include/*.h")
|
||||||
POCO_HEADERS_AUTO( SRCS ${HDRS_G})
|
POCO_HEADERS_AUTO(SRCS ${HDRS_G})
|
||||||
|
|
||||||
add_library(mod_poco SHARED ${SRCS})
|
add_library(mod_poco SHARED ${SRCS})
|
||||||
set_target_properties(mod_poco
|
set_target_properties(mod_poco
|
||||||
PROPERTIES
|
PROPERTIES
|
||||||
VERSION ${SHARED_LIBRARY_VERSION} SOVERSION ${SHARED_LIBRARY_VERSION}
|
VERSION ${SHARED_LIBRARY_VERSION} SOVERSION ${SHARED_LIBRARY_VERSION}
|
||||||
DEFINE_SYMBOL ApacheHandlers_EXPORTS)
|
DEFINE_SYMBOL ApacheHandlers_EXPORTS)
|
||||||
target_include_directories(mod_poco
|
target_include_directories(mod_poco
|
||||||
PUBLIC
|
PUBLIC
|
||||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
|
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
|
||||||
$<INSTALL_INTERFACE:include>
|
$<INSTALL_INTERFACE:include>
|
||||||
PRIVATE
|
PRIVATE
|
||||||
${APACHE2_INCLUDE_DIRS}
|
${APACHE2_INCLUDE_DIRS}
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/src
|
${CMAKE_CURRENT_SOURCE_DIR}/src
|
||||||
)
|
)
|
||||||
target_link_libraries(mod_poco PUBLIC Poco::Util Poco::Net Apache::Apr Apache::Aprutil)
|
target_link_libraries(mod_poco PUBLIC Poco::Util Poco::Net Apache::Apr Apache::Aprutil)
|
||||||
|
|
||||||
if (ENABLE_TESTS)
|
if(ENABLE_TESTS)
|
||||||
add_subdirectory(samples)
|
add_subdirectory(samples)
|
||||||
endif ()
|
endif()
|
||||||
|
@ -1,2 +1,2 @@
|
|||||||
add_subdirectory( FormServer )
|
add_subdirectory(FormServer)
|
||||||
add_subdirectory( TimeServer )
|
add_subdirectory(TimeServer)
|
||||||
|
337
CMakeLists.txt
337
CMakeLists.txt
@ -4,7 +4,7 @@ project(Poco)
|
|||||||
|
|
||||||
file(STRINGS "${PROJECT_SOURCE_DIR}/libversion" SHARED_LIBRARY_VERSION)
|
file(STRINGS "${PROJECT_SOURCE_DIR}/libversion" SHARED_LIBRARY_VERSION)
|
||||||
# Read the version information from the VERSION file
|
# Read the version information from the VERSION file
|
||||||
file (STRINGS "${PROJECT_SOURCE_DIR}/VERSION" PACKAGE_VERSION )
|
file(STRINGS "${PROJECT_SOURCE_DIR}/VERSION" PACKAGE_VERSION)
|
||||||
string(REGEX REPLACE "([0-9]+)\\.[0-9]+\\.[0-9]+.*" "\\1" CPACK_PACKAGE_VERSION_MAJOR ${PACKAGE_VERSION})
|
string(REGEX REPLACE "([0-9]+)\\.[0-9]+\\.[0-9]+.*" "\\1" CPACK_PACKAGE_VERSION_MAJOR ${PACKAGE_VERSION})
|
||||||
string(REGEX REPLACE "[0-9]+\\.([0-9]+)\\.[0-9]+.*" "\\1" CPACK_PACKAGE_VERSION_MINOR ${PACKAGE_VERSION})
|
string(REGEX REPLACE "[0-9]+\\.([0-9]+)\\.[0-9]+.*" "\\1" CPACK_PACKAGE_VERSION_MINOR ${PACKAGE_VERSION})
|
||||||
string(REGEX REPLACE "[0-9]+\\.[0-9]+\\.([0-9]+).*" "\\1" CPACK_PACKAGE_VERSION_PATCH ${PACKAGE_VERSION})
|
string(REGEX REPLACE "[0-9]+\\.[0-9]+\\.([0-9]+).*" "\\1" CPACK_PACKAGE_VERSION_PATCH ${PACKAGE_VERSION})
|
||||||
@ -40,42 +40,42 @@ check_for_cxx14_compiler(CXX14_COMPILER)
|
|||||||
|
|
||||||
# If a C++14 compiler is available, then set the appropriate flags
|
# If a C++14 compiler is available, then set the appropriate flags
|
||||||
if(CXX14_COMPILER)
|
if(CXX14_COMPILER)
|
||||||
set (CMAKE_CXX_STANDARD 14)
|
set(CMAKE_CXX_STANDARD 14)
|
||||||
set (CMAKE_CXX_STANDARD_REQUIRED ON)
|
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||||
else()
|
else()
|
||||||
message(FATAL_ERROR "Compiler does not support C++14." )
|
message(FATAL_ERROR "Compiler does not support C++14.")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(NOT CMAKE_BUILD_TYPE)
|
if(NOT CMAKE_BUILD_TYPE)
|
||||||
set(CMAKE_BUILD_TYPE "RelWithDebInfo")
|
set(CMAKE_BUILD_TYPE "RelWithDebInfo")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Include some common macros to simpilfy the Poco CMake files
|
# Include some common macros to simpilfy the Poco CMake files
|
||||||
include(PocoMacros)
|
include(PocoMacros)
|
||||||
|
|
||||||
if(POCO_STATIC)
|
if(POCO_STATIC)
|
||||||
message(WARNING "POCO_STATIC has been deprecated. Please use BUILD_SHARED_LIBS instead.")
|
message(WARNING "POCO_STATIC has been deprecated. Please use BUILD_SHARED_LIBS instead.")
|
||||||
option(BUILD_SHARED_LIBS "Build shared libraries" OFF)
|
option(BUILD_SHARED_LIBS "Build shared libraries" OFF)
|
||||||
else()
|
else()
|
||||||
option(BUILD_SHARED_LIBS "Build shared libraries" ON)
|
option(BUILD_SHARED_LIBS "Build shared libraries" ON)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(MSVC)
|
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" OFF)
|
||||||
option(ENABLE_MSVC_MP "Set to OFF|ON (default is OFF) to control parallel build of POCO with MSVC" ON)
|
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)
|
if(BUILD_SHARED_LIBS AND POCO_MT)
|
||||||
message(FATAL_ERROR "Cannot have both BUILD_SHARED_LIBS and POCO_MT")
|
message(FATAL_ERROR "Cannot have both BUILD_SHARED_LIBS and POCO_MT")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# allow disabling of internally built OpenSSL# (see below for details)
|
# allow disabling of internally built OpenSSL# (see below for details)
|
||||||
# if POCO pre-built OpenSSL directory is found, and POCO_DISABLE_INTERNAL_OPENSSL=OFF,
|
# if POCO pre-built OpenSSL directory is found, and POCO_DISABLE_INTERNAL_OPENSSL=OFF,
|
||||||
# the internal OpenSSL build will be used
|
# the internal OpenSSL build will be used
|
||||||
option(POCO_DISABLE_INTERNAL_OPENSSL "Disable internal OpensSSL binaries use" ON)
|
option(POCO_DISABLE_INTERNAL_OPENSSL "Disable internal OpensSSL binaries use" ON)
|
||||||
|
|
||||||
if((NOT POCO_DISABLE_INTERNAL_OPENSSL) AND (ENABLE_NETSSL OR ENABLE_CRYPTO OR (ENABLE_DATA_MYSQL AND MINGW)))
|
if((NOT POCO_DISABLE_INTERNAL_OPENSSL) AND (ENABLE_NETSSL OR ENABLE_CRYPTO OR (ENABLE_DATA_MYSQL AND MINGW)))
|
||||||
include(UseEmbeddedOpenSSL)
|
include(UseEmbeddedOpenSSL)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
option(ENABLE_NETSSL_WIN "Enable NetSSL Windows" OFF)
|
option(ENABLE_NETSSL_WIN "Enable NetSSL Windows" OFF)
|
||||||
@ -98,62 +98,62 @@ else()
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(ENABLE_APACHECONNECTOR)
|
if(ENABLE_APACHECONNECTOR)
|
||||||
find_package(APR REQUIRED)
|
find_package(APR REQUIRED)
|
||||||
find_package(APRUTIL REQUIRED)
|
find_package(APRUTIL REQUIRED)
|
||||||
find_package(Apache2 REQUIRED)
|
find_package(Apache2 REQUIRED)
|
||||||
else()
|
else()
|
||||||
find_package(APR)
|
find_package(APR)
|
||||||
find_package(APRUTIL)
|
find_package(APRUTIL)
|
||||||
find_package(Apache2)
|
find_package(Apache2)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(APR_FOUND AND APRUTIL_FOUND AND APACHE2_FOUND AND
|
if(APR_FOUND AND APRUTIL_FOUND AND APACHE2_FOUND AND
|
||||||
EXISTS ${PROJECT_SOURCE_DIR}/ApacheConnector AND ENABLE_APACHECONNECTOR)
|
EXISTS ${PROJECT_SOURCE_DIR}/ApacheConnector AND ENABLE_APACHECONNECTOR)
|
||||||
option(ENABLE_APACHECONNECTOR "Enable ApacheConnector" ON)
|
option(ENABLE_APACHECONNECTOR "Enable ApacheConnector" ON)
|
||||||
else()
|
else()
|
||||||
option(ENABLE_APACHECONNECTOR "Enable ApacheConnector" OFF)
|
option(ENABLE_APACHECONNECTOR "Enable ApacheConnector" OFF)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(ENABLE_DATA_MYSQL)
|
if(ENABLE_DATA_MYSQL)
|
||||||
find_package(MySQL REQUIRED)
|
find_package(MySQL REQUIRED)
|
||||||
else()
|
else()
|
||||||
find_package(MySQL)
|
find_package(MySQL)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(MYSQL_FOUND)
|
if(MYSQL_FOUND)
|
||||||
option(ENABLE_DATA "Enable Data" ON)
|
option(ENABLE_DATA "Enable Data" ON)
|
||||||
option(ENABLE_DATA_MYSQL "Enable Data MySQL or MariaDB" ON)
|
option(ENABLE_DATA_MYSQL "Enable Data MySQL or MariaDB" ON)
|
||||||
else()
|
else()
|
||||||
option(ENABLE_DATA "Enable Data" OFF)
|
option(ENABLE_DATA "Enable Data" OFF)
|
||||||
option(ENABLE_DATA_MYSQL "Enable Data MySQL or MariaDB" OFF)
|
option(ENABLE_DATA_MYSQL "Enable Data MySQL or MariaDB" OFF)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(ENABLE_DATA_POSTGRESQL)
|
if(ENABLE_DATA_POSTGRESQL)
|
||||||
find_package(PostgreSQL REQUIRED)
|
find_package(PostgreSQL REQUIRED)
|
||||||
else()
|
else()
|
||||||
find_package(PostgreSQL)
|
find_package(PostgreSQL)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(PostgreSQL_FOUND)
|
if(PostgreSQL_FOUND)
|
||||||
option(ENABLE_DATA "Enable SQL" ON)
|
option(ENABLE_DATA "Enable SQL" ON)
|
||||||
option(ENABLE_DATA_POSTGRESQL "Enable SQL PosgreSQL" ON)
|
option(ENABLE_DATA_POSTGRESQL "Enable SQL PosgreSQL" ON)
|
||||||
else()
|
else()
|
||||||
option(ENABLE_DATA "Enable SQL" OFF)
|
option(ENABLE_DATA "Enable SQL" OFF)
|
||||||
option(ENABLE_DATA_POSTGRESQL "Enable SQL PosgreSQL" OFF)
|
option(ENABLE_DATA_POSTGRESQL "Enable SQL PosgreSQL" OFF)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(ENABLE_DATA_ODBC)
|
if(ENABLE_DATA_ODBC)
|
||||||
find_package(ODBC REQUIRED)
|
find_package(ODBC REQUIRED)
|
||||||
else()
|
else()
|
||||||
find_package(ODBC)
|
find_package(ODBC)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(ODBC_FOUND)
|
if(ODBC_FOUND)
|
||||||
option(ENABLE_DATA "Enable Data" ON)
|
option(ENABLE_DATA "Enable Data" ON)
|
||||||
option(ENABLE_DATA_ODBC "Enable Data ODBC" ON)
|
option(ENABLE_DATA_ODBC "Enable Data ODBC" ON)
|
||||||
else()
|
else()
|
||||||
option(ENABLE_DATA "Enable Data" OFF)
|
option(ENABLE_DATA "Enable Data" OFF)
|
||||||
option(ENABLE_DATA_ODBC "Enable Data ODBC" OFF)
|
option(ENABLE_DATA_ODBC "Enable Data ODBC" OFF)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Allow enabling and disabling components
|
# Allow enabling and disabling components
|
||||||
@ -177,23 +177,23 @@ option(ENABLE_PAGECOMPILER "Enable PageCompiler" ON)
|
|||||||
option(ENABLE_PAGECOMPILER_FILE2PAGE "Enable File2Page" ON)
|
option(ENABLE_PAGECOMPILER_FILE2PAGE "Enable File2Page" ON)
|
||||||
|
|
||||||
option(ENABLE_TESTS
|
option(ENABLE_TESTS
|
||||||
"Set to OFF|ON (default is OFF) to control build of POCO tests & samples" OFF)
|
"Set to OFF|ON (default is OFF) to control build of POCO tests & samples" OFF)
|
||||||
|
|
||||||
option(POCO_UNBUNDLED
|
option(POCO_UNBUNDLED
|
||||||
"Set to OFF|ON (default is OFF) to control linking dependencies as external" OFF)
|
"Set to OFF|ON (default is OFF) to control linking dependencies as external" OFF)
|
||||||
|
|
||||||
if(ENABLE_TESTS)
|
if(ENABLE_TESTS)
|
||||||
include(CTest)
|
include(CTest)
|
||||||
enable_testing()
|
enable_testing()
|
||||||
message(STATUS "Building with unittests & samples")
|
message(STATUS "Building with unittests & samples")
|
||||||
else()
|
else()
|
||||||
message(STATUS "Building without tests & samples")
|
message(STATUS "Building without tests & samples")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(POCO_UNBUNDLED)
|
if(POCO_UNBUNDLED)
|
||||||
message(STATUS "Using external sqlite, zlib, pcre, expat, ...")
|
message(STATUS "Using external sqlite, zlib, pcre, expat, ...")
|
||||||
else()
|
else()
|
||||||
message(STATUS "Using internal sqlite, zlib, pcre, expat, ...")
|
message(STATUS "Using internal sqlite, zlib, pcre, expat, ...")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
include(DefinePlatformSpecifc)
|
include(DefinePlatformSpecifc)
|
||||||
@ -202,217 +202,218 @@ include(DefinePlatformSpecifc)
|
|||||||
set(Poco_COMPONENTS "")
|
set(Poco_COMPONENTS "")
|
||||||
|
|
||||||
if(ENABLE_TESTS)
|
if(ENABLE_TESTS)
|
||||||
add_subdirectory(CppUnit)
|
add_subdirectory(CppUnit)
|
||||||
set(ENABLE_XML ON CACHE BOOL "Enable XML" FORCE )
|
set(ENABLE_XML ON CACHE BOOL "Enable XML" FORCE)
|
||||||
set(ENABLE_JSON ON CACHE BOOL "Enable JSON" FORCE)
|
set(ENABLE_JSON ON CACHE BOOL "Enable JSON" FORCE)
|
||||||
|
|
||||||
if(ENABLE_ZIP)
|
if(ENABLE_ZIP)
|
||||||
set(ENABLE_NET ON CACHE BOOL "Enable Net" FORCE)
|
set(ENABLE_NET ON CACHE BOOL "Enable Net" FORCE)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(ENABLE_ENCODINGS_COMPILER OR ENABLE_APACHECONNECTOR)
|
if(ENABLE_ENCODINGS_COMPILER OR ENABLE_APACHECONNECTOR)
|
||||||
set(ENABLE_NET ON CACHE BOOL "Enable Net" FORCE)
|
set(ENABLE_NET ON CACHE BOOL "Enable Net" FORCE)
|
||||||
set(ENABLE_UTIL ON CACHE BOOL "Enable Util" FORCE)
|
set(ENABLE_UTIL ON CACHE BOOL "Enable Util" FORCE)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(ENABLE_PAGECOMPILER_FILE2PAGE)
|
if(ENABLE_PAGECOMPILER_FILE2PAGE)
|
||||||
set(ENABLE_UTIL ON CACHE BOOL "Enable Util" FORCE)
|
set(ENABLE_UTIL ON CACHE BOOL "Enable Util" FORCE)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(ENABLE_PAGECOMPILER)
|
if(ENABLE_PAGECOMPILER)
|
||||||
set(ENABLE_NET ON CACHE BOOL "Enable Net" FORCE)
|
set(ENABLE_NET ON CACHE BOOL "Enable Net" FORCE)
|
||||||
set(ENABLE_UTIL ON CACHE BOOL "Enable Util" FORCE)
|
set(ENABLE_UTIL ON CACHE BOOL "Enable Util" FORCE)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(ENABLE_MONGODB OR ENABLE_REDIS)
|
if(ENABLE_MONGODB OR ENABLE_REDIS)
|
||||||
set(ENABLE_NET ON CACHE BOOL "Enable Net" FORCE)
|
set(ENABLE_NET ON CACHE BOOL "Enable Net" FORCE)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(ENABLE_DATA_SQLITE OR ENABLE_DATA_MYSQL OR ENABLE_DATA_ODBC OR ENABLE_DATA_POSTGRESQL)
|
if(ENABLE_DATA_SQLITE OR ENABLE_DATA_MYSQL OR ENABLE_DATA_ODBC OR ENABLE_DATA_POSTGRESQL)
|
||||||
set(ENABLE_DATA ON CACHE BOOL "Enable Data" FORCE)
|
set(ENABLE_DATA ON CACHE BOOL "Enable Data" FORCE)
|
||||||
if(ENABLE_TESTS)
|
if(ENABLE_TESTS)
|
||||||
set(ENABLE_NET ON CACHE BOOL "Enable Net" FORCE)
|
set(ENABLE_NET ON CACHE BOOL "Enable Net" FORCE)
|
||||||
set(ENABLE_DATA_SQLITE ON CACHE BOOL "Enable Data SQlite" FORCE)
|
set(ENABLE_DATA_SQLITE ON CACHE BOOL "Enable Data SQlite" FORCE)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(ENABLE_DATA AND ENABLE_TESTS)
|
if(ENABLE_DATA AND ENABLE_TESTS)
|
||||||
set(ENABLE_DATA_SQLITE ON CACHE BOOL "Enable Data SQlite" FORCE)
|
set(ENABLE_DATA_SQLITE ON CACHE BOOL "Enable Data SQlite" FORCE)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(ENABLE_NETSSL_WIN)
|
if(ENABLE_NETSSL_WIN)
|
||||||
set(ENABLE_UTIL ON CACHE BOOL "Enable Util" FORCE)
|
set(ENABLE_UTIL ON CACHE BOOL "Enable Util" FORCE)
|
||||||
if(ENABLE_TESTS)
|
if(ENABLE_TESTS)
|
||||||
set(ENABLE_CRYPTO ON CACHE BOOL "Enable Crypto" FORCE)
|
set(ENABLE_CRYPTO ON CACHE BOOL "Enable Crypto" FORCE)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(ENABLE_NETSSL)
|
if(ENABLE_NETSSL)
|
||||||
set(ENABLE_CRYPTO ON CACHE BOOL "Enable Crypto" FORCE)
|
set(ENABLE_CRYPTO ON CACHE BOOL "Enable Crypto" FORCE)
|
||||||
set(ENABLE_NET ON CACHE BOOL "Enable Net" FORCE)
|
set(ENABLE_NET ON CACHE BOOL "Enable Net" FORCE)
|
||||||
set(ENABLE_UTIL ON CACHE BOOL "Enable Util" FORCE)
|
set(ENABLE_UTIL ON CACHE BOOL "Enable Util" FORCE)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(ENABLE_CRYPTO AND ENABLE_TESTS)
|
if(ENABLE_CRYPTO AND ENABLE_TESTS)
|
||||||
set(ENABLE_NETSSL ON CACHE BOOL "Enable NetSSL" FORCE)
|
set(ENABLE_NETSSL ON CACHE BOOL "Enable NetSSL" FORCE)
|
||||||
set(ENABLE_NET ON CACHE BOOL "Enable Net" FORCE)
|
set(ENABLE_NET ON CACHE BOOL "Enable Net" FORCE)
|
||||||
set(ENABLE_UTIL ON CACHE BOOL "Enable Util" FORCE)
|
set(ENABLE_UTIL ON CACHE BOOL "Enable Util" FORCE)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(ENABLE_NET AND ENABLE_TESTS)
|
if(ENABLE_NET AND ENABLE_TESTS)
|
||||||
set(ENABLE_UTIL ON CACHE BOOL "Enable Util" FORCE)
|
set(ENABLE_UTIL ON CACHE BOOL "Enable Util" FORCE)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(ENABLE_PDF)
|
if(ENABLE_PDF)
|
||||||
set(ENABLE_UTIL ON CACHE BOOL "Enable Util" FORCE)
|
set(ENABLE_UTIL ON CACHE BOOL "Enable Util" FORCE)
|
||||||
set(ENABLE_XML ON CACHE BOOL "Enable XML" FORCE)
|
set(ENABLE_XML ON CACHE BOOL "Enable XML" FORCE)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(ENABLE_POCODOC)
|
if(ENABLE_POCODOC)
|
||||||
set(ENABLE_UTIL ON CACHE BOOL "Enable Util" FORCE)
|
set(ENABLE_UTIL ON CACHE BOOL "Enable Util" FORCE)
|
||||||
set(ENABLE_XML ON CACHE BOOL "Enable XML" FORCE)
|
set(ENABLE_XML ON CACHE BOOL "Enable XML" FORCE)
|
||||||
set(ENABLE_CPPPARSER ON CACHE BOOL "Enable C++ parser" FORCE)
|
set(ENABLE_CPPPARSER ON CACHE BOOL "Enable C++ parser" FORCE)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(ENABLE_SEVENZIP OR ENABLE_ZIP)
|
if(ENABLE_SEVENZIP OR ENABLE_ZIP)
|
||||||
set(ENABLE_UTIL ON CACHE BOOL "Enable Util" FORCE)
|
set(ENABLE_UTIL ON CACHE BOOL "Enable Util" FORCE)
|
||||||
set(ENABLE_XML ON CACHE BOOL "Enable XML" FORCE)
|
set(ENABLE_XML ON CACHE BOOL "Enable XML" FORCE)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(ENABLE_UTIL AND ENABLE_TESTS)
|
if(ENABLE_UTIL AND ENABLE_TESTS)
|
||||||
set(ENABLE_JSON ON CACHE BOOL "Enable JSON" FORCE)
|
set(ENABLE_JSON ON CACHE BOOL "Enable JSON" FORCE)
|
||||||
set(ENABLE_XML ON CACHE BOOL "Enable XML" FORCE)
|
set(ENABLE_XML ON CACHE BOOL "Enable XML" FORCE)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(ENABLE_JWT)
|
if(ENABLE_JWT)
|
||||||
set(ENABLE_CRYPTO ON CACHE BOOL "Enable Crypto" FORCE)
|
set(ENABLE_CRYPTO ON CACHE BOOL "Enable Crypto" FORCE)
|
||||||
set(ENABLE_JSON ON CACHE BOOL "Enable JSON" FORCE)
|
set(ENABLE_JSON ON CACHE BOOL "Enable JSON" FORCE)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(ENABLE_FOUNDATION)
|
if(ENABLE_FOUNDATION)
|
||||||
add_subdirectory(Foundation)
|
add_subdirectory(Foundation)
|
||||||
endif()
|
endif()
|
||||||
if(ENABLE_ENCODINGS)
|
if(ENABLE_ENCODINGS)
|
||||||
add_subdirectory(Encodings)
|
add_subdirectory(Encodings)
|
||||||
list(APPEND Poco_COMPONENTS "Encodings")
|
list(APPEND Poco_COMPONENTS "Encodings")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(ENABLE_XML)
|
if(ENABLE_XML)
|
||||||
add_subdirectory(XML)
|
add_subdirectory(XML)
|
||||||
list(APPEND Poco_COMPONENTS "XML")
|
list(APPEND Poco_COMPONENTS "XML")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(ENABLE_JSON)
|
if(ENABLE_JSON)
|
||||||
add_subdirectory(JSON)
|
add_subdirectory(JSON)
|
||||||
list(APPEND Poco_COMPONENTS "JSON")
|
list(APPEND Poco_COMPONENTS "JSON")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(ENABLE_UTIL)
|
if(ENABLE_UTIL)
|
||||||
add_subdirectory(Util)
|
add_subdirectory(Util)
|
||||||
list(APPEND Poco_COMPONENTS "Util")
|
list(APPEND Poco_COMPONENTS "Util")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(ENABLE_NET)
|
if(ENABLE_NET)
|
||||||
add_subdirectory(Net)
|
add_subdirectory(Net)
|
||||||
list(APPEND Poco_COMPONENTS "Net")
|
list(APPEND Poco_COMPONENTS "Net")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(EXISTS ${PROJECT_SOURCE_DIR}/MongoDB AND ENABLE_MONGODB)
|
if(EXISTS ${PROJECT_SOURCE_DIR}/MongoDB AND ENABLE_MONGODB)
|
||||||
add_subdirectory(MongoDB)
|
add_subdirectory(MongoDB)
|
||||||
list(APPEND Poco_COMPONENTS "MongoDB")
|
list(APPEND Poco_COMPONENTS "MongoDB")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(EXISTS ${PROJECT_SOURCE_DIR}/Redis AND ENABLE_REDIS)
|
if(EXISTS ${PROJECT_SOURCE_DIR}/Redis AND ENABLE_REDIS)
|
||||||
add_subdirectory(Redis)
|
add_subdirectory(Redis)
|
||||||
list(APPEND Poco_COMPONENTS "Redis")
|
list(APPEND Poco_COMPONENTS "Redis")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(EXISTS ${PROJECT_SOURCE_DIR}/PDF AND ENABLE_PDF)
|
if(EXISTS ${PROJECT_SOURCE_DIR}/PDF AND ENABLE_PDF)
|
||||||
add_subdirectory(PDF)
|
add_subdirectory(PDF)
|
||||||
list(APPEND Poco_COMPONENTS "PDF")
|
list(APPEND Poco_COMPONENTS "PDF")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(EXISTS ${PROJECT_SOURCE_DIR}/JWT AND ENABLE_JWT)
|
if(EXISTS ${PROJECT_SOURCE_DIR}/JWT AND ENABLE_JWT)
|
||||||
add_subdirectory(JWT)
|
add_subdirectory(JWT)
|
||||||
list(APPEND Poco_COMPONENTS "JWT")
|
list(APPEND Poco_COMPONENTS "JWT")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
#NetSSL
|
#NetSSL
|
||||||
|
|
||||||
|
|
||||||
if(WIN32 AND EXISTS ${PROJECT_SOURCE_DIR}/NetSSL_Win AND ENABLE_NETSSL_WIN)
|
if(WIN32 AND EXISTS ${PROJECT_SOURCE_DIR}/NetSSL_Win AND ENABLE_NETSSL_WIN)
|
||||||
add_subdirectory(NetSSL_Win)
|
add_subdirectory(NetSSL_Win)
|
||||||
list(APPEND Poco_COMPONENTS "NetSSL_Win")
|
list(APPEND Poco_COMPONENTS "NetSSL_Win")
|
||||||
endif(WIN32 AND EXISTS ${PROJECT_SOURCE_DIR}/NetSSL_Win AND ENABLE_NETSSL_WIN)
|
endif(WIN32 AND EXISTS ${PROJECT_SOURCE_DIR}/NetSSL_Win AND ENABLE_NETSSL_WIN)
|
||||||
|
|
||||||
if(OPENSSL_FOUND)
|
if(OPENSSL_FOUND)
|
||||||
if(EXISTS ${PROJECT_SOURCE_DIR}/NetSSL_OpenSSL AND ENABLE_NETSSL)
|
if(EXISTS ${PROJECT_SOURCE_DIR}/NetSSL_OpenSSL AND ENABLE_NETSSL)
|
||||||
add_subdirectory(NetSSL_OpenSSL)
|
add_subdirectory(NetSSL_OpenSSL)
|
||||||
list(APPEND Poco_COMPONENTS "NetSSL_OpenSSL")
|
list(APPEND Poco_COMPONENTS "NetSSL_OpenSSL")
|
||||||
endif()
|
endif()
|
||||||
if(EXISTS ${PROJECT_SOURCE_DIR}/Crypto AND ENABLE_CRYPTO)
|
if(EXISTS ${PROJECT_SOURCE_DIR}/Crypto AND ENABLE_CRYPTO)
|
||||||
add_subdirectory(Crypto)
|
add_subdirectory(Crypto)
|
||||||
list(APPEND Poco_COMPONENTS "Crypto")
|
list(APPEND Poco_COMPONENTS "Crypto")
|
||||||
endif()
|
endif()
|
||||||
endif(OPENSSL_FOUND)
|
endif(OPENSSL_FOUND)
|
||||||
|
|
||||||
if(EXISTS ${PROJECT_SOURCE_DIR}/Data AND ENABLE_DATA)
|
if(EXISTS ${PROJECT_SOURCE_DIR}/Data AND ENABLE_DATA)
|
||||||
add_subdirectory(Data)
|
add_subdirectory(Data)
|
||||||
list(APPEND Poco_COMPONENTS "Data")
|
list(APPEND Poco_COMPONENTS "Data")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(EXISTS ${PROJECT_SOURCE_DIR}/SevenZip AND ENABLE_SEVENZIP)
|
if(EXISTS ${PROJECT_SOURCE_DIR}/SevenZip AND ENABLE_SEVENZIP)
|
||||||
add_subdirectory(SevenZip)
|
add_subdirectory(SevenZip)
|
||||||
list(APPEND Poco_COMPONENTS "SevenZip")
|
list(APPEND Poco_COMPONENTS "SevenZip")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(EXISTS ${PROJECT_SOURCE_DIR}/Zip AND ENABLE_ZIP)
|
if(EXISTS ${PROJECT_SOURCE_DIR}/Zip AND ENABLE_ZIP)
|
||||||
add_subdirectory(Zip)
|
add_subdirectory(Zip)
|
||||||
list(APPEND Poco_COMPONENTS "Zip")
|
list(APPEND Poco_COMPONENTS "Zip")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(APRUTIL_FOUND AND APACHE_FOUND AND
|
if(APRUTIL_FOUND AND APACHE_FOUND AND
|
||||||
EXISTS ${PROJECT_SOURCE_DIR}/ApacheConnector AND ENABLE_APACHECONNECTOR)
|
EXISTS ${PROJECT_SOURCE_DIR}/ApacheConnector AND ENABLE_APACHECONNECTOR)
|
||||||
add_subdirectory(ApacheConnector)
|
add_subdirectory(ApacheConnector)
|
||||||
list(APPEND Poco_COMPONENTS "ApacheConnector")
|
list(APPEND Poco_COMPONENTS "ApacheConnector")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(EXISTS ${PROJECT_SOURCE_DIR}/CppParser AND ENABLE_CPPPARSER)
|
if(EXISTS ${PROJECT_SOURCE_DIR}/CppParser AND ENABLE_CPPPARSER)
|
||||||
add_subdirectory(CppParser)
|
add_subdirectory(CppParser)
|
||||||
list(APPEND Poco_COMPONENTS "CppParser")
|
list(APPEND Poco_COMPONENTS "CppParser")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(EXISTS ${PROJECT_SOURCE_DIR}/PocoDoc AND ENABLE_POCODOC)
|
if(EXISTS ${PROJECT_SOURCE_DIR}/PocoDoc AND ENABLE_POCODOC)
|
||||||
add_subdirectory(PocoDoc)
|
add_subdirectory(PocoDoc)
|
||||||
list(APPEND Poco_COMPONENTS "PocoDoc")
|
list(APPEND Poco_COMPONENTS "PocoDoc")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(EXISTS ${PROJECT_SOURCE_DIR}/PageCompiler AND ENABLE_PAGECOMPILER)
|
if(EXISTS ${PROJECT_SOURCE_DIR}/PageCompiler AND ENABLE_PAGECOMPILER)
|
||||||
add_subdirectory(PageCompiler)
|
add_subdirectory(PageCompiler)
|
||||||
list(APPEND Poco_COMPONENTS "PageCompiler")
|
list(APPEND Poco_COMPONENTS "PageCompiler")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(EXISTS ${PROJECT_SOURCE_DIR}/PageCompiler/File2Page AND ENABLE_PAGECOMPILER_FILE2PAGE)
|
if(EXISTS ${PROJECT_SOURCE_DIR}/PageCompiler/File2Page AND ENABLE_PAGECOMPILER_FILE2PAGE)
|
||||||
add_subdirectory(PageCompiler/File2Page)
|
add_subdirectory(PageCompiler/File2Page)
|
||||||
list(APPEND Poco_COMPONENTS "File2Page")
|
list(APPEND Poco_COMPONENTS "File2Page")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(EXISTS ${PROJECT_SOURCE_DIR}/Encodings/Compiler AND ENABLE_ENCODINGS_COMPILER)
|
if(EXISTS ${PROJECT_SOURCE_DIR}/Encodings/Compiler AND ENABLE_ENCODINGS_COMPILER)
|
||||||
add_subdirectory(Encodings/Compiler)
|
add_subdirectory(Encodings/Compiler)
|
||||||
list(APPEND Poco_COMPONENTS "EncodingsCompiler")
|
list(APPEND Poco_COMPONENTS "EncodingsCompiler")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
||||||
#############################################################
|
#############################################################
|
||||||
# Uninstall stuff see: http://www.vtk.org/Wiki/CMake_FAQ
|
# Uninstall stuff see: http://www.vtk.org/Wiki/CMake_FAQ
|
||||||
configure_file(
|
configure_file(
|
||||||
"${CMAKE_CURRENT_SOURCE_DIR}/cmake/cmake_uninstall.cmake.in"
|
"${CMAKE_CURRENT_SOURCE_DIR}/cmake/cmake_uninstall.cmake.in"
|
||||||
"${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
|
"${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
|
||||||
IMMEDIATE @ONLY)
|
IMMEDIATE @ONLY)
|
||||||
|
|
||||||
add_custom_target(uninstall
|
add_custom_target(uninstall
|
||||||
"${CMAKE_COMMAND}" -P "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake")
|
"${CMAKE_COMMAND}" -P "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
|
||||||
|
)
|
||||||
|
|
||||||
#############################################################
|
#############################################################
|
||||||
# Enable packaging
|
# Enable packaging
|
||||||
@ -432,38 +433,38 @@ include(CPack)
|
|||||||
|
|
||||||
include(CMakePackageConfigHelpers)
|
include(CMakePackageConfigHelpers)
|
||||||
write_basic_package_version_file(
|
write_basic_package_version_file(
|
||||||
"${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}/${PROJECT_NAME}ConfigVersion.cmake"
|
"${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}/${PROJECT_NAME}ConfigVersion.cmake"
|
||||||
VERSION ${PROJECT_VERSION}
|
VERSION ${PROJECT_VERSION}
|
||||||
COMPATIBILITY AnyNewerVersion
|
COMPATIBILITY AnyNewerVersion
|
||||||
)
|
)
|
||||||
|
|
||||||
# Set config script install location in a location that find_package() will
|
# Set config script install location in a location that find_package() will
|
||||||
# look for, which is different on MS Windows than for UNIX
|
# look for, which is different on MS Windows than for UNIX
|
||||||
# Note: also set in POCO_GENERATE_PACKAGE macro in cmake/PocoMacros.cmake
|
# Note: also set in POCO_GENERATE_PACKAGE macro in cmake/PocoMacros.cmake
|
||||||
if (WIN32)
|
if(WIN32)
|
||||||
set(PocoConfigPackageLocation "cmake")
|
set(PocoConfigPackageLocation "cmake")
|
||||||
else()
|
else()
|
||||||
set(PocoConfigPackageLocation "lib${LIB_SUFFIX}/cmake/${PROJECT_NAME}")
|
set(PocoConfigPackageLocation "lib${LIB_SUFFIX}/cmake/${PROJECT_NAME}")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
configure_file(cmake/${PROJECT_NAME}Config.cmake.in "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}/${PROJECT_NAME}Config.cmake" @ONLY)
|
configure_file(cmake/${PROJECT_NAME}Config.cmake.in "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}/${PROJECT_NAME}Config.cmake" @ONLY)
|
||||||
install(
|
install(
|
||||||
FILES
|
FILES
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}/${PROJECT_NAME}Config.cmake
|
${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}/${PROJECT_NAME}Config.cmake
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}/${PROJECT_NAME}ConfigVersion.cmake
|
${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}/${PROJECT_NAME}ConfigVersion.cmake
|
||||||
DESTINATION
|
DESTINATION
|
||||||
"lib${LIB_SUFFIX}/cmake/${PROJECT_NAME}"
|
"lib${LIB_SUFFIX}/cmake/${PROJECT_NAME}"
|
||||||
COMPONENT
|
COMPONENT
|
||||||
Devel
|
Devel
|
||||||
)
|
)
|
||||||
|
|
||||||
if(POCO_UNBUNDLED)
|
if(POCO_UNBUNDLED)
|
||||||
install(FILES cmake/FindPCRE.cmake
|
install(FILES cmake/FindPCRE.cmake
|
||||||
DESTINATION "${PocoConfigPackageLocation}")
|
DESTINATION "${PocoConfigPackageLocation}")
|
||||||
install(FILES cmake/V39/FindEXPAT.cmake
|
install(FILES cmake/V39/FindEXPAT.cmake
|
||||||
DESTINATION "${PocoConfigPackageLocation}/V39")
|
DESTINATION "${PocoConfigPackageLocation}/V39")
|
||||||
install(FILES cmake/V313/FindSQLite3.cmake
|
install(FILES cmake/V313/FindSQLite3.cmake
|
||||||
DESTINATION "${PocoConfigPackageLocation}/V313")
|
DESTINATION "${PocoConfigPackageLocation}/V313")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
message(STATUS "CMake ${CMAKE_VERSION} successfully configured ${PROJECT_NAME} using ${CMAKE_GENERATOR} generator")
|
message(STATUS "CMake ${CMAKE_VERSION} successfully configured ${PROJECT_NAME} using ${CMAKE_GENERATOR} generator")
|
||||||
@ -475,16 +476,16 @@ else()
|
|||||||
endif()
|
endif()
|
||||||
message(STATUS "[cmake] Installation target path: ${CMAKE_INSTALL_PREFIX}")
|
message(STATUS "[cmake] Installation target path: ${CMAKE_INSTALL_PREFIX}")
|
||||||
if(CMAKE_TOOLCHAIN_FILE)
|
if(CMAKE_TOOLCHAIN_FILE)
|
||||||
message(STATUS "[cmake] Use toolchain file: ${CMAKE_TOOLCHAIN_FILE}")
|
message(STATUS "[cmake] Use toolchain file: ${CMAKE_TOOLCHAIN_FILE}")
|
||||||
endif()
|
endif()
|
||||||
message(STATUS "[cmake] Bulid for OS type: ${CMAKE_SYSTEM_NAME}")
|
message(STATUS "[cmake] Bulid for OS type: ${CMAKE_SYSTEM_NAME}")
|
||||||
message(STATUS "[cmake] Build for OS version: ${CMAKE_SYSTEM_VERSION}")
|
message(STATUS "[cmake] Build for OS version: ${CMAKE_SYSTEM_VERSION}")
|
||||||
message(STATUS "[cmake] Build for CPU type: ${CMAKE_SYSTEM_PROCESSOR}")
|
message(STATUS "[cmake] Build for CPU type: ${CMAKE_SYSTEM_PROCESSOR}")
|
||||||
message(STATUS "[cmake] Build type: ${CMAKE_BUILD_TYPE}")
|
message(STATUS "[cmake] Build type: ${CMAKE_BUILD_TYPE}")
|
||||||
string(TOUPPER "${CMAKE_BUILD_TYPE}" BUILD_TYPE)
|
string(TOUPPER "${CMAKE_BUILD_TYPE}" BUILD_TYPE)
|
||||||
message(STATUS "[cmake] Build with cxx flags: ${CMAKE_CXX_FLAGS_${BUILD_TYPE}} ${CMAKE_CXX_FLAGS}")
|
message(STATUS "[cmake] Build with cxx flags: ${CMAKE_CXX_FLAGS_${BUILD_TYPE}} ${CMAKE_CXX_FLAGS}")
|
||||||
message(STATUS "[cmake] Build with c flags: ${CMAKE_C_FLAGS_${BUILD_TYPE}} ${CMAKE_C_FLAGS}")
|
message(STATUS "[cmake] Build with c flags: ${CMAKE_C_FLAGS_${BUILD_TYPE}} ${CMAKE_C_FLAGS}")
|
||||||
|
|
||||||
foreach(component ${Poco_COMPONENTS})
|
foreach(component ${Poco_COMPONENTS})
|
||||||
message(STATUS "Building: ${component}")
|
message(STATUS "Building: ${component}")
|
||||||
endforeach()
|
endforeach()
|
||||||
|
@ -1,38 +1,38 @@
|
|||||||
# Sources
|
# Sources
|
||||||
file(GLOB SRCS_G "src/*.cpp")
|
file(GLOB SRCS_G "src/*.cpp")
|
||||||
POCO_SOURCES_AUTO( SRCS ${SRCS_G})
|
POCO_SOURCES_AUTO(SRCS ${SRCS_G})
|
||||||
|
|
||||||
# Headers
|
# Headers
|
||||||
file(GLOB_RECURSE HDRS_G "include/*.h" )
|
file(GLOB_RECURSE HDRS_G "include/*.h")
|
||||||
POCO_HEADERS_AUTO( SRCS ${HDRS_G})
|
POCO_HEADERS_AUTO(SRCS ${HDRS_G})
|
||||||
|
|
||||||
# Version Resource
|
# Version Resource
|
||||||
if(MSVC AND BUILD_SHARED_LIBS)
|
if(MSVC AND BUILD_SHARED_LIBS)
|
||||||
source_group("Resources" FILES ${PROJECT_SOURCE_DIR}/DLLVersion.rc)
|
source_group("Resources" FILES ${PROJECT_SOURCE_DIR}/DLLVersion.rc)
|
||||||
list(APPEND SRCS ${PROJECT_SOURCE_DIR}/DLLVersion.rc)
|
list(APPEND SRCS ${PROJECT_SOURCE_DIR}/DLLVersion.rc)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
add_library(CppParser ${SRCS})
|
add_library(CppParser ${SRCS})
|
||||||
add_library(Poco::CppParser ALIAS CppParser)
|
add_library(Poco::CppParser ALIAS CppParser)
|
||||||
set_target_properties(CppParser
|
set_target_properties(CppParser
|
||||||
PROPERTIES
|
PROPERTIES
|
||||||
VERSION ${SHARED_LIBRARY_VERSION} SOVERSION ${SHARED_LIBRARY_VERSION}
|
VERSION ${SHARED_LIBRARY_VERSION} SOVERSION ${SHARED_LIBRARY_VERSION}
|
||||||
OUTPUT_NAME PocoCppParser
|
OUTPUT_NAME PocoCppParser
|
||||||
DEFINE_SYMBOL CppParser_EXPORTS
|
DEFINE_SYMBOL CppParser_EXPORTS
|
||||||
)
|
)
|
||||||
|
|
||||||
target_link_libraries(CppParser PUBLIC Poco::Foundation)
|
target_link_libraries(CppParser PUBLIC Poco::Foundation)
|
||||||
target_include_directories(CppParser
|
target_include_directories(CppParser
|
||||||
PUBLIC
|
PUBLIC
|
||||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
|
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
|
||||||
$<INSTALL_INTERFACE:include>
|
$<INSTALL_INTERFACE:include>
|
||||||
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src
|
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src
|
||||||
)
|
)
|
||||||
|
|
||||||
POCO_INSTALL(CppParser)
|
POCO_INSTALL(CppParser)
|
||||||
POCO_GENERATE_PACKAGE(CppParser)
|
POCO_GENERATE_PACKAGE(CppParser)
|
||||||
|
|
||||||
if (ENABLE_TESTS)
|
if(ENABLE_TESTS)
|
||||||
add_subdirectory(testsuite)
|
add_subdirectory(testsuite)
|
||||||
endif ()
|
endif()
|
||||||
|
|
||||||
|
@ -1,21 +1,28 @@
|
|||||||
# Sources
|
# Sources
|
||||||
file(GLOB SRCS_G "src/*.cpp")
|
file(GLOB SRCS_G "src/*.cpp")
|
||||||
POCO_SOURCES_AUTO( TEST_SRCS ${SRCS_G})
|
POCO_SOURCES_AUTO(TEST_SRCS ${SRCS_G})
|
||||||
|
|
||||||
# Headers
|
# Headers
|
||||||
file(GLOB_RECURSE HDRS_G "src/*.h" )
|
file(GLOB_RECURSE HDRS_G "src/*.h")
|
||||||
POCO_HEADERS_AUTO( TEST_SRCS ${HDRS_G})
|
POCO_HEADERS_AUTO(TEST_SRCS ${HDRS_G})
|
||||||
|
|
||||||
POCO_SOURCES_AUTO_PLAT( TEST_SRCS OFF
|
POCO_SOURCES_AUTO_PLAT(TEST_SRCS OFF
|
||||||
src/WinDriver.cpp
|
src/WinDriver.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
add_executable(CppParser-testrunner ${TEST_SRCS} )
|
add_executable(CppParser-testrunner ${TEST_SRCS})
|
||||||
if(ANDROID)
|
if(ANDROID)
|
||||||
add_test(NAME CppParser WORKING_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
|
add_test(
|
||||||
COMMAND ${CMAKE_COMMAND} -DANDROID_NDK=${ANDROID_NDK} -DLIBRARY_DIR=${CMAKE_BINARY_DIR}/lib -DUNITTEST=${CMAKE_BINARY_DIR}/bin/CppParser-testrunner -DTEST_PARAMETER=-all -P ${CMAKE_SOURCE_DIR}/cmake/ExecuteOnAndroid.cmake)
|
NAME CppParser
|
||||||
|
WORKING_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
|
||||||
|
COMMAND ${CMAKE_COMMAND} -DANDROID_NDK=${ANDROID_NDK} -DLIBRARY_DIR=${CMAKE_BINARY_DIR}/lib -DUNITTEST=${CMAKE_BINARY_DIR}/bin/CppParser-testrunner -DTEST_PARAMETER=-all -P ${CMAKE_SOURCE_DIR}/cmake/ExecuteOnAndroid.cmake
|
||||||
|
)
|
||||||
else()
|
else()
|
||||||
add_test(NAME CppParser WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND CppParser-testrunner -ignore ${CMAKE_SOURCE_DIR}/cppignore.lnx -all)
|
add_test(
|
||||||
set_tests_properties(CppParser PROPERTIES ENVIRONMENT POCO_BASE=${CMAKE_SOURCE_DIR})
|
NAME CppParser
|
||||||
|
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
||||||
|
COMMAND CppParser-testrunner -ignore ${CMAKE_SOURCE_DIR}/cppignore.lnx -all
|
||||||
|
)
|
||||||
|
set_tests_properties(CppParser PROPERTIES ENVIRONMENT POCO_BASE=${CMAKE_SOURCE_DIR})
|
||||||
endif()
|
endif()
|
||||||
target_link_libraries(CppParser-testrunner PUBLIC Poco::CppParser CppUnit)
|
target_link_libraries(CppParser-testrunner PUBLIC Poco::CppParser CppUnit)
|
||||||
|
@ -1,33 +1,33 @@
|
|||||||
# Sources
|
# Sources
|
||||||
file(GLOB SRCS_G "src/*.cpp")
|
file(GLOB SRCS_G "src/*.cpp")
|
||||||
POCO_SOURCES_AUTO( SRCS ${SRCS_G})
|
POCO_SOURCES_AUTO(SRCS ${SRCS_G})
|
||||||
|
|
||||||
# Headers
|
# Headers
|
||||||
file(GLOB_RECURSE HDRS_G "include/*.h" )
|
file(GLOB_RECURSE HDRS_G "include/*.h")
|
||||||
POCO_HEADERS_AUTO( SRCS ${HDRS_G})
|
POCO_HEADERS_AUTO(SRCS ${HDRS_G})
|
||||||
|
|
||||||
add_library(CppUnit ${SRCS})
|
add_library(CppUnit ${SRCS})
|
||||||
add_library(Poco::CppUnit ALIAS CppUnit)
|
add_library(Poco::CppUnit ALIAS CppUnit)
|
||||||
set_target_properties(CppUnit
|
set_target_properties(CppUnit
|
||||||
PROPERTIES
|
PROPERTIES
|
||||||
VERSION "1" SOVERSION "1"
|
VERSION "1" SOVERSION "1"
|
||||||
OUTPUT_NAME CppUnit
|
OUTPUT_NAME CppUnit
|
||||||
DEFINE_SYMBOL CppUnit_EXPORTS
|
DEFINE_SYMBOL CppUnit_EXPORTS
|
||||||
)
|
)
|
||||||
target_link_libraries(CppUnit PUBLIC Poco::Foundation)
|
target_link_libraries(CppUnit PUBLIC Poco::Foundation)
|
||||||
target_include_directories(CppUnit
|
target_include_directories(CppUnit
|
||||||
PUBLIC
|
PUBLIC
|
||||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
|
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
|
||||||
$<INSTALL_INTERFACE:include>
|
$<INSTALL_INTERFACE:include>
|
||||||
PRIVATE
|
PRIVATE
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/src
|
${CMAKE_CURRENT_SOURCE_DIR}/src
|
||||||
)
|
)
|
||||||
|
|
||||||
if(NOT BUILD_SHARED_LIBS)
|
if(NOT BUILD_SHARED_LIBS)
|
||||||
target_compile_definitions(CppUnit
|
target_compile_definitions(CppUnit
|
||||||
PUBLIC
|
PUBLIC
|
||||||
POCO_STATIC
|
POCO_STATIC
|
||||||
)
|
)
|
||||||
elseif(MINGW)
|
elseif(MINGW)
|
||||||
target_compile_definitions(CppUnit
|
target_compile_definitions(CppUnit
|
||||||
PUBLIC
|
PUBLIC
|
||||||
|
@ -1,37 +1,37 @@
|
|||||||
# Sources
|
# Sources
|
||||||
file(GLOB SRCS_G "src/*.cpp")
|
file(GLOB SRCS_G "src/*.cpp")
|
||||||
POCO_SOURCES_AUTO( SRCS ${SRCS_G})
|
POCO_SOURCES_AUTO(SRCS ${SRCS_G})
|
||||||
|
|
||||||
# Headers
|
# Headers
|
||||||
file(GLOB_RECURSE HDRS_G "include/*.h" )
|
file(GLOB_RECURSE HDRS_G "include/*.h")
|
||||||
POCO_HEADERS_AUTO( SRCS ${HDRS_G})
|
POCO_HEADERS_AUTO(SRCS ${HDRS_G})
|
||||||
|
|
||||||
# Version Resource
|
# Version Resource
|
||||||
if(MSVC AND BUILD_SHARED_LIBS)
|
if(MSVC AND BUILD_SHARED_LIBS)
|
||||||
source_group("Resources" FILES ${PROJECT_SOURCE_DIR}/DLLVersion.rc)
|
source_group("Resources" FILES ${PROJECT_SOURCE_DIR}/DLLVersion.rc)
|
||||||
list(APPEND SRCS ${PROJECT_SOURCE_DIR}/DLLVersion.rc)
|
list(APPEND SRCS ${PROJECT_SOURCE_DIR}/DLLVersion.rc)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
add_library(Crypto ${SRCS} )
|
add_library(Crypto ${SRCS})
|
||||||
add_library(Poco::Crypto ALIAS Crypto)
|
add_library(Poco::Crypto ALIAS Crypto)
|
||||||
set_target_properties(Crypto
|
set_target_properties(Crypto
|
||||||
PROPERTIES
|
PROPERTIES
|
||||||
VERSION ${SHARED_LIBRARY_VERSION} SOVERSION ${SHARED_LIBRARY_VERSION}
|
VERSION ${SHARED_LIBRARY_VERSION} SOVERSION ${SHARED_LIBRARY_VERSION}
|
||||||
OUTPUT_NAME PocoCrypto
|
OUTPUT_NAME PocoCrypto
|
||||||
DEFINE_SYMBOL Crypto_EXPORTS
|
DEFINE_SYMBOL Crypto_EXPORTS
|
||||||
)
|
)
|
||||||
|
|
||||||
target_link_libraries(Crypto PUBLIC Poco::Foundation OpenSSL::SSL OpenSSL::Crypto)
|
target_link_libraries(Crypto PUBLIC Poco::Foundation OpenSSL::SSL OpenSSL::Crypto)
|
||||||
target_include_directories(Crypto
|
target_include_directories(Crypto
|
||||||
PUBLIC
|
PUBLIC
|
||||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
|
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
|
||||||
$<INSTALL_INTERFACE:include>
|
$<INSTALL_INTERFACE:include>
|
||||||
PRIVATE
|
PRIVATE
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/src
|
${CMAKE_CURRENT_SOURCE_DIR}/src
|
||||||
)
|
)
|
||||||
|
|
||||||
if(MSVC AND POCO_DISABLE_INTERNAL_OPENSSL)
|
if(MSVC AND POCO_DISABLE_INTERNAL_OPENSSL)
|
||||||
target_compile_definitions(Crypto PUBLIC POCO_EXTERNAL_OPENSSL)
|
target_compile_definitions(Crypto PUBLIC POCO_EXTERNAL_OPENSSL)
|
||||||
if(OPENSSL_USE_STATIC_LIBS)
|
if(OPENSSL_USE_STATIC_LIBS)
|
||||||
target_link_libraries(Crypto PUBLIC ws2_32.lib Crypt32.lib)
|
target_link_libraries(Crypto PUBLIC ws2_32.lib Crypt32.lib)
|
||||||
endif()
|
endif()
|
||||||
@ -40,7 +40,7 @@ endif()
|
|||||||
POCO_INSTALL(Crypto)
|
POCO_INSTALL(Crypto)
|
||||||
POCO_GENERATE_PACKAGE(Crypto)
|
POCO_GENERATE_PACKAGE(Crypto)
|
||||||
|
|
||||||
if (ENABLE_TESTS)
|
if(ENABLE_TESTS)
|
||||||
add_subdirectory(samples)
|
add_subdirectory(samples)
|
||||||
add_subdirectory(testsuite)
|
add_subdirectory(testsuite)
|
||||||
endif ()
|
endif()
|
||||||
|
@ -1 +1 @@
|
|||||||
add_subdirectory( genrsakey )
|
add_subdirectory(genrsakey)
|
||||||
|
@ -1,28 +1,35 @@
|
|||||||
# Sources
|
# Sources
|
||||||
file(GLOB SRCS_G "src/*.cpp")
|
file(GLOB SRCS_G "src/*.cpp")
|
||||||
POCO_SOURCES_AUTO( TEST_SRCS ${SRCS_G})
|
POCO_SOURCES_AUTO(TEST_SRCS ${SRCS_G})
|
||||||
|
|
||||||
# Headers
|
# Headers
|
||||||
file(GLOB_RECURSE HDRS_G "src/*.h" )
|
file(GLOB_RECURSE HDRS_G "src/*.h")
|
||||||
POCO_HEADERS_AUTO( TEST_SRCS ${HDRS_G})
|
POCO_HEADERS_AUTO(TEST_SRCS ${HDRS_G})
|
||||||
|
|
||||||
POCO_SOURCES_AUTO_PLAT( TEST_SRCS OFF
|
POCO_SOURCES_AUTO_PLAT(TEST_SRCS OFF
|
||||||
src/WinDriver.cpp
|
src/WinDriver.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
POCO_SOURCES_AUTO_PLAT( TEST_SRCS WINCE
|
POCO_SOURCES_AUTO_PLAT(TEST_SRCS WINCE
|
||||||
src/WinCEDriver.cpp
|
src/WinCEDriver.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
add_executable(Crypto-testrunner ${TEST_SRCS} )
|
add_executable(Crypto-testrunner ${TEST_SRCS})
|
||||||
if(ANDROID)
|
if(ANDROID)
|
||||||
add_test(NAME Crypto WORKING_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
|
add_test(
|
||||||
COMMAND ${CMAKE_COMMAND} -DANDROID_NDK=${ANDROID_NDK} -DLIBRARY_DIR=${CMAKE_BINARY_DIR}/lib -DUNITTEST=${CMAKE_BINARY_DIR}/bin/Crypto-testrunner -DTEST_PARAMETER=-all -P ${CMAKE_SOURCE_DIR}/cmake/ExecuteOnAndroid.cmake)
|
NAME Crypto
|
||||||
|
WORKING_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
|
||||||
|
COMMAND ${CMAKE_COMMAND} -DANDROID_NDK=${ANDROID_NDK} -DLIBRARY_DIR=${CMAKE_BINARY_DIR}/lib -DUNITTEST=${CMAKE_BINARY_DIR}/bin/Crypto-testrunner -DTEST_PARAMETER=-all -P ${CMAKE_SOURCE_DIR}/cmake/ExecuteOnAndroid.cmake
|
||||||
|
)
|
||||||
else()
|
else()
|
||||||
add_test(NAME Crypto WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND Crypto-testrunner -ignore ${CMAKE_SOURCE_DIR}/cppignore.lnx -all)
|
add_test(
|
||||||
set_tests_properties(Crypto PROPERTIES ENVIRONMENT POCO_BASE=${CMAKE_SOURCE_DIR})
|
NAME Crypto
|
||||||
|
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
||||||
|
COMMAND Crypto-testrunner -ignore ${CMAKE_SOURCE_DIR}/cppignore.lnx -all
|
||||||
|
)
|
||||||
|
set_tests_properties(Crypto PROPERTIES ENVIRONMENT POCO_BASE=${CMAKE_SOURCE_DIR})
|
||||||
endif()
|
endif()
|
||||||
target_link_libraries(Crypto-testrunner PUBLIC Poco::NetSSL Poco::XML CppUnit)
|
target_link_libraries(Crypto-testrunner PUBLIC Poco::NetSSL Poco::XML CppUnit)
|
||||||
if(UNIX AND NOT ANDROID)
|
if(UNIX AND NOT ANDROID)
|
||||||
target_link_libraries(Crypto-testrunner PUBLIC pthread)
|
target_link_libraries(Crypto-testrunner PUBLIC pthread)
|
||||||
endif(UNIX AND NOT ANDROID)
|
endif(UNIX AND NOT ANDROID)
|
||||||
|
@ -1,72 +1,72 @@
|
|||||||
# Sources
|
# Sources
|
||||||
file(GLOB SRCS_G "src/*.cpp")
|
file(GLOB SRCS_G "src/*.cpp")
|
||||||
POCO_SOURCES_AUTO( SRCS ${SRCS_G})
|
POCO_SOURCES_AUTO(SRCS ${SRCS_G})
|
||||||
|
|
||||||
# Headers
|
# Headers
|
||||||
file(GLOB_RECURSE HDRS_G "include/*.h" )
|
file(GLOB_RECURSE HDRS_G "include/*.h")
|
||||||
POCO_HEADERS_AUTO( SRCS ${HDRS_G})
|
POCO_HEADERS_AUTO(SRCS ${HDRS_G})
|
||||||
|
|
||||||
if(MSVC AND NOT(MSVC_VERSION LESS 1400))
|
if(MSVC AND NOT(MSVC_VERSION LESS 1400))
|
||||||
set_source_files_properties(src/StatementImpl.cpp
|
set_source_files_properties(src/StatementImpl.cpp
|
||||||
PROPERTIES COMPILE_FLAGS "/bigobj")
|
PROPERTIES COMPILE_FLAGS "/bigobj")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Version Resource
|
# Version Resource
|
||||||
if(MSVC AND BUILD_SHARED_LIBS)
|
if(MSVC AND BUILD_SHARED_LIBS)
|
||||||
source_group("Resources" FILES ${PROJECT_SOURCE_DIR}/DLLVersion.rc)
|
source_group("Resources" FILES ${PROJECT_SOURCE_DIR}/DLLVersion.rc)
|
||||||
list(APPEND SRCS ${PROJECT_SOURCE_DIR}/DLLVersion.rc)
|
list(APPEND SRCS ${PROJECT_SOURCE_DIR}/DLLVersion.rc)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
add_library(Data ${SRCS} )
|
add_library(Data ${SRCS})
|
||||||
add_library(Poco::Data ALIAS Data)
|
add_library(Poco::Data ALIAS Data)
|
||||||
set_target_properties(Data
|
set_target_properties(Data
|
||||||
PROPERTIES
|
PROPERTIES
|
||||||
VERSION ${SHARED_LIBRARY_VERSION} SOVERSION ${SHARED_LIBRARY_VERSION}
|
VERSION ${SHARED_LIBRARY_VERSION} SOVERSION ${SHARED_LIBRARY_VERSION}
|
||||||
OUTPUT_NAME PocoData
|
OUTPUT_NAME PocoData
|
||||||
DEFINE_SYMBOL Data_EXPORTS
|
DEFINE_SYMBOL Data_EXPORTS
|
||||||
)
|
)
|
||||||
|
|
||||||
target_link_libraries(Data PUBLIC Poco::Foundation)
|
target_link_libraries(Data PUBLIC Poco::Foundation)
|
||||||
target_include_directories(Data
|
target_include_directories(Data
|
||||||
PUBLIC
|
PUBLIC
|
||||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
|
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
|
||||||
$<INSTALL_INTERFACE:include>
|
$<INSTALL_INTERFACE:include>
|
||||||
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src
|
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src
|
||||||
)
|
)
|
||||||
|
|
||||||
POCO_INSTALL(Data)
|
POCO_INSTALL(Data)
|
||||||
POCO_GENERATE_PACKAGE(Data)
|
POCO_GENERATE_PACKAGE(Data)
|
||||||
|
|
||||||
if(ENABLE_DATA_SQLITE)
|
if(ENABLE_DATA_SQLITE)
|
||||||
# SQlite3 is built in any case
|
# SQlite3 is built in any case
|
||||||
message(STATUS "SQLite Support Enabled")
|
message(STATUS "SQLite Support Enabled")
|
||||||
add_subdirectory( SQLite )
|
add_subdirectory(SQLite)
|
||||||
else(ENABLE_DATA_SQLITE)
|
else(ENABLE_DATA_SQLITE)
|
||||||
message(STATUS "SQLite Support Disabled")
|
message(STATUS "SQLite Support Disabled")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(MYSQL_FOUND AND ENABLE_DATA_MYSQL)
|
if(MYSQL_FOUND AND ENABLE_DATA_MYSQL)
|
||||||
message(STATUS "MySQL Support Enabled")
|
message(STATUS "MySQL Support Enabled")
|
||||||
add_subdirectory( MySQL )
|
add_subdirectory(MySQL)
|
||||||
else()
|
else()
|
||||||
message(STATUS "MySQL Support Disabled")
|
message(STATUS "MySQL Support Disabled")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(POSTGRESQL_FOUND AND ENABLE_DATA_POSTGRESQL)
|
if(POSTGRESQL_FOUND AND ENABLE_DATA_POSTGRESQL)
|
||||||
message(STATUS "PostgreSQL Support Enabled")
|
message(STATUS "PostgreSQL Support Enabled")
|
||||||
add_subdirectory( PostgreSQL )
|
add_subdirectory(PostgreSQL)
|
||||||
else()
|
else()
|
||||||
message(STATUS "PostgreSQL Support Disabled")
|
message(STATUS "PostgreSQL Support Disabled")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(ODBC_FOUND AND ENABLE_DATA_ODBC AND NOT WINCE)
|
if(ODBC_FOUND AND ENABLE_DATA_ODBC AND NOT WINCE)
|
||||||
message(STATUS "ODBC Support Enabled")
|
message(STATUS "ODBC Support Enabled")
|
||||||
add_subdirectory( ODBC )
|
add_subdirectory(ODBC)
|
||||||
else()
|
else()
|
||||||
message(STATUS "ODBC Support Disabled")
|
message(STATUS "ODBC Support Disabled")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (ENABLE_TESTS)
|
if(ENABLE_TESTS)
|
||||||
add_subdirectory(samples)
|
add_subdirectory(samples)
|
||||||
add_subdirectory(testsuite)
|
add_subdirectory(testsuite)
|
||||||
endif ()
|
endif()
|
||||||
|
@ -1,42 +1,42 @@
|
|||||||
# Sources
|
# Sources
|
||||||
file(GLOB SRCS_G "src/*.cpp")
|
file(GLOB SRCS_G "src/*.cpp")
|
||||||
POCO_SOURCES_AUTO( MYSQL_SRCS ${SRCS_G})
|
POCO_SOURCES_AUTO(MYSQL_SRCS ${SRCS_G})
|
||||||
|
|
||||||
# Headers
|
# Headers
|
||||||
file(GLOB_RECURSE HDRS_G "include/*.h" )
|
file(GLOB_RECURSE HDRS_G "include/*.h")
|
||||||
POCO_HEADERS_AUTO( MYSQL_SRCS ${HDRS_G})
|
POCO_HEADERS_AUTO(MYSQL_SRCS ${HDRS_G})
|
||||||
|
|
||||||
# Version Resource
|
# Version Resource
|
||||||
if(MSVC AND BUILD_SHARED_LIBS)
|
if(MSVC AND BUILD_SHARED_LIBS)
|
||||||
source_group("Resources" FILES ${PROJECT_SOURCE_DIR}/DLLVersion.rc)
|
source_group("Resources" FILES ${PROJECT_SOURCE_DIR}/DLLVersion.rc)
|
||||||
list(APPEND MYSQL_SRCS ${PROJECT_SOURCE_DIR}/DLLVersion.rc)
|
list(APPEND MYSQL_SRCS ${PROJECT_SOURCE_DIR}/DLLVersion.rc)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
add_library(DataMySQL ${MYSQL_SRCS} )
|
add_library(DataMySQL ${MYSQL_SRCS})
|
||||||
add_library(Poco::DataMySQL ALIAS DataMySQL)
|
add_library(Poco::DataMySQL ALIAS DataMySQL)
|
||||||
set_target_properties(DataMySQL
|
set_target_properties(DataMySQL
|
||||||
PROPERTIES
|
PROPERTIES
|
||||||
VERSION ${SHARED_LIBRARY_VERSION} SOVERSION ${SHARED_LIBRARY_VERSION}
|
VERSION ${SHARED_LIBRARY_VERSION} SOVERSION ${SHARED_LIBRARY_VERSION}
|
||||||
OUTPUT_NAME PocoDataMySQL
|
OUTPUT_NAME PocoDataMySQL
|
||||||
DEFINE_SYMBOL MySQL_EXPORTS
|
DEFINE_SYMBOL MySQL_EXPORTS
|
||||||
)
|
)
|
||||||
|
|
||||||
target_link_libraries(DataMySQL PUBLIC Poco::Data MySQL::client)
|
target_link_libraries(DataMySQL PUBLIC Poco::Data MySQL::client)
|
||||||
target_include_directories(DataMySQL
|
target_include_directories(DataMySQL
|
||||||
PUBLIC
|
PUBLIC
|
||||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
|
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
|
||||||
$<INSTALL_INTERFACE:include>
|
$<INSTALL_INTERFACE:include>
|
||||||
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src
|
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src
|
||||||
)
|
)
|
||||||
target_compile_definitions(DataMySQL PUBLIC THREADSAFE NO_TCL)
|
target_compile_definitions(DataMySQL PUBLIC THREADSAFE NO_TCL)
|
||||||
|
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
target_compile_definitions(DataMySQL PUBLIC __LCC__) #__LCC__ define used by MySQL.h
|
target_compile_definitions(DataMySQL PUBLIC __LCC__) #__LCC__ define used by MySQL.h
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
POCO_INSTALL(DataMySQL)
|
POCO_INSTALL(DataMySQL)
|
||||||
POCO_GENERATE_PACKAGE(DataMySQL)
|
POCO_GENERATE_PACKAGE(DataMySQL)
|
||||||
|
|
||||||
if (ENABLE_TESTS)
|
if(ENABLE_TESTS)
|
||||||
add_subdirectory(testsuite)
|
add_subdirectory(testsuite)
|
||||||
endif ()
|
endif()
|
||||||
|
@ -1,21 +1,28 @@
|
|||||||
# Sources
|
# Sources
|
||||||
file(GLOB SRCS_G "src/*.cpp")
|
file(GLOB SRCS_G "src/*.cpp")
|
||||||
POCO_SOURCES_AUTO( TEST_SRCS ${SRCS_G})
|
POCO_SOURCES_AUTO(TEST_SRCS ${SRCS_G})
|
||||||
|
|
||||||
# Headers
|
# Headers
|
||||||
file(GLOB_RECURSE HDRS_G "src/*.h" )
|
file(GLOB_RECURSE HDRS_G "src/*.h")
|
||||||
POCO_HEADERS_AUTO( TEST_SRCS ${HDRS_G})
|
POCO_HEADERS_AUTO(TEST_SRCS ${HDRS_G})
|
||||||
|
|
||||||
POCO_SOURCES_AUTO_PLAT( TEST_SRCS OFF
|
POCO_SOURCES_AUTO_PLAT(TEST_SRCS OFF
|
||||||
src/WinDriver.cpp
|
src/WinDriver.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
add_executable(DataMySQL-testrunner ${TEST_SRCS} )
|
add_executable(DataMySQL-testrunner ${TEST_SRCS})
|
||||||
if(ANDROID)
|
if(ANDROID)
|
||||||
add_test(NAME DataMySQL WORKING_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
|
add_test(
|
||||||
COMMAND ${CMAKE_COMMAND} -DANDROID_NDK=${ANDROID_NDK} -DLIBRARY_DIR=${CMAKE_BINARY_DIR}/lib -DUNITTEST=${CMAKE_BINARY_DIR}/bin/DataMySQL-testrunner -DTEST_PARAMETER=-all -P ${CMAKE_SOURCE_DIR}/cmake/ExecuteOnAndroid.cmake)
|
NAME DataMySQL
|
||||||
|
WORKING_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
|
||||||
|
COMMAND ${CMAKE_COMMAND} -DANDROID_NDK=${ANDROID_NDK} -DLIBRARY_DIR=${CMAKE_BINARY_DIR}/lib -DUNITTEST=${CMAKE_BINARY_DIR}/bin/DataMySQL-testrunner -DTEST_PARAMETER=-all -P ${CMAKE_SOURCE_DIR}/cmake/ExecuteOnAndroid.cmake
|
||||||
|
)
|
||||||
else()
|
else()
|
||||||
add_test(NAME DataMySQL WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND DataMySQL-testrunner -ignore ${CMAKE_SOURCE_DIR}/cppignore.lnx -all)
|
add_test(
|
||||||
set_tests_properties(DataMySQL PROPERTIES ENVIRONMENT POCO_BASE=${CMAKE_SOURCE_DIR})
|
NAME DataMySQL
|
||||||
|
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
||||||
|
COMMAND DataMySQL-testrunner -ignore ${CMAKE_SOURCE_DIR}/cppignore.lnx -all
|
||||||
|
)
|
||||||
|
set_tests_properties(DataMySQL PROPERTIES ENVIRONMENT POCO_BASE=${CMAKE_SOURCE_DIR})
|
||||||
endif()
|
endif()
|
||||||
target_link_libraries(DataMySQL-testrunner PUBLIC Poco::DataMySQL CppUnit)
|
target_link_libraries(DataMySQL-testrunner PUBLIC Poco::DataMySQL CppUnit)
|
||||||
|
@ -1,38 +1,38 @@
|
|||||||
# Sources
|
# Sources
|
||||||
file(GLOB SRCS_G "src/*.cpp")
|
file(GLOB SRCS_G "src/*.cpp")
|
||||||
POCO_SOURCES_AUTO( ODBC_SRCS ${SRCS_G})
|
POCO_SOURCES_AUTO(ODBC_SRCS ${SRCS_G})
|
||||||
|
|
||||||
# Headers
|
# Headers
|
||||||
file(GLOB_RECURSE HDRS_G "include/*.h" )
|
file(GLOB_RECURSE HDRS_G "include/*.h")
|
||||||
POCO_HEADERS_AUTO( ODBC_SRCS ${HDRS_G})
|
POCO_HEADERS_AUTO(ODBC_SRCS ${HDRS_G})
|
||||||
|
|
||||||
# Version Resource
|
# Version Resource
|
||||||
if(MSVC AND BUILD_SHARED_LIBS)
|
if(MSVC AND BUILD_SHARED_LIBS)
|
||||||
source_group("Resources" FILES ${PROJECT_SOURCE_DIR}/DLLVersion.rc)
|
source_group("Resources" FILES ${PROJECT_SOURCE_DIR}/DLLVersion.rc)
|
||||||
list(APPEND ODBC_SRCS ${PROJECT_SOURCE_DIR}/DLLVersion.rc)
|
list(APPEND ODBC_SRCS ${PROJECT_SOURCE_DIR}/DLLVersion.rc)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
add_library(DataODBC ${ODBC_SRCS})
|
add_library(DataODBC ${ODBC_SRCS})
|
||||||
add_library(Poco::DataODBC ALIAS DataODBC)
|
add_library(Poco::DataODBC ALIAS DataODBC)
|
||||||
set_target_properties(DataODBC
|
set_target_properties(DataODBC
|
||||||
PROPERTIES
|
PROPERTIES
|
||||||
VERSION ${SHARED_LIBRARY_VERSION} SOVERSION ${SHARED_LIBRARY_VERSION}
|
VERSION ${SHARED_LIBRARY_VERSION} SOVERSION ${SHARED_LIBRARY_VERSION}
|
||||||
OUTPUT_NAME PocoDataODBC
|
OUTPUT_NAME PocoDataODBC
|
||||||
DEFINE_SYMBOL ODBC_EXPORTS
|
DEFINE_SYMBOL ODBC_EXPORTS
|
||||||
)
|
)
|
||||||
|
|
||||||
target_link_libraries(DataODBC PUBLIC Poco::Data ODBC::ODBC)
|
target_link_libraries(DataODBC PUBLIC Poco::Data ODBC::ODBC)
|
||||||
target_include_directories(DataODBC
|
target_include_directories(DataODBC
|
||||||
PUBLIC
|
PUBLIC
|
||||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
|
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
|
||||||
$<INSTALL_INTERFACE:include>
|
$<INSTALL_INTERFACE:include>
|
||||||
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src
|
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src
|
||||||
)
|
)
|
||||||
target_compile_definitions(DataODBC PUBLIC THREADSAFE)
|
target_compile_definitions(DataODBC PUBLIC THREADSAFE)
|
||||||
|
|
||||||
POCO_INSTALL(DataODBC)
|
POCO_INSTALL(DataODBC)
|
||||||
POCO_GENERATE_PACKAGE(DataODBC)
|
POCO_GENERATE_PACKAGE(DataODBC)
|
||||||
|
|
||||||
if (ENABLE_TESTS)
|
if(ENABLE_TESTS)
|
||||||
add_subdirectory(testsuite)
|
add_subdirectory(testsuite)
|
||||||
endif ()
|
endif()
|
||||||
|
@ -1,21 +1,28 @@
|
|||||||
# Sources
|
# Sources
|
||||||
file(GLOB SRCS_G "src/*.cpp")
|
file(GLOB SRCS_G "src/*.cpp")
|
||||||
POCO_SOURCES_AUTO( TEST_SRCS ${SRCS_G})
|
POCO_SOURCES_AUTO(TEST_SRCS ${SRCS_G})
|
||||||
|
|
||||||
# Headers
|
# Headers
|
||||||
file(GLOB_RECURSE HDRS_G "src/*.h" )
|
file(GLOB_RECURSE HDRS_G "src/*.h")
|
||||||
POCO_HEADERS_AUTO( TEST_SRCS ${HDRS_G})
|
POCO_HEADERS_AUTO(TEST_SRCS ${HDRS_G})
|
||||||
|
|
||||||
POCO_SOURCES_AUTO_PLAT( TEST_SRCS OFF
|
POCO_SOURCES_AUTO_PLAT(TEST_SRCS OFF
|
||||||
src/WinDriver.cpp
|
src/WinDriver.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
add_executable(DataODBC-testrunner ${TEST_SRCS} )
|
add_executable(DataODBC-testrunner ${TEST_SRCS})
|
||||||
if(ANDROID)
|
if(ANDROID)
|
||||||
add_test(NAME DataODBC WORKING_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
|
add_test(
|
||||||
COMMAND ${CMAKE_COMMAND} -DANDROID_NDK=${ANDROID_NDK} -DLIBRARY_DIR=${CMAKE_BINARY_DIR}/lib -DUNITTEST=${CMAKE_BINARY_DIR}/bin/DataODBC-testrunner -DTEST_PARAMETER=-all -P ${CMAKE_SOURCE_DIR}/cmake/ExecuteOnAndroid.cmake)
|
NAME DataODBC
|
||||||
|
WORKING_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
|
||||||
|
COMMAND ${CMAKE_COMMAND} -DANDROID_NDK=${ANDROID_NDK} -DLIBRARY_DIR=${CMAKE_BINARY_DIR}/lib -DUNITTEST=${CMAKE_BINARY_DIR}/bin/DataODBC-testrunner -DTEST_PARAMETER=-all -P ${CMAKE_SOURCE_DIR}/cmake/ExecuteOnAndroid.cmake
|
||||||
|
)
|
||||||
else()
|
else()
|
||||||
add_test(NAME DataODBC WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND DataODBC-testrunner -ignore ${CMAKE_SOURCE_DIR}/cppignore.lnx -all)
|
add_test(
|
||||||
set_tests_properties(DataODBC PROPERTIES ENVIRONMENT POCO_BASE=${CMAKE_SOURCE_DIR})
|
NAME DataODBC
|
||||||
|
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
||||||
|
COMMAND DataODBC-testrunner -ignore ${CMAKE_SOURCE_DIR}/cppignore.lnx -all
|
||||||
|
)
|
||||||
|
set_tests_properties(DataODBC PROPERTIES ENVIRONMENT POCO_BASE=${CMAKE_SOURCE_DIR})
|
||||||
endif()
|
endif()
|
||||||
target_link_libraries(DataODBC-testrunner PUBLIC Poco::DataODBC CppUnit)
|
target_link_libraries(DataODBC-testrunner PUBLIC Poco::DataODBC CppUnit)
|
||||||
|
@ -1,31 +1,31 @@
|
|||||||
# Sources
|
# Sources
|
||||||
file(GLOB SRCS_G "src/*.cpp")
|
file(GLOB SRCS_G "src/*.cpp")
|
||||||
POCO_SOURCES_AUTO( POSTGRESQL_SRCS ${SRCS_G})
|
POCO_SOURCES_AUTO(POSTGRESQL_SRCS ${SRCS_G})
|
||||||
|
|
||||||
# Headers
|
# Headers
|
||||||
file(GLOB_RECURSE HDRS_G "include/*.h" )
|
file(GLOB_RECURSE HDRS_G "include/*.h")
|
||||||
POCO_HEADERS_AUTO( POSTGRESQL_SRCS ${HDRS_G})
|
POCO_HEADERS_AUTO(POSTGRESQL_SRCS ${HDRS_G})
|
||||||
|
|
||||||
# Version Resource
|
# Version Resource
|
||||||
if(MSVC AND BUILD_SHARED_LIBS)
|
if(MSVC AND BUILD_SHARED_LIBS)
|
||||||
source_group("Resources" FILES ${PROJECT_SOURCE_DIR}/DLLVersion.rc)
|
source_group("Resources" FILES ${PROJECT_SOURCE_DIR}/DLLVersion.rc)
|
||||||
list(APPEND POSTGRESQL_SRCS ${PROJECT_SOURCE_DIR}/DLLVersion.rc)
|
list(APPEND POSTGRESQL_SRCS ${PROJECT_SOURCE_DIR}/DLLVersion.rc)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
add_library(DataPostgreSQL ${POSTGRESQL_SRCS} )
|
add_library(DataPostgreSQL ${POSTGRESQL_SRCS})
|
||||||
add_library(Poco::DataPostgreSQL ALIAS DataPostgreSQL)
|
add_library(Poco::DataPostgreSQL ALIAS DataPostgreSQL)
|
||||||
set_target_properties(DataPostgreSQL
|
set_target_properties(DataPostgreSQL
|
||||||
PROPERTIES
|
PROPERTIES
|
||||||
VERSION ${SHARED_LIBRARY_VERSION} SOVERSION ${SHARED_LIBRARY_VERSION}
|
VERSION ${SHARED_LIBRARY_VERSION} SOVERSION ${SHARED_LIBRARY_VERSION}
|
||||||
OUTPUT_NAME PocoDataPostgreSQL
|
OUTPUT_NAME PocoDataPostgreSQL
|
||||||
DEFINE_SYMBOL PostgreSQL_EXPORTS
|
DEFINE_SYMBOL PostgreSQL_EXPORTS
|
||||||
)
|
)
|
||||||
|
|
||||||
target_link_libraries(DataPostgreSQL PUBLIC Poco::Data PostgreSQL::client)
|
target_link_libraries(DataPostgreSQL PUBLIC Poco::Data PostgreSQL::client)
|
||||||
target_include_directories(DataPostgreSQL
|
target_include_directories(DataPostgreSQL
|
||||||
PUBLIC
|
PUBLIC
|
||||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
|
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
|
||||||
$<INSTALL_INTERFACE:include>
|
$<INSTALL_INTERFACE:include>
|
||||||
PRIVATE
|
PRIVATE
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/src
|
${CMAKE_CURRENT_SOURCE_DIR}/src
|
||||||
)
|
)
|
||||||
@ -33,6 +33,6 @@ target_include_directories(DataPostgreSQL
|
|||||||
POCO_INSTALL(DataPostgreSQL)
|
POCO_INSTALL(DataPostgreSQL)
|
||||||
POCO_GENERATE_PACKAGE(DataPostgreSQL)
|
POCO_GENERATE_PACKAGE(DataPostgreSQL)
|
||||||
|
|
||||||
if (ENABLE_TESTS)
|
if(ENABLE_TESTS)
|
||||||
add_subdirectory(testsuite)
|
add_subdirectory(testsuite)
|
||||||
endif ()
|
endif()
|
||||||
|
@ -1,16 +1,20 @@
|
|||||||
# Sources
|
# Sources
|
||||||
file(GLOB SRCS_G "src/*.cpp")
|
file(GLOB SRCS_G "src/*.cpp")
|
||||||
POCO_SOURCES_AUTO( TEST_SRCS ${SRCS_G})
|
POCO_SOURCES_AUTO(TEST_SRCS ${SRCS_G})
|
||||||
|
|
||||||
# Headers
|
# Headers
|
||||||
file(GLOB_RECURSE HDRS_G "src/*.h" )
|
file(GLOB_RECURSE HDRS_G "src/*.h")
|
||||||
POCO_HEADERS_AUTO( TEST_SRCS ${HDRS_G})
|
POCO_HEADERS_AUTO(TEST_SRCS ${HDRS_G})
|
||||||
|
|
||||||
POCO_SOURCES_AUTO_PLAT( TEST_SRCS OFF
|
POCO_SOURCES_AUTO_PLAT(TEST_SRCS OFF
|
||||||
src/WinDriver.cpp
|
src/WinDriver.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
add_executable(DataPostgreSQL-testrunner ${TEST_SRCS} )
|
add_executable(DataPostgreSQL-testrunner ${TEST_SRCS})
|
||||||
add_test(NAME DataPostgreSQL WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND DataPostgreSQL-testrunner -ignore ${CMAKE_SOURCE_DIR}/cppignore.lnx -all)
|
add_test(
|
||||||
|
NAME DataPostgreSQL
|
||||||
|
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
||||||
|
COMMAND DataPostgreSQL-testrunner -ignore ${CMAKE_SOURCE_DIR}/cppignore.lnx -all
|
||||||
|
)
|
||||||
set_tests_properties(DataPostgreSQL PROPERTIES ENVIRONMENT POCO_BASE=${CMAKE_SOURCE_DIR})
|
set_tests_properties(DataPostgreSQL PROPERTIES ENVIRONMENT POCO_BASE=${CMAKE_SOURCE_DIR})
|
||||||
target_link_libraries(DataPostgreSQL-testrunner PUBLIC Poco::DataPostgreSQL CppUnit)
|
target_link_libraries(DataPostgreSQL-testrunner PUBLIC Poco::DataPostgreSQL CppUnit)
|
||||||
|
@ -1,53 +1,53 @@
|
|||||||
# Sources
|
# Sources
|
||||||
file(GLOB SRCS_G "src/*.cpp")
|
file(GLOB SRCS_G "src/*.cpp")
|
||||||
POCO_SOURCES_AUTO( SQLITE_SRCS ${SRCS_G})
|
POCO_SOURCES_AUTO(SQLITE_SRCS ${SRCS_G})
|
||||||
|
|
||||||
# Headers
|
# Headers
|
||||||
file(GLOB_RECURSE HDRS_G "include/*.h" )
|
file(GLOB_RECURSE HDRS_G "include/*.h")
|
||||||
POCO_HEADERS_AUTO( SQLITE_SRCS ${HDRS_G})
|
POCO_HEADERS_AUTO(SQLITE_SRCS ${HDRS_G})
|
||||||
|
|
||||||
if (POCO_UNBUNDLED)
|
if(POCO_UNBUNDLED)
|
||||||
find_package(SQLite3 REQUIRED)
|
find_package(SQLite3 REQUIRED)
|
||||||
else()
|
else()
|
||||||
# sqlite3
|
# sqlite3
|
||||||
POCO_SOURCES( SQLITE_SRCS sqlite3
|
POCO_SOURCES(SQLITE_SRCS sqlite3
|
||||||
src/sqlite3.c
|
src/sqlite3.c
|
||||||
)
|
)
|
||||||
|
|
||||||
POCO_HEADERS( SQLITE_SRCS sqlite3
|
POCO_HEADERS(SQLITE_SRCS sqlite3
|
||||||
src/sqlite3.h
|
src/sqlite3.h
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Version Resource
|
# Version Resource
|
||||||
if(MSVC AND BUILD_SHARED_LIBS)
|
if(MSVC AND BUILD_SHARED_LIBS)
|
||||||
source_group("Resources" FILES ${PROJECT_SOURCE_DIR}/DLLVersion.rc)
|
source_group("Resources" FILES ${PROJECT_SOURCE_DIR}/DLLVersion.rc)
|
||||||
list(APPEND SQLITE_SRCS ${PROJECT_SOURCE_DIR}/DLLVersion.rc)
|
list(APPEND SQLITE_SRCS ${PROJECT_SOURCE_DIR}/DLLVersion.rc)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
add_library(DataSQLite ${SQLITE_SRCS} )
|
add_library(DataSQLite ${SQLITE_SRCS})
|
||||||
|
|
||||||
add_library(Poco::DataSQLite ALIAS DataSQLite)
|
add_library(Poco::DataSQLite ALIAS DataSQLite)
|
||||||
set_target_properties(DataSQLite
|
set_target_properties(DataSQLite
|
||||||
PROPERTIES
|
PROPERTIES
|
||||||
VERSION ${SHARED_LIBRARY_VERSION} SOVERSION ${SHARED_LIBRARY_VERSION}
|
VERSION ${SHARED_LIBRARY_VERSION} SOVERSION ${SHARED_LIBRARY_VERSION}
|
||||||
OUTPUT_NAME PocoDataSQLite
|
OUTPUT_NAME PocoDataSQLite
|
||||||
DEFINE_SYMBOL SQLite_EXPORTS
|
DEFINE_SYMBOL SQLite_EXPORTS
|
||||||
)
|
)
|
||||||
target_link_libraries(DataSQLite PUBLIC Poco::Data)
|
target_link_libraries(DataSQLite PUBLIC Poco::Data)
|
||||||
target_include_directories(DataSQLite
|
target_include_directories(DataSQLite
|
||||||
PUBLIC
|
PUBLIC
|
||||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
|
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
|
||||||
$<INSTALL_INTERFACE:include>
|
$<INSTALL_INTERFACE:include>
|
||||||
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src
|
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src
|
||||||
)
|
)
|
||||||
|
|
||||||
if(POCO_UNBUNDLED)
|
if(POCO_UNBUNDLED)
|
||||||
target_link_libraries(DataSQLite PUBLIC SQLite::SQLite3)
|
target_link_libraries(DataSQLite PUBLIC SQLite::SQLite3)
|
||||||
target_compile_definitions(DataSQLite PUBLIC
|
target_compile_definitions(DataSQLite PUBLIC
|
||||||
POCO_UNBUNDLED
|
POCO_UNBUNDLED
|
||||||
SQLITE_THREADSAFE=1
|
SQLITE_THREADSAFE=1
|
||||||
)
|
)
|
||||||
else()
|
else()
|
||||||
if(WINCE)
|
if(WINCE)
|
||||||
target_compile_definitions(DataSQLite PRIVATE SQLITE_MSVC_LOCALTIME_API)
|
target_compile_definitions(DataSQLite PRIVATE SQLITE_MSVC_LOCALTIME_API)
|
||||||
@ -66,7 +66,6 @@ endif()
|
|||||||
POCO_INSTALL(DataSQLite)
|
POCO_INSTALL(DataSQLite)
|
||||||
POCO_GENERATE_PACKAGE(DataSQLite)
|
POCO_GENERATE_PACKAGE(DataSQLite)
|
||||||
|
|
||||||
if (ENABLE_TESTS)
|
if(ENABLE_TESTS)
|
||||||
add_subdirectory(testsuite)
|
add_subdirectory(testsuite)
|
||||||
endif ()
|
endif()
|
||||||
|
|
||||||
|
@ -2,10 +2,10 @@ include(CMakeFindDependencyMacro)
|
|||||||
find_dependency(PocoFoundation)
|
find_dependency(PocoFoundation)
|
||||||
find_dependency(PocoData)
|
find_dependency(PocoData)
|
||||||
if(@POCO_UNBUNDLED@)
|
if(@POCO_UNBUNDLED@)
|
||||||
if(CMAKE_VERSION VERSION_LESS "3.14")
|
if(CMAKE_VERSION VERSION_LESS "3.14")
|
||||||
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/V313")
|
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/V313")
|
||||||
endif()
|
endif()
|
||||||
find_dependency(SQLite3 REQUIRED)
|
find_dependency(SQLite3 REQUIRED)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
include("${CMAKE_CURRENT_LIST_DIR}/PocoDataSQLiteTargets.cmake")
|
include("${CMAKE_CURRENT_LIST_DIR}/PocoDataSQLiteTargets.cmake")
|
||||||
|
@ -1,25 +1,32 @@
|
|||||||
# Sources
|
# Sources
|
||||||
file(GLOB SRCS_G "src/*.cpp")
|
file(GLOB SRCS_G "src/*.cpp")
|
||||||
POCO_SOURCES_AUTO( TEST_SRCS ${SRCS_G})
|
POCO_SOURCES_AUTO(TEST_SRCS ${SRCS_G})
|
||||||
|
|
||||||
# Headers
|
# Headers
|
||||||
file(GLOB_RECURSE HDRS_G "src/*.h" )
|
file(GLOB_RECURSE HDRS_G "src/*.h")
|
||||||
POCO_HEADERS_AUTO( TEST_SRCS ${HDRS_G})
|
POCO_HEADERS_AUTO(TEST_SRCS ${HDRS_G})
|
||||||
|
|
||||||
POCO_SOURCES_AUTO_PLAT( TEST_SRCS OFF
|
POCO_SOURCES_AUTO_PLAT(TEST_SRCS OFF
|
||||||
src/WinDriver.cpp
|
src/WinDriver.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
POCO_SOURCES_AUTO_PLAT( TEST_SRCS WINCE
|
POCO_SOURCES_AUTO_PLAT(TEST_SRCS WINCE
|
||||||
src/WinCEDriver.cpp
|
src/WinCEDriver.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
add_executable(DataSQLite-testrunner ${TEST_SRCS} )
|
add_executable(DataSQLite-testrunner ${TEST_SRCS})
|
||||||
if(ANDROID)
|
if(ANDROID)
|
||||||
add_test(NAME DataSQLite WORKING_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
|
add_test(
|
||||||
COMMAND ${CMAKE_COMMAND} -DANDROID_NDK=${ANDROID_NDK} -DLIBRARY_DIR=${CMAKE_BINARY_DIR}/lib -DUNITTEST=${CMAKE_BINARY_DIR}/bin/DataSQLite-testrunner -DTEST_PARAMETER=-all -P ${CMAKE_SOURCE_DIR}/cmake/ExecuteOnAndroid.cmake)
|
NAME DataSQLite
|
||||||
|
WORKING_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
|
||||||
|
COMMAND ${CMAKE_COMMAND} -DANDROID_NDK=${ANDROID_NDK} -DLIBRARY_DIR=${CMAKE_BINARY_DIR}/lib -DUNITTEST=${CMAKE_BINARY_DIR}/bin/DataSQLite-testrunner -DTEST_PARAMETER=-all -P ${CMAKE_SOURCE_DIR}/cmake/ExecuteOnAndroid.cmake
|
||||||
|
)
|
||||||
else()
|
else()
|
||||||
add_test(NAME DataSQLite WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND DataSQLite-testrunner -ignore ${CMAKE_SOURCE_DIR}/cppignore.lnx -all)
|
add_test(
|
||||||
set_tests_properties(DataSQLite PROPERTIES ENVIRONMENT POCO_BASE=${CMAKE_SOURCE_DIR})
|
NAME DataSQLite
|
||||||
|
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
||||||
|
COMMAND DataSQLite-testrunner -ignore ${CMAKE_SOURCE_DIR}/cppignore.lnx -all
|
||||||
|
)
|
||||||
|
set_tests_properties(DataSQLite PROPERTIES ENVIRONMENT POCO_BASE=${CMAKE_SOURCE_DIR})
|
||||||
endif()
|
endif()
|
||||||
target_link_libraries(DataSQLite-testrunner PUBLIC Poco::DataSQLite CppUnit)
|
target_link_libraries(DataSQLite-testrunner PUBLIC Poco::DataSQLite CppUnit)
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
add_subdirectory( Binding )
|
add_subdirectory(Binding)
|
||||||
add_subdirectory( RecordSet )
|
add_subdirectory(RecordSet)
|
||||||
add_subdirectory( RowFormatter )
|
add_subdirectory(RowFormatter)
|
||||||
add_subdirectory( Tuple )
|
add_subdirectory(Tuple)
|
||||||
add_subdirectory( TypeHandler )
|
add_subdirectory(TypeHandler)
|
||||||
|
@ -1,30 +1,37 @@
|
|||||||
# Sources
|
# Sources
|
||||||
file(GLOB SRCS_G "src/*.cpp")
|
file(GLOB SRCS_G "src/*.cpp")
|
||||||
POCO_SOURCES_AUTO( TEST_SRCS ${SRCS_G})
|
POCO_SOURCES_AUTO(TEST_SRCS ${SRCS_G})
|
||||||
|
|
||||||
# Headers
|
# Headers
|
||||||
file(GLOB_RECURSE HDRS_G "src/*.h" )
|
file(GLOB_RECURSE HDRS_G "src/*.h")
|
||||||
POCO_HEADERS_AUTO( TEST_SRCS ${HDRS_G})
|
POCO_HEADERS_AUTO(TEST_SRCS ${HDRS_G})
|
||||||
|
|
||||||
POCO_SOURCES_AUTO_PLAT( TEST_SRCS OFF
|
POCO_SOURCES_AUTO_PLAT(TEST_SRCS OFF
|
||||||
src/WinDriver.cpp
|
src/WinDriver.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
POCO_SOURCES_AUTO_PLAT( TEST_SRCS WINCE
|
POCO_SOURCES_AUTO_PLAT(TEST_SRCS WINCE
|
||||||
src/WinCEDriver.cpp
|
src/WinCEDriver.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
#TODO: Why is this file there? It doesn't compile if it is include in the sources
|
#TODO: Why is this file there? It doesn't compile if it is include in the sources
|
||||||
POCO_SOURCES_AUTO_PLAT( TEST_SRCS OFF
|
POCO_SOURCES_AUTO_PLAT(TEST_SRCS OFF
|
||||||
src/StatementImpl.cpp
|
src/StatementImpl.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
add_executable(Data-testrunner ${TEST_SRCS} )
|
add_executable(Data-testrunner ${TEST_SRCS})
|
||||||
if(ANDROID)
|
if(ANDROID)
|
||||||
add_test(NAME Data WORKING_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
|
add_test(
|
||||||
COMMAND ${CMAKE_COMMAND} -DANDROID_NDK=${ANDROID_NDK} -DLIBRARY_DIR=${CMAKE_BINARY_DIR}/lib -DUNITTEST=${CMAKE_BINARY_DIR}/bin/Data-testrunner -DTEST_PARAMETER=-all -P ${CMAKE_SOURCE_DIR}/cmake/ExecuteOnAndroid.cmake)
|
NAME Data
|
||||||
|
WORKING_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
|
||||||
|
COMMAND ${CMAKE_COMMAND} -DANDROID_NDK=${ANDROID_NDK} -DLIBRARY_DIR=${CMAKE_BINARY_DIR}/lib -DUNITTEST=${CMAKE_BINARY_DIR}/bin/Data-testrunner -DTEST_PARAMETER=-all -P ${CMAKE_SOURCE_DIR}/cmake/ExecuteOnAndroid.cmake
|
||||||
|
)
|
||||||
else()
|
else()
|
||||||
add_test(NAME Data WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND Data-testrunner -ignore ${CMAKE_SOURCE_DIR}/cppignore.lnx -all)
|
add_test(
|
||||||
set_tests_properties(Data PROPERTIES ENVIRONMENT POCO_BASE=${CMAKE_SOURCE_DIR})
|
NAME Data
|
||||||
|
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
||||||
|
COMMAND Data-testrunner -ignore ${CMAKE_SOURCE_DIR}/cppignore.lnx -all
|
||||||
|
)
|
||||||
|
set_tests_properties(Data PROPERTIES ENVIRONMENT POCO_BASE=${CMAKE_SOURCE_DIR})
|
||||||
endif()
|
endif()
|
||||||
target_link_libraries(Data-testrunner PUBLIC Poco::Data CppUnit)
|
target_link_libraries(Data-testrunner PUBLIC Poco::Data CppUnit)
|
||||||
|
@ -1,38 +1,38 @@
|
|||||||
# Sources
|
# Sources
|
||||||
file(GLOB SRCS_G "src/*.cpp")
|
file(GLOB SRCS_G "src/*.cpp")
|
||||||
POCO_SOURCES( SRCS Encodings ${SRCS_G})
|
POCO_SOURCES(SRCS Encodings ${SRCS_G})
|
||||||
|
|
||||||
# Headers
|
# Headers
|
||||||
file(GLOB_RECURSE HDRS_G "include/*.h" )
|
file(GLOB_RECURSE HDRS_G "include/*.h")
|
||||||
POCO_HEADERS( SRCS Encodings ${HDRS_G})
|
POCO_HEADERS(SRCS Encodings ${HDRS_G})
|
||||||
|
|
||||||
# Version Resource
|
# Version Resource
|
||||||
if(MSVC AND BUILD_SHARED_LIBS)
|
if(MSVC AND BUILD_SHARED_LIBS)
|
||||||
source_group("Resources" FILES ${PROJECT_SOURCE_DIR}/DLLVersion.rc)
|
source_group("Resources" FILES ${PROJECT_SOURCE_DIR}/DLLVersion.rc)
|
||||||
list(APPEND SRCS ${PROJECT_SOURCE_DIR}/DLLVersion.rc)
|
list(APPEND SRCS ${PROJECT_SOURCE_DIR}/DLLVersion.rc)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
add_library(Encodings ${SRCS} )
|
add_library(Encodings ${SRCS})
|
||||||
add_library(Poco::Encodings ALIAS Encodings)
|
add_library(Poco::Encodings ALIAS Encodings)
|
||||||
set_target_properties(Encodings
|
set_target_properties(Encodings
|
||||||
PROPERTIES
|
PROPERTIES
|
||||||
VERSION ${SHARED_LIBRARY_VERSION} SOVERSION ${SHARED_LIBRARY_VERSION}
|
VERSION ${SHARED_LIBRARY_VERSION} SOVERSION ${SHARED_LIBRARY_VERSION}
|
||||||
OUTPUT_NAME PocoEncodings
|
OUTPUT_NAME PocoEncodings
|
||||||
DEFINE_SYMBOL Encodings_EXPORTS
|
DEFINE_SYMBOL Encodings_EXPORTS
|
||||||
)
|
)
|
||||||
|
|
||||||
target_link_libraries(Encodings PUBLIC Poco::Foundation)
|
target_link_libraries(Encodings PUBLIC Poco::Foundation)
|
||||||
target_include_directories(Encodings
|
target_include_directories(Encodings
|
||||||
PUBLIC
|
PUBLIC
|
||||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
|
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
|
||||||
$<INSTALL_INTERFACE:include>
|
$<INSTALL_INTERFACE:include>
|
||||||
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src
|
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src
|
||||||
)
|
)
|
||||||
|
|
||||||
POCO_INSTALL(Encodings)
|
POCO_INSTALL(Encodings)
|
||||||
POCO_GENERATE_PACKAGE(Encodings)
|
POCO_GENERATE_PACKAGE(Encodings)
|
||||||
|
|
||||||
if (ENABLE_TESTS)
|
if(ENABLE_TESTS)
|
||||||
add_subdirectory(samples)
|
add_subdirectory(samples)
|
||||||
add_subdirectory(testsuite)
|
add_subdirectory(testsuite)
|
||||||
endif ()
|
endif()
|
||||||
|
@ -1,19 +1,19 @@
|
|||||||
# Sources
|
# Sources
|
||||||
file(GLOB SRCS_G "src/*.cpp")
|
file(GLOB SRCS_G "src/*.cpp")
|
||||||
POCO_SOURCES_AUTO( SRCS ${SRCS_G})
|
POCO_SOURCES_AUTO(SRCS ${SRCS_G})
|
||||||
|
|
||||||
add_executable(EncodingsCompiler ${SRCS} )
|
add_executable(EncodingsCompiler ${SRCS})
|
||||||
set_target_properties(EncodingsCompiler
|
set_target_properties(EncodingsCompiler
|
||||||
PROPERTIES
|
PROPERTIES
|
||||||
OUTPUT_NAME tec
|
OUTPUT_NAME tec
|
||||||
)
|
)
|
||||||
|
|
||||||
target_link_libraries(EncodingsCompiler PUBLIC Poco::Net Poco::Util)
|
target_link_libraries(EncodingsCompiler PUBLIC Poco::Net Poco::Util)
|
||||||
|
|
||||||
install(
|
install(
|
||||||
TARGETS EncodingsCompiler EXPORT "EncodingsCompilerTargets"
|
TARGETS EncodingsCompiler EXPORT "EncodingsCompilerTargets"
|
||||||
LIBRARY DESTINATION lib${LIB_SUFFIX}
|
LIBRARY DESTINATION lib${LIB_SUFFIX}
|
||||||
ARCHIVE DESTINATION lib${LIB_SUFFIX}
|
ARCHIVE DESTINATION lib${LIB_SUFFIX}
|
||||||
RUNTIME DESTINATION bin
|
RUNTIME DESTINATION bin
|
||||||
INCLUDES DESTINATION include
|
INCLUDES DESTINATION include
|
||||||
)
|
)
|
||||||
|
@ -1,26 +1,33 @@
|
|||||||
# Sources
|
# Sources
|
||||||
file(GLOB SRCS_G "src/*.cpp")
|
file(GLOB SRCS_G "src/*.cpp")
|
||||||
POCO_SOURCES_AUTO( TEST_SRCS ${SRCS_G})
|
POCO_SOURCES_AUTO(TEST_SRCS ${SRCS_G})
|
||||||
|
|
||||||
# Headers
|
# Headers
|
||||||
file(GLOB_RECURSE HDRS_G "src/*.h" )
|
file(GLOB_RECURSE HDRS_G "src/*.h")
|
||||||
POCO_HEADERS_AUTO( TEST_SRCS ${HDRS_G})
|
POCO_HEADERS_AUTO(TEST_SRCS ${HDRS_G})
|
||||||
|
|
||||||
POCO_SOURCES_AUTO_PLAT( TEST_SRCS OFF
|
POCO_SOURCES_AUTO_PLAT(TEST_SRCS OFF
|
||||||
src/WinDriver.cpp
|
src/WinDriver.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
POCO_SOURCES_AUTO_PLAT( TEST_SRCS WINCE
|
POCO_SOURCES_AUTO_PLAT(TEST_SRCS WINCE
|
||||||
src/WinCEDriver.cpp
|
src/WinCEDriver.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
add_executable(Encodings-testrunner ${TEST_SRCS} )
|
add_executable(Encodings-testrunner ${TEST_SRCS})
|
||||||
if(ANDROID)
|
if(ANDROID)
|
||||||
add_test(NAME Encodings WORKING_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
|
add_test(
|
||||||
COMMAND ${CMAKE_COMMAND} -DANDROID_NDK=${ANDROID_NDK} -DLIBRARY_DIR=${CMAKE_BINARY_DIR}/lib -DUNITTEST=${CMAKE_BINARY_DIR}/bin/Encodings-testrunner -DTEST_PARAMETER=-all -P ${CMAKE_SOURCE_DIR}/cmake/ExecuteOnAndroid.cmake)
|
NAME Encodings
|
||||||
|
WORKING_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
|
||||||
|
COMMAND ${CMAKE_COMMAND} -DANDROID_NDK=${ANDROID_NDK} -DLIBRARY_DIR=${CMAKE_BINARY_DIR}/lib -DUNITTEST=${CMAKE_BINARY_DIR}/bin/Encodings-testrunner -DTEST_PARAMETER=-all -P ${CMAKE_SOURCE_DIR}/cmake/ExecuteOnAndroid.cmake
|
||||||
|
)
|
||||||
else()
|
else()
|
||||||
add_test(NAME Encodings WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND Encodings-testrunner -ignore ${CMAKE_SOURCE_DIR}/cppignore.lnx -all)
|
add_test(
|
||||||
set_tests_properties(Encodings PROPERTIES ENVIRONMENT POCO_BASE=${CMAKE_SOURCE_DIR})
|
NAME Encodings
|
||||||
|
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
||||||
|
COMMAND Encodings-testrunner -ignore ${CMAKE_SOURCE_DIR}/cppignore.lnx -all
|
||||||
|
)
|
||||||
|
set_tests_properties(Encodings PROPERTIES ENVIRONMENT POCO_BASE=${CMAKE_SOURCE_DIR})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
target_link_libraries(Encodings-testrunner PUBLIC Poco::Encodings CppUnit)
|
target_link_libraries(Encodings-testrunner PUBLIC Poco::Encodings CppUnit)
|
||||||
|
@ -1,23 +1,23 @@
|
|||||||
# Sources
|
# Sources
|
||||||
file(GLOB SRCS_G "src/*.cpp")
|
file(GLOB SRCS_G "src/*.cpp")
|
||||||
POCO_SOURCES_AUTO( SRCS ${SRCS_G})
|
POCO_SOURCES_AUTO(SRCS ${SRCS_G})
|
||||||
|
|
||||||
# Headers
|
# Headers
|
||||||
file(GLOB_RECURSE HDRS_G "include/*.h" )
|
file(GLOB_RECURSE HDRS_G "include/*.h")
|
||||||
POCO_HEADERS_AUTO( SRCS ${HDRS_G})
|
POCO_HEADERS_AUTO(SRCS ${HDRS_G})
|
||||||
|
|
||||||
# Platform Specific
|
# Platform Specific
|
||||||
POCO_SOURCES_AUTO_PLAT( SRCS UNIX src/SyslogChannel.cpp )
|
POCO_SOURCES_AUTO_PLAT(SRCS UNIX src/SyslogChannel.cpp)
|
||||||
POCO_HEADERS_AUTO( SRCS include/Poco/SyslogChannel.h )
|
POCO_HEADERS_AUTO(SRCS include/Poco/SyslogChannel.h)
|
||||||
|
|
||||||
# For Windows CE we need to disable these
|
# For Windows CE we need to disable these
|
||||||
if(WINCE)
|
if(WINCE)
|
||||||
POCO_SOURCES_AUTO_PLAT( SRCS OFF
|
POCO_SOURCES_AUTO_PLAT(SRCS OFF
|
||||||
src/WindowsConsoleChannel.cpp
|
src/WindowsConsoleChannel.cpp
|
||||||
src/EventLogChannel.cpp
|
src/EventLogChannel.cpp
|
||||||
)
|
)
|
||||||
else()
|
else()
|
||||||
POCO_SOURCES_AUTO_PLAT( SRCS WIN32
|
POCO_SOURCES_AUTO_PLAT(SRCS WIN32
|
||||||
src/WindowsConsoleChannel.cpp
|
src/WindowsConsoleChannel.cpp
|
||||||
src/EventLogChannel.cpp
|
src/EventLogChannel.cpp
|
||||||
)
|
)
|
||||||
@ -25,28 +25,28 @@ endif()
|
|||||||
|
|
||||||
# Version Resource
|
# Version Resource
|
||||||
if(MSVC AND BUILD_SHARED_LIBS)
|
if(MSVC AND BUILD_SHARED_LIBS)
|
||||||
source_group("Resources" FILES ${PROJECT_SOURCE_DIR}/DLLVersion.rc)
|
source_group("Resources" FILES ${PROJECT_SOURCE_DIR}/DLLVersion.rc)
|
||||||
list(APPEND SRCS ${PROJECT_SOURCE_DIR}/DLLVersion.rc)
|
list(APPEND SRCS ${PROJECT_SOURCE_DIR}/DLLVersion.rc)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Messages
|
# Messages
|
||||||
POCO_MESSAGES( SRCS Logging src/pocomsg.mc)
|
POCO_MESSAGES(SRCS Logging src/pocomsg.mc)
|
||||||
|
|
||||||
# If POCO_UNBUNDLED is enabled we try to find the required packages
|
# If POCO_UNBUNDLED is enabled we try to find the required packages
|
||||||
# The configuration will fail if the packages are not found
|
# The configuration will fail if the packages are not found
|
||||||
if (POCO_UNBUNDLED)
|
if(POCO_UNBUNDLED)
|
||||||
find_package(PCRE REQUIRED)
|
find_package(PCRE REQUIRED)
|
||||||
find_package(ZLIB REQUIRED)
|
find_package(ZLIB REQUIRED)
|
||||||
|
|
||||||
#HACK: Unicode.cpp requires functions from these files. The can't be taken from the library
|
#HACK: Unicode.cpp requires functions from these files. The can't be taken from the library
|
||||||
POCO_SOURCES( SRCS RegExp
|
POCO_SOURCES(SRCS RegExp
|
||||||
src/pcre_ucd.c
|
src/pcre_ucd.c
|
||||||
src/pcre_tables.c
|
src/pcre_tables.c
|
||||||
)
|
)
|
||||||
|
|
||||||
else()
|
else()
|
||||||
# pcre
|
# pcre
|
||||||
POCO_SOURCES( SRCS pcre
|
POCO_SOURCES(SRCS pcre
|
||||||
src/pcre_config.c
|
src/pcre_config.c
|
||||||
src/pcre_byte_order.c
|
src/pcre_byte_order.c
|
||||||
src/pcre_chartables.c
|
src/pcre_chartables.c
|
||||||
@ -71,12 +71,12 @@ else()
|
|||||||
)
|
)
|
||||||
|
|
||||||
# zlib
|
# zlib
|
||||||
POCO_HEADERS( SRCS zlib
|
POCO_HEADERS(SRCS zlib
|
||||||
include/Poco/zconf.h
|
include/Poco/zconf.h
|
||||||
include/Poco/zlib.h
|
include/Poco/zlib.h
|
||||||
)
|
)
|
||||||
|
|
||||||
POCO_SOURCES( SRCS zlib
|
POCO_SOURCES(SRCS zlib
|
||||||
src/adler32.c
|
src/adler32.c
|
||||||
src/compress.c
|
src/compress.c
|
||||||
src/crc32.c
|
src/crc32.c
|
||||||
@ -88,7 +88,7 @@ else()
|
|||||||
src/trees.c
|
src/trees.c
|
||||||
src/zutil.c
|
src/zutil.c
|
||||||
)
|
)
|
||||||
endif (POCO_UNBUNDLED)
|
endif(POCO_UNBUNDLED)
|
||||||
|
|
||||||
|
|
||||||
add_library(Foundation ${SRCS})
|
add_library(Foundation ${SRCS})
|
||||||
@ -98,41 +98,41 @@ set_target_properties(Foundation
|
|||||||
VERSION ${SHARED_LIBRARY_VERSION} SOVERSION ${SHARED_LIBRARY_VERSION}
|
VERSION ${SHARED_LIBRARY_VERSION} SOVERSION ${SHARED_LIBRARY_VERSION}
|
||||||
OUTPUT_NAME PocoFoundation
|
OUTPUT_NAME PocoFoundation
|
||||||
DEFINE_SYMBOL Foundation_EXPORTS
|
DEFINE_SYMBOL Foundation_EXPORTS
|
||||||
)
|
)
|
||||||
|
|
||||||
if (POCO_UNBUNDLED)
|
if(POCO_UNBUNDLED)
|
||||||
target_link_libraries(Foundation PUBLIC Pcre::Pcre ZLIB::ZLIB)
|
target_link_libraries(Foundation PUBLIC Pcre::Pcre ZLIB::ZLIB)
|
||||||
target_compile_definitions(Foundation PUBLIC POCO_UNBUNDLED)
|
target_compile_definitions(Foundation PUBLIC POCO_UNBUNDLED)
|
||||||
endif (POCO_UNBUNDLED)
|
endif(POCO_UNBUNDLED)
|
||||||
|
|
||||||
target_include_directories(Foundation
|
target_include_directories(Foundation
|
||||||
PUBLIC
|
PUBLIC
|
||||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
|
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
|
||||||
$<INSTALL_INTERFACE:include>
|
$<INSTALL_INTERFACE:include>
|
||||||
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src
|
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src
|
||||||
)
|
)
|
||||||
|
|
||||||
target_compile_definitions(Foundation
|
target_compile_definitions(Foundation
|
||||||
PUBLIC
|
PUBLIC
|
||||||
$<$<CONFIG:Debug>:_DEBUG>
|
$<$<CONFIG:Debug>:_DEBUG>
|
||||||
$<$<BOOL:${DISABLE_CPP14}>:POCO_DISABLE_CPP14>
|
$<$<BOOL:${DISABLE_CPP14}>:POCO_DISABLE_CPP14>
|
||||||
$<$<NOT:$<BOOL:${DISABLE_CPP14}>>:POCO_ENABLE_CPP14>
|
$<$<NOT:$<BOOL:${DISABLE_CPP14}>>:POCO_ENABLE_CPP14>
|
||||||
$<$<BOOL:${DISABLE_CPP11}>:POCO_DISABLE_CPP11>
|
$<$<BOOL:${DISABLE_CPP11}>:POCO_DISABLE_CPP11>
|
||||||
$<$<NOT:$<BOOL:${DISABLE_CPP11}>>:POCO_ENABLE_CPP11>
|
$<$<NOT:$<BOOL:${DISABLE_CPP11}>>:POCO_ENABLE_CPP11>
|
||||||
)
|
)
|
||||||
target_compile_features(Foundation
|
target_compile_features(Foundation
|
||||||
PUBLIC
|
PUBLIC
|
||||||
$<$<NOT:$<BOOL:${DISABLE_CPP11}>>:cxx_defaulted_move_initializers>
|
$<$<NOT:$<BOOL:${DISABLE_CPP11}>>:cxx_defaulted_move_initializers>
|
||||||
)
|
)
|
||||||
if(NOT DISABLE_CPP14 AND CMAKE_VERSION VERSION_GREATER "3.8")
|
if(NOT DISABLE_CPP14 AND CMAKE_VERSION VERSION_GREATER "3.8")
|
||||||
target_compile_features(Foundation PUBLIC cxx_std_14)
|
target_compile_features(Foundation PUBLIC cxx_std_14)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(NOT BUILD_SHARED_LIBS)
|
if(NOT BUILD_SHARED_LIBS)
|
||||||
target_compile_definitions(Foundation
|
target_compile_definitions(Foundation
|
||||||
PUBLIC
|
PUBLIC
|
||||||
POCO_STATIC
|
POCO_STATIC
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
@ -140,56 +140,56 @@ if(WIN32)
|
|||||||
target_link_libraries(Foundation PUBLIC iphlpapi)
|
target_link_libraries(Foundation PUBLIC iphlpapi)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (CYGWIN)
|
if(CYGWIN)
|
||||||
target_compile_definitions(Foundation PUBLIC POCO_NO_FPENVIRONMENT POCO_NO_WSTRING _XOPEN_SOURCE=500 __BSD_VISIBLE)
|
target_compile_definitions(Foundation PUBLIC POCO_NO_FPENVIRONMENT POCO_NO_WSTRING _XOPEN_SOURCE=500 __BSD_VISIBLE)
|
||||||
else()
|
else()
|
||||||
if (UNIX AND NOT ANDROID )
|
if(UNIX AND NOT ANDROID)
|
||||||
target_compile_definitions(Foundation PUBLIC POCO_OS_FAMILY_UNIX)
|
target_compile_definitions(Foundation PUBLIC POCO_OS_FAMILY_UNIX)
|
||||||
if (APPLE)
|
if(APPLE)
|
||||||
target_compile_definitions(Foundation PUBLIC POCO_HAVE_IPv6 POCO_NO_STAT64)
|
target_compile_definitions(Foundation PUBLIC POCO_HAVE_IPv6 POCO_NO_STAT64)
|
||||||
target_link_libraries(Foundation PUBLIC ${CMAKE_DL_LIBS})
|
target_link_libraries(Foundation PUBLIC ${CMAKE_DL_LIBS})
|
||||||
else()
|
|
||||||
target_compile_definitions(Foundation PUBLIC _REENTRANT _THREAD_SAFE _LARGEFILE64_SOURCE _FILE_OFFSET_BITS=64)
|
|
||||||
if (QNX)
|
|
||||||
target_compile_definitions(Foundation PUBLIC POCO_HAVE_FD_POLL)
|
|
||||||
target_link_libraries(Foundation PUBLIC m socket)
|
|
||||||
elseif("${CMAKE_SYSTEM_NAME}" STREQUAL "FreeBSD")
|
|
||||||
target_compile_definitions(Foundation PUBLIC POCO_HAVE_FD_POLL)
|
|
||||||
target_link_libraries(Foundation PUBLIC pthread ${CMAKE_DL_LIBS} rt)
|
|
||||||
elseif("${CMAKE_SYSTEM_NAME}" STREQUAL "AIX")
|
|
||||||
target_compile_definitions(Foundation PUBLIC _XOPEN_SOURCE=500 POCO_HAVE_FD_POLL)
|
|
||||||
target_link_libraries(Foundation PUBLIC pthread ${CMAKE_DL_LIBS} rt)
|
|
||||||
else()
|
else()
|
||||||
target_compile_definitions(Foundation PUBLIC _XOPEN_SOURCE=500 POCO_HAVE_FD_EPOLL)
|
target_compile_definitions(Foundation PUBLIC _REENTRANT _THREAD_SAFE _LARGEFILE64_SOURCE _FILE_OFFSET_BITS=64)
|
||||||
target_link_libraries(Foundation PUBLIC pthread ${CMAKE_DL_LIBS} rt)
|
if(QNX)
|
||||||
endif()
|
target_compile_definitions(Foundation PUBLIC POCO_HAVE_FD_POLL)
|
||||||
endif (APPLE)
|
target_link_libraries(Foundation PUBLIC m socket)
|
||||||
endif(UNIX AND NOT ANDROID )
|
elseif("${CMAKE_SYSTEM_NAME}" STREQUAL "FreeBSD")
|
||||||
endif (CYGWIN)
|
target_compile_definitions(Foundation PUBLIC POCO_HAVE_FD_POLL)
|
||||||
|
target_link_libraries(Foundation PUBLIC pthread ${CMAKE_DL_LIBS} rt)
|
||||||
|
elseif("${CMAKE_SYSTEM_NAME}" STREQUAL "AIX")
|
||||||
|
target_compile_definitions(Foundation PUBLIC _XOPEN_SOURCE=500 POCO_HAVE_FD_POLL)
|
||||||
|
target_link_libraries(Foundation PUBLIC pthread ${CMAKE_DL_LIBS} rt)
|
||||||
|
else()
|
||||||
|
target_compile_definitions(Foundation PUBLIC _XOPEN_SOURCE=500 POCO_HAVE_FD_EPOLL)
|
||||||
|
target_link_libraries(Foundation PUBLIC pthread ${CMAKE_DL_LIBS} rt)
|
||||||
|
endif()
|
||||||
|
endif(APPLE)
|
||||||
|
endif(UNIX AND NOT ANDROID)
|
||||||
|
endif(CYGWIN)
|
||||||
|
|
||||||
if (CMAKE_SYSTEM MATCHES "SunOS")
|
if(CMAKE_SYSTEM MATCHES "SunOS")
|
||||||
target_compile_definitions(Foundation
|
target_compile_definitions(Foundation
|
||||||
PUBLIC
|
PUBLIC
|
||||||
POCO_OS_FAMILY_UNIX
|
POCO_OS_FAMILY_UNIX
|
||||||
_XOPEN_SOURCE=500
|
_XOPEN_SOURCE=500
|
||||||
_REENTRANT
|
_REENTRANT
|
||||||
_THREAD_SAFE
|
_THREAD_SAFE
|
||||||
_LARGEFILE64_SOURCE
|
_LARGEFILE64_SOURCE
|
||||||
_FILE_OFFSET_BITS=64
|
_FILE_OFFSET_BITS=64
|
||||||
)
|
)
|
||||||
target_link_libraries(Foundation PUBLIC pthread socket xnet nsl resolv rt ${CMAKE_DL_LIBS})
|
target_link_libraries(Foundation PUBLIC pthread socket xnet nsl resolv rt ${CMAKE_DL_LIBS})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(CMAKE_COMPILER_IS_MINGW)
|
if(CMAKE_COMPILER_IS_MINGW)
|
||||||
target_compile_definitions(Foundation
|
target_compile_definitions(Foundation
|
||||||
PUBLIC
|
PUBLIC
|
||||||
WC_NO_BEST_FIT_CHARS=0x400
|
WC_NO_BEST_FIT_CHARS=0x400
|
||||||
POCO_WIN32_UTF8
|
POCO_WIN32_UTF8
|
||||||
_WIN32
|
_WIN32
|
||||||
MINGW32
|
MINGW32
|
||||||
WINVER=0x500
|
WINVER=0x500
|
||||||
ODBCVER=0x0300
|
ODBCVER=0x0300
|
||||||
POCO_THREAD_STACK_SIZE
|
POCO_THREAD_STACK_SIZE
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
@ -200,19 +200,19 @@ if(${CMAKE_CXX_COMPILER_ID} MATCHES "SunPro")
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
# iOS
|
# iOS
|
||||||
if (IOS)
|
if(IOS)
|
||||||
target_compile_definitions(Foundation
|
target_compile_definitions(Foundation
|
||||||
PUBLIC
|
PUBLIC
|
||||||
POCO_HAVE_IPv6
|
POCO_HAVE_IPv6
|
||||||
POCO_NO_FPENVIRONMENT
|
POCO_NO_FPENVIRONMENT
|
||||||
POCO_NO_STAT64
|
POCO_NO_STAT64
|
||||||
POCO_NO_SHAREDLIBS
|
POCO_NO_SHAREDLIBS
|
||||||
POCO_NO_NET_IFTYPES
|
POCO_NO_NET_IFTYPES
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
#Android
|
#Android
|
||||||
if (ANDROID)
|
if(ANDROID)
|
||||||
target_compile_definitions(Foundation
|
target_compile_definitions(Foundation
|
||||||
PUBLIC
|
PUBLIC
|
||||||
POCO_NO_FPENVIRONMENT
|
POCO_NO_FPENVIRONMENT
|
||||||
@ -225,11 +225,10 @@ endif()
|
|||||||
POCO_INSTALL(Foundation)
|
POCO_INSTALL(Foundation)
|
||||||
POCO_GENERATE_PACKAGE(Foundation)
|
POCO_GENERATE_PACKAGE(Foundation)
|
||||||
|
|
||||||
if (ENABLE_TESTS)
|
if(ENABLE_TESTS)
|
||||||
if(NOT BUILD_SHARED_LIBS)
|
if(NOT BUILD_SHARED_LIBS)
|
||||||
set_property(TARGET Foundation PROPERTY POSITION_INDEPENDENT_CODE ON) # This is needed to build TestLibrary.so as shared.
|
set_property(TARGET Foundation PROPERTY POSITION_INDEPENDENT_CODE ON) # This is needed to build TestLibrary.so as shared.
|
||||||
endif()
|
endif()
|
||||||
add_subdirectory(samples)
|
add_subdirectory(samples)
|
||||||
add_subdirectory(testsuite)
|
add_subdirectory(testsuite)
|
||||||
endif ()
|
endif()
|
||||||
|
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
if(@POCO_UNBUNDLED@)
|
if(@POCO_UNBUNDLED@)
|
||||||
include(CMakeFindDependencyMacro)
|
include(CMakeFindDependencyMacro)
|
||||||
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}")
|
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}")
|
||||||
find_dependency(ZLIB REQUIRED)
|
find_dependency(ZLIB REQUIRED)
|
||||||
find_dependency(PCRE REQUIRED)
|
find_dependency(PCRE REQUIRED)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
include("${CMAKE_CURRENT_LIST_DIR}/PocoFoundationTargets.cmake")
|
include("${CMAKE_CURRENT_LIST_DIR}/PocoFoundationTargets.cmake")
|
||||||
|
@ -1,2 +1,2 @@
|
|||||||
add_executable(ActiveMethod src/ActiveMethod.cpp)
|
add_executable(ActiveMethod src/ActiveMethod.cpp)
|
||||||
target_link_libraries(ActiveMethod PUBLIC Poco::Foundation )
|
target_link_libraries(ActiveMethod PUBLIC Poco::Foundation)
|
||||||
|
@ -1,2 +1,2 @@
|
|||||||
add_executable(Activity src/Activity.cpp)
|
add_executable(Activity src/Activity.cpp)
|
||||||
target_link_libraries(Activity PUBLIC Poco::Foundation )
|
target_link_libraries(Activity PUBLIC Poco::Foundation)
|
||||||
|
@ -1,2 +1,2 @@
|
|||||||
add_executable(BinaryReaderWriter src/BinaryReaderWriter.cpp)
|
add_executable(BinaryReaderWriter src/BinaryReaderWriter.cpp)
|
||||||
target_link_libraries(BinaryReaderWriter PUBLIC Poco::Foundation )
|
target_link_libraries(BinaryReaderWriter PUBLIC Poco::Foundation)
|
||||||
|
@ -1,2 +1,2 @@
|
|||||||
add_executable(LineEndingConverter src/LineEndingConverter.cpp)
|
add_executable(LineEndingConverter src/LineEndingConverter.cpp)
|
||||||
target_link_libraries(LineEndingConverter PUBLIC Poco::Foundation )
|
target_link_libraries(LineEndingConverter PUBLIC Poco::Foundation)
|
||||||
|
@ -1,2 +1,2 @@
|
|||||||
add_executable(LogRotation src/LogRotation.cpp)
|
add_executable(LogRotation src/LogRotation.cpp)
|
||||||
target_link_libraries(LogRotation PUBLIC Poco::Foundation )
|
target_link_libraries(LogRotation PUBLIC Poco::Foundation)
|
||||||
|
@ -1,2 +1,2 @@
|
|||||||
add_executable(Logger src/Logger.cpp)
|
add_executable(Logger src/Logger.cpp)
|
||||||
target_link_libraries(Logger PUBLIC Poco::Foundation )
|
target_link_libraries(Logger PUBLIC Poco::Foundation)
|
||||||
|
@ -1,2 +1,2 @@
|
|||||||
add_executable(NotificationQueue src/NotificationQueue.cpp)
|
add_executable(NotificationQueue src/NotificationQueue.cpp)
|
||||||
target_link_libraries(NotificationQueue PUBLIC Poco::Foundation )
|
target_link_libraries(NotificationQueue PUBLIC Poco::Foundation)
|
||||||
|
@ -1,2 +1,2 @@
|
|||||||
add_executable(Timer src/Timer.cpp)
|
add_executable(Timer src/Timer.cpp)
|
||||||
target_link_libraries(Timer PUBLIC Poco::Foundation )
|
target_link_libraries(Timer PUBLIC Poco::Foundation)
|
||||||
|
@ -1,2 +1,2 @@
|
|||||||
add_executable(URI src/URI.cpp)
|
add_executable(URI src/URI.cpp)
|
||||||
target_link_libraries(URI PUBLIC Poco::Foundation )
|
target_link_libraries(URI PUBLIC Poco::Foundation)
|
||||||
|
@ -1,2 +1,2 @@
|
|||||||
add_executable(base64decode src/base64decode.cpp)
|
add_executable(base64decode src/base64decode.cpp)
|
||||||
target_link_libraries(base64decode PUBLIC Poco::Foundation )
|
target_link_libraries(base64decode PUBLIC Poco::Foundation)
|
||||||
|
@ -1,2 +1,2 @@
|
|||||||
add_executable(base64encode src/base64encode.cpp)
|
add_executable(base64encode src/base64encode.cpp)
|
||||||
target_link_libraries(base64encode PUBLIC Poco::Foundation )
|
target_link_libraries(base64encode PUBLIC Poco::Foundation)
|
||||||
|
@ -1,2 +1,2 @@
|
|||||||
add_executable(deflate src/deflate.cpp)
|
add_executable(deflate src/deflate.cpp)
|
||||||
target_link_libraries(deflate PUBLIC Poco::Foundation )
|
target_link_libraries(deflate PUBLIC Poco::Foundation)
|
||||||
|
@ -1,2 +1,2 @@
|
|||||||
add_executable(dir src/dir.cpp)
|
add_executable(dir src/dir.cpp)
|
||||||
target_link_libraries(dir PUBLIC Poco::Foundation )
|
target_link_libraries(dir PUBLIC Poco::Foundation)
|
||||||
|
@ -1,2 +1,2 @@
|
|||||||
add_executable(grep src/grep.cpp)
|
add_executable(grep src/grep.cpp)
|
||||||
target_link_libraries(grep PUBLIC Poco::Foundation )
|
target_link_libraries(grep PUBLIC Poco::Foundation)
|
||||||
|
@ -1,2 +1,2 @@
|
|||||||
add_executable(hmacmd5 src/hmacmd5.cpp)
|
add_executable(hmacmd5 src/hmacmd5.cpp)
|
||||||
target_link_libraries(hmacmd5 PUBLIC Poco::Foundation )
|
target_link_libraries(hmacmd5 PUBLIC Poco::Foundation)
|
||||||
|
@ -1,2 +1,2 @@
|
|||||||
add_executable(inflate src/inflate.cpp)
|
add_executable(inflate src/inflate.cpp)
|
||||||
target_link_libraries(inflate PUBLIC Poco::Foundation )
|
target_link_libraries(inflate PUBLIC Poco::Foundation)
|
||||||
|
@ -1,2 +1,2 @@
|
|||||||
add_executable(md5 src/md5.cpp)
|
add_executable(md5 src/md5.cpp)
|
||||||
target_link_libraries(md5 PUBLIC Poco::Foundation )
|
target_link_libraries(md5 PUBLIC Poco::Foundation)
|
||||||
|
@ -1,2 +1,2 @@
|
|||||||
add_executable(uuidgen src/uuidgen.cpp)
|
add_executable(uuidgen src/uuidgen.cpp)
|
||||||
target_link_libraries(uuidgen PUBLIC Poco::Foundation )
|
target_link_libraries(uuidgen PUBLIC Poco::Foundation)
|
||||||
|
@ -2,63 +2,72 @@ set(TESTUNIT "Foundation-testrunner")
|
|||||||
|
|
||||||
# Sources
|
# Sources
|
||||||
file(GLOB SRCS_G "src/*.cpp")
|
file(GLOB SRCS_G "src/*.cpp")
|
||||||
file(GLOB SRCS_G_REMOVE
|
file(GLOB SRCS_G_REMOVE
|
||||||
src/TestApp.cpp
|
src/TestApp.cpp
|
||||||
src/TestApp_WINCE.cpp
|
src/TestApp_WINCE.cpp
|
||||||
src/TestLibrary.cpp
|
src/TestLibrary.cpp
|
||||||
src/TestPlugin.cpp
|
src/TestPlugin.cpp
|
||||||
)
|
)
|
||||||
list(REMOVE_ITEM SRCS_G ${SRCS_G_REMOVE})
|
list(REMOVE_ITEM SRCS_G ${SRCS_G_REMOVE})
|
||||||
POCO_SOURCES_AUTO( TEST_SRCS ${SRCS_G})
|
POCO_SOURCES_AUTO(TEST_SRCS ${SRCS_G})
|
||||||
|
|
||||||
# Headers
|
# Headers
|
||||||
file(GLOB_RECURSE HDRS_G "src/*.h" )
|
file(GLOB_RECURSE HDRS_G "src/*.h")
|
||||||
POCO_HEADERS_AUTO( TEST_SRCS ${HDRS_G})
|
POCO_HEADERS_AUTO(TEST_SRCS ${HDRS_G})
|
||||||
|
|
||||||
# WinDriver depends on WinTestRunner which depends on MFC, and we don't want that
|
# WinDriver depends on WinTestRunner which depends on MFC, and we don't want that
|
||||||
POCO_SOURCES_AUTO_PLAT( TEST_SRCS OFF
|
POCO_SOURCES_AUTO_PLAT(TEST_SRCS OFF
|
||||||
src/WinDriver.cpp
|
src/WinDriver.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
POCO_SOURCES_AUTO_PLAT( TEST_SRCS WINCE
|
POCO_SOURCES_AUTO_PLAT(TEST_SRCS WINCE
|
||||||
src/WinCEDriver.cpp
|
src/WinCEDriver.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
add_executable(Foundation-testrunner ${TEST_SRCS} )
|
add_executable(Foundation-testrunner ${TEST_SRCS})
|
||||||
if(ANDROID)
|
if(ANDROID)
|
||||||
add_test(NAME Foundation WORKING_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
|
add_test(
|
||||||
COMMAND ${CMAKE_COMMAND} -DANDROID_NDK=${ANDROID_NDK} "-DTEST_FILES=${CMAKE_CURRENT_SOURCE_DIR}/data;${CMAKE_BINARY_DIR}/bin/TestApp;${CMAKE_BINARY_DIR}/bin/TestLibrary.so" -DLIBRARY_DIR=${CMAKE_BINARY_DIR}/lib -DUNITTEST=${CMAKE_BINARY_DIR}/bin/Foundation-testrunner -DTEST_PARAMETER=-all -P ${CMAKE_SOURCE_DIR}/cmake/ExecuteOnAndroid.cmake)
|
NAME Foundation
|
||||||
|
WORKING_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
|
||||||
|
COMMAND ${CMAKE_COMMAND} -DANDROID_NDK=${ANDROID_NDK} "-DTEST_FILES=${CMAKE_CURRENT_SOURCE_DIR}/data;${CMAKE_BINARY_DIR}/bin/TestApp;${CMAKE_BINARY_DIR}/bin/TestLibrary.so" -DLIBRARY_DIR=${CMAKE_BINARY_DIR}/lib -DUNITTEST=${CMAKE_BINARY_DIR}/bin/Foundation-testrunner -DTEST_PARAMETER=-all -P ${CMAKE_SOURCE_DIR}/cmake/ExecuteOnAndroid.cmake
|
||||||
|
)
|
||||||
else()
|
else()
|
||||||
add_test(NAME Foundation WORKING_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY} COMMAND Foundation-testrunner -ignore ${CMAKE_SOURCE_DIR}/cppignore.lnx -all)
|
add_test(
|
||||||
set_tests_properties(Foundation PROPERTIES ENVIRONMENT "LD_LIBRARY_PATH=${CMAKE_RUNTIME_OUTPUT_DIRECTORY}") # The SharedLibaryTest has to look for shared libraries in the working directory
|
NAME Foundation
|
||||||
set_property(TEST Foundation APPEND PROPERTY ENVIRONMENT "PATH=${CMAKE_RUNTIME_OUTPUT_DIRECTORY}:$ENV{PATH}") # The ProcessTest has to look for the TestApp in the working directory
|
WORKING_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
|
||||||
set_property(TEST Foundation APPEND PROPERTY ENVIRONMENT "POCO_BASE=${CMAKE_SOURCE_DIR}")
|
COMMAND Foundation-testrunner -ignore ${CMAKE_SOURCE_DIR}/cppignore.lnx -all
|
||||||
# The test is run in the runtime directory. So the test data is copied there too
|
)
|
||||||
add_custom_command(TARGET Foundation-testrunner POST_BUILD
|
set_tests_properties(Foundation PROPERTIES ENVIRONMENT "LD_LIBRARY_PATH=${CMAKE_RUNTIME_OUTPUT_DIRECTORY}") # The SharedLibaryTest has to look for shared libraries in the working directory
|
||||||
COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/data ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/data )
|
set_property(TEST Foundation APPEND PROPERTY ENVIRONMENT "PATH=${CMAKE_RUNTIME_OUTPUT_DIRECTORY}:$ENV{PATH}") # The ProcessTest has to look for the TestApp in the working directory
|
||||||
|
set_property(TEST Foundation APPEND PROPERTY ENVIRONMENT "POCO_BASE=${CMAKE_SOURCE_DIR}")
|
||||||
|
# The test is run in the runtime directory. So the test data is copied there too
|
||||||
|
add_custom_command(
|
||||||
|
TARGET Foundation-testrunner POST_BUILD
|
||||||
|
COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/data ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/data
|
||||||
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
target_link_libraries(Foundation-testrunner PUBLIC Poco::Foundation CppUnit )
|
target_link_libraries(Foundation-testrunner PUBLIC Poco::Foundation CppUnit)
|
||||||
if(UNIX AND NOT ANDROID)
|
if(UNIX AND NOT ANDROID)
|
||||||
target_link_libraries(Foundation-testrunner PUBLIC pthread)
|
target_link_libraries(Foundation-testrunner PUBLIC pthread)
|
||||||
endif(UNIX AND NOT ANDROID)
|
endif(UNIX AND NOT ANDROID)
|
||||||
|
|
||||||
# TestApp
|
# TestApp
|
||||||
if(WINCE)
|
if(WINCE)
|
||||||
add_executable( TestApp src/TestApp_WINCE.cpp )
|
add_executable(TestApp src/TestApp_WINCE.cpp)
|
||||||
set_target_properties(TestApp PROPERTIES LINK_FLAGS "/ENTRY:wmainCRTStartup")
|
set_target_properties(TestApp PROPERTIES LINK_FLAGS "/ENTRY:wmainCRTStartup")
|
||||||
else()
|
else()
|
||||||
add_executable( TestApp src/TestApp.cpp )
|
add_executable(TestApp src/TestApp.cpp)
|
||||||
endif()
|
endif()
|
||||||
# The test is run in the runtime directory. So the TestApp is built there too because it is used by the tests
|
# The test is run in the runtime directory. So the TestApp is built there too because it is used by the tests
|
||||||
set_target_properties( TestApp PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY} )
|
set_target_properties(TestApp PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
|
||||||
target_link_libraries( TestApp PUBLIC Poco::Foundation )
|
target_link_libraries(TestApp PUBLIC Poco::Foundation)
|
||||||
|
|
||||||
# TestLibrary
|
# TestLibrary
|
||||||
add_library(TestLibrary SHARED src/TestLibrary.cpp src/TestPlugin.cpp src/TestPlugin.h )
|
add_library(TestLibrary SHARED src/TestLibrary.cpp src/TestPlugin.cpp src/TestPlugin.h)
|
||||||
set_target_properties(TestLibrary PROPERTIES PREFIX "" DEBUG_POSTFIX "") # The test requires the library named TestLibrary. By default it is prefixed with lib.
|
set_target_properties(TestLibrary PROPERTIES PREFIX "" DEBUG_POSTFIX "") # The test requires the library named TestLibrary. By default it is prefixed with lib.
|
||||||
# The test is run in the runtime directory. So the TestLibrary is built there too because it is used by the tests
|
# The test is run in the runtime directory. So the TestLibrary is built there too because it is used by the tests
|
||||||
set_target_properties(TestLibrary PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY} )
|
set_target_properties(TestLibrary PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
|
||||||
target_link_libraries(TestLibrary PUBLIC Poco::Foundation )
|
target_link_libraries(TestLibrary PUBLIC Poco::Foundation)
|
||||||
|
|
||||||
add_dependencies(Foundation-testrunner TestApp TestLibrary)
|
add_dependencies(Foundation-testrunner TestApp TestLibrary)
|
||||||
|
@ -1,34 +1,34 @@
|
|||||||
# Sources
|
# Sources
|
||||||
file(GLOB SRCS_G "src/*.cpp")
|
file(GLOB SRCS_G "src/*.cpp")
|
||||||
POCO_SOURCES_AUTO( SRCS ${SRCS_G})
|
POCO_SOURCES_AUTO(SRCS ${SRCS_G})
|
||||||
|
|
||||||
# Headers
|
# Headers
|
||||||
file(GLOB_RECURSE HDRS_G "include/*.h" )
|
file(GLOB_RECURSE HDRS_G "include/*.h")
|
||||||
POCO_HEADERS_AUTO( SRCS ${HDRS_G})
|
POCO_HEADERS_AUTO(SRCS ${HDRS_G})
|
||||||
POCO_SOURCES(SRCS pdjson src/pdjson.c)
|
POCO_SOURCES(SRCS pdjson src/pdjson.c)
|
||||||
|
|
||||||
# Version Resource
|
# Version Resource
|
||||||
if(MSVC AND BUILD_SHARED_LIBS)
|
if(MSVC AND BUILD_SHARED_LIBS)
|
||||||
source_group("Resources" FILES ${PROJECT_SOURCE_DIR}/DLLVersion.rc)
|
source_group("Resources" FILES ${PROJECT_SOURCE_DIR}/DLLVersion.rc)
|
||||||
list(APPEND SRCS ${PROJECT_SOURCE_DIR}/DLLVersion.rc)
|
list(APPEND SRCS ${PROJECT_SOURCE_DIR}/DLLVersion.rc)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
add_library(JSON ${SRCS} )
|
add_library(JSON ${SRCS})
|
||||||
add_library(Poco::JSON ALIAS JSON)
|
add_library(Poco::JSON ALIAS JSON)
|
||||||
set_target_properties(JSON
|
set_target_properties(JSON
|
||||||
PROPERTIES
|
PROPERTIES
|
||||||
VERSION ${SHARED_LIBRARY_VERSION} SOVERSION ${SHARED_LIBRARY_VERSION}
|
VERSION ${SHARED_LIBRARY_VERSION} SOVERSION ${SHARED_LIBRARY_VERSION}
|
||||||
OUTPUT_NAME PocoJSON
|
OUTPUT_NAME PocoJSON
|
||||||
DEFINE_SYMBOL JSON_EXPORTS
|
DEFINE_SYMBOL JSON_EXPORTS
|
||||||
)
|
)
|
||||||
|
|
||||||
target_link_libraries(JSON PUBLIC Poco::Foundation)
|
target_link_libraries(JSON PUBLIC Poco::Foundation)
|
||||||
target_include_directories(JSON
|
target_include_directories(JSON
|
||||||
PUBLIC
|
PUBLIC
|
||||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
|
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
|
||||||
$<INSTALL_INTERFACE:include>
|
$<INSTALL_INTERFACE:include>
|
||||||
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src
|
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src
|
||||||
)
|
)
|
||||||
|
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
target_compile_definitions(JSON PRIVATE _CRT_SECURE_NO_WARNINGS)
|
target_compile_definitions(JSON PRIVATE _CRT_SECURE_NO_WARNINGS)
|
||||||
@ -41,8 +41,7 @@ endif()
|
|||||||
POCO_INSTALL(JSON)
|
POCO_INSTALL(JSON)
|
||||||
POCO_GENERATE_PACKAGE(JSON)
|
POCO_GENERATE_PACKAGE(JSON)
|
||||||
|
|
||||||
if (ENABLE_TESTS)
|
if(ENABLE_TESTS)
|
||||||
add_subdirectory(samples)
|
add_subdirectory(samples)
|
||||||
add_subdirectory(testsuite)
|
add_subdirectory(testsuite)
|
||||||
endif ()
|
endif()
|
||||||
|
|
||||||
|
@ -1 +1 @@
|
|||||||
add_subdirectory( Benchmark )
|
add_subdirectory(Benchmark)
|
||||||
|
@ -1,29 +1,37 @@
|
|||||||
# Sources
|
# Sources
|
||||||
file(GLOB SRCS_G "src/*.cpp")
|
file(GLOB SRCS_G "src/*.cpp")
|
||||||
POCO_SOURCES_AUTO( TEST_SRCS ${SRCS_G})
|
POCO_SOURCES_AUTO(TEST_SRCS ${SRCS_G})
|
||||||
|
|
||||||
# Headers
|
# Headers
|
||||||
file(GLOB_RECURSE HDRS_G "src/*.h" )
|
file(GLOB_RECURSE HDRS_G "src/*.h")
|
||||||
POCO_HEADERS_AUTO( TEST_SRCS ${HDRS_G})
|
POCO_HEADERS_AUTO(TEST_SRCS ${HDRS_G})
|
||||||
|
|
||||||
POCO_SOURCES_AUTO_PLAT( TEST_SRCS OFF
|
POCO_SOURCES_AUTO_PLAT(TEST_SRCS OFF
|
||||||
src/WinDriver.cpp
|
src/WinDriver.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
POCO_SOURCES_AUTO_PLAT( TEST_SRCS WINCE
|
POCO_SOURCES_AUTO_PLAT(TEST_SRCS WINCE
|
||||||
src/WinCEDriver.cpp
|
src/WinCEDriver.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
add_executable(JSON-testrunner ${TEST_SRCS} )
|
add_executable(JSON-testrunner ${TEST_SRCS})
|
||||||
if(ANDROID)
|
if(ANDROID)
|
||||||
add_test(NAME JSON WORKING_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
|
add_test(
|
||||||
COMMAND ${CMAKE_COMMAND} -DANDROID_NDK=${ANDROID_NDK} "-DTEST_FILES=${CMAKE_CURRENT_SOURCE_DIR}/data;" -DLIBRARY_DIR=${CMAKE_BINARY_DIR}/lib -DUNITTEST=${CMAKE_BINARY_DIR}/bin/JSON-testrunner -DTEST_PARAMETER=-all -P ${CMAKE_SOURCE_DIR}/cmake/ExecuteOnAndroid.cmake)
|
NAME JSON
|
||||||
|
WORKING_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
|
||||||
|
COMMAND ${CMAKE_COMMAND} -DANDROID_NDK=${ANDROID_NDK} "-DTEST_FILES=${CMAKE_CURRENT_SOURCE_DIR}/data;" -DLIBRARY_DIR=${CMAKE_BINARY_DIR}/lib -DUNITTEST=${CMAKE_BINARY_DIR}/bin/JSON-testrunner -DTEST_PARAMETER=-all -P ${CMAKE_SOURCE_DIR}/cmake/ExecuteOnAndroid.cmake
|
||||||
|
)
|
||||||
else()
|
else()
|
||||||
add_test(NAME JSON WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND JSON-testrunner -ignore ${CMAKE_SOURCE_DIR}/cppignore.lnx -all)
|
add_test(
|
||||||
set_tests_properties(JSON PROPERTIES ENVIRONMENT POCO_BASE=${CMAKE_SOURCE_DIR})
|
NAME JSON
|
||||||
# The test is run in the build directory. So the test data is copied there too
|
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
||||||
add_custom_command(TARGET JSON-testrunner POST_BUILD
|
COMMAND JSON-testrunner -ignore ${CMAKE_SOURCE_DIR}/cppignore.lnx -all
|
||||||
COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/data ${CMAKE_CURRENT_BINARY_DIR}/data )
|
)
|
||||||
|
set_tests_properties(JSON PROPERTIES ENVIRONMENT POCO_BASE=${CMAKE_SOURCE_DIR})
|
||||||
|
# The test is run in the build directory. So the test data is copied there too
|
||||||
|
add_custom_command(
|
||||||
|
TARGET JSON-testrunner POST_BUILD
|
||||||
|
COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/data ${CMAKE_CURRENT_BINARY_DIR}/data
|
||||||
|
)
|
||||||
endif()
|
endif()
|
||||||
target_link_libraries(JSON-testrunner PUBLIC Poco::JSON CppUnit)
|
target_link_libraries(JSON-testrunner PUBLIC Poco::JSON CppUnit)
|
||||||
|
|
||||||
|
@ -1,37 +1,37 @@
|
|||||||
# Sources
|
# Sources
|
||||||
file(GLOB SRCS_G "src/*.cpp")
|
file(GLOB SRCS_G "src/*.cpp")
|
||||||
POCO_SOURCES_AUTO( SRCS ${SRCS_G})
|
POCO_SOURCES_AUTO(SRCS ${SRCS_G})
|
||||||
|
|
||||||
# Headers
|
# Headers
|
||||||
file(GLOB_RECURSE HDRS_G "include/*.h" )
|
file(GLOB_RECURSE HDRS_G "include/*.h")
|
||||||
POCO_HEADERS_AUTO( SRCS ${HDRS_G})
|
POCO_HEADERS_AUTO(SRCS ${HDRS_G})
|
||||||
|
|
||||||
# Version Resource
|
# Version Resource
|
||||||
if(MSVC AND BUILD_SHARED_LIBS)
|
if(MSVC AND BUILD_SHARED_LIBS)
|
||||||
source_group("Resources" FILES ${PROJECT_SOURCE_DIR}/DLLVersion.rc)
|
source_group("Resources" FILES ${PROJECT_SOURCE_DIR}/DLLVersion.rc)
|
||||||
list(APPEND SRCS ${PROJECT_SOURCE_DIR}/DLLVersion.rc)
|
list(APPEND SRCS ${PROJECT_SOURCE_DIR}/DLLVersion.rc)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
add_library(JWT ${SRCS} )
|
add_library(JWT ${SRCS})
|
||||||
add_library(Poco::JWT ALIAS JWT)
|
add_library(Poco::JWT ALIAS JWT)
|
||||||
set_target_properties( JWT
|
set_target_properties(JWT
|
||||||
PROPERTIES
|
PROPERTIES
|
||||||
VERSION ${SHARED_LIBRARY_VERSION} SOVERSION ${SHARED_LIBRARY_VERSION}
|
VERSION ${SHARED_LIBRARY_VERSION} SOVERSION ${SHARED_LIBRARY_VERSION}
|
||||||
OUTPUT_NAME PocoJWT
|
OUTPUT_NAME PocoJWT
|
||||||
DEFINE_SYMBOL JWT_EXPORTS
|
DEFINE_SYMBOL JWT_EXPORTS
|
||||||
)
|
)
|
||||||
|
|
||||||
target_link_libraries(JWT PUBLIC Poco::JSON Poco::Crypto)
|
target_link_libraries(JWT PUBLIC Poco::JSON Poco::Crypto)
|
||||||
target_include_directories(JWT
|
target_include_directories(JWT
|
||||||
PUBLIC
|
PUBLIC
|
||||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
|
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
|
||||||
$<INSTALL_INTERFACE:include>
|
$<INSTALL_INTERFACE:include>
|
||||||
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src
|
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src
|
||||||
)
|
)
|
||||||
|
|
||||||
POCO_INSTALL(JWT)
|
POCO_INSTALL(JWT)
|
||||||
POCO_GENERATE_PACKAGE(JWT)
|
POCO_GENERATE_PACKAGE(JWT)
|
||||||
|
|
||||||
if (ENABLE_TESTS)
|
if(ENABLE_TESTS)
|
||||||
add_subdirectory(testsuite)
|
add_subdirectory(testsuite)
|
||||||
endif ()
|
endif()
|
||||||
|
@ -1,28 +1,35 @@
|
|||||||
# Sources
|
# Sources
|
||||||
file(GLOB SRCS_G "src/*.cpp")
|
file(GLOB SRCS_G "src/*.cpp")
|
||||||
POCO_SOURCES_AUTO( TEST_SRCS ${SRCS_G})
|
POCO_SOURCES_AUTO(TEST_SRCS ${SRCS_G})
|
||||||
|
|
||||||
# Headers
|
# Headers
|
||||||
file(GLOB_RECURSE HDRS_G "src/*.h" )
|
file(GLOB_RECURSE HDRS_G "src/*.h")
|
||||||
POCO_HEADERS_AUTO( TEST_SRCS ${HDRS_G})
|
POCO_HEADERS_AUTO(TEST_SRCS ${HDRS_G})
|
||||||
|
|
||||||
POCO_SOURCES_AUTO_PLAT( TEST_SRCS OFF
|
POCO_SOURCES_AUTO_PLAT(TEST_SRCS OFF
|
||||||
src/WinDriver.cpp
|
src/WinDriver.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
POCO_SOURCES_AUTO_PLAT( TEST_SRCS WINCE
|
POCO_SOURCES_AUTO_PLAT(TEST_SRCS WINCE
|
||||||
src/WinCEDriver.cpp
|
src/WinCEDriver.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
add_executable(JWT-testrunner ${TEST_SRCS} )
|
add_executable(JWT-testrunner ${TEST_SRCS})
|
||||||
if(ANDROID)
|
if(ANDROID)
|
||||||
add_test(NAME JWT WORKING_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
|
add_test(
|
||||||
COMMAND ${CMAKE_COMMAND} -DANDROID_NDK=${ANDROID_NDK} -DLIBRARY_DIR=${CMAKE_BINARY_DIR}/lib -DUNITTEST=${CMAKE_BINARY_DIR}/bin/JWT-testrunner -DTEST_PARAMETER=-all -P ${CMAKE_SOURCE_DIR}/cmake/ExecuteOnAndroid.cmake)
|
NAME JWT
|
||||||
|
WORKING_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
|
||||||
|
COMMAND ${CMAKE_COMMAND} -DANDROID_NDK=${ANDROID_NDK} -DLIBRARY_DIR=${CMAKE_BINARY_DIR}/lib -DUNITTEST=${CMAKE_BINARY_DIR}/bin/JWT-testrunner -DTEST_PARAMETER=-all -P ${CMAKE_SOURCE_DIR}/cmake/ExecuteOnAndroid.cmake
|
||||||
|
)
|
||||||
else()
|
else()
|
||||||
add_test(NAME JWT WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND JWT-testrunner -ignore ${CMAKE_SOURCE_DIR}/cppignore.lnx -all)
|
add_test(
|
||||||
set_tests_properties(JWT PROPERTIES ENVIRONMENT POCO_BASE=${CMAKE_SOURCE_DIR})
|
NAME JWT
|
||||||
|
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
||||||
|
COMMAND JWT-testrunner -ignore ${CMAKE_SOURCE_DIR}/cppignore.lnx -all
|
||||||
|
)
|
||||||
|
set_tests_properties(JWT PROPERTIES ENVIRONMENT POCO_BASE=${CMAKE_SOURCE_DIR})
|
||||||
endif()
|
endif()
|
||||||
target_link_libraries(JWT-testrunner PUBLIC Poco::JWT Poco::Crypto CppUnit)
|
target_link_libraries(JWT-testrunner PUBLIC Poco::JWT Poco::Crypto CppUnit)
|
||||||
if(UNIX AND NOT ANDROID)
|
if(UNIX AND NOT ANDROID)
|
||||||
target_link_libraries(JWT-testrunner PUBLIC pthread)
|
target_link_libraries(JWT-testrunner PUBLIC pthread)
|
||||||
endif(UNIX AND NOT ANDROID)
|
endif(UNIX AND NOT ANDROID)
|
||||||
|
@ -1,39 +1,39 @@
|
|||||||
# Sources
|
# Sources
|
||||||
file(GLOB SRCS_G "src/*.cpp")
|
file(GLOB SRCS_G "src/*.cpp")
|
||||||
POCO_SOURCES_AUTO( SRCS ${SRCS_G})
|
POCO_SOURCES_AUTO(SRCS ${SRCS_G})
|
||||||
|
|
||||||
# Headers
|
# Headers
|
||||||
file(GLOB_RECURSE HDRS_G "include/*.h" )
|
file(GLOB_RECURSE HDRS_G "include/*.h")
|
||||||
POCO_HEADERS_AUTO( SRCS ${HDRS_G})
|
POCO_HEADERS_AUTO(SRCS ${HDRS_G})
|
||||||
|
|
||||||
# Version Resource
|
# Version Resource
|
||||||
if(MSVC AND BUILD_SHARED_LIBS)
|
if(MSVC AND BUILD_SHARED_LIBS)
|
||||||
source_group("Resources" FILES ${PROJECT_SOURCE_DIR}/DLLVersion.rc)
|
source_group("Resources" FILES ${PROJECT_SOURCE_DIR}/DLLVersion.rc)
|
||||||
list(APPEND SRCS ${PROJECT_SOURCE_DIR}/DLLVersion.rc)
|
list(APPEND SRCS ${PROJECT_SOURCE_DIR}/DLLVersion.rc)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
add_library(MongoDB ${SRCS} )
|
add_library(MongoDB ${SRCS})
|
||||||
add_library(Poco::MongoDB ALIAS MongoDB)
|
add_library(Poco::MongoDB ALIAS MongoDB)
|
||||||
set_target_properties(MongoDB
|
set_target_properties(MongoDB
|
||||||
PROPERTIES
|
PROPERTIES
|
||||||
VERSION ${SHARED_LIBRARY_VERSION} SOVERSION ${SHARED_LIBRARY_VERSION}
|
VERSION ${SHARED_LIBRARY_VERSION} SOVERSION ${SHARED_LIBRARY_VERSION}
|
||||||
OUTPUT_NAME PocoMongoDB
|
OUTPUT_NAME PocoMongoDB
|
||||||
DEFINE_SYMBOL MongoDB_EXPORTS
|
DEFINE_SYMBOL MongoDB_EXPORTS
|
||||||
)
|
)
|
||||||
|
|
||||||
target_link_libraries(MongoDB PUBLIC Poco::Net)
|
target_link_libraries(MongoDB PUBLIC Poco::Net)
|
||||||
target_include_directories(MongoDB
|
target_include_directories(MongoDB
|
||||||
PUBLIC
|
PUBLIC
|
||||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
|
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
|
||||||
$<INSTALL_INTERFACE:include>
|
$<INSTALL_INTERFACE:include>
|
||||||
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src
|
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src
|
||||||
)
|
)
|
||||||
|
|
||||||
POCO_INSTALL(MongoDB)
|
POCO_INSTALL(MongoDB)
|
||||||
POCO_GENERATE_PACKAGE(MongoDB)
|
POCO_GENERATE_PACKAGE(MongoDB)
|
||||||
|
|
||||||
if (ENABLE_TESTS)
|
if(ENABLE_TESTS)
|
||||||
add_subdirectory(samples)
|
add_subdirectory(samples)
|
||||||
add_subdirectory(testsuite)
|
add_subdirectory(testsuite)
|
||||||
endif ()
|
endif()
|
||||||
|
|
||||||
|
@ -1 +1 @@
|
|||||||
add_subdirectory( SQLToMongo )
|
add_subdirectory(SQLToMongo)
|
||||||
|
@ -1,25 +1,31 @@
|
|||||||
# Sources
|
# Sources
|
||||||
file(GLOB SRCS_G "src/*.cpp")
|
file(GLOB SRCS_G "src/*.cpp")
|
||||||
POCO_SOURCES_AUTO( TEST_SRCS ${SRCS_G})
|
POCO_SOURCES_AUTO(TEST_SRCS ${SRCS_G})
|
||||||
|
|
||||||
# Headers
|
# Headers
|
||||||
file(GLOB_RECURSE HDRS_G "src/*.h" )
|
file(GLOB_RECURSE HDRS_G "src/*.h")
|
||||||
POCO_HEADERS_AUTO( TEST_SRCS ${HDRS_G})
|
POCO_HEADERS_AUTO(TEST_SRCS ${HDRS_G})
|
||||||
|
|
||||||
POCO_SOURCES_AUTO_PLAT( TEST_SRCS OFF
|
POCO_SOURCES_AUTO_PLAT(TEST_SRCS OFF
|
||||||
src/WinDriver.cpp
|
src/WinDriver.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
POCO_SOURCES_AUTO_PLAT( TEST_SRCS WINCE
|
POCO_SOURCES_AUTO_PLAT(TEST_SRCS WINCE
|
||||||
src/WinCEDriver.cpp
|
src/WinCEDriver.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
add_executable(MongoDB-testrunner ${TEST_SRCS} )
|
add_executable(MongoDB-testrunner ${TEST_SRCS})
|
||||||
if(ANDROID)
|
if(ANDROID)
|
||||||
add_test(NAME MongoDB WORKING_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
|
add_test(
|
||||||
COMMAND ${CMAKE_COMMAND} -DANDROID_NDK=${ANDROID_NDK} -DLIBRARY_DIR=${CMAKE_BINARY_DIR}/lib -DUNITTEST=${CMAKE_BINARY_DIR}/bin/MongoDB-testrunner -DTEST_PARAMETER=-all -P ${CMAKE_SOURCE_DIR}/cmake/ExecuteOnAndroid.cmake)
|
NAME MongoDB
|
||||||
|
WORKING_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
|
||||||
|
COMMAND ${CMAKE_COMMAND} -DANDROID_NDK=${ANDROID_NDK} -DLIBRARY_DIR=${CMAKE_BINARY_DIR}/lib -DUNITTEST=${CMAKE_BINARY_DIR}/bin/MongoDB-testrunner -DTEST_PARAMETER=-all -P ${CMAKE_SOURCE_DIR}/cmake/ExecuteOnAndroid.cmake
|
||||||
|
)
|
||||||
else()
|
else()
|
||||||
add_test(NAME MongoDB WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND MongoDB-testrunner -ignore ${CMAKE_SOURCE_DIR}/cppignore.lnx -all)
|
add_test(
|
||||||
|
NAME MongoDB
|
||||||
|
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND MongoDB-testrunner -ignore ${CMAKE_SOURCE_DIR}/cppignore.lnx -all
|
||||||
|
)
|
||||||
set_tests_properties(MongoDB PROPERTIES ENVIRONMENT POCO_BASE=${CMAKE_SOURCE_DIR})
|
set_tests_properties(MongoDB PROPERTIES ENVIRONMENT POCO_BASE=${CMAKE_SOURCE_DIR})
|
||||||
endif()
|
endif()
|
||||||
target_link_libraries(MongoDB-testrunner PUBLIC Poco::MongoDB CppUnit)
|
target_link_libraries(MongoDB-testrunner PUBLIC Poco::MongoDB CppUnit)
|
||||||
|
@ -1,49 +1,49 @@
|
|||||||
# Sources
|
# Sources
|
||||||
file(GLOB SRCS_G "src/*.cpp")
|
file(GLOB SRCS_G "src/*.cpp")
|
||||||
POCO_SOURCES_AUTO( SRCS ${SRCS_G})
|
POCO_SOURCES_AUTO(SRCS ${SRCS_G})
|
||||||
|
|
||||||
# Headers
|
# Headers
|
||||||
file(GLOB_RECURSE HDRS_G "include/*.h" )
|
file(GLOB_RECURSE HDRS_G "include/*.h")
|
||||||
POCO_HEADERS_AUTO( SRCS ${HDRS_G})
|
POCO_HEADERS_AUTO(SRCS ${HDRS_G})
|
||||||
|
|
||||||
# Version Resource
|
# Version Resource
|
||||||
if(MSVC AND BUILD_SHARED_LIBS)
|
if(MSVC AND BUILD_SHARED_LIBS)
|
||||||
source_group("Resources" FILES ${PROJECT_SOURCE_DIR}/DLLVersion.rc)
|
source_group("Resources" FILES ${PROJECT_SOURCE_DIR}/DLLVersion.rc)
|
||||||
list(APPEND SRCS ${PROJECT_SOURCE_DIR}/DLLVersion.rc)
|
list(APPEND SRCS ${PROJECT_SOURCE_DIR}/DLLVersion.rc)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
add_library(Net ${SRCS} )
|
add_library(Net ${SRCS})
|
||||||
add_library(Poco::Net ALIAS Net)
|
add_library(Poco::Net ALIAS Net)
|
||||||
set_target_properties( Net
|
set_target_properties(Net
|
||||||
PROPERTIES
|
PROPERTIES
|
||||||
VERSION ${SHARED_LIBRARY_VERSION} SOVERSION ${SHARED_LIBRARY_VERSION}
|
VERSION ${SHARED_LIBRARY_VERSION} SOVERSION ${SHARED_LIBRARY_VERSION}
|
||||||
OUTPUT_NAME PocoNet
|
OUTPUT_NAME PocoNet
|
||||||
DEFINE_SYMBOL Net_EXPORTS
|
DEFINE_SYMBOL Net_EXPORTS
|
||||||
)
|
)
|
||||||
|
|
||||||
target_link_libraries(Net PUBLIC Poco::Foundation)
|
target_link_libraries(Net PUBLIC Poco::Foundation)
|
||||||
# Windows and WindowsCE need additional libraries
|
# Windows and WindowsCE need additional libraries
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
target_link_libraries(Net PUBLIC "iphlpapi.lib")
|
target_link_libraries(Net PUBLIC "iphlpapi.lib")
|
||||||
if(WINCE)
|
if(WINCE)
|
||||||
target_link_libraries(Net PUBLIC "ws2.lib")
|
target_link_libraries(Net PUBLIC "ws2.lib")
|
||||||
else()
|
else()
|
||||||
target_link_libraries(Net PUBLIC "ws2_32.lib")
|
target_link_libraries(Net PUBLIC "ws2_32.lib")
|
||||||
endif()
|
endif()
|
||||||
endif(WIN32)
|
endif(WIN32)
|
||||||
|
|
||||||
target_include_directories(Net
|
target_include_directories(Net
|
||||||
PUBLIC
|
PUBLIC
|
||||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
|
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
|
||||||
$<INSTALL_INTERFACE:include>
|
$<INSTALL_INTERFACE:include>
|
||||||
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src
|
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src
|
||||||
)
|
)
|
||||||
|
|
||||||
POCO_INSTALL(Net)
|
POCO_INSTALL(Net)
|
||||||
POCO_GENERATE_PACKAGE(Net)
|
POCO_GENERATE_PACKAGE(Net)
|
||||||
|
|
||||||
if (ENABLE_TESTS)
|
if(ENABLE_TESTS)
|
||||||
add_subdirectory(samples)
|
add_subdirectory(samples)
|
||||||
add_subdirectory(testsuite)
|
add_subdirectory(testsuite)
|
||||||
endif ()
|
endif()
|
||||||
|
|
||||||
|
@ -1,25 +1,32 @@
|
|||||||
# Sources
|
# Sources
|
||||||
file(GLOB SRCS_G "src/*.cpp")
|
file(GLOB SRCS_G "src/*.cpp")
|
||||||
POCO_SOURCES_AUTO( TEST_SRCS ${SRCS_G})
|
POCO_SOURCES_AUTO(TEST_SRCS ${SRCS_G})
|
||||||
|
|
||||||
# Headers
|
# Headers
|
||||||
file(GLOB_RECURSE HDRS_G "src/*.h" )
|
file(GLOB_RECURSE HDRS_G "src/*.h")
|
||||||
POCO_HEADERS_AUTO( TEST_SRCS ${HDRS_G})
|
POCO_HEADERS_AUTO(TEST_SRCS ${HDRS_G})
|
||||||
|
|
||||||
POCO_SOURCES_AUTO_PLAT( TEST_SRCS OFF
|
POCO_SOURCES_AUTO_PLAT(TEST_SRCS OFF
|
||||||
src/WinDriver.cpp
|
src/WinDriver.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
POCO_SOURCES_AUTO_PLAT( TEST_SRCS WINCE
|
POCO_SOURCES_AUTO_PLAT(TEST_SRCS WINCE
|
||||||
src/WinCEDriver.cpp
|
src/WinCEDriver.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
add_executable(Net-testrunner ${TEST_SRCS} )
|
add_executable(Net-testrunner ${TEST_SRCS})
|
||||||
if(ANDROID)
|
if(ANDROID)
|
||||||
add_test(NAME Net WORKING_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
|
add_test(
|
||||||
COMMAND ${CMAKE_COMMAND} -DANDROID_NDK=${ANDROID_NDK} -DLIBRARY_DIR=${CMAKE_BINARY_DIR}/lib -DUNITTEST=${CMAKE_BINARY_DIR}/bin/Net-testrunner -DTEST_PARAMETER=-all -P ${CMAKE_SOURCE_DIR}/cmake/ExecuteOnAndroid.cmake)
|
NAME Net
|
||||||
|
WORKING_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
|
||||||
|
COMMAND ${CMAKE_COMMAND} -DANDROID_NDK=${ANDROID_NDK} -DLIBRARY_DIR=${CMAKE_BINARY_DIR}/lib -DUNITTEST=${CMAKE_BINARY_DIR}/bin/Net-testrunner -DTEST_PARAMETER=-all -P ${CMAKE_SOURCE_DIR}/cmake/ExecuteOnAndroid.cmake
|
||||||
|
)
|
||||||
else()
|
else()
|
||||||
add_test(NAME Net WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND Net-testrunner -ignore ${CMAKE_SOURCE_DIR}/cppignore.lnx -all)
|
add_test(
|
||||||
set_tests_properties(Net PROPERTIES ENVIRONMENT POCO_BASE=${CMAKE_SOURCE_DIR})
|
NAME Net
|
||||||
|
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
||||||
|
COMMAND Net-testrunner -ignore ${CMAKE_SOURCE_DIR}/cppignore.lnx -all
|
||||||
|
)
|
||||||
|
set_tests_properties(Net PROPERTIES ENVIRONMENT POCO_BASE=${CMAKE_SOURCE_DIR})
|
||||||
endif()
|
endif()
|
||||||
target_link_libraries(Net-testrunner PUBLIC Poco::Net Poco::Util Poco::XML CppUnit)
|
target_link_libraries(Net-testrunner PUBLIC Poco::Net Poco::Util Poco::XML CppUnit)
|
||||||
|
@ -1,43 +1,43 @@
|
|||||||
# Sources
|
# Sources
|
||||||
file(GLOB SRCS_G "src/*.cpp")
|
file(GLOB SRCS_G "src/*.cpp")
|
||||||
POCO_SOURCES_AUTO( SRCS ${SRCS_G})
|
POCO_SOURCES_AUTO(SRCS ${SRCS_G})
|
||||||
|
|
||||||
# Headers
|
# Headers
|
||||||
file(GLOB_RECURSE HDRS_G "include/*.h" )
|
file(GLOB_RECURSE HDRS_G "include/*.h")
|
||||||
POCO_HEADERS_AUTO( SRCS ${HDRS_G})
|
POCO_HEADERS_AUTO(SRCS ${HDRS_G})
|
||||||
|
|
||||||
# Version Resource
|
# Version Resource
|
||||||
if(MSVC AND BUILD_SHARED_LIBS)
|
if(MSVC AND BUILD_SHARED_LIBS)
|
||||||
source_group("Resources" FILES ${PROJECT_SOURCE_DIR}/DLLVersion.rc)
|
source_group("Resources" FILES ${PROJECT_SOURCE_DIR}/DLLVersion.rc)
|
||||||
list(APPEND SRCS ${PROJECT_SOURCE_DIR}/DLLVersion.rc)
|
list(APPEND SRCS ${PROJECT_SOURCE_DIR}/DLLVersion.rc)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
add_library(NetSSL ${SRCS} )
|
add_library(NetSSL ${SRCS})
|
||||||
add_library(Poco::NetSSL ALIAS NetSSL)
|
add_library(Poco::NetSSL ALIAS NetSSL)
|
||||||
set_target_properties( NetSSL
|
set_target_properties(NetSSL
|
||||||
PROPERTIES
|
PROPERTIES
|
||||||
VERSION ${SHARED_LIBRARY_VERSION} SOVERSION ${SHARED_LIBRARY_VERSION}
|
VERSION ${SHARED_LIBRARY_VERSION} SOVERSION ${SHARED_LIBRARY_VERSION}
|
||||||
OUTPUT_NAME PocoNetSSL
|
OUTPUT_NAME PocoNetSSL
|
||||||
DEFINE_SYMBOL NetSSL_EXPORTS
|
DEFINE_SYMBOL NetSSL_EXPORTS
|
||||||
)
|
)
|
||||||
|
|
||||||
target_link_libraries(NetSSL PUBLIC Poco::Crypto Poco::Util Poco::Net)
|
target_link_libraries(NetSSL PUBLIC Poco::Crypto Poco::Util Poco::Net)
|
||||||
target_include_directories(NetSSL
|
target_include_directories(NetSSL
|
||||||
PUBLIC
|
PUBLIC
|
||||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
|
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
|
||||||
$<INSTALL_INTERFACE:include>
|
$<INSTALL_INTERFACE:include>
|
||||||
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src
|
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src
|
||||||
)
|
)
|
||||||
|
|
||||||
if(MSVC AND POCO_DISABLE_INTERNAL_OPENSSL AND OPENSSL_USE_STATIC_LIBS)
|
if(MSVC AND POCO_DISABLE_INTERNAL_OPENSSL AND OPENSSL_USE_STATIC_LIBS)
|
||||||
target_link_libraries(NetSSL PUBLIC ws2_32.lib Crypt32.lib)
|
target_link_libraries(NetSSL PUBLIC ws2_32.lib Crypt32.lib)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
POCO_INSTALL(NetSSL)
|
POCO_INSTALL(NetSSL)
|
||||||
POCO_GENERATE_PACKAGE(NetSSL)
|
POCO_GENERATE_PACKAGE(NetSSL)
|
||||||
|
|
||||||
if (ENABLE_TESTS)
|
if(ENABLE_TESTS)
|
||||||
add_subdirectory(samples)
|
add_subdirectory(samples)
|
||||||
add_subdirectory(testsuite)
|
add_subdirectory(testsuite)
|
||||||
endif ()
|
endif()
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
add_subdirectory( HTTPSTimeServer )
|
add_subdirectory(HTTPSTimeServer)
|
||||||
add_subdirectory( download )
|
add_subdirectory(download)
|
||||||
add_subdirectory( Mail )
|
add_subdirectory(Mail)
|
||||||
add_subdirectory( TwitterClient )
|
add_subdirectory(TwitterClient)
|
||||||
|
@ -1,32 +1,39 @@
|
|||||||
# Sources
|
# Sources
|
||||||
file(GLOB SRCS_G "src/*.cpp")
|
file(GLOB SRCS_G "src/*.cpp")
|
||||||
POCO_SOURCES_AUTO( TEST_SRCS ${SRCS_G})
|
POCO_SOURCES_AUTO(TEST_SRCS ${SRCS_G})
|
||||||
|
|
||||||
# Headers
|
# Headers
|
||||||
file(GLOB_RECURSE HDRS_G "src/*.h" )
|
file(GLOB_RECURSE HDRS_G "src/*.h")
|
||||||
POCO_HEADERS_AUTO( TEST_SRCS ${HDRS_G})
|
POCO_HEADERS_AUTO(TEST_SRCS ${HDRS_G})
|
||||||
|
|
||||||
POCO_SOURCES_AUTO_PLAT( TEST_SRCS OFF
|
POCO_SOURCES_AUTO_PLAT(TEST_SRCS OFF
|
||||||
src/WinDriver.cpp
|
src/WinDriver.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
POCO_SOURCES_AUTO_PLAT( TEST_SRCS WINCE
|
POCO_SOURCES_AUTO_PLAT(TEST_SRCS WINCE
|
||||||
src/WinCEDriver.cpp
|
src/WinCEDriver.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
add_executable(NetSSL-testrunner ${TEST_SRCS} )
|
add_executable(NetSSL-testrunner ${TEST_SRCS})
|
||||||
if(ANDROID)
|
if(ANDROID)
|
||||||
add_test(NAME NetSSL WORKING_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
|
add_test(
|
||||||
COMMAND ${CMAKE_COMMAND} -DANDROID_NDK=${ANDROID_NDK} "-DTEST_FILES=${CMAKE_CURRENT_SOURCE_DIR}/any.pem;${CMAKE_CURRENT_SOURCE_DIR}/rootcert.pem;${CMAKE_CURRENT_SOURCE_DIR}/testrunner.xml" -DLIBRARY_DIR=${CMAKE_BINARY_DIR}/lib -DUNITTEST=${CMAKE_BINARY_DIR}/bin/NetSSL-testrunner -DTEST_PARAMETER=-all -P ${CMAKE_SOURCE_DIR}/cmake/ExecuteOnAndroid.cmake)
|
NAME NetSSL
|
||||||
|
WORKING_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
|
||||||
|
COMMAND ${CMAKE_COMMAND} -DANDROID_NDK=${ANDROID_NDK} "-DTEST_FILES=${CMAKE_CURRENT_SOURCE_DIR}/any.pem;${CMAKE_CURRENT_SOURCE_DIR}/rootcert.pem;${CMAKE_CURRENT_SOURCE_DIR}/testrunner.xml" -DLIBRARY_DIR=${CMAKE_BINARY_DIR}/lib -DUNITTEST=${CMAKE_BINARY_DIR}/bin/NetSSL-testrunner -DTEST_PARAMETER=-all -P ${CMAKE_SOURCE_DIR}/cmake/ExecuteOnAndroid.cmake
|
||||||
|
)
|
||||||
else()
|
else()
|
||||||
add_test(NAME NetSSL WORKING_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY} COMMAND NetSSL-testrunner -ignore ${CMAKE_SOURCE_DIR}/cppignore.lnx -all)
|
add_test(
|
||||||
set_tests_properties(NetSSL PROPERTIES ENVIRONMENT POCO_BASE=${CMAKE_SOURCE_DIR})
|
NAME NetSSL
|
||||||
# The test is run in the build directory. So the test data is copied there too
|
WORKING_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
|
||||||
add_custom_command(TARGET NetSSL-testrunner POST_BUILD
|
COMMAND NetSSL-testrunner -ignore ${CMAKE_SOURCE_DIR}/cppignore.lnx -all
|
||||||
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/any.pem ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
|
)
|
||||||
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/rootcert.pem ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
|
set_tests_properties(NetSSL PROPERTIES ENVIRONMENT POCO_BASE=${CMAKE_SOURCE_DIR})
|
||||||
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/testrunner.xml ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/NetSSL-testrunner.xml
|
# The test is run in the build directory. So the test data is copied there too
|
||||||
)
|
add_custom_command(
|
||||||
|
TARGET NetSSL-testrunner POST_BUILD
|
||||||
|
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/any.pem ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
|
||||||
|
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/rootcert.pem ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
|
||||||
|
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/testrunner.xml ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/NetSSL-testrunner.xml
|
||||||
|
)
|
||||||
endif()
|
endif()
|
||||||
target_link_libraries(NetSSL-testrunner PUBLIC Poco::NetSSL Poco::Util Poco::XML CppUnit)
|
target_link_libraries(NetSSL-testrunner PUBLIC Poco::NetSSL Poco::Util Poco::XML CppUnit)
|
||||||
|
|
||||||
|
@ -1,40 +1,40 @@
|
|||||||
# Sources
|
# Sources
|
||||||
file(GLOB SRCS_G "src/*.cpp")
|
file(GLOB SRCS_G "src/*.cpp")
|
||||||
POCO_SOURCES_AUTO( SRCS ${SRCS_G})
|
POCO_SOURCES_AUTO(SRCS ${SRCS_G})
|
||||||
|
|
||||||
# Headers
|
# Headers
|
||||||
file(GLOB_RECURSE HDRS_G "include/*.h" )
|
file(GLOB_RECURSE HDRS_G "include/*.h")
|
||||||
POCO_HEADERS_AUTO( SRCS ${HDRS_G})
|
POCO_HEADERS_AUTO(SRCS ${HDRS_G})
|
||||||
|
|
||||||
# Version Resource
|
# Version Resource
|
||||||
if(MSVC AND BUILD_SHARED_LIBS)
|
if(MSVC AND BUILD_SHARED_LIBS)
|
||||||
source_group("Resources" FILES ${PROJECT_SOURCE_DIR}/DLLVersion.rc)
|
source_group("Resources" FILES ${PROJECT_SOURCE_DIR}/DLLVersion.rc)
|
||||||
list(APPEND SRCS ${PROJECT_SOURCE_DIR}/DLLVersion.rc)
|
list(APPEND SRCS ${PROJECT_SOURCE_DIR}/DLLVersion.rc)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
add_library(NetSSLWin ${SRCS})
|
add_library(NetSSLWin ${SRCS})
|
||||||
add_library(Poco::NetSSLWin ALIAS NetSSLWin)
|
add_library(Poco::NetSSLWin ALIAS NetSSLWin)
|
||||||
set_target_properties(NetSSLWin
|
set_target_properties(NetSSLWin
|
||||||
PROPERTIES
|
PROPERTIES
|
||||||
VERSION ${SHARED_LIBRARY_VERSION} SOVERSION ${SHARED_LIBRARY_VERSION}
|
VERSION ${SHARED_LIBRARY_VERSION} SOVERSION ${SHARED_LIBRARY_VERSION}
|
||||||
OUTPUT_NAME PocoNetSSLWin
|
OUTPUT_NAME PocoNetSSLWin
|
||||||
DEFINE_SYMBOL NetSSL_Win_EXPORTS
|
DEFINE_SYMBOL NetSSL_Win_EXPORTS
|
||||||
)
|
)
|
||||||
|
|
||||||
target_link_libraries(NetSSLWin PUBLIC Poco::Net Poco::Util Crypt32.lib)
|
target_link_libraries(NetSSLWin PUBLIC Poco::Net Poco::Util Crypt32.lib)
|
||||||
target_include_directories(NetSSLWin
|
target_include_directories(NetSSLWin
|
||||||
PUBLIC
|
PUBLIC
|
||||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
|
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
|
||||||
$<INSTALL_INTERFACE:include>
|
$<INSTALL_INTERFACE:include>
|
||||||
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src
|
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src
|
||||||
)
|
)
|
||||||
|
|
||||||
POCO_INSTALL(NetSSLWin)
|
POCO_INSTALL(NetSSLWin)
|
||||||
POCO_GENERATE_PACKAGE(NetSSLWin)
|
POCO_GENERATE_PACKAGE(NetSSLWin)
|
||||||
|
|
||||||
if (ENABLE_TESTS)
|
if(ENABLE_TESTS)
|
||||||
#TODO: Looks like the samples use crypto somehow?
|
#TODO: Looks like the samples use crypto somehow?
|
||||||
#add_subdirectory(samples)
|
#add_subdirectory(samples)
|
||||||
#add_subdirectory(testsuite)
|
#add_subdirectory(testsuite)
|
||||||
endif ()
|
endif()
|
||||||
|
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
add_subdirectory( HTTPSTimeServer )
|
add_subdirectory(HTTPSTimeServer)
|
||||||
add_subdirectory( download )
|
add_subdirectory(download)
|
||||||
add_subdirectory( Mail )
|
add_subdirectory(Mail)
|
||||||
|
@ -1,27 +1,32 @@
|
|||||||
# Sources
|
# Sources
|
||||||
file(GLOB SRCS_G "src/*.cpp")
|
file(GLOB SRCS_G "src/*.cpp")
|
||||||
POCO_SOURCES_AUTO( TEST_SRCS ${SRCS_G})
|
POCO_SOURCES_AUTO(TEST_SRCS ${SRCS_G})
|
||||||
|
|
||||||
# Headers
|
# Headers
|
||||||
file(GLOB_RECURSE HDRS_G "src/*.h" )
|
file(GLOB_RECURSE HDRS_G "src/*.h")
|
||||||
POCO_HEADERS_AUTO( TEST_SRCS ${HDRS_G})
|
POCO_HEADERS_AUTO(TEST_SRCS ${HDRS_G})
|
||||||
|
|
||||||
POCO_SOURCES_AUTO_PLAT( TEST_SRCS OFF
|
POCO_SOURCES_AUTO_PLAT(TEST_SRCS OFF
|
||||||
src/WinDriver.cpp
|
src/WinDriver.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
POCO_SOURCES_AUTO_PLAT( TEST_SRCS WINCE
|
POCO_SOURCES_AUTO_PLAT(TEST_SRCS WINCE
|
||||||
src/WinCEDriver.cpp
|
src/WinCEDriver.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
add_executable(NetSSLWin-testrunner ${TEST_SRCS} )
|
add_executable(NetSSLWin-testrunner ${TEST_SRCS})
|
||||||
add_test(NAME NetSSLWin WORKING_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY} COMMAND NetSSLWin-testrunner -ignore ${CMAKE_SOURCE_DIR}/cppignore.lnx -all)
|
add_test(
|
||||||
|
NAME NetSSLWin
|
||||||
|
WORKING_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
|
||||||
|
COMMAND NetSSLWin-testrunner -ignore ${CMAKE_SOURCE_DIR}/cppignore.lnx -all
|
||||||
|
)
|
||||||
set_tests_properties(NetSSLWin PROPERTIES ENVIRONMENT POCO_BASE=${CMAKE_SOURCE_DIR})
|
set_tests_properties(NetSSLWin PROPERTIES ENVIRONMENT POCO_BASE=${CMAKE_SOURCE_DIR})
|
||||||
target_link_libraries(NetSSLWin-testrunner PUBLIC Poco::NetSSL Poco::Util Poco::XML CppUnit)
|
target_link_libraries(NetSSLWin-testrunner PUBLIC Poco::NetSSL Poco::Util Poco::XML CppUnit)
|
||||||
|
|
||||||
# The test is run in the build directory. So the test data is copied there too
|
# The test is run in the build directory. So the test data is copied there too
|
||||||
add_custom_command(TARGET NetSSLWin-testrunner POST_BUILD
|
add_custom_command(
|
||||||
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/any.pem ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
|
TARGET NetSSLWin-testrunner POST_BUILD
|
||||||
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/rootcert.pem ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
|
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/any.pem ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
|
||||||
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/testrunner.xml ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/NetSSLWin.xml
|
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/rootcert.pem ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
|
||||||
)
|
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/testrunner.xml ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/NetSSLWin.xml
|
||||||
|
)
|
||||||
|
@ -1,153 +1,153 @@
|
|||||||
# Sources
|
# Sources
|
||||||
file(GLOB SRCS_G "src/*.cpp")
|
file(GLOB SRCS_G "src/*.cpp")
|
||||||
POCO_SOURCES_AUTO( SRCS ${SRCS_G})
|
POCO_SOURCES_AUTO(SRCS ${SRCS_G})
|
||||||
|
|
||||||
# Headers
|
# Headers
|
||||||
file(GLOB_RECURSE HDRS_G "include/*.h" )
|
file(GLOB_RECURSE HDRS_G "include/*.h")
|
||||||
POCO_HEADERS_AUTO( SRCS ${HDRS_G})
|
POCO_HEADERS_AUTO(SRCS ${HDRS_G})
|
||||||
|
|
||||||
# If POCO_UNBUNDLED is enabled we try to find the required packages
|
# If POCO_UNBUNDLED is enabled we try to find the required packages
|
||||||
# The configuration will fail if the packages are not found
|
# The configuration will fail if the packages are not found
|
||||||
if (POCO_UNBUNDLED)
|
if(POCO_UNBUNDLED)
|
||||||
find_package(ZLIB REQUIRED)
|
find_package(ZLIB REQUIRED)
|
||||||
else()
|
else()
|
||||||
# zlib
|
# zlib
|
||||||
POCO_SOURCES( SRCS zlib
|
POCO_SOURCES(SRCS zlib
|
||||||
src/adler32.c
|
src/adler32.c
|
||||||
src/compress.c
|
src/compress.c
|
||||||
src/crc32.c
|
src/crc32.c
|
||||||
src/deflate.c
|
src/deflate.c
|
||||||
src/gzio.c
|
src/gzio.c
|
||||||
src/infback.c
|
src/infback.c
|
||||||
src/inffast.c
|
src/inffast.c
|
||||||
src/inflate.c
|
src/inflate.c
|
||||||
src/inftrees.c
|
src/inftrees.c
|
||||||
src/trees.c
|
src/trees.c
|
||||||
src/zutil.c
|
src/zutil.c
|
||||||
)
|
)
|
||||||
endif (POCO_UNBUNDLED)
|
endif(POCO_UNBUNDLED)
|
||||||
|
|
||||||
# TODO: Currently only bundled is supported, in future this should also be possible
|
# TODO: Currently only bundled is supported, in future this should also be possible
|
||||||
# with an unbundled version of hpdf
|
# with an unbundled version of hpdf
|
||||||
# hpdf
|
# hpdf
|
||||||
POCO_SOURCES(SRCS hpdf
|
POCO_SOURCES(SRCS hpdf
|
||||||
src/hpdf_3dmeasure.c
|
src/hpdf_3dmeasure.c
|
||||||
src/hpdf_annotation.c
|
src/hpdf_annotation.c
|
||||||
src/hpdf_array.c
|
src/hpdf_array.c
|
||||||
src/hpdf_binary.c
|
src/hpdf_binary.c
|
||||||
src/hpdf_boolean.c
|
src/hpdf_boolean.c
|
||||||
src/hpdf_catalog.c
|
src/hpdf_catalog.c
|
||||||
src/hpdf_destination.c
|
src/hpdf_destination.c
|
||||||
src/hpdf_dict.c
|
src/hpdf_dict.c
|
||||||
src/hpdf_doc.c
|
src/hpdf_doc.c
|
||||||
src/hpdf_doc_png.c
|
src/hpdf_doc_png.c
|
||||||
src/hpdf_encoder.c
|
src/hpdf_encoder.c
|
||||||
src/hpdf_encoder_cns.c
|
src/hpdf_encoder_cns.c
|
||||||
src/hpdf_encoder_cnt.c
|
src/hpdf_encoder_cnt.c
|
||||||
src/hpdf_encoder_jp.c
|
src/hpdf_encoder_jp.c
|
||||||
src/hpdf_encoder_kr.c
|
src/hpdf_encoder_kr.c
|
||||||
src/hpdf_encoder_utf.c
|
src/hpdf_encoder_utf.c
|
||||||
src/hpdf_encrypt.c
|
src/hpdf_encrypt.c
|
||||||
src/hpdf_encryptdict.c
|
src/hpdf_encryptdict.c
|
||||||
src/hpdf_error.c
|
src/hpdf_error.c
|
||||||
src/hpdf_exdata.c
|
src/hpdf_exdata.c
|
||||||
src/hpdf_ext_gstate.c
|
src/hpdf_ext_gstate.c
|
||||||
src/hpdf_font.c
|
src/hpdf_font.c
|
||||||
src/hpdf_font_cid.c
|
src/hpdf_font_cid.c
|
||||||
src/hpdf_font_tt.c
|
src/hpdf_font_tt.c
|
||||||
src/hpdf_font_type1.c
|
src/hpdf_font_type1.c
|
||||||
src/hpdf_fontdef.c
|
src/hpdf_fontdef.c
|
||||||
src/hpdf_fontdef_base14.c
|
src/hpdf_fontdef_base14.c
|
||||||
src/hpdf_fontdef_cid.c
|
src/hpdf_fontdef_cid.c
|
||||||
src/hpdf_fontdef_cns.c
|
src/hpdf_fontdef_cns.c
|
||||||
src/hpdf_fontdef_cnt.c
|
src/hpdf_fontdef_cnt.c
|
||||||
src/hpdf_fontdef_jp.c
|
src/hpdf_fontdef_jp.c
|
||||||
src/hpdf_fontdef_kr.c
|
src/hpdf_fontdef_kr.c
|
||||||
src/hpdf_fontdef_tt.c
|
src/hpdf_fontdef_tt.c
|
||||||
src/hpdf_fontdef_type1.c
|
src/hpdf_fontdef_type1.c
|
||||||
src/hpdf_gstate.c
|
src/hpdf_gstate.c
|
||||||
src/hpdf_image.c
|
src/hpdf_image.c
|
||||||
src/hpdf_image_ccitt.c
|
src/hpdf_image_ccitt.c
|
||||||
src/hpdf_image_png.c
|
src/hpdf_image_png.c
|
||||||
src/hpdf_info.c
|
src/hpdf_info.c
|
||||||
src/hpdf_list.c
|
src/hpdf_list.c
|
||||||
src/hpdf_mmgr.c
|
src/hpdf_mmgr.c
|
||||||
src/hpdf_name.c
|
src/hpdf_name.c
|
||||||
src/hpdf_namedict.c
|
src/hpdf_namedict.c
|
||||||
src/hpdf_null.c
|
src/hpdf_null.c
|
||||||
src/hpdf_number.c
|
src/hpdf_number.c
|
||||||
src/hpdf_objects.c
|
src/hpdf_objects.c
|
||||||
src/hpdf_outline.c
|
src/hpdf_outline.c
|
||||||
src/hpdf_page_label.c
|
src/hpdf_page_label.c
|
||||||
src/hpdf_page_operator.c
|
src/hpdf_page_operator.c
|
||||||
src/hpdf_pages.c
|
src/hpdf_pages.c
|
||||||
src/hpdf_pdfa.c
|
src/hpdf_pdfa.c
|
||||||
src/hpdf_real.c
|
src/hpdf_real.c
|
||||||
src/hpdf_streams.c
|
src/hpdf_streams.c
|
||||||
src/hpdf_string.c
|
src/hpdf_string.c
|
||||||
src/hpdf_u3d.c
|
src/hpdf_u3d.c
|
||||||
src/hpdf_utils.c
|
src/hpdf_utils.c
|
||||||
src/hpdf_xref.c
|
src/hpdf_xref.c
|
||||||
)
|
)
|
||||||
|
|
||||||
# TODO: Currently only bundled is supported, in future this should also be possible
|
# TODO: Currently only bundled is supported, in future this should also be possible
|
||||||
# with an unbundled version of libpng
|
# with an unbundled version of libpng
|
||||||
POCO_SOURCES( SRCS libpng
|
POCO_SOURCES(SRCS libpng
|
||||||
src/png.c
|
src/png.c
|
||||||
src/pngerror.c
|
src/pngerror.c
|
||||||
src/pnggccrd.c
|
src/pnggccrd.c
|
||||||
src/pngget.c
|
src/pngget.c
|
||||||
src/pngmem.c
|
src/pngmem.c
|
||||||
src/pngpread.c
|
src/pngpread.c
|
||||||
src/pngread.c
|
src/pngread.c
|
||||||
src/pngrio.c
|
src/pngrio.c
|
||||||
src/pngrtran.c
|
src/pngrtran.c
|
||||||
src/pngrutil.c
|
src/pngrutil.c
|
||||||
src/pngset.c
|
src/pngset.c
|
||||||
src/pngtest.c
|
src/pngtest.c
|
||||||
src/pngtrans.c
|
src/pngtrans.c
|
||||||
src/pngvcrd.c
|
src/pngvcrd.c
|
||||||
src/pngwio.c
|
src/pngwio.c
|
||||||
src/pngwrite.c
|
src/pngwrite.c
|
||||||
src/pngwtran.c
|
src/pngwtran.c
|
||||||
src/pngwutil.c
|
src/pngwutil.c
|
||||||
)
|
)
|
||||||
|
|
||||||
# Version Resource
|
# Version Resource
|
||||||
if(MSVC AND BUILD_SHARED_LIBS)
|
if(MSVC AND BUILD_SHARED_LIBS)
|
||||||
source_group("Resources" FILES ${PROJECT_SOURCE_DIR}/DLLVersion.rc)
|
source_group("Resources" FILES ${PROJECT_SOURCE_DIR}/DLLVersion.rc)
|
||||||
list(APPEND SRCS ${PROJECT_SOURCE_DIR}/DLLVersion.rc)
|
list(APPEND SRCS ${PROJECT_SOURCE_DIR}/DLLVersion.rc)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
#TODO: Can we put this with the below includes? PRIVAT eg.
|
#TODO: Can we put this with the below includes? PRIVAT eg.
|
||||||
include_directories( "include/Poco/PDF" ) # zip src
|
include_directories("include/Poco/PDF") # zip src
|
||||||
|
|
||||||
add_library(PDF ${SRCS} )
|
add_library(PDF ${SRCS})
|
||||||
add_library(Poco::PDF ALIAS PDF)
|
add_library(Poco::PDF ALIAS PDF)
|
||||||
set_target_properties(PDF
|
set_target_properties(PDF
|
||||||
PROPERTIES
|
PROPERTIES
|
||||||
VERSION ${SHARED_LIBRARY_VERSION} SOVERSION ${SHARED_LIBRARY_VERSION}
|
VERSION ${SHARED_LIBRARY_VERSION} SOVERSION ${SHARED_LIBRARY_VERSION}
|
||||||
OUTPUT_NAME PocoPDF
|
OUTPUT_NAME PocoPDF
|
||||||
DEFINE_SYMBOL PDF_EXPORTS
|
DEFINE_SYMBOL PDF_EXPORTS
|
||||||
)
|
)
|
||||||
|
|
||||||
if (POCO_UNBUNDLED)
|
if(POCO_UNBUNDLED)
|
||||||
target_link_libraries(PDF PUBLIC ZLIB::ZLIB)
|
target_link_libraries(PDF PUBLIC ZLIB::ZLIB)
|
||||||
target_compile_definitions(PDF PUBLIC POCO_UNBUNDLED)
|
target_compile_definitions(PDF PUBLIC POCO_UNBUNDLED)
|
||||||
endif (POCO_UNBUNDLED)
|
endif(POCO_UNBUNDLED)
|
||||||
target_link_libraries(PDF PUBLIC Poco::XML Poco::Util)
|
target_link_libraries(PDF PUBLIC Poco::XML Poco::Util)
|
||||||
target_include_directories(PDF
|
target_include_directories(PDF
|
||||||
PUBLIC
|
PUBLIC
|
||||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
|
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
|
||||||
$<INSTALL_INTERFACE:include>
|
$<INSTALL_INTERFACE:include>
|
||||||
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src
|
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src
|
||||||
)
|
)
|
||||||
|
|
||||||
POCO_INSTALL(PDF)
|
POCO_INSTALL(PDF)
|
||||||
POCO_GENERATE_PACKAGE(PDF)
|
POCO_GENERATE_PACKAGE(PDF)
|
||||||
|
|
||||||
if (ENABLE_TESTS)
|
if(ENABLE_TESTS)
|
||||||
add_subdirectory(samples)
|
add_subdirectory(samples)
|
||||||
add_subdirectory(testsuite)
|
add_subdirectory(testsuite)
|
||||||
endif ()
|
endif()
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
include(CMakeFindDependencyMacro)
|
include(CMakeFindDependencyMacro)
|
||||||
find_dependency(PocoFoundation)
|
find_dependency(PocoFoundation)
|
||||||
if(@POCO_UNBUNDLED@)
|
if(@POCO_UNBUNDLED@)
|
||||||
find_dependency(ZLIB REQUIRED)
|
find_dependency(ZLIB REQUIRED)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
include("${CMAKE_CURRENT_LIST_DIR}/PocoPDFTargets.cmake")
|
include("${CMAKE_CURRENT_LIST_DIR}/PocoPDFTargets.cmake")
|
||||||
|
@ -1,21 +1,28 @@
|
|||||||
# Sources
|
# Sources
|
||||||
file(GLOB SRCS_G "src/*.cpp")
|
file(GLOB SRCS_G "src/*.cpp")
|
||||||
POCO_SOURCES_AUTO( TEST_SRCS ${SRCS_G})
|
POCO_SOURCES_AUTO(TEST_SRCS ${SRCS_G})
|
||||||
|
|
||||||
# Headers
|
# Headers
|
||||||
file(GLOB_RECURSE HDRS_G "src/*.h" )
|
file(GLOB_RECURSE HDRS_G "src/*.h")
|
||||||
POCO_HEADERS_AUTO( TEST_SRCS ${HDRS_G})
|
POCO_HEADERS_AUTO(TEST_SRCS ${HDRS_G})
|
||||||
|
|
||||||
POCO_SOURCES_AUTO_PLAT( TEST_SRCS OFF
|
POCO_SOURCES_AUTO_PLAT(TEST_SRCS OFF
|
||||||
src/WinDriver.cpp
|
src/WinDriver.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
add_executable(PDF-testrunner ${TEST_SRCS} )
|
add_executable(PDF-testrunner ${TEST_SRCS})
|
||||||
if(ANDROID)
|
if(ANDROID)
|
||||||
add_test(NAME PDF WORKING_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
|
add_test(
|
||||||
COMMAND ${CMAKE_COMMAND} -DANDROID_NDK=${ANDROID_NDK} -DLIBRARY_DIR=${CMAKE_BINARY_DIR}/lib -DUNITTEST=${CMAKE_BINARY_DIR}/bin/PDF-testrunner -DTEST_PARAMETER=-all -P ${CMAKE_SOURCE_DIR}/cmake/ExecuteOnAndroid.cmake)
|
NAME PDF
|
||||||
|
WORKING_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
|
||||||
|
COMMAND ${CMAKE_COMMAND} -DANDROID_NDK=${ANDROID_NDK} -DLIBRARY_DIR=${CMAKE_BINARY_DIR}/lib -DUNITTEST=${CMAKE_BINARY_DIR}/bin/PDF-testrunner -DTEST_PARAMETER=-all -P ${CMAKE_SOURCE_DIR}/cmake/ExecuteOnAndroid.cmake
|
||||||
|
)
|
||||||
else()
|
else()
|
||||||
add_test(NAME PDF WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND PDF-testrunner -ignore ${CMAKE_SOURCE_DIR}/cppignore.lnx -all)
|
add_test(
|
||||||
|
NAME PDF
|
||||||
|
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
||||||
|
COMMAND PDF-testrunner -ignore ${CMAKE_SOURCE_DIR}/cppignore.lnx -all
|
||||||
|
)
|
||||||
set_tests_properties(PDF PROPERTIES ENVIRONMENT POCO_BASE=${CMAKE_SOURCE_DIR})
|
set_tests_properties(PDF PROPERTIES ENVIRONMENT POCO_BASE=${CMAKE_SOURCE_DIR})
|
||||||
endif()
|
endif()
|
||||||
target_link_libraries(PDF-testrunner PUBLIC Poco::PDF CppUnit )
|
target_link_libraries(PDF-testrunner PUBLIC Poco::PDF CppUnit)
|
||||||
|
@ -2,20 +2,20 @@ set(POCO_EXENAME "PageCompiler")
|
|||||||
|
|
||||||
# Sources
|
# Sources
|
||||||
file(GLOB SRCS_G "src/*.cpp")
|
file(GLOB SRCS_G "src/*.cpp")
|
||||||
POCO_SOURCES_AUTO( SRCS ${SRCS_G})
|
POCO_SOURCES_AUTO(SRCS ${SRCS_G})
|
||||||
|
|
||||||
add_executable(PageCompiler ${SRCS} )
|
add_executable(PageCompiler ${SRCS})
|
||||||
set_target_properties(PageCompiler
|
set_target_properties(PageCompiler
|
||||||
PROPERTIES
|
PROPERTIES
|
||||||
OUTPUT_NAME cpspc
|
OUTPUT_NAME cpspc
|
||||||
)
|
)
|
||||||
|
|
||||||
target_link_libraries(PageCompiler PUBLIC Poco::Net Poco::Util)
|
target_link_libraries(PageCompiler PUBLIC Poco::Net Poco::Util)
|
||||||
|
|
||||||
install(
|
install(
|
||||||
TARGETS PageCompiler EXPORT PageCompilerTargets
|
TARGETS PageCompiler EXPORT PageCompilerTargets
|
||||||
LIBRARY DESTINATION lib${LIB_SUFFIX}
|
LIBRARY DESTINATION lib${LIB_SUFFIX}
|
||||||
ARCHIVE DESTINATION lib${LIB_SUFFIX}
|
ARCHIVE DESTINATION lib${LIB_SUFFIX}
|
||||||
RUNTIME DESTINATION bin
|
RUNTIME DESTINATION bin
|
||||||
INCLUDES DESTINATION include
|
INCLUDES DESTINATION include
|
||||||
)
|
)
|
||||||
|
@ -1,19 +1,19 @@
|
|||||||
# Sources
|
# Sources
|
||||||
file(GLOB SRCS_G "src/*.cpp")
|
file(GLOB SRCS_G "src/*.cpp")
|
||||||
POCO_SOURCES_AUTO( SRCS ${SRCS_G})
|
POCO_SOURCES_AUTO(SRCS ${SRCS_G})
|
||||||
|
|
||||||
add_executable(File2Page ${SRCS} )
|
add_executable(File2Page ${SRCS})
|
||||||
set_target_properties(File2Page
|
set_target_properties(File2Page
|
||||||
PROPERTIES
|
PROPERTIES
|
||||||
OUTPUT_NAME f2cpsp
|
OUTPUT_NAME f2cpsp
|
||||||
)
|
)
|
||||||
|
|
||||||
target_link_libraries(File2Page PUBLIC Poco::Util)
|
target_link_libraries(File2Page PUBLIC Poco::Util)
|
||||||
|
|
||||||
install(
|
install(
|
||||||
TARGETS File2Page EXPORT File2PageTargets
|
TARGETS File2Page EXPORT File2PageTargets
|
||||||
LIBRARY DESTINATION lib${LIB_SUFFIX}
|
LIBRARY DESTINATION lib${LIB_SUFFIX}
|
||||||
ARCHIVE DESTINATION lib${LIB_SUFFIX}
|
ARCHIVE DESTINATION lib${LIB_SUFFIX}
|
||||||
RUNTIME DESTINATION bin
|
RUNTIME DESTINATION bin
|
||||||
INCLUDES DESTINATION include
|
INCLUDES DESTINATION include
|
||||||
)
|
)
|
||||||
|
@ -1,15 +1,15 @@
|
|||||||
# Sources
|
# Sources
|
||||||
file(GLOB SRCS_G "src/*.cpp")
|
file(GLOB SRCS_G "src/*.cpp")
|
||||||
POCO_SOURCES_AUTO( SRCS ${SRCS_G})
|
POCO_SOURCES_AUTO(SRCS ${SRCS_G})
|
||||||
|
|
||||||
add_executable(PocoDoc ${SRCS} )
|
add_executable(PocoDoc ${SRCS})
|
||||||
|
|
||||||
target_link_libraries(PocoDoc PUBLIC Poco::Util Poco::XML Poco::CppParser)
|
target_link_libraries(PocoDoc PUBLIC Poco::Util Poco::XML Poco::CppParser)
|
||||||
|
|
||||||
install(
|
install(
|
||||||
TARGETS PocoDoc EXPORT PocoDocTargets
|
TARGETS PocoDoc EXPORT PocoDocTargets
|
||||||
LIBRARY DESTINATION lib${LIB_SUFFIX}
|
LIBRARY DESTINATION lib${LIB_SUFFIX}
|
||||||
ARCHIVE DESTINATION lib${LIB_SUFFIX}
|
ARCHIVE DESTINATION lib${LIB_SUFFIX}
|
||||||
RUNTIME DESTINATION bin
|
RUNTIME DESTINATION bin
|
||||||
INCLUDES DESTINATION include
|
INCLUDES DESTINATION include
|
||||||
)
|
)
|
||||||
|
@ -1,39 +1,39 @@
|
|||||||
# Sources
|
# Sources
|
||||||
file(GLOB SRCS_G "src/*.cpp")
|
file(GLOB SRCS_G "src/*.cpp")
|
||||||
POCO_SOURCES_AUTO( SRCS ${SRCS_G})
|
POCO_SOURCES_AUTO(SRCS ${SRCS_G})
|
||||||
|
|
||||||
# Headers
|
# Headers
|
||||||
file(GLOB_RECURSE HDRS_G "include/*.h" )
|
file(GLOB_RECURSE HDRS_G "include/*.h")
|
||||||
POCO_HEADERS_AUTO( SRCS ${HDRS_G})
|
POCO_HEADERS_AUTO(SRCS ${HDRS_G})
|
||||||
|
|
||||||
# Version Resource
|
# Version Resource
|
||||||
if(MSVC AND BUILD_SHARED_LIBS)
|
if(MSVC AND BUILD_SHARED_LIBS)
|
||||||
source_group("Resources" FILES ${PROJECT_SOURCE_DIR}/DLLVersion.rc)
|
source_group("Resources" FILES ${PROJECT_SOURCE_DIR}/DLLVersion.rc)
|
||||||
list(APPEND SRCS ${PROJECT_SOURCE_DIR}/DLLVersion.rc)
|
list(APPEND SRCS ${PROJECT_SOURCE_DIR}/DLLVersion.rc)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
add_library(Redis ${SRCS} )
|
add_library(Redis ${SRCS})
|
||||||
add_library(Poco::Redis ALIAS Redis)
|
add_library(Poco::Redis ALIAS Redis)
|
||||||
set_target_properties(Redis
|
set_target_properties(Redis
|
||||||
PROPERTIES
|
PROPERTIES
|
||||||
VERSION ${SHARED_LIBRARY_VERSION} SOVERSION ${SHARED_LIBRARY_VERSION}
|
VERSION ${SHARED_LIBRARY_VERSION} SOVERSION ${SHARED_LIBRARY_VERSION}
|
||||||
OUTPUT_NAME PocoRedis
|
OUTPUT_NAME PocoRedis
|
||||||
DEFINE_SYMBOL Redis_EXPORTS
|
DEFINE_SYMBOL Redis_EXPORTS
|
||||||
)
|
)
|
||||||
|
|
||||||
target_link_libraries(Redis PUBLIC Poco::Net)
|
target_link_libraries(Redis PUBLIC Poco::Net)
|
||||||
target_include_directories(Redis
|
target_include_directories(Redis
|
||||||
PUBLIC
|
PUBLIC
|
||||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
|
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
|
||||||
$<INSTALL_INTERFACE:include>
|
$<INSTALL_INTERFACE:include>
|
||||||
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src
|
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src
|
||||||
)
|
)
|
||||||
|
|
||||||
POCO_INSTALL(Redis)
|
POCO_INSTALL(Redis)
|
||||||
POCO_GENERATE_PACKAGE(Redis)
|
POCO_GENERATE_PACKAGE(Redis)
|
||||||
|
|
||||||
if (ENABLE_TESTS)
|
if(ENABLE_TESTS)
|
||||||
add_subdirectory(testsuite)
|
add_subdirectory(testsuite)
|
||||||
# add_subdirectory(samples)
|
# add_subdirectory(samples)
|
||||||
endif ()
|
endif()
|
||||||
|
|
||||||
|
@ -1,30 +1,37 @@
|
|||||||
# Sources
|
# Sources
|
||||||
file(GLOB SRCS_G "src/*.cpp")
|
file(GLOB SRCS_G "src/*.cpp")
|
||||||
POCO_SOURCES_AUTO( TEST_SRCS ${SRCS_G})
|
POCO_SOURCES_AUTO(TEST_SRCS ${SRCS_G})
|
||||||
|
|
||||||
# Headers
|
# Headers
|
||||||
file(GLOB_RECURSE HDRS_G "src/*.h" )
|
file(GLOB_RECURSE HDRS_G "src/*.h")
|
||||||
POCO_HEADERS_AUTO( TEST_SRCS ${HDRS_G})
|
POCO_HEADERS_AUTO(TEST_SRCS ${HDRS_G})
|
||||||
|
|
||||||
POCO_SOURCES_AUTO_PLAT( TEST_SRCS OFF
|
POCO_SOURCES_AUTO_PLAT(TEST_SRCS OFF
|
||||||
src/WinDriver.cpp
|
src/WinDriver.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
POCO_SOURCES_AUTO_PLAT( TEST_SRCS WINCE
|
POCO_SOURCES_AUTO_PLAT(TEST_SRCS WINCE
|
||||||
src/WinCEDriver.cpp
|
src/WinCEDriver.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
add_executable(Redis-testrunner ${TEST_SRCS} )
|
add_executable(Redis-testrunner ${TEST_SRCS})
|
||||||
if(ANDROID)
|
if(ANDROID)
|
||||||
add_test(NAME Redis WORKING_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
|
add_test(
|
||||||
COMMAND ${CMAKE_COMMAND} -DANDROID_NDK=${ANDROID_NDK} -DLIBRARY_DIR=${CMAKE_BINARY_DIR}/lib -DUNITTEST=${CMAKE_BINARY_DIR}/bin/Redis-testrunner -DTEST_PARAMETER=-all -P ${CMAKE_SOURCE_DIR}/cmake/ExecuteOnAndroid.cmake)
|
NAME Redis
|
||||||
|
WORKING_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
|
||||||
|
COMMAND ${CMAKE_COMMAND} -DANDROID_NDK=${ANDROID_NDK} -DLIBRARY_DIR=${CMAKE_BINARY_DIR}/lib -DUNITTEST=${CMAKE_BINARY_DIR}/bin/Redis-testrunner -DTEST_PARAMETER=-all -P ${CMAKE_SOURCE_DIR}/cmake/ExecuteOnAndroid.cmake
|
||||||
|
)
|
||||||
else()
|
else()
|
||||||
add_test(NAME Redis WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND Redis-testrunner -ignore ${CMAKE_SOURCE_DIR}/cppignore.lnx -all)
|
add_test(
|
||||||
set_tests_properties(Redis PROPERTIES ENVIRONMENT POCO_BASE=${CMAKE_SOURCE_DIR})
|
NAME Redis
|
||||||
|
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
||||||
|
COMMAND Redis-testrunner -ignore ${CMAKE_SOURCE_DIR}/cppignore.lnx -all
|
||||||
|
)
|
||||||
|
set_tests_properties(Redis PROPERTIES ENVIRONMENT POCO_BASE=${CMAKE_SOURCE_DIR})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
target_link_libraries(Redis-testrunner PUBLIC ${CMAKE_THREAD_LIBS_INIT} Poco::Redis CppUnit )
|
target_link_libraries(Redis-testrunner PUBLIC ${CMAKE_THREAD_LIBS_INIT} Poco::Redis CppUnit)
|
||||||
|
|
||||||
if(OLD_REDIS_VERSION)
|
if(OLD_REDIS_VERSION)
|
||||||
target_compile_definitions(Redis-testrunner PRIVATE OLD_REDIS_VERSION)
|
target_compile_definitions(Redis-testrunner PRIVATE OLD_REDIS_VERSION)
|
||||||
endif(OLD_REDIS_VERSION)
|
endif(OLD_REDIS_VERSION)
|
||||||
|
@ -1,81 +1,81 @@
|
|||||||
# Sources
|
# Sources
|
||||||
file(GLOB SRCS_G "src/*.cpp")
|
file(GLOB SRCS_G "src/*.cpp")
|
||||||
POCO_SOURCES_AUTO( SRCS ${SRCS_G})
|
POCO_SOURCES_AUTO(SRCS ${SRCS_G})
|
||||||
|
|
||||||
# Headers
|
# Headers
|
||||||
file(GLOB_RECURSE HDRS_G "include/*.h" )
|
file(GLOB_RECURSE HDRS_G "include/*.h")
|
||||||
POCO_HEADERS_AUTO( SRCS ${HDRS_G})
|
POCO_HEADERS_AUTO(SRCS ${HDRS_G})
|
||||||
|
|
||||||
# TODO: Currently only bundled is supported, in future this should also be possible
|
# TODO: Currently only bundled is supported, in future this should also be possible
|
||||||
# with an unbundled version of 7z
|
# with an unbundled version of 7z
|
||||||
POCO_SOURCES( SRCS 7z
|
POCO_SOURCES(SRCS 7z
|
||||||
src/7zAlloc.c
|
src/7zAlloc.c
|
||||||
src/7zBuf2.c
|
src/7zBuf2.c
|
||||||
src/7zBuf.c
|
src/7zBuf.c
|
||||||
src/7zCrc.c
|
src/7zCrc.c
|
||||||
src/7zCrcOpt.c
|
src/7zCrcOpt.c
|
||||||
src/7zDec.c
|
src/7zDec.c
|
||||||
src/7zFile.c
|
src/7zFile.c
|
||||||
src/7zIn.c
|
src/7zIn.c
|
||||||
src/7zStream.c
|
src/7zStream.c
|
||||||
src/Alloc.c
|
src/Alloc.c
|
||||||
src/Bcj2.c
|
src/Bcj2.c
|
||||||
src/Bra86.c
|
src/Bra86.c
|
||||||
src/Bra.c
|
src/Bra.c
|
||||||
# src/BraIA64.c
|
# src/BraIA64.c
|
||||||
src/CpuArch.c
|
src/CpuArch.c
|
||||||
# src/Delta.c
|
# src/Delta.c
|
||||||
# src/LzFind.c
|
# src/LzFind.c
|
||||||
# src/LzFindMt.c
|
# src/LzFindMt.c
|
||||||
src/Lzma2Dec.c
|
src/Lzma2Dec.c
|
||||||
# src/Lzma2Enc.c
|
# src/Lzma2Enc.c
|
||||||
src/Lzma86Dec.c
|
src/Lzma86Dec.c
|
||||||
# src/Lzma86Enc.c
|
# src/Lzma86Enc.c
|
||||||
src/LzmaDec.c
|
src/LzmaDec.c
|
||||||
# src/LzmaEnc.c
|
# src/LzmaEnc.c
|
||||||
# src/LzmaLib.c
|
# src/LzmaLib.c
|
||||||
# src/MtCoder.c
|
# src/MtCoder.c
|
||||||
src/Ppmd7.c
|
src/Ppmd7.c
|
||||||
src/Ppmd7Dec.c
|
src/Ppmd7Dec.c
|
||||||
# src/Ppmd7Enc.c
|
# src/Ppmd7Enc.c
|
||||||
# src/Sha256.c
|
# src/Sha256.c
|
||||||
# src/Threads.c
|
# src/Threads.c
|
||||||
# src/Xz.c
|
# src/Xz.c
|
||||||
# src/XzCrc64.c
|
# src/XzCrc64.c
|
||||||
# src/XzDec.c
|
# src/XzDec.c
|
||||||
# src/XzEnc.c
|
# src/XzEnc.c
|
||||||
# src/XzIn.c
|
# src/XzIn.c
|
||||||
)
|
)
|
||||||
|
|
||||||
# Version Resource
|
# Version Resource
|
||||||
if(MSVC AND BUILD_SHARED_LIBS)
|
if(MSVC AND BUILD_SHARED_LIBS)
|
||||||
source_group("Resources" FILES ${PROJECT_SOURCE_DIR}/DLLVersion.rc)
|
source_group("Resources" FILES ${PROJECT_SOURCE_DIR}/DLLVersion.rc)
|
||||||
list(APPEND SRCS ${PROJECT_SOURCE_DIR}/DLLVersion.rc)
|
list(APPEND SRCS ${PROJECT_SOURCE_DIR}/DLLVersion.rc)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
add_library(SevenZip ${SRCS} )
|
add_library(SevenZip ${SRCS})
|
||||||
add_library(Poco::SevenZip ALIAS SevenZip)
|
add_library(Poco::SevenZip ALIAS SevenZip)
|
||||||
set_target_properties(SevenZip
|
set_target_properties(SevenZip
|
||||||
PROPERTIES
|
PROPERTIES
|
||||||
VERSION ${SHARED_LIBRARY_VERSION} SOVERSION ${SHARED_LIBRARY_VERSION}
|
VERSION ${SHARED_LIBRARY_VERSION} SOVERSION ${SHARED_LIBRARY_VERSION}
|
||||||
OUTPUT_NAME PocoSevenZip
|
OUTPUT_NAME PocoSevenZip
|
||||||
DEFINE_SYMBOL SevenZip_EXPORTS
|
DEFINE_SYMBOL SevenZip_EXPORTS
|
||||||
)
|
)
|
||||||
|
|
||||||
target_link_libraries(SevenZip PUBLIC Poco::Util Poco::XML)
|
target_link_libraries(SevenZip PUBLIC Poco::Util Poco::XML)
|
||||||
target_include_directories(SevenZip
|
target_include_directories(SevenZip
|
||||||
PUBLIC
|
PUBLIC
|
||||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
|
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
|
||||||
$<INSTALL_INTERFACE:include>
|
$<INSTALL_INTERFACE:include>
|
||||||
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src
|
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src
|
||||||
)
|
)
|
||||||
|
|
||||||
POCO_INSTALL(SevenZip)
|
POCO_INSTALL(SevenZip)
|
||||||
POCO_GENERATE_PACKAGE(SevenZip)
|
POCO_GENERATE_PACKAGE(SevenZip)
|
||||||
|
|
||||||
if (ENABLE_TESTS)
|
if(ENABLE_TESTS)
|
||||||
add_subdirectory(samples)
|
add_subdirectory(samples)
|
||||||
# TODO: Add tests
|
# TODO: Add tests
|
||||||
#add_subdirectory(testsuite)
|
#add_subdirectory(testsuite)
|
||||||
endif ()
|
endif()
|
||||||
|
|
||||||
|
@ -1 +1 @@
|
|||||||
add_subdirectory( un7zip )
|
add_subdirectory(un7zip)
|
||||||
|
@ -1,55 +1,55 @@
|
|||||||
# Sources
|
# Sources
|
||||||
file(GLOB SRCS_G "src/*.cpp")
|
file(GLOB SRCS_G "src/*.cpp")
|
||||||
POCO_SOURCES_AUTO( SRCS ${SRCS_G})
|
POCO_SOURCES_AUTO(SRCS ${SRCS_G})
|
||||||
|
|
||||||
# Headers
|
# Headers
|
||||||
file(GLOB_RECURSE HDRS_G "include/*.h" )
|
file(GLOB_RECURSE HDRS_G "include/*.h")
|
||||||
POCO_HEADERS_AUTO( SRCS ${HDRS_G})
|
POCO_HEADERS_AUTO(SRCS ${HDRS_G})
|
||||||
|
|
||||||
# Version Resource
|
# Version Resource
|
||||||
if(MSVC AND BUILD_SHARED_LIBS)
|
if(MSVC AND BUILD_SHARED_LIBS)
|
||||||
source_group("Resources" FILES ${PROJECT_SOURCE_DIR}/DLLVersion.rc)
|
source_group("Resources" FILES ${PROJECT_SOURCE_DIR}/DLLVersion.rc)
|
||||||
list(APPEND SRCS ${PROJECT_SOURCE_DIR}/DLLVersion.rc)
|
list(APPEND SRCS ${PROJECT_SOURCE_DIR}/DLLVersion.rc)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
POCO_SOURCES_AUTO_PLAT( SRCS WIN32
|
POCO_SOURCES_AUTO_PLAT(SRCS WIN32
|
||||||
src/WinRegistryConfiguration.cpp
|
src/WinRegistryConfiguration.cpp
|
||||||
src/WinRegistryKey.cpp
|
src/WinRegistryKey.cpp
|
||||||
src/WinService.cpp
|
src/WinService.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
add_library(Util ${SRCS} )
|
add_library(Util ${SRCS})
|
||||||
add_library(Poco::Util ALIAS Util)
|
add_library(Poco::Util ALIAS Util)
|
||||||
set_target_properties(Util
|
set_target_properties(Util
|
||||||
PROPERTIES
|
PROPERTIES
|
||||||
VERSION ${SHARED_LIBRARY_VERSION} SOVERSION ${SHARED_LIBRARY_VERSION}
|
VERSION ${SHARED_LIBRARY_VERSION} SOVERSION ${SHARED_LIBRARY_VERSION}
|
||||||
OUTPUT_NAME PocoUtil
|
OUTPUT_NAME PocoUtil
|
||||||
DEFINE_SYMBOL Util_EXPORTS
|
DEFINE_SYMBOL Util_EXPORTS
|
||||||
)
|
)
|
||||||
|
|
||||||
target_link_libraries(Util PUBLIC Poco::Foundation)
|
target_link_libraries(Util PUBLIC Poco::Foundation)
|
||||||
if (ENABLE_XML)
|
if(ENABLE_XML)
|
||||||
target_link_libraries(Util PUBLIC Poco::XML)
|
target_link_libraries(Util PUBLIC Poco::XML)
|
||||||
else ()
|
else()
|
||||||
target_compile_definitions(Util PUBLIC POCO_UTIL_NO_XMLCONFIGURATION )
|
target_compile_definitions(Util PUBLIC POCO_UTIL_NO_XMLCONFIGURATION)
|
||||||
endif()
|
endif()
|
||||||
if (ENABLE_JSON)
|
if(ENABLE_JSON)
|
||||||
target_link_libraries(Util PUBLIC Poco::JSON)
|
target_link_libraries(Util PUBLIC Poco::JSON)
|
||||||
else ()
|
else()
|
||||||
target_compile_definitions(Util PUBLIC POCO_UTIL_NO_JSONCONFIGURATION )
|
target_compile_definitions(Util PUBLIC POCO_UTIL_NO_JSONCONFIGURATION)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
target_include_directories(Util
|
target_include_directories(Util
|
||||||
PUBLIC
|
PUBLIC
|
||||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
|
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
|
||||||
$<INSTALL_INTERFACE:include>
|
$<INSTALL_INTERFACE:include>
|
||||||
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src
|
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src
|
||||||
)
|
)
|
||||||
|
|
||||||
POCO_INSTALL(Util)
|
POCO_INSTALL(Util)
|
||||||
POCO_GENERATE_PACKAGE(Util)
|
POCO_GENERATE_PACKAGE(Util)
|
||||||
|
|
||||||
if (ENABLE_TESTS)
|
if(ENABLE_TESTS)
|
||||||
add_subdirectory(samples)
|
add_subdirectory(samples)
|
||||||
add_subdirectory(testsuite)
|
add_subdirectory(testsuite)
|
||||||
endif ()
|
endif()
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
add_subdirectory( SampleApp )
|
add_subdirectory(SampleApp)
|
||||||
add_subdirectory( SampleServer )
|
add_subdirectory(SampleServer)
|
||||||
add_subdirectory( Units )
|
add_subdirectory(Units)
|
||||||
add_subdirectory( pkill )
|
add_subdirectory(pkill)
|
||||||
|
@ -1,32 +1,39 @@
|
|||||||
# Sources
|
# Sources
|
||||||
file(GLOB SRCS_G "src/*.cpp")
|
file(GLOB SRCS_G "src/*.cpp")
|
||||||
POCO_SOURCES_AUTO( TEST_SRCS ${SRCS_G})
|
POCO_SOURCES_AUTO(TEST_SRCS ${SRCS_G})
|
||||||
|
|
||||||
# Headers
|
# Headers
|
||||||
file(GLOB_RECURSE HDRS_G "src/*.h" )
|
file(GLOB_RECURSE HDRS_G "src/*.h")
|
||||||
POCO_HEADERS_AUTO( TEST_SRCS ${HDRS_G})
|
POCO_HEADERS_AUTO(TEST_SRCS ${HDRS_G})
|
||||||
|
|
||||||
POCO_SOURCES_AUTO_PLAT( TEST_SRCS WIN32
|
POCO_SOURCES_AUTO_PLAT(TEST_SRCS WIN32
|
||||||
src/WinConfigurationTest.cpp
|
src/WinConfigurationTest.cpp
|
||||||
src/WinRegistryTest.cpp
|
src/WinRegistryTest.cpp
|
||||||
src/WinServiceTest.cpp
|
src/WinServiceTest.cpp
|
||||||
src/WindowsTestSuite.cpp
|
src/WindowsTestSuite.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
POCO_SOURCES_AUTO_PLAT( TEST_SRCS OFF
|
POCO_SOURCES_AUTO_PLAT(TEST_SRCS OFF
|
||||||
src/WinDriver.cpp
|
src/WinDriver.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
POCO_SOURCES_AUTO_PLAT( TEST_SRCS WINCE
|
POCO_SOURCES_AUTO_PLAT(TEST_SRCS WINCE
|
||||||
src/WinCEDriver.cpp
|
src/WinCEDriver.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
add_executable(Util-testrunner ${TEST_SRCS} )
|
add_executable(Util-testrunner ${TEST_SRCS})
|
||||||
if(ANDROID)
|
if(ANDROID)
|
||||||
add_test(NAME Util WORKING_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
|
add_test(
|
||||||
COMMAND ${CMAKE_COMMAND} -DANDROID_NDK=${ANDROID_NDK} -DLIBRARY_DIR=${CMAKE_BINARY_DIR}/lib -DUNITTEST=${CMAKE_BINARY_DIR}/bin/Util-testrunner -DTEST_PARAMETER=-all -P ${CMAKE_SOURCE_DIR}/cmake/ExecuteOnAndroid.cmake)
|
NAME Util
|
||||||
|
WORKING_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
|
||||||
|
COMMAND ${CMAKE_COMMAND} -DANDROID_NDK=${ANDROID_NDK} -DLIBRARY_DIR=${CMAKE_BINARY_DIR}/lib -DUNITTEST=${CMAKE_BINARY_DIR}/bin/Util-testrunner -DTEST_PARAMETER=-all -P ${CMAKE_SOURCE_DIR}/cmake/ExecuteOnAndroid.cmake
|
||||||
|
)
|
||||||
else()
|
else()
|
||||||
add_test(NAME Util WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND Util-testrunner -ignore ${CMAKE_SOURCE_DIR}/cppignore.lnx -all)
|
add_test(
|
||||||
set_tests_properties(Util PROPERTIES ENVIRONMENT POCO_BASE=${CMAKE_SOURCE_DIR})
|
NAME Util
|
||||||
|
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
||||||
|
COMMAND Util-testrunner -ignore ${CMAKE_SOURCE_DIR}/cppignore.lnx -all
|
||||||
|
)
|
||||||
|
set_tests_properties(Util PROPERTIES ENVIRONMENT POCO_BASE=${CMAKE_SOURCE_DIR})
|
||||||
endif()
|
endif()
|
||||||
target_link_libraries(Util-testrunner PUBLIC Poco::Util Poco::JSON Poco::XML CppUnit)
|
target_link_libraries(Util-testrunner PUBLIC Poco::Util Poco::JSON Poco::XML CppUnit)
|
||||||
|
@ -5,51 +5,51 @@ set(EXPAT_CPP "${CMAKE_CURRENT_SOURCE_DIR}/src/xmlparse.cpp")
|
|||||||
# Sources
|
# Sources
|
||||||
file(GLOB SRCS_G "src/*.cpp")
|
file(GLOB SRCS_G "src/*.cpp")
|
||||||
list(REMOVE_ITEM SRCS_G ${EXPAT_CPP})
|
list(REMOVE_ITEM SRCS_G ${EXPAT_CPP})
|
||||||
POCO_SOURCES_AUTO( SRCS ${SRCS_G})
|
POCO_SOURCES_AUTO(SRCS ${SRCS_G})
|
||||||
|
|
||||||
# Headers
|
# Headers
|
||||||
file(GLOB_RECURSE HDRS_G "include/*.h" )
|
file(GLOB_RECURSE HDRS_G "include/*.h")
|
||||||
POCO_HEADERS_AUTO( SRCS ${HDRS_G})
|
POCO_HEADERS_AUTO(SRCS ${HDRS_G})
|
||||||
|
|
||||||
# Version Resource
|
# Version Resource
|
||||||
if(MSVC AND BUILD_SHARED_LIBS)
|
if(MSVC AND BUILD_SHARED_LIBS)
|
||||||
source_group("Resources" FILES ${PROJECT_SOURCE_DIR}/DLLVersion.rc)
|
source_group("Resources" FILES ${PROJECT_SOURCE_DIR}/DLLVersion.rc)
|
||||||
list(APPEND SRCS ${PROJECT_SOURCE_DIR}/DLLVersion.rc)
|
list(APPEND SRCS ${PROJECT_SOURCE_DIR}/DLLVersion.rc)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# If POCO_UNBUNDLED is enabled we try to find the required packages
|
# If POCO_UNBUNDLED is enabled we try to find the required packages
|
||||||
# The configuration will fail if the packages are not found
|
# The configuration will fail if the packages are not found
|
||||||
if (POCO_UNBUNDLED)
|
if(POCO_UNBUNDLED)
|
||||||
find_package(EXPAT REQUIRED)
|
find_package(EXPAT REQUIRED)
|
||||||
else()
|
else()
|
||||||
POCO_SOURCES( SRCS expat
|
POCO_SOURCES(SRCS expat
|
||||||
src/xmlparse.cpp
|
src/xmlparse.cpp
|
||||||
src/xmlrole.c
|
src/xmlrole.c
|
||||||
src/xmltok.c
|
src/xmltok.c
|
||||||
src/xmltok_impl.c
|
src/xmltok_impl.c
|
||||||
src/xmltok_ns.c
|
src/xmltok_ns.c
|
||||||
)
|
)
|
||||||
endif (POCO_UNBUNDLED)
|
endif(POCO_UNBUNDLED)
|
||||||
|
|
||||||
add_library(XML ${SRCS} )
|
add_library(XML ${SRCS})
|
||||||
|
|
||||||
add_library(Poco::XML ALIAS XML)
|
add_library(Poco::XML ALIAS XML)
|
||||||
set_target_properties( XML
|
set_target_properties(XML
|
||||||
PROPERTIES
|
PROPERTIES
|
||||||
VERSION ${SHARED_LIBRARY_VERSION} SOVERSION ${SHARED_LIBRARY_VERSION}
|
VERSION ${SHARED_LIBRARY_VERSION} SOVERSION ${SHARED_LIBRARY_VERSION}
|
||||||
OUTPUT_NAME PocoXML
|
OUTPUT_NAME PocoXML
|
||||||
DEFINE_SYMBOL XML_EXPORTS
|
DEFINE_SYMBOL XML_EXPORTS
|
||||||
)
|
)
|
||||||
|
|
||||||
target_link_libraries(XML PUBLIC Poco::Foundation)
|
target_link_libraries(XML PUBLIC Poco::Foundation)
|
||||||
target_include_directories(XML
|
target_include_directories(XML
|
||||||
PUBLIC
|
PUBLIC
|
||||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
|
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
|
||||||
$<INSTALL_INTERFACE:include>
|
$<INSTALL_INTERFACE:include>
|
||||||
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src
|
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src
|
||||||
)
|
)
|
||||||
|
|
||||||
if (POCO_UNBUNDLED)
|
if(POCO_UNBUNDLED)
|
||||||
target_link_libraries(XML PUBLIC EXPAT::EXPAT)
|
target_link_libraries(XML PUBLIC EXPAT::EXPAT)
|
||||||
target_compile_definitions(XML PUBLIC POCO_UNBUNDLED)
|
target_compile_definitions(XML PUBLIC POCO_UNBUNDLED)
|
||||||
else()
|
else()
|
||||||
@ -65,8 +65,8 @@ endif()
|
|||||||
POCO_INSTALL(XML)
|
POCO_INSTALL(XML)
|
||||||
POCO_GENERATE_PACKAGE(XML)
|
POCO_GENERATE_PACKAGE(XML)
|
||||||
|
|
||||||
if (ENABLE_TESTS)
|
if(ENABLE_TESTS)
|
||||||
add_subdirectory(samples)
|
add_subdirectory(samples)
|
||||||
add_subdirectory(testsuite)
|
add_subdirectory(testsuite)
|
||||||
endif ()
|
endif()
|
||||||
|
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
include(CMakeFindDependencyMacro)
|
include(CMakeFindDependencyMacro)
|
||||||
find_dependency(PocoFoundation)
|
find_dependency(PocoFoundation)
|
||||||
if(@POCO_UNBUNDLED@)
|
if(@POCO_UNBUNDLED@)
|
||||||
if(CMAKE_VERSION VERSION_LESS "3.10")
|
if(CMAKE_VERSION VERSION_LESS "3.10")
|
||||||
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/V39")
|
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/V39")
|
||||||
endif()
|
endif()
|
||||||
find_dependency(EXPAT REQUIRED)
|
find_dependency(EXPAT REQUIRED)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
include("${CMAKE_CURRENT_LIST_DIR}/PocoXMLTargets.cmake")
|
include("${CMAKE_CURRENT_LIST_DIR}/PocoXMLTargets.cmake")
|
||||||
|
@ -1,25 +1,32 @@
|
|||||||
# Sources
|
# Sources
|
||||||
file(GLOB SRCS_G "src/*.cpp")
|
file(GLOB SRCS_G "src/*.cpp")
|
||||||
POCO_SOURCES_AUTO( TEST_SRCS ${SRCS_G})
|
POCO_SOURCES_AUTO(TEST_SRCS ${SRCS_G})
|
||||||
|
|
||||||
# Headers
|
# Headers
|
||||||
file(GLOB_RECURSE HDRS_G "src/*.h" )
|
file(GLOB_RECURSE HDRS_G "src/*.h")
|
||||||
POCO_HEADERS_AUTO( TEST_SRCS ${HDRS_G})
|
POCO_HEADERS_AUTO(TEST_SRCS ${HDRS_G})
|
||||||
|
|
||||||
POCO_SOURCES_AUTO_PLAT( TEST_SRCS OFF
|
POCO_SOURCES_AUTO_PLAT(TEST_SRCS OFF
|
||||||
src/WinDriver.cpp
|
src/WinDriver.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
POCO_SOURCES_AUTO_PLAT( TEST_SRCS WINCE
|
POCO_SOURCES_AUTO_PLAT(TEST_SRCS WINCE
|
||||||
src/WinCEDriver.cpp
|
src/WinCEDriver.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
add_executable(XML-testrunner ${TEST_SRCS} )
|
add_executable(XML-testrunner ${TEST_SRCS})
|
||||||
if(ANDROID)
|
if(ANDROID)
|
||||||
add_test(NAME XML WORKING_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
|
add_test(
|
||||||
COMMAND ${CMAKE_COMMAND} -DANDROID_NDK=${ANDROID_NDK} -DLIBRARY_DIR=${CMAKE_BINARY_DIR}/lib -DUNITTEST=${CMAKE_BINARY_DIR}/bin/XML-testrunner -DTEST_PARAMETER=-all -P ${CMAKE_SOURCE_DIR}/cmake/ExecuteOnAndroid.cmake)
|
NAME XML
|
||||||
|
WORKING_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
|
||||||
|
COMMAND ${CMAKE_COMMAND} -DANDROID_NDK=${ANDROID_NDK} -DLIBRARY_DIR=${CMAKE_BINARY_DIR}/lib -DUNITTEST=${CMAKE_BINARY_DIR}/bin/XML-testrunner -DTEST_PARAMETER=-all -P ${CMAKE_SOURCE_DIR}/cmake/ExecuteOnAndroid.cmake
|
||||||
|
)
|
||||||
else()
|
else()
|
||||||
add_test(NAME XML WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND XML-testrunner -ignore ${CMAKE_SOURCE_DIR}/cppignore.lnx -all)
|
add_test(
|
||||||
set_tests_properties(XML PROPERTIES ENVIRONMENT POCO_BASE=${CMAKE_SOURCE_DIR})
|
NAME XML
|
||||||
|
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
||||||
|
COMMAND XML-testrunner -ignore ${CMAKE_SOURCE_DIR}/cppignore.lnx -all
|
||||||
|
)
|
||||||
|
set_tests_properties(XML PROPERTIES ENVIRONMENT POCO_BASE=${CMAKE_SOURCE_DIR})
|
||||||
endif()
|
endif()
|
||||||
target_link_libraries(XML-testrunner PUBLIC Poco::XML CppUnit)
|
target_link_libraries(XML-testrunner PUBLIC Poco::XML CppUnit)
|
||||||
|
@ -1,39 +1,39 @@
|
|||||||
# Sources
|
# Sources
|
||||||
file(GLOB SRCS_G "src/*.cpp")
|
file(GLOB SRCS_G "src/*.cpp")
|
||||||
POCO_SOURCES_AUTO( SRCS ${SRCS_G})
|
POCO_SOURCES_AUTO(SRCS ${SRCS_G})
|
||||||
|
|
||||||
# Headers
|
# Headers
|
||||||
file(GLOB_RECURSE HDRS_G "include/*.h" )
|
file(GLOB_RECURSE HDRS_G "include/*.h")
|
||||||
POCO_HEADERS_AUTO( SRCS ${HDRS_G})
|
POCO_HEADERS_AUTO(SRCS ${HDRS_G})
|
||||||
|
|
||||||
# Version Resource
|
# Version Resource
|
||||||
if(MSVC AND BUILD_SHARED_LIBS)
|
if(MSVC AND BUILD_SHARED_LIBS)
|
||||||
source_group("Resources" FILES ${PROJECT_SOURCE_DIR}/DLLVersion.rc)
|
source_group("Resources" FILES ${PROJECT_SOURCE_DIR}/DLLVersion.rc)
|
||||||
list(APPEND SRCS ${PROJECT_SOURCE_DIR}/DLLVersion.rc)
|
list(APPEND SRCS ${PROJECT_SOURCE_DIR}/DLLVersion.rc)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
add_library(Zip ${SRCS} )
|
add_library(Zip ${SRCS})
|
||||||
add_library(Poco::Zip ALIAS Zip)
|
add_library(Poco::Zip ALIAS Zip)
|
||||||
set_target_properties( Zip
|
set_target_properties(Zip
|
||||||
PROPERTIES
|
PROPERTIES
|
||||||
VERSION ${SHARED_LIBRARY_VERSION} SOVERSION ${SHARED_LIBRARY_VERSION}
|
VERSION ${SHARED_LIBRARY_VERSION} SOVERSION ${SHARED_LIBRARY_VERSION}
|
||||||
OUTPUT_NAME PocoZip
|
OUTPUT_NAME PocoZip
|
||||||
DEFINE_SYMBOL Zip_EXPORTS
|
DEFINE_SYMBOL Zip_EXPORTS
|
||||||
)
|
)
|
||||||
|
|
||||||
target_link_libraries(Zip PUBLIC Poco::Util Poco::XML)
|
target_link_libraries(Zip PUBLIC Poco::Util Poco::XML)
|
||||||
target_include_directories(Zip
|
target_include_directories(Zip
|
||||||
PUBLIC
|
PUBLIC
|
||||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
|
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
|
||||||
$<INSTALL_INTERFACE:include>
|
$<INSTALL_INTERFACE:include>
|
||||||
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src
|
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src
|
||||||
)
|
)
|
||||||
|
|
||||||
POCO_INSTALL(Zip)
|
POCO_INSTALL(Zip)
|
||||||
POCO_GENERATE_PACKAGE(Zip)
|
POCO_GENERATE_PACKAGE(Zip)
|
||||||
|
|
||||||
if (ENABLE_TESTS)
|
if(ENABLE_TESTS)
|
||||||
add_subdirectory(samples)
|
add_subdirectory(samples)
|
||||||
add_subdirectory(testsuite)
|
add_subdirectory(testsuite)
|
||||||
endif ()
|
endif()
|
||||||
|
|
||||||
|
@ -1,2 +1,2 @@
|
|||||||
add_subdirectory( zip )
|
add_subdirectory(zip)
|
||||||
add_subdirectory( unzip )
|
add_subdirectory(unzip)
|
||||||
|
@ -1,29 +1,36 @@
|
|||||||
# Sources
|
# Sources
|
||||||
file(GLOB SRCS_G "src/*.cpp")
|
file(GLOB SRCS_G "src/*.cpp")
|
||||||
POCO_SOURCES_AUTO( TEST_SRCS ${SRCS_G})
|
POCO_SOURCES_AUTO(TEST_SRCS ${SRCS_G})
|
||||||
|
|
||||||
# Headers
|
# Headers
|
||||||
file(GLOB_RECURSE HDRS_G "src/*.h" )
|
file(GLOB_RECURSE HDRS_G "src/*.h")
|
||||||
POCO_HEADERS_AUTO( TEST_SRCS ${HDRS_G})
|
POCO_HEADERS_AUTO(TEST_SRCS ${HDRS_G})
|
||||||
|
|
||||||
POCO_SOURCES_AUTO_PLAT( TEST_SRCS OFF
|
POCO_SOURCES_AUTO_PLAT(TEST_SRCS OFF
|
||||||
src/WinDriver.cpp
|
src/WinDriver.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
POCO_SOURCES_AUTO_PLAT( TEST_SRCS WINCE
|
POCO_SOURCES_AUTO_PLAT(TEST_SRCS WINCE
|
||||||
src/WinCEDriver.cpp
|
src/WinCEDriver.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
add_executable(Zip-testrunner ${TEST_SRCS} )
|
add_executable(Zip-testrunner ${TEST_SRCS})
|
||||||
if(ANDROID)
|
if(ANDROID)
|
||||||
add_test(NAME Zip WORKING_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
|
add_test(
|
||||||
COMMAND ${CMAKE_COMMAND} -DANDROID_NDK=${ANDROID_NDK} "-DTEST_FILES=${CMAKE_CURRENT_SOURCE_DIR}/data;" -DLIBRARY_DIR=${CMAKE_BINARY_DIR}/lib -DUNITTEST=${CMAKE_BINARY_DIR}/bin/Zip-testrunner -DTEST_PARAMETER=-all -P ${CMAKE_SOURCE_DIR}/cmake/ExecuteOnAndroid.cmake)
|
NAME Zip
|
||||||
|
WORKING_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
|
||||||
|
COMMAND ${CMAKE_COMMAND} -DANDROID_NDK=${ANDROID_NDK} "-DTEST_FILES=${CMAKE_CURRENT_SOURCE_DIR}/data;" -DLIBRARY_DIR=${CMAKE_BINARY_DIR}/lib -DUNITTEST=${CMAKE_BINARY_DIR}/bin/Zip-testrunner -DTEST_PARAMETER=-all -P ${CMAKE_SOURCE_DIR}/cmake/ExecuteOnAndroid.cmake
|
||||||
|
)
|
||||||
else()
|
else()
|
||||||
add_test(NAME Zip WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND Zip-testrunner -ignore ${CMAKE_SOURCE_DIR}/cppignore.lnx -all)
|
add_test(
|
||||||
set_tests_properties(Zip PROPERTIES ENVIRONMENT POCO_BASE=${CMAKE_SOURCE_DIR})
|
NAME Zip
|
||||||
# The test is run in the build directory. So the test data is copied there too
|
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND Zip-testrunner -ignore ${CMAKE_SOURCE_DIR}/cppignore.lnx -all
|
||||||
add_custom_command(TARGET Zip-testrunner POST_BUILD
|
)
|
||||||
COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/data ${CMAKE_CURRENT_BINARY_DIR}/data )
|
set_tests_properties(Zip PROPERTIES ENVIRONMENT POCO_BASE=${CMAKE_SOURCE_DIR})
|
||||||
|
# The test is run in the build directory. So the test data is copied there too
|
||||||
|
add_custom_command(
|
||||||
|
TARGET Zip-testrunner POST_BUILD
|
||||||
|
COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/data ${CMAKE_CURRENT_BINARY_DIR}/data
|
||||||
|
)
|
||||||
endif()
|
endif()
|
||||||
target_link_libraries(Zip-testrunner PUBLIC Poco::Zip Poco::Net CppUnit)
|
target_link_libraries(Zip-testrunner PUBLIC Poco::Zip Poco::Net CppUnit)
|
||||||
|
|
||||||
|
@ -31,7 +31,7 @@ if(MSVC)
|
|||||||
CMAKE_C_FLAGS
|
CMAKE_C_FLAGS
|
||||||
CMAKE_C_FLAGS_DEBUG
|
CMAKE_C_FLAGS_DEBUG
|
||||||
CMAKE_C_FLAGS_RELEASE
|
CMAKE_C_FLAGS_RELEASE
|
||||||
)
|
)
|
||||||
foreach(CompilerFlag ${CompilerFlags})
|
foreach(CompilerFlag ${CompilerFlags})
|
||||||
string(REPLACE "/MD" "/MT" ${CompilerFlag} "${${CompilerFlag}}")
|
string(REPLACE "/MD" "/MT" ${CompilerFlag} "${${CompilerFlag}}")
|
||||||
endforeach()
|
endforeach()
|
||||||
@ -42,7 +42,7 @@ if(MSVC)
|
|||||||
endif(POCO_MT)
|
endif(POCO_MT)
|
||||||
|
|
||||||
if (ENABLE_MSVC_MP)
|
if (ENABLE_MSVC_MP)
|
||||||
add_definitions(/MP)
|
add_definitions(/MP)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
else(MSVC)
|
else(MSVC)
|
||||||
@ -54,15 +54,15 @@ endif(MSVC)
|
|||||||
|
|
||||||
# Add a d postfix to the debug libraries
|
# Add a d postfix to the debug libraries
|
||||||
if(BUILD_SHARED_LIBS)
|
if(BUILD_SHARED_LIBS)
|
||||||
set(CMAKE_DEBUG_POSTFIX "d" CACHE STRING "Set Debug library postfix" FORCE)
|
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_RELEASE_POSTFIX "" CACHE STRING "Set Release library postfix" FORCE)
|
||||||
set(CMAKE_MINSIZEREL_POSTFIX "" CACHE STRING "Set MinSizeRel 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)
|
set(CMAKE_RELWITHDEBINFO_POSTFIX "" CACHE STRING "Set RelWithDebInfo library postfix" FORCE)
|
||||||
else(BUILD_SHARED_LIBS)
|
else(BUILD_SHARED_LIBS)
|
||||||
set(CMAKE_DEBUG_POSTFIX "${STATIC_POSTFIX}d" CACHE STRING "Set Debug library postfix" FORCE)
|
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_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_MINSIZEREL_POSTFIX "${STATIC_POSTFIX}" CACHE STRING "Set MinSizeRel library postfix" FORCE)
|
||||||
set(CMAKE_RELWITHDEBINFO_POSTFIX "${STATIC_POSTFIX}" CACHE STRING "Set RelWithDebInfo library postfix" FORCE)
|
set(CMAKE_RELWITHDEBINFO_POSTFIX "${STATIC_POSTFIX}" CACHE STRING "Set RelWithDebInfo library postfix" FORCE)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
|
|
||||||
if(EXISTS "$ENV{ANDROID_HOME}")
|
if(EXISTS "$ENV{ANDROID_HOME}")
|
||||||
set(ANDROID_SDK "$ENV{ANDROID_HOME}")
|
set(ANDROID_SDK "$ENV{ANDROID_HOME}")
|
||||||
else()
|
else()
|
||||||
set(ANDROID_SDK "${ANDROID_NDK}/..")
|
set(ANDROID_SDK "${ANDROID_NDK}/..")
|
||||||
endif()
|
endif()
|
||||||
message(STATUS "ANDROID_SDK path .... ${ANDROID_SDK}")
|
message(STATUS "ANDROID_SDK path .... ${ANDROID_SDK}")
|
||||||
get_filename_component(UNITTEST_FILENAME ${UNITTEST} NAME)
|
get_filename_component(UNITTEST_FILENAME ${UNITTEST} NAME)
|
||||||
@ -15,7 +15,7 @@ endforeach()
|
|||||||
message(STATUS "Push ignored.sh to android ...")
|
message(STATUS "Push ignored.sh to android ...")
|
||||||
execute_process(COMMAND ${ANDROID_SDK}/platform-tools/adb push ${CMAKE_CURRENT_LIST_DIR}/../travis/ignored.sh /data/local/tmp/ OUTPUT_QUIET)
|
execute_process(COMMAND ${ANDROID_SDK}/platform-tools/adb push ${CMAKE_CURRENT_LIST_DIR}/../travis/ignored.sh /data/local/tmp/ OUTPUT_QUIET)
|
||||||
message(STATUS "Push ${LIBRARY_DIR} to android ...")
|
message(STATUS "Push ${LIBRARY_DIR} to android ...")
|
||||||
execute_process(COMMAND ${ANDROID_SDK}/platform-tools/adb push ${LIBRARY_DIR} /data/local/tmp/ OUTPUT_QUIET)
|
execute_process(COMMAND ${ANDROID_SDK}/platform-tools/adb push ${LIBRARY_DIR} /data/local/tmp/ OUTPUT_QUIET)
|
||||||
message(STATUS "Push ${UNITTEST} to android ...")
|
message(STATUS "Push ${UNITTEST} to android ...")
|
||||||
execute_process(COMMAND ${ANDROID_SDK}/platform-tools/adb push ${UNITTEST} /data/local/tmp/ OUTPUT_QUIET)
|
execute_process(COMMAND ${ANDROID_SDK}/platform-tools/adb push ${UNITTEST} /data/local/tmp/ OUTPUT_QUIET)
|
||||||
message(STATUS "Execute ${UNITTEST_FILENAME} ${TEST_PARAMETER} on android ...")
|
message(STATUS "Execute ${UNITTEST_FILENAME} ${TEST_PARAMETER} on android ...")
|
||||||
@ -25,7 +25,7 @@ execute_process(
|
|||||||
OUTPUT_VARIABLE _OUT
|
OUTPUT_VARIABLE _OUT
|
||||||
ERROR_VARIABLE _ERR
|
ERROR_VARIABLE _ERR
|
||||||
)
|
)
|
||||||
|
|
||||||
if(_RESULT)
|
if(_RESULT)
|
||||||
execute_process(COMMAND ls -l ${UNITTEST})
|
execute_process(COMMAND ls -l ${UNITTEST})
|
||||||
execute_process(COMMAND ${ANDROID_SDK}/platform-tools/adb shell "ls -R /data/local/tmp")
|
execute_process(COMMAND ${ANDROID_SDK}/platform-tools/adb shell "ls -R /data/local/tmp")
|
||||||
|
@ -61,13 +61,13 @@ find_package_handle_standard_args(APR
|
|||||||
)
|
)
|
||||||
|
|
||||||
if(APR_FOUND)
|
if(APR_FOUND)
|
||||||
set(APR_LIBRARIES ${APR_LIBRARY})
|
set(APR_LIBRARIES ${APR_LIBRARY})
|
||||||
set(APR_INCLUDE_DIRS ${APR_INCLUDE_DIR})
|
set(APR_INCLUDE_DIRS ${APR_INCLUDE_DIR})
|
||||||
set(APR_DEFINITIONS ${PC_APR_CFLAGS_OTHER})
|
set(APR_DEFINITIONS ${PC_APR_CFLAGS_OTHER})
|
||||||
|
|
||||||
# Deprecated declarations.
|
# Deprecated declarations.
|
||||||
SET (NATIVE_APR_INCLUDE_PATH ${APR_INCLUDE_DIR} )
|
SET (NATIVE_APR_INCLUDE_PATH ${APR_INCLUDE_DIR} )
|
||||||
GET_FILENAME_COMPONENT (NATIVE_APR_LIB_PATH ${APR_LIBRARY} PATH)
|
GET_FILENAME_COMPONENT (NATIVE_APR_LIB_PATH ${APR_LIBRARY} PATH)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(APR_FOUND AND NOT TARGET Apache::Apr)
|
if(APR_FOUND AND NOT TARGET Apache::Apr)
|
||||||
@ -80,6 +80,6 @@ if(APR_FOUND AND NOT TARGET Apache::Apr)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
mark_as_advanced(
|
mark_as_advanced(
|
||||||
APR_LIBRARY
|
APR_LIBRARY
|
||||||
APR_INCLUDE_DIR
|
APR_INCLUDE_DIR
|
||||||
)
|
)
|
||||||
|
@ -33,10 +33,10 @@ find_path(APACHE2_INCLUDE_DIR httpd.h
|
|||||||
set(APACHE2_VERSION ${PC_APACHE2_VERSION})
|
set(APACHE2_VERSION ${PC_APACHE2_VERSION})
|
||||||
|
|
||||||
find_package_handle_standard_args(Apache2
|
find_package_handle_standard_args(Apache2
|
||||||
FOUND_VAR APACHE2_FOUND
|
FOUND_VAR APACHE2_FOUND
|
||||||
REQUIRED_VARS
|
REQUIRED_VARS
|
||||||
APACHE2_INCLUDE_DIR
|
APACHE2_INCLUDE_DIR
|
||||||
VERSION_VAR APACHE2_VERSION
|
VERSION_VAR APACHE2_VERSION
|
||||||
)
|
)
|
||||||
|
|
||||||
if(APACHE2_FOUND)
|
if(APACHE2_FOUND)
|
||||||
@ -45,5 +45,5 @@ if(APACHE2_FOUND)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
mark_as_advanced(
|
mark_as_advanced(
|
||||||
APACHE2_INCLUDE_DIR
|
APACHE2_INCLUDE_DIR
|
||||||
)
|
)
|
||||||
|
@ -76,33 +76,33 @@ set(PostgreSQL_KNOWN_VERSIONS ${PostgreSQL_ADDITIONAL_VERSIONS}
|
|||||||
"10" "9.6" "9.5" "9.4" "9.3" "9.2" "9.1" "9.0" "8.4" "8.3" "8.2" "8.1" "8.0")
|
"10" "9.6" "9.5" "9.4" "9.3" "9.2" "9.1" "9.0" "8.4" "8.3" "8.2" "8.1" "8.0")
|
||||||
|
|
||||||
# Define additional search paths for root directories.
|
# Define additional search paths for root directories.
|
||||||
set( PostgreSQL_ROOT_DIRECTORIES
|
set(PostgreSQL_ROOT_DIRECTORIES
|
||||||
ENV PostgreSQL_ROOT
|
ENV PostgreSQL_ROOT
|
||||||
${PostgreSQL_ROOT}
|
${PostgreSQL_ROOT}
|
||||||
${PostgreSQL_ROOT_DIR}
|
${PostgreSQL_ROOT_DIR}
|
||||||
)
|
)
|
||||||
foreach(suffix ${PostgreSQL_KNOWN_VERSIONS})
|
foreach(suffix ${PostgreSQL_KNOWN_VERSIONS})
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
list(APPEND PostgreSQL_LIBRARY_ADDITIONAL_SEARCH_SUFFIXES
|
list(APPEND PostgreSQL_LIBRARY_ADDITIONAL_SEARCH_SUFFIXES
|
||||||
"PostgreSQL/${suffix}/lib")
|
"PostgreSQL/${suffix}/lib")
|
||||||
list(APPEND PostgreSQL_INCLUDE_ADDITIONAL_SEARCH_SUFFIXES
|
list(APPEND PostgreSQL_INCLUDE_ADDITIONAL_SEARCH_SUFFIXES
|
||||||
"PostgreSQL/${suffix}/include")
|
"PostgreSQL/${suffix}/include")
|
||||||
list(APPEND PostgreSQL_TYPE_ADDITIONAL_SEARCH_SUFFIXES
|
list(APPEND PostgreSQL_TYPE_ADDITIONAL_SEARCH_SUFFIXES
|
||||||
"PostgreSQL/${suffix}/include/server")
|
"PostgreSQL/${suffix}/include/server")
|
||||||
endif()
|
endif()
|
||||||
if(UNIX)
|
if(UNIX)
|
||||||
list(APPEND PostgreSQL_LIBRARY_ADDITIONAL_SEARCH_SUFFIXES
|
list(APPEND PostgreSQL_LIBRARY_ADDITIONAL_SEARCH_SUFFIXES
|
||||||
"pgsql-${suffix}/lib")
|
"pgsql-${suffix}/lib")
|
||||||
list(APPEND PostgreSQL_INCLUDE_ADDITIONAL_SEARCH_SUFFIXES
|
list(APPEND PostgreSQL_INCLUDE_ADDITIONAL_SEARCH_SUFFIXES
|
||||||
"pgsql-${suffix}/include")
|
"pgsql-${suffix}/include")
|
||||||
list(APPEND PostgreSQL_TYPE_ADDITIONAL_SEARCH_SUFFIXES
|
list(APPEND PostgreSQL_TYPE_ADDITIONAL_SEARCH_SUFFIXES
|
||||||
"postgresql/${suffix}/server"
|
"postgresql/${suffix}/server"
|
||||||
"pgsql-${suffix}/include/server")
|
"pgsql-${suffix}/include/server")
|
||||||
endif()
|
endif()
|
||||||
endforeach()
|
endforeach()
|
||||||
|
|
||||||
if(UNIX)
|
if(UNIX)
|
||||||
list(APPEND PostgreSQL_ROOT_DIRECTORIES
|
list(APPEND PostgreSQL_ROOT_DIRECTORIES
|
||||||
"/usr")
|
"/usr")
|
||||||
list(APPEND PostgreSQL_INCLUDE_ADDITIONAL_SEARCH_SUFFIXES
|
list(APPEND PostgreSQL_INCLUDE_ADDITIONAL_SEARCH_SUFFIXES
|
||||||
"include/postgresql")
|
"include/postgresql")
|
||||||
@ -112,19 +112,19 @@ endif()
|
|||||||
# Look for an installation.
|
# Look for an installation.
|
||||||
#
|
#
|
||||||
find_path(PostgreSQL_INCLUDE_DIR
|
find_path(PostgreSQL_INCLUDE_DIR
|
||||||
NAMES libpq-fe.h
|
NAMES libpq-fe.h
|
||||||
HINTS
|
HINTS
|
||||||
${PostgreSQL_ROOT_INCLUDE_DIRS}
|
${PostgreSQL_ROOT_INCLUDE_DIRS}
|
||||||
PATHS
|
PATHS
|
||||||
# Look in other places.
|
# Look in other places.
|
||||||
${PostgreSQL_ROOT_DIRECTORIES}
|
${PostgreSQL_ROOT_DIRECTORIES}
|
||||||
PATH_SUFFIXES
|
PATH_SUFFIXES
|
||||||
pgsql
|
pgsql
|
||||||
postgresql
|
postgresql
|
||||||
include
|
include
|
||||||
${PostgreSQL_INCLUDE_ADDITIONAL_SEARCH_SUFFIXES}
|
${PostgreSQL_INCLUDE_ADDITIONAL_SEARCH_SUFFIXES}
|
||||||
# Help the user find it if we cannot.
|
# Help the user find it if we cannot.
|
||||||
DOC "The ${PostgreSQL_INCLUDE_DIR_MESSAGE}"
|
DOC "The ${PostgreSQL_INCLUDE_DIR_MESSAGE}"
|
||||||
)
|
)
|
||||||
|
|
||||||
# TODO(Bjoe) It is not needed to build an PostgreSQL client. Maybe create an issue on cmake project
|
# TODO(Bjoe) It is not needed to build an PostgreSQL client. Maybe create an issue on cmake project
|
||||||
@ -144,67 +144,69 @@ find_path(PostgreSQL_INCLUDE_DIR
|
|||||||
# )
|
# )
|
||||||
|
|
||||||
# The PostgreSQL library.
|
# The PostgreSQL library.
|
||||||
set (PostgreSQL_LIBRARY_TO_FIND pq)
|
set(PostgreSQL_LIBRARY_TO_FIND pq)
|
||||||
# Setting some more prefixes for the library
|
# Setting some more prefixes for the library
|
||||||
set (PostgreSQL_LIB_PREFIX "")
|
set(PostgreSQL_LIB_PREFIX "")
|
||||||
if ( WIN32 )
|
if(WIN32)
|
||||||
set (PostgreSQL_LIB_PREFIX ${PostgreSQL_LIB_PREFIX} "lib")
|
set(PostgreSQL_LIB_PREFIX ${PostgreSQL_LIB_PREFIX} "lib")
|
||||||
set (PostgreSQL_LIBRARY_TO_FIND ${PostgreSQL_LIB_PREFIX}${PostgreSQL_LIBRARY_TO_FIND})
|
set(PostgreSQL_LIBRARY_TO_FIND ${PostgreSQL_LIB_PREFIX}${PostgreSQL_LIBRARY_TO_FIND})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
find_library(PostgreSQL_LIBRARY
|
find_library(PostgreSQL_LIBRARY
|
||||||
NAMES ${PostgreSQL_LIBRARY_TO_FIND}
|
NAMES ${PostgreSQL_LIBRARY_TO_FIND}
|
||||||
HINTS
|
HINTS
|
||||||
${PostgreSQL_ROOT_LIBRARY_DIRS}
|
${PostgreSQL_ROOT_LIBRARY_DIRS}
|
||||||
PATHS
|
PATHS
|
||||||
${PostgreSQL_ROOT_DIRECTORIES}
|
${PostgreSQL_ROOT_DIRECTORIES}
|
||||||
PATH_SUFFIXES
|
PATH_SUFFIXES
|
||||||
lib
|
lib
|
||||||
${PostgreSQL_LIBRARY_ADDITIONAL_SEARCH_SUFFIXES}
|
${PostgreSQL_LIBRARY_ADDITIONAL_SEARCH_SUFFIXES}
|
||||||
# Help the user find it if we cannot.
|
# Help the user find it if we cannot.
|
||||||
DOC "The ${PostgreSQL_LIBRARY_DIR_MESSAGE}"
|
DOC "The ${PostgreSQL_LIBRARY_DIR_MESSAGE}"
|
||||||
)
|
)
|
||||||
get_filename_component(PostgreSQL_LIBRARY_DIR ${PostgreSQL_LIBRARY} PATH)
|
get_filename_component(PostgreSQL_LIBRARY_DIR ${PostgreSQL_LIBRARY} PATH)
|
||||||
|
|
||||||
if (PostgreSQL_INCLUDE_DIR)
|
if(PostgreSQL_INCLUDE_DIR)
|
||||||
# Some platforms include multiple pg_config.hs for multi-lib configurations
|
# Some platforms include multiple pg_config.hs for multi-lib configurations
|
||||||
# This is a temporary workaround. A better solution would be to compile
|
# This is a temporary workaround. A better solution would be to compile
|
||||||
# a dummy c file and extract the value of the symbol.
|
# a dummy c file and extract the value of the symbol.
|
||||||
file(GLOB _PG_CONFIG_HEADERS "${PostgreSQL_INCLUDE_DIR}/pg_config*.h")
|
file(GLOB _PG_CONFIG_HEADERS "${PostgreSQL_INCLUDE_DIR}/pg_config*.h")
|
||||||
foreach(_PG_CONFIG_HEADER ${_PG_CONFIG_HEADERS})
|
foreach(_PG_CONFIG_HEADER ${_PG_CONFIG_HEADERS})
|
||||||
if(EXISTS "${_PG_CONFIG_HEADER}")
|
if(EXISTS "${_PG_CONFIG_HEADER}")
|
||||||
file(STRINGS "${_PG_CONFIG_HEADER}" pgsql_version_str
|
file(STRINGS "${_PG_CONFIG_HEADER}" pgsql_version_str
|
||||||
REGEX "^#define[\t ]+PG_VERSION[\t ]+\".*\"")
|
REGEX "^#define[\t ]+PG_VERSION[\t ]+\".*\"")
|
||||||
if(pgsql_version_str)
|
if(pgsql_version_str)
|
||||||
string(REGEX REPLACE "^#define[\t ]+PG_VERSION[\t ]+\"([^\"]*)\".*"
|
string(REGEX REPLACE "^#define[\t ]+PG_VERSION[\t ]+\"([^\"]*)\".*"
|
||||||
"\\1" PostgreSQL_VERSION "${pgsql_version_str}")
|
"\\1" PostgreSQL_VERSION "${pgsql_version_str}")
|
||||||
break()
|
break()
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
endforeach()
|
endforeach()
|
||||||
unset(pgsql_version_str)
|
unset(pgsql_version_str)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Did we find anything?
|
# Did we find anything?
|
||||||
include(FindPackageHandleStandardArgs)
|
include(FindPackageHandleStandardArgs)
|
||||||
find_package_handle_standard_args(PostgreSQL
|
find_package_handle_standard_args(
|
||||||
REQUIRED_VARS PostgreSQL_LIBRARY PostgreSQL_INCLUDE_DIR #PostgreSQL_TYPE_INCLUDE_DIR
|
PostgreSQL
|
||||||
VERSION_VAR PostgreSQL_VERSION)
|
REQUIRED_VARS PostgreSQL_LIBRARY PostgreSQL_INCLUDE_DIR #PostgreSQL_TYPE_INCLUDE_DIR
|
||||||
|
VERSION_VAR PostgreSQL_VERSION
|
||||||
|
)
|
||||||
set(PostgreSQL_FOUND ${POSTGRESQL_FOUND})
|
set(PostgreSQL_FOUND ${POSTGRESQL_FOUND})
|
||||||
|
|
||||||
# Now try to get the include and library path.
|
# Now try to get the include and library path.
|
||||||
if(PostgreSQL_FOUND)
|
if(PostgreSQL_FOUND)
|
||||||
set(PostgreSQL_INCLUDE_DIRS ${PostgreSQL_INCLUDE_DIR} ) #${PostgreSQL_TYPE_INCLUDE_DIR} )
|
set(PostgreSQL_INCLUDE_DIRS ${PostgreSQL_INCLUDE_DIR} ) #${PostgreSQL_TYPE_INCLUDE_DIR} )
|
||||||
set(PostgreSQL_LIBRARY_DIRS ${PostgreSQL_LIBRARY_DIR} )
|
set(PostgreSQL_LIBRARY_DIRS ${PostgreSQL_LIBRARY_DIR} )
|
||||||
set(PostgreSQL_LIBRARIES ${PostgreSQL_LIBRARY})
|
set(PostgreSQL_LIBRARIES ${PostgreSQL_LIBRARY})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(PostgreSQL_FOUND AND NOT TARGET PostgreSQL::client)
|
if(PostgreSQL_FOUND AND NOT TARGET PostgreSQL::client)
|
||||||
add_library(PostgreSQL::client UNKNOWN IMPORTED)
|
add_library(PostgreSQL::client UNKNOWN IMPORTED)
|
||||||
set_target_properties(PostgreSQL::client PROPERTIES
|
set_target_properties(PostgreSQL::client PROPERTIES
|
||||||
IMPORTED_LOCATION "${PostgreSQL_LIBRARY}"
|
IMPORTED_LOCATION "${PostgreSQL_LIBRARY}"
|
||||||
INTERFACE_INCLUDE_DIRECTORIES "${PostgreSQL_INCLUDE_DIR}"
|
INTERFACE_INCLUDE_DIRECTORIES "${PostgreSQL_INCLUDE_DIR}"
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
mark_as_advanced(PostgreSQL_INCLUDE_DIR PostgreSQL_LIBRARY ) #PostgreSQL_TYPE_INCLUDE_DIR
|
mark_as_advanced(PostgreSQL_INCLUDE_DIR PostgreSQL_LIBRARY ) #PostgreSQL_TYPE_INCLUDE_DIR
|
||||||
|
@ -8,49 +8,49 @@
|
|||||||
|
|
||||||
# Find the Microsoft mc.exe message compiler
|
# Find the Microsoft mc.exe message compiler
|
||||||
#
|
#
|
||||||
# CMAKE_MC_COMPILER - where to find mc.exe
|
# CMAKE_MC_COMPILER - where to find mc.exe
|
||||||
if (WIN32)
|
if(WIN32)
|
||||||
# cmake has CMAKE_RC_COMPILER, but no message compiler
|
# cmake has CMAKE_RC_COMPILER, but no message compiler
|
||||||
if ("${CMAKE_GENERATOR}" MATCHES "Visual Studio")
|
if("${CMAKE_GENERATOR}" MATCHES "Visual Studio")
|
||||||
# this path is only present for 2008+, but we currently require PATH to
|
# this path is only present for 2008+, but we currently require PATH to
|
||||||
# be set up anyway
|
# be set up anyway
|
||||||
get_filename_component(sdk_dir "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Microsoft SDKs\\Windows;CurrentInstallFolder]" REALPATH)
|
get_filename_component(sdk_dir "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Microsoft SDKs\\Windows;CurrentInstallFolder]" REALPATH)
|
||||||
get_filename_component(kit_dir "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows Kits\\Installed Roots;KitsRoot]" REALPATH)
|
get_filename_component(kit_dir "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows Kits\\Installed Roots;KitsRoot]" REALPATH)
|
||||||
get_filename_component(kit81_dir "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows Kits\\Installed Roots;KitsRoot81]" REALPATH)
|
get_filename_component(kit81_dir "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows Kits\\Installed Roots;KitsRoot81]" REALPATH)
|
||||||
get_filename_component(kit10_dir "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows Kits\\Installed Roots;KitsRoot10]" REALPATH)
|
get_filename_component(kit10_dir "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows Kits\\Installed Roots;KitsRoot10]" REALPATH)
|
||||||
get_filename_component(kit10wow_dir "[HKEY_LOCAL_MACHINE\\SOFTWARE\\WOW6432Node\\Microsoft\\Windows Kits\\Installed Roots;KitsRoot10]" REALPATH)
|
get_filename_component(kit10wow_dir "[HKEY_LOCAL_MACHINE\\SOFTWARE\\WOW6432Node\\Microsoft\\Windows Kits\\Installed Roots;KitsRoot10]" REALPATH)
|
||||||
file(GLOB kit10_list ${kit10_dir}/bin/10.* ${kit10wow_dir}/bin/10.*)
|
file(GLOB kit10_list ${kit10_dir}/bin/10.* ${kit10wow_dir}/bin/10.*)
|
||||||
if (X64)
|
if(X64)
|
||||||
set(sdk_bindir "${sdk_dir}/bin/x64")
|
set(sdk_bindir "${sdk_dir}/bin/x64")
|
||||||
set(kit_bindir "${kit_dir}/bin/x64")
|
set(kit_bindir "${kit_dir}/bin/x64")
|
||||||
set(kit81_bindir "${kit81_dir}/bin/x64")
|
set(kit81_bindir "${kit81_dir}/bin/x64")
|
||||||
foreach (tmp_elem ${kit10_list})
|
foreach(tmp_elem ${kit10_list})
|
||||||
if (IS_DIRECTORY ${tmp_elem})
|
if(IS_DIRECTORY ${tmp_elem})
|
||||||
list(APPEND kit10_bindir "${tmp_elem}/x64")
|
list(APPEND kit10_bindir "${tmp_elem}/x64")
|
||||||
endif()
|
endif()
|
||||||
endforeach()
|
endforeach()
|
||||||
else (X64)
|
else(X64)
|
||||||
set(sdk_bindir "${sdk_dir}/bin")
|
set(sdk_bindir "${sdk_dir}/bin")
|
||||||
set(kit_bindir "${kit_dir}/bin/x86")
|
set(kit_bindir "${kit_dir}/bin/x86")
|
||||||
set(kit81_bindir "${kit81_dir}/bin/x86")
|
set(kit81_bindir "${kit81_dir}/bin/x86")
|
||||||
foreach (tmp_elem ${kit10_list})
|
foreach(tmp_elem ${kit10_list})
|
||||||
if (IS_DIRECTORY ${tmp_elem})
|
if(IS_DIRECTORY ${tmp_elem})
|
||||||
list(APPEND kit10_bindir "${tmp_elem}/x86")
|
list(APPEND kit10_bindir "${tmp_elem}/x86")
|
||||||
endif()
|
endif()
|
||||||
endforeach()
|
endforeach()
|
||||||
endif (X64)
|
endif(X64)
|
||||||
endif ()
|
endif()
|
||||||
find_program(CMAKE_MC_COMPILER mc.exe HINTS "${sdk_bindir}" "${kit_bindir}" "${kit81_bindir}" ${kit10_bindir}
|
find_program(CMAKE_MC_COMPILER mc.exe HINTS "${sdk_bindir}" "${kit_bindir}" "${kit81_bindir}" ${kit10_bindir}
|
||||||
DOC "path to message compiler")
|
DOC "path to message compiler")
|
||||||
if (NOT CMAKE_MC_COMPILER)
|
if(NOT CMAKE_MC_COMPILER)
|
||||||
message(FATAL_ERROR "message compiler not found: required to build")
|
message(FATAL_ERROR "message compiler not found: required to build")
|
||||||
endif (NOT CMAKE_MC_COMPILER)
|
endif(NOT CMAKE_MC_COMPILER)
|
||||||
message(STATUS "Found message compiler: ${CMAKE_MC_COMPILER}")
|
message(STATUS "Found message compiler: ${CMAKE_MC_COMPILER}")
|
||||||
mark_as_advanced(CMAKE_MC_COMPILER)
|
mark_as_advanced(CMAKE_MC_COMPILER)
|
||||||
endif(WIN32)
|
endif(WIN32)
|
||||||
|
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Macros for Source file management
|
# Macros for Source file management
|
||||||
#
|
#
|
||||||
# POCO_SOURCES_PLAT - Adds a list of files to the sources of a components
|
# POCO_SOURCES_PLAT - Adds a list of files to the sources of a components
|
||||||
# Usage: POCO_SOURCES_PLAT( out name platform sources)
|
# Usage: POCO_SOURCES_PLAT( out name platform sources)
|
||||||
@ -98,11 +98,10 @@ endif(WIN32)
|
|||||||
# Example: POCO_MESSAGES( HDRS Foundation include/Poco/Foundation.mc )
|
# Example: POCO_MESSAGES( HDRS Foundation include/Poco/Foundation.mc )
|
||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
macro(POCO_SOURCES_PLAT out name platform)
|
macro(POCO_SOURCES_PLAT out name platform)
|
||||||
source_group("${name}\\Source Files" FILES ${ARGN})
|
source_group("${name}\\Source Files" FILES ${ARGN})
|
||||||
list(APPEND ${out} ${ARGN})
|
list(APPEND ${out} ${ARGN})
|
||||||
if(NOT (${platform}))
|
if(NOT(${platform}))
|
||||||
set_source_files_properties(${ARGN} PROPERTIES HEADER_FILE_ONLY TRUE)
|
set_source_files_properties(${ARGN} PROPERTIES HEADER_FILE_ONLY TRUE)
|
||||||
endif()
|
endif()
|
||||||
endmacro()
|
endmacro()
|
||||||
@ -116,8 +115,7 @@ macro(POCO_SOURCES_AUTO out)
|
|||||||
endmacro()
|
endmacro()
|
||||||
|
|
||||||
macro(POCO_SOURCES_AUTO_PLAT out platform)
|
macro(POCO_SOURCES_AUTO_PLAT out platform)
|
||||||
foreach( f ${ARGN})
|
foreach(f ${ARGN})
|
||||||
|
|
||||||
get_filename_component(fname ${f} NAME)
|
get_filename_component(fname ${f} NAME)
|
||||||
|
|
||||||
# Read the package name from the source file
|
# Read the package name from the source file
|
||||||
@ -140,10 +138,8 @@ macro(POCO_SOURCES_AUTO_PLAT out platform)
|
|||||||
endforeach()
|
endforeach()
|
||||||
endmacro()
|
endmacro()
|
||||||
|
|
||||||
|
|
||||||
macro(POCO_HEADERS_AUTO out)
|
macro(POCO_HEADERS_AUTO out)
|
||||||
foreach( f ${ARGN})
|
foreach(f ${ARGN})
|
||||||
|
|
||||||
get_filename_component(fname ${f} NAME)
|
get_filename_component(fname ${f} NAME)
|
||||||
|
|
||||||
# Read the package name from the source file
|
# Read the package name from the source file
|
||||||
@ -165,9 +161,8 @@ macro(POCO_HEADERS out name)
|
|||||||
list(APPEND ${out} ${ARGN})
|
list(APPEND ${out} ${ARGN})
|
||||||
endmacro()
|
endmacro()
|
||||||
|
|
||||||
|
|
||||||
macro(POCO_MESSAGES out name)
|
macro(POCO_MESSAGES out name)
|
||||||
if (WIN32)
|
if(WIN32)
|
||||||
foreach(msg ${ARGN})
|
foreach(msg ${ARGN})
|
||||||
get_filename_component(msg_name ${msg} NAME)
|
get_filename_component(msg_name ${msg} NAME)
|
||||||
get_filename_component(msg_path ${msg} ABSOLUTE)
|
get_filename_component(msg_path ${msg} ABSOLUTE)
|
||||||
@ -196,10 +191,9 @@ macro(POCO_MESSAGES out name)
|
|||||||
source_group("${name}\\Message Files" FILES ${ARGN})
|
source_group("${name}\\Message Files" FILES ${ARGN})
|
||||||
list(APPEND ${out} ${ARGN})
|
list(APPEND ${out} ${ARGN})
|
||||||
|
|
||||||
endif (WIN32)
|
endif(WIN32)
|
||||||
endmacro()
|
endmacro()
|
||||||
|
|
||||||
|
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Macros for Package generation
|
# Macros for Package generation
|
||||||
#
|
#
|
||||||
@ -211,32 +205,32 @@ endmacro()
|
|||||||
macro(POCO_GENERATE_PACKAGE target_name)
|
macro(POCO_GENERATE_PACKAGE target_name)
|
||||||
include(CMakePackageConfigHelpers)
|
include(CMakePackageConfigHelpers)
|
||||||
write_basic_package_version_file(
|
write_basic_package_version_file(
|
||||||
"${CMAKE_BINARY_DIR}/${PROJECT_NAME}/${PROJECT_NAME}${target_name}ConfigVersion.cmake"
|
"${CMAKE_BINARY_DIR}/${PROJECT_NAME}/${PROJECT_NAME}${target_name}ConfigVersion.cmake"
|
||||||
VERSION ${PROJECT_VERSION}
|
VERSION ${PROJECT_VERSION}
|
||||||
COMPATIBILITY AnyNewerVersion
|
COMPATIBILITY AnyNewerVersion
|
||||||
)
|
)
|
||||||
if ("${CMAKE_VERSION}" VERSION_LESS "3.0.0")
|
if("${CMAKE_VERSION}" VERSION_LESS "3.0.0")
|
||||||
if (NOT EXISTS "${CMAKE_BINARY_DIR}/${PROJECT_NAME}/${PROJECT_NAME}${target_name}Targets.cmake")
|
if(NOT EXISTS "${CMAKE_BINARY_DIR}/${PROJECT_NAME}/${PROJECT_NAME}${target_name}Targets.cmake")
|
||||||
export(TARGETS "${target_name}" APPEND
|
export(TARGETS "${target_name}" APPEND
|
||||||
FILE "${CMAKE_BINARY_DIR}/${PROJECT_NAME}/${PROJECT_NAME}${target_name}Targets.cmake"
|
FILE "${CMAKE_BINARY_DIR}/${PROJECT_NAME}/${PROJECT_NAME}${target_name}Targets.cmake"
|
||||||
NAMESPACE "${PROJECT_NAME}::"
|
NAMESPACE "${PROJECT_NAME}::"
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
else()
|
||||||
|
export(EXPORT "${target_name}Targets"
|
||||||
|
FILE "${CMAKE_BINARY_DIR}/${PROJECT_NAME}/${PROJECT_NAME}${target_name}Targets.cmake"
|
||||||
|
NAMESPACE "${PROJECT_NAME}::"
|
||||||
)
|
)
|
||||||
endif ()
|
endif()
|
||||||
else ()
|
|
||||||
export(EXPORT "${target_name}Targets"
|
|
||||||
FILE "${CMAKE_BINARY_DIR}/${PROJECT_NAME}/${PROJECT_NAME}${target_name}Targets.cmake"
|
|
||||||
NAMESPACE "${PROJECT_NAME}::"
|
|
||||||
)
|
|
||||||
endif ()
|
|
||||||
configure_file("cmake/Poco${target_name}Config.cmake"
|
configure_file("cmake/Poco${target_name}Config.cmake"
|
||||||
"${CMAKE_BINARY_DIR}/${PROJECT_NAME}/${PROJECT_NAME}${target_name}Config.cmake"
|
"${CMAKE_BINARY_DIR}/${PROJECT_NAME}/${PROJECT_NAME}${target_name}Config.cmake"
|
||||||
@ONLY
|
@ONLY
|
||||||
)
|
)
|
||||||
|
|
||||||
# Set config script install location in a location that find_package() will
|
# Set config script install location in a location that find_package() will
|
||||||
# look for, which is different on MS Windows than for UNIX
|
# look for, which is different on MS Windows than for UNIX
|
||||||
# Note: also set in root CMakeLists.txt
|
# Note: also set in root CMakeLists.txt
|
||||||
if (WIN32)
|
if(WIN32)
|
||||||
set(PocoConfigPackageLocation "cmake")
|
set(PocoConfigPackageLocation "cmake")
|
||||||
else()
|
else()
|
||||||
set(PocoConfigPackageLocation "lib${LIB_SUFFIX}/cmake/${PROJECT_NAME}")
|
set(PocoConfigPackageLocation "lib${LIB_SUFFIX}/cmake/${PROJECT_NAME}")
|
||||||
@ -247,7 +241,7 @@ install(
|
|||||||
FILE "${PROJECT_NAME}${target_name}Targets.cmake"
|
FILE "${PROJECT_NAME}${target_name}Targets.cmake"
|
||||||
NAMESPACE "${PROJECT_NAME}::"
|
NAMESPACE "${PROJECT_NAME}::"
|
||||||
DESTINATION "${PocoConfigPackageLocation}"
|
DESTINATION "${PocoConfigPackageLocation}"
|
||||||
)
|
)
|
||||||
|
|
||||||
install(
|
install(
|
||||||
FILES
|
FILES
|
||||||
@ -255,7 +249,7 @@ install(
|
|||||||
"${CMAKE_BINARY_DIR}/${PROJECT_NAME}/${PROJECT_NAME}${target_name}ConfigVersion.cmake"
|
"${CMAKE_BINARY_DIR}/${PROJECT_NAME}/${PROJECT_NAME}${target_name}ConfigVersion.cmake"
|
||||||
DESTINATION "${PocoConfigPackageLocation}"
|
DESTINATION "${PocoConfigPackageLocation}"
|
||||||
COMPONENT Devel
|
COMPONENT Devel
|
||||||
)
|
)
|
||||||
|
|
||||||
endmacro()
|
endmacro()
|
||||||
|
|
||||||
@ -273,7 +267,7 @@ install(
|
|||||||
DESTINATION include
|
DESTINATION include
|
||||||
COMPONENT Devel
|
COMPONENT Devel
|
||||||
PATTERN ".svn" EXCLUDE
|
PATTERN ".svn" EXCLUDE
|
||||||
)
|
)
|
||||||
|
|
||||||
install(
|
install(
|
||||||
TARGETS "${target_name}" EXPORT "${target_name}Targets"
|
TARGETS "${target_name}" EXPORT "${target_name}Targets"
|
||||||
@ -281,11 +275,11 @@ install(
|
|||||||
ARCHIVE DESTINATION lib${LIB_SUFFIX}
|
ARCHIVE DESTINATION lib${LIB_SUFFIX}
|
||||||
RUNTIME DESTINATION bin
|
RUNTIME DESTINATION bin
|
||||||
INCLUDES DESTINATION include
|
INCLUDES DESTINATION include
|
||||||
)
|
)
|
||||||
|
|
||||||
if (MSVC)
|
if(MSVC)
|
||||||
# install the targets pdb
|
# install the targets pdb
|
||||||
POCO_INSTALL_PDB(${target_name})
|
POCO_INSTALL_PDB(${target_name})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
endmacro()
|
endmacro()
|
||||||
@ -298,14 +292,13 @@ endmacro()
|
|||||||
#
|
#
|
||||||
# This is an internal macro meant only to be used by POCO_INSTALL.
|
# This is an internal macro meant only to be used by POCO_INSTALL.
|
||||||
macro(POCO_INSTALL_PDB target_name)
|
macro(POCO_INSTALL_PDB target_name)
|
||||||
|
|
||||||
get_property(type TARGET ${target_name} PROPERTY TYPE)
|
get_property(type TARGET ${target_name} PROPERTY TYPE)
|
||||||
if ("${type}" STREQUAL "SHARED_LIBRARY" OR "${type}" STREQUAL "EXECUTABLE")
|
if("${type}" STREQUAL "SHARED_LIBRARY" OR "${type}" STREQUAL "EXECUTABLE")
|
||||||
install(
|
install(
|
||||||
FILES $<TARGET_PDB_FILE:${target_name}>
|
FILES $<TARGET_PDB_FILE:${target_name}>
|
||||||
DESTINATION bin
|
DESTINATION bin
|
||||||
COMPONENT Devel
|
COMPONENT Devel
|
||||||
OPTIONAL
|
OPTIONAL
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
endmacro()
|
endmacro()
|
||||||
|
Loading…
Reference in New Issue
Block a user