make CMake files style (more) consistent

This commit is contained in:
Günter Obiltschnig 2020-02-14 11:07:32 +01:00
parent 4f59aef815
commit 4de9a21187
86 changed files with 1542 additions and 1412 deletions

View File

@ -1,10 +1,10 @@
# Sources
file(GLOB SRCS_G "src/*.cpp")
POCO_SOURCES_AUTO( SRCS ${SRCS_G})
POCO_SOURCES_AUTO(SRCS ${SRCS_G})
# Headers
file(GLOB_RECURSE HDRS_G "include/*.h" )
POCO_HEADERS_AUTO( SRCS ${HDRS_G})
file(GLOB_RECURSE HDRS_G "include/*.h")
POCO_HEADERS_AUTO(SRCS ${HDRS_G})
add_library(mod_poco SHARED ${SRCS})
set_target_properties(mod_poco
@ -18,9 +18,9 @@ target_include_directories(mod_poco
PRIVATE
${APACHE2_INCLUDE_DIRS}
${CMAKE_CURRENT_SOURCE_DIR}/src
)
)
target_link_libraries(mod_poco PUBLIC Poco::Util Poco::Net Apache::Apr Apache::Aprutil)
if (ENABLE_TESTS)
if(ENABLE_TESTS)
add_subdirectory(samples)
endif ()
endif()

View File

@ -1,2 +1,2 @@
add_subdirectory( FormServer )
add_subdirectory( TimeServer )
add_subdirectory(FormServer)
add_subdirectory(TimeServer)

View File

@ -4,7 +4,7 @@ project(Poco)
file(STRINGS "${PROJECT_SOURCE_DIR}/libversion" SHARED_LIBRARY_VERSION)
# 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_MINOR ${PACKAGE_VERSION})
string(REGEX REPLACE "[0-9]+\\.[0-9]+\\.([0-9]+).*" "\\1" CPACK_PACKAGE_VERSION_PATCH ${PACKAGE_VERSION})
@ -40,10 +40,10 @@ check_for_cxx14_compiler(CXX14_COMPILER)
# If a C++14 compiler is available, then set the appropriate flags
if(CXX14_COMPILER)
set (CMAKE_CXX_STANDARD 14)
set (CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
else()
message(FATAL_ERROR "Compiler does not support C++14." )
message(FATAL_ERROR "Compiler does not support C++14.")
endif()
if(NOT CMAKE_BUILD_TYPE)
@ -203,7 +203,7 @@ set(Poco_COMPONENTS "")
if(ENABLE_TESTS)
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)
if(ENABLE_ZIP)
@ -412,7 +412,8 @@ configure_file(
IMMEDIATE @ONLY)
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
@ -440,7 +441,7 @@ write_basic_package_version_file(
# Set config script install location in a location that find_package() will
# look for, which is different on MS Windows than for UNIX
# Note: also set in POCO_GENERATE_PACKAGE macro in cmake/PocoMacros.cmake
if (WIN32)
if(WIN32)
set(PocoConfigPackageLocation "cmake")
else()
set(PocoConfigPackageLocation "lib${LIB_SUFFIX}/cmake/${PROJECT_NAME}")

View File

@ -1,10 +1,10 @@
# Sources
file(GLOB SRCS_G "src/*.cpp")
POCO_SOURCES_AUTO( SRCS ${SRCS_G})
POCO_SOURCES_AUTO(SRCS ${SRCS_G})
# Headers
file(GLOB_RECURSE HDRS_G "include/*.h" )
POCO_HEADERS_AUTO( SRCS ${HDRS_G})
file(GLOB_RECURSE HDRS_G "include/*.h")
POCO_HEADERS_AUTO(SRCS ${HDRS_G})
# Version Resource
if(MSVC AND BUILD_SHARED_LIBS)
@ -19,7 +19,7 @@ set_target_properties(CppParser
VERSION ${SHARED_LIBRARY_VERSION} SOVERSION ${SHARED_LIBRARY_VERSION}
OUTPUT_NAME PocoCppParser
DEFINE_SYMBOL CppParser_EXPORTS
)
)
target_link_libraries(CppParser PUBLIC Poco::Foundation)
target_include_directories(CppParser
@ -27,12 +27,12 @@ target_include_directories(CppParser
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:include>
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src
)
)
POCO_INSTALL(CppParser)
POCO_GENERATE_PACKAGE(CppParser)
if (ENABLE_TESTS)
if(ENABLE_TESTS)
add_subdirectory(testsuite)
endif ()
endif()

View File

@ -1,21 +1,28 @@
# Sources
file(GLOB SRCS_G "src/*.cpp")
POCO_SOURCES_AUTO( TEST_SRCS ${SRCS_G})
POCO_SOURCES_AUTO(TEST_SRCS ${SRCS_G})
# Headers
file(GLOB_RECURSE HDRS_G "src/*.h" )
POCO_HEADERS_AUTO( TEST_SRCS ${HDRS_G})
file(GLOB_RECURSE HDRS_G "src/*.h")
POCO_HEADERS_AUTO(TEST_SRCS ${HDRS_G})
POCO_SOURCES_AUTO_PLAT( TEST_SRCS OFF
POCO_SOURCES_AUTO_PLAT(TEST_SRCS OFF
src/WinDriver.cpp
)
add_executable(CppParser-testrunner ${TEST_SRCS} )
add_executable(CppParser-testrunner ${TEST_SRCS})
if(ANDROID)
add_test(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)
add_test(
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()
add_test(NAME CppParser WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND CppParser-testrunner -ignore ${CMAKE_SOURCE_DIR}/cppignore.lnx -all)
add_test(
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()
target_link_libraries(CppParser-testrunner PUBLIC Poco::CppParser CppUnit)

View File

@ -1,10 +1,10 @@
# Sources
file(GLOB SRCS_G "src/*.cpp")
POCO_SOURCES_AUTO( SRCS ${SRCS_G})
POCO_SOURCES_AUTO(SRCS ${SRCS_G})
# Headers
file(GLOB_RECURSE HDRS_G "include/*.h" )
POCO_HEADERS_AUTO( SRCS ${HDRS_G})
file(GLOB_RECURSE HDRS_G "include/*.h")
POCO_HEADERS_AUTO(SRCS ${HDRS_G})
add_library(CppUnit ${SRCS})
add_library(Poco::CppUnit ALIAS CppUnit)
@ -13,7 +13,7 @@ set_target_properties(CppUnit
VERSION "1" SOVERSION "1"
OUTPUT_NAME CppUnit
DEFINE_SYMBOL CppUnit_EXPORTS
)
)
target_link_libraries(CppUnit PUBLIC Poco::Foundation)
target_include_directories(CppUnit
PUBLIC
@ -21,7 +21,7 @@ target_include_directories(CppUnit
$<INSTALL_INTERFACE:include>
PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}/src
)
)
if(NOT BUILD_SHARED_LIBS)
target_compile_definitions(CppUnit

View File

@ -1,10 +1,10 @@
# Sources
file(GLOB SRCS_G "src/*.cpp")
POCO_SOURCES_AUTO( SRCS ${SRCS_G})
POCO_SOURCES_AUTO(SRCS ${SRCS_G})
# Headers
file(GLOB_RECURSE HDRS_G "include/*.h" )
POCO_HEADERS_AUTO( SRCS ${HDRS_G})
file(GLOB_RECURSE HDRS_G "include/*.h")
POCO_HEADERS_AUTO(SRCS ${HDRS_G})
# Version Resource
if(MSVC AND BUILD_SHARED_LIBS)
@ -12,14 +12,14 @@ if(MSVC AND BUILD_SHARED_LIBS)
list(APPEND SRCS ${PROJECT_SOURCE_DIR}/DLLVersion.rc)
endif()
add_library(Crypto ${SRCS} )
add_library(Crypto ${SRCS})
add_library(Poco::Crypto ALIAS Crypto)
set_target_properties(Crypto
PROPERTIES
VERSION ${SHARED_LIBRARY_VERSION} SOVERSION ${SHARED_LIBRARY_VERSION}
OUTPUT_NAME PocoCrypto
DEFINE_SYMBOL Crypto_EXPORTS
)
)
target_link_libraries(Crypto PUBLIC Poco::Foundation OpenSSL::SSL OpenSSL::Crypto)
target_include_directories(Crypto
@ -28,7 +28,7 @@ target_include_directories(Crypto
$<INSTALL_INTERFACE:include>
PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}/src
)
)
if(MSVC AND POCO_DISABLE_INTERNAL_OPENSSL)
target_compile_definitions(Crypto PUBLIC POCO_EXTERNAL_OPENSSL)
@ -40,7 +40,7 @@ endif()
POCO_INSTALL(Crypto)
POCO_GENERATE_PACKAGE(Crypto)
if (ENABLE_TESTS)
if(ENABLE_TESTS)
add_subdirectory(samples)
add_subdirectory(testsuite)
endif ()
endif()

View File

@ -1 +1 @@
add_subdirectory( genrsakey )
add_subdirectory(genrsakey)

View File

@ -1,25 +1,32 @@
# Sources
file(GLOB SRCS_G "src/*.cpp")
POCO_SOURCES_AUTO( TEST_SRCS ${SRCS_G})
POCO_SOURCES_AUTO(TEST_SRCS ${SRCS_G})
# Headers
file(GLOB_RECURSE HDRS_G "src/*.h" )
POCO_HEADERS_AUTO( TEST_SRCS ${HDRS_G})
file(GLOB_RECURSE HDRS_G "src/*.h")
POCO_HEADERS_AUTO(TEST_SRCS ${HDRS_G})
POCO_SOURCES_AUTO_PLAT( TEST_SRCS OFF
POCO_SOURCES_AUTO_PLAT(TEST_SRCS OFF
src/WinDriver.cpp
)
POCO_SOURCES_AUTO_PLAT( TEST_SRCS WINCE
POCO_SOURCES_AUTO_PLAT(TEST_SRCS WINCE
src/WinCEDriver.cpp
)
add_executable(Crypto-testrunner ${TEST_SRCS} )
add_executable(Crypto-testrunner ${TEST_SRCS})
if(ANDROID)
add_test(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)
add_test(
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()
add_test(NAME Crypto WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND Crypto-testrunner -ignore ${CMAKE_SOURCE_DIR}/cppignore.lnx -all)
add_test(
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()
target_link_libraries(Crypto-testrunner PUBLIC Poco::NetSSL Poco::XML CppUnit)

View File

@ -1,10 +1,10 @@
# Sources
file(GLOB SRCS_G "src/*.cpp")
POCO_SOURCES_AUTO( SRCS ${SRCS_G})
POCO_SOURCES_AUTO(SRCS ${SRCS_G})
# Headers
file(GLOB_RECURSE HDRS_G "include/*.h" )
POCO_HEADERS_AUTO( SRCS ${HDRS_G})
file(GLOB_RECURSE HDRS_G "include/*.h")
POCO_HEADERS_AUTO(SRCS ${HDRS_G})
if(MSVC AND NOT(MSVC_VERSION LESS 1400))
set_source_files_properties(src/StatementImpl.cpp
@ -17,14 +17,14 @@ if(MSVC AND BUILD_SHARED_LIBS)
list(APPEND SRCS ${PROJECT_SOURCE_DIR}/DLLVersion.rc)
endif()
add_library(Data ${SRCS} )
add_library(Data ${SRCS})
add_library(Poco::Data ALIAS Data)
set_target_properties(Data
PROPERTIES
VERSION ${SHARED_LIBRARY_VERSION} SOVERSION ${SHARED_LIBRARY_VERSION}
OUTPUT_NAME PocoData
DEFINE_SYMBOL Data_EXPORTS
)
)
target_link_libraries(Data PUBLIC Poco::Foundation)
target_include_directories(Data
@ -32,7 +32,7 @@ target_include_directories(Data
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:include>
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src
)
)
POCO_INSTALL(Data)
POCO_GENERATE_PACKAGE(Data)
@ -40,33 +40,33 @@ POCO_GENERATE_PACKAGE(Data)
if(ENABLE_DATA_SQLITE)
# SQlite3 is built in any case
message(STATUS "SQLite Support Enabled")
add_subdirectory( SQLite )
add_subdirectory(SQLite)
else(ENABLE_DATA_SQLITE)
message(STATUS "SQLite Support Disabled")
endif()
if(MYSQL_FOUND AND ENABLE_DATA_MYSQL)
message(STATUS "MySQL Support Enabled")
add_subdirectory( MySQL )
add_subdirectory(MySQL)
else()
message(STATUS "MySQL Support Disabled")
endif()
if(POSTGRESQL_FOUND AND ENABLE_DATA_POSTGRESQL)
message(STATUS "PostgreSQL Support Enabled")
add_subdirectory( PostgreSQL )
add_subdirectory(PostgreSQL)
else()
message(STATUS "PostgreSQL Support Disabled")
endif()
if(ODBC_FOUND AND ENABLE_DATA_ODBC AND NOT WINCE)
message(STATUS "ODBC Support Enabled")
add_subdirectory( ODBC )
add_subdirectory(ODBC)
else()
message(STATUS "ODBC Support Disabled")
endif()
if (ENABLE_TESTS)
if(ENABLE_TESTS)
add_subdirectory(samples)
add_subdirectory(testsuite)
endif ()
endif()

View File

@ -1,10 +1,10 @@
# Sources
file(GLOB SRCS_G "src/*.cpp")
POCO_SOURCES_AUTO( MYSQL_SRCS ${SRCS_G})
POCO_SOURCES_AUTO(MYSQL_SRCS ${SRCS_G})
# Headers
file(GLOB_RECURSE HDRS_G "include/*.h" )
POCO_HEADERS_AUTO( MYSQL_SRCS ${HDRS_G})
file(GLOB_RECURSE HDRS_G "include/*.h")
POCO_HEADERS_AUTO(MYSQL_SRCS ${HDRS_G})
# Version Resource
if(MSVC AND BUILD_SHARED_LIBS)
@ -12,14 +12,14 @@ if(MSVC AND BUILD_SHARED_LIBS)
list(APPEND MYSQL_SRCS ${PROJECT_SOURCE_DIR}/DLLVersion.rc)
endif()
add_library(DataMySQL ${MYSQL_SRCS} )
add_library(DataMySQL ${MYSQL_SRCS})
add_library(Poco::DataMySQL ALIAS DataMySQL)
set_target_properties(DataMySQL
PROPERTIES
VERSION ${SHARED_LIBRARY_VERSION} SOVERSION ${SHARED_LIBRARY_VERSION}
OUTPUT_NAME PocoDataMySQL
DEFINE_SYMBOL MySQL_EXPORTS
)
)
target_link_libraries(DataMySQL PUBLIC Poco::Data MySQL::client)
target_include_directories(DataMySQL
@ -27,7 +27,7 @@ target_include_directories(DataMySQL
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:include>
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src
)
)
target_compile_definitions(DataMySQL PUBLIC THREADSAFE NO_TCL)
if(WIN32)
@ -37,6 +37,6 @@ endif()
POCO_INSTALL(DataMySQL)
POCO_GENERATE_PACKAGE(DataMySQL)
if (ENABLE_TESTS)
if(ENABLE_TESTS)
add_subdirectory(testsuite)
endif ()
endif()

View File

@ -1,21 +1,28 @@
# Sources
file(GLOB SRCS_G "src/*.cpp")
POCO_SOURCES_AUTO( TEST_SRCS ${SRCS_G})
POCO_SOURCES_AUTO(TEST_SRCS ${SRCS_G})
# Headers
file(GLOB_RECURSE HDRS_G "src/*.h" )
POCO_HEADERS_AUTO( TEST_SRCS ${HDRS_G})
file(GLOB_RECURSE HDRS_G "src/*.h")
POCO_HEADERS_AUTO(TEST_SRCS ${HDRS_G})
POCO_SOURCES_AUTO_PLAT( TEST_SRCS OFF
POCO_SOURCES_AUTO_PLAT(TEST_SRCS OFF
src/WinDriver.cpp
)
add_executable(DataMySQL-testrunner ${TEST_SRCS} )
add_executable(DataMySQL-testrunner ${TEST_SRCS})
if(ANDROID)
add_test(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)
add_test(
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()
add_test(NAME DataMySQL WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND DataMySQL-testrunner -ignore ${CMAKE_SOURCE_DIR}/cppignore.lnx -all)
add_test(
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()
target_link_libraries(DataMySQL-testrunner PUBLIC Poco::DataMySQL CppUnit)

View File

@ -1,10 +1,10 @@
# Sources
file(GLOB SRCS_G "src/*.cpp")
POCO_SOURCES_AUTO( ODBC_SRCS ${SRCS_G})
POCO_SOURCES_AUTO(ODBC_SRCS ${SRCS_G})
# Headers
file(GLOB_RECURSE HDRS_G "include/*.h" )
POCO_HEADERS_AUTO( ODBC_SRCS ${HDRS_G})
file(GLOB_RECURSE HDRS_G "include/*.h")
POCO_HEADERS_AUTO(ODBC_SRCS ${HDRS_G})
# Version Resource
if(MSVC AND BUILD_SHARED_LIBS)
@ -19,7 +19,7 @@ set_target_properties(DataODBC
VERSION ${SHARED_LIBRARY_VERSION} SOVERSION ${SHARED_LIBRARY_VERSION}
OUTPUT_NAME PocoDataODBC
DEFINE_SYMBOL ODBC_EXPORTS
)
)
target_link_libraries(DataODBC PUBLIC Poco::Data ODBC::ODBC)
target_include_directories(DataODBC
@ -27,12 +27,12 @@ target_include_directories(DataODBC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:include>
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src
)
)
target_compile_definitions(DataODBC PUBLIC THREADSAFE)
POCO_INSTALL(DataODBC)
POCO_GENERATE_PACKAGE(DataODBC)
if (ENABLE_TESTS)
if(ENABLE_TESTS)
add_subdirectory(testsuite)
endif ()
endif()

View File

@ -1,21 +1,28 @@
# Sources
file(GLOB SRCS_G "src/*.cpp")
POCO_SOURCES_AUTO( TEST_SRCS ${SRCS_G})
POCO_SOURCES_AUTO(TEST_SRCS ${SRCS_G})
# Headers
file(GLOB_RECURSE HDRS_G "src/*.h" )
POCO_HEADERS_AUTO( TEST_SRCS ${HDRS_G})
file(GLOB_RECURSE HDRS_G "src/*.h")
POCO_HEADERS_AUTO(TEST_SRCS ${HDRS_G})
POCO_SOURCES_AUTO_PLAT( TEST_SRCS OFF
POCO_SOURCES_AUTO_PLAT(TEST_SRCS OFF
src/WinDriver.cpp
)
add_executable(DataODBC-testrunner ${TEST_SRCS} )
add_executable(DataODBC-testrunner ${TEST_SRCS})
if(ANDROID)
add_test(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)
add_test(
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()
add_test(NAME DataODBC WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND DataODBC-testrunner -ignore ${CMAKE_SOURCE_DIR}/cppignore.lnx -all)
add_test(
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()
target_link_libraries(DataODBC-testrunner PUBLIC Poco::DataODBC CppUnit)

View File

@ -1,10 +1,10 @@
# Sources
file(GLOB SRCS_G "src/*.cpp")
POCO_SOURCES_AUTO( POSTGRESQL_SRCS ${SRCS_G})
POCO_SOURCES_AUTO(POSTGRESQL_SRCS ${SRCS_G})
# Headers
file(GLOB_RECURSE HDRS_G "include/*.h" )
POCO_HEADERS_AUTO( POSTGRESQL_SRCS ${HDRS_G})
file(GLOB_RECURSE HDRS_G "include/*.h")
POCO_HEADERS_AUTO(POSTGRESQL_SRCS ${HDRS_G})
# Version Resource
if(MSVC AND BUILD_SHARED_LIBS)
@ -12,14 +12,14 @@ if(MSVC AND BUILD_SHARED_LIBS)
list(APPEND POSTGRESQL_SRCS ${PROJECT_SOURCE_DIR}/DLLVersion.rc)
endif()
add_library(DataPostgreSQL ${POSTGRESQL_SRCS} )
add_library(DataPostgreSQL ${POSTGRESQL_SRCS})
add_library(Poco::DataPostgreSQL ALIAS DataPostgreSQL)
set_target_properties(DataPostgreSQL
PROPERTIES
VERSION ${SHARED_LIBRARY_VERSION} SOVERSION ${SHARED_LIBRARY_VERSION}
OUTPUT_NAME PocoDataPostgreSQL
DEFINE_SYMBOL PostgreSQL_EXPORTS
)
)
target_link_libraries(DataPostgreSQL PUBLIC Poco::Data PostgreSQL::client)
target_include_directories(DataPostgreSQL
@ -33,6 +33,6 @@ target_include_directories(DataPostgreSQL
POCO_INSTALL(DataPostgreSQL)
POCO_GENERATE_PACKAGE(DataPostgreSQL)
if (ENABLE_TESTS)
if(ENABLE_TESTS)
add_subdirectory(testsuite)
endif ()
endif()

View File

@ -1,16 +1,20 @@
# Sources
file(GLOB SRCS_G "src/*.cpp")
POCO_SOURCES_AUTO( TEST_SRCS ${SRCS_G})
POCO_SOURCES_AUTO(TEST_SRCS ${SRCS_G})
# Headers
file(GLOB_RECURSE HDRS_G "src/*.h" )
POCO_HEADERS_AUTO( TEST_SRCS ${HDRS_G})
file(GLOB_RECURSE HDRS_G "src/*.h")
POCO_HEADERS_AUTO(TEST_SRCS ${HDRS_G})
POCO_SOURCES_AUTO_PLAT( TEST_SRCS OFF
POCO_SOURCES_AUTO_PLAT(TEST_SRCS OFF
src/WinDriver.cpp
)
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_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
)
set_tests_properties(DataPostgreSQL PROPERTIES ENVIRONMENT POCO_BASE=${CMAKE_SOURCE_DIR})
target_link_libraries(DataPostgreSQL-testrunner PUBLIC Poco::DataPostgreSQL CppUnit)

View File

@ -1,20 +1,20 @@
# Sources
file(GLOB SRCS_G "src/*.cpp")
POCO_SOURCES_AUTO( SQLITE_SRCS ${SRCS_G})
POCO_SOURCES_AUTO(SQLITE_SRCS ${SRCS_G})
# Headers
file(GLOB_RECURSE HDRS_G "include/*.h" )
POCO_HEADERS_AUTO( SQLITE_SRCS ${HDRS_G})
file(GLOB_RECURSE HDRS_G "include/*.h")
POCO_HEADERS_AUTO(SQLITE_SRCS ${HDRS_G})
if (POCO_UNBUNDLED)
if(POCO_UNBUNDLED)
find_package(SQLite3 REQUIRED)
else()
# sqlite3
POCO_SOURCES( SQLITE_SRCS sqlite3
POCO_SOURCES(SQLITE_SRCS sqlite3
src/sqlite3.c
)
POCO_HEADERS( SQLITE_SRCS sqlite3
POCO_HEADERS(SQLITE_SRCS sqlite3
src/sqlite3.h
)
endif()
@ -25,7 +25,7 @@ if(MSVC AND BUILD_SHARED_LIBS)
list(APPEND SQLITE_SRCS ${PROJECT_SOURCE_DIR}/DLLVersion.rc)
endif()
add_library(DataSQLite ${SQLITE_SRCS} )
add_library(DataSQLite ${SQLITE_SRCS})
add_library(Poco::DataSQLite ALIAS DataSQLite)
set_target_properties(DataSQLite
@ -33,21 +33,21 @@ set_target_properties(DataSQLite
VERSION ${SHARED_LIBRARY_VERSION} SOVERSION ${SHARED_LIBRARY_VERSION}
OUTPUT_NAME PocoDataSQLite
DEFINE_SYMBOL SQLite_EXPORTS
)
)
target_link_libraries(DataSQLite PUBLIC Poco::Data)
target_include_directories(DataSQLite
PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:include>
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src
)
)
if(POCO_UNBUNDLED)
target_link_libraries(DataSQLite PUBLIC SQLite::SQLite3)
target_compile_definitions(DataSQLite PUBLIC
POCO_UNBUNDLED
SQLITE_THREADSAFE=1
)
)
else()
if(WINCE)
target_compile_definitions(DataSQLite PRIVATE SQLITE_MSVC_LOCALTIME_API)
@ -66,7 +66,6 @@ endif()
POCO_INSTALL(DataSQLite)
POCO_GENERATE_PACKAGE(DataSQLite)
if (ENABLE_TESTS)
if(ENABLE_TESTS)
add_subdirectory(testsuite)
endif ()
endif()

View File

@ -1,25 +1,32 @@
# Sources
file(GLOB SRCS_G "src/*.cpp")
POCO_SOURCES_AUTO( TEST_SRCS ${SRCS_G})
POCO_SOURCES_AUTO(TEST_SRCS ${SRCS_G})
# Headers
file(GLOB_RECURSE HDRS_G "src/*.h" )
POCO_HEADERS_AUTO( TEST_SRCS ${HDRS_G})
file(GLOB_RECURSE HDRS_G "src/*.h")
POCO_HEADERS_AUTO(TEST_SRCS ${HDRS_G})
POCO_SOURCES_AUTO_PLAT( TEST_SRCS OFF
POCO_SOURCES_AUTO_PLAT(TEST_SRCS OFF
src/WinDriver.cpp
)
POCO_SOURCES_AUTO_PLAT( TEST_SRCS WINCE
POCO_SOURCES_AUTO_PLAT(TEST_SRCS WINCE
src/WinCEDriver.cpp
)
add_executable(DataSQLite-testrunner ${TEST_SRCS} )
add_executable(DataSQLite-testrunner ${TEST_SRCS})
if(ANDROID)
add_test(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)
add_test(
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()
add_test(NAME DataSQLite WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND DataSQLite-testrunner -ignore ${CMAKE_SOURCE_DIR}/cppignore.lnx -all)
add_test(
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()
target_link_libraries(DataSQLite-testrunner PUBLIC Poco::DataSQLite CppUnit)

View File

@ -1,5 +1,5 @@
add_subdirectory( Binding )
add_subdirectory( RecordSet )
add_subdirectory( RowFormatter )
add_subdirectory( Tuple )
add_subdirectory( TypeHandler )
add_subdirectory(Binding)
add_subdirectory(RecordSet)
add_subdirectory(RowFormatter)
add_subdirectory(Tuple)
add_subdirectory(TypeHandler)

View File

@ -1,30 +1,37 @@
# Sources
file(GLOB SRCS_G "src/*.cpp")
POCO_SOURCES_AUTO( TEST_SRCS ${SRCS_G})
POCO_SOURCES_AUTO(TEST_SRCS ${SRCS_G})
# Headers
file(GLOB_RECURSE HDRS_G "src/*.h" )
POCO_HEADERS_AUTO( TEST_SRCS ${HDRS_G})
file(GLOB_RECURSE HDRS_G "src/*.h")
POCO_HEADERS_AUTO(TEST_SRCS ${HDRS_G})
POCO_SOURCES_AUTO_PLAT( TEST_SRCS OFF
POCO_SOURCES_AUTO_PLAT(TEST_SRCS OFF
src/WinDriver.cpp
)
POCO_SOURCES_AUTO_PLAT( TEST_SRCS WINCE
POCO_SOURCES_AUTO_PLAT(TEST_SRCS WINCE
src/WinCEDriver.cpp
)
#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
)
add_executable(Data-testrunner ${TEST_SRCS} )
add_executable(Data-testrunner ${TEST_SRCS})
if(ANDROID)
add_test(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)
add_test(
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()
add_test(NAME Data WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND Data-testrunner -ignore ${CMAKE_SOURCE_DIR}/cppignore.lnx -all)
add_test(
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()
target_link_libraries(Data-testrunner PUBLIC Poco::Data CppUnit)

View File

@ -1,10 +1,10 @@
# Sources
file(GLOB SRCS_G "src/*.cpp")
POCO_SOURCES( SRCS Encodings ${SRCS_G})
POCO_SOURCES(SRCS Encodings ${SRCS_G})
# Headers
file(GLOB_RECURSE HDRS_G "include/*.h" )
POCO_HEADERS( SRCS Encodings ${HDRS_G})
file(GLOB_RECURSE HDRS_G "include/*.h")
POCO_HEADERS(SRCS Encodings ${HDRS_G})
# Version Resource
if(MSVC AND BUILD_SHARED_LIBS)
@ -12,14 +12,14 @@ if(MSVC AND BUILD_SHARED_LIBS)
list(APPEND SRCS ${PROJECT_SOURCE_DIR}/DLLVersion.rc)
endif()
add_library(Encodings ${SRCS} )
add_library(Encodings ${SRCS})
add_library(Poco::Encodings ALIAS Encodings)
set_target_properties(Encodings
PROPERTIES
VERSION ${SHARED_LIBRARY_VERSION} SOVERSION ${SHARED_LIBRARY_VERSION}
OUTPUT_NAME PocoEncodings
DEFINE_SYMBOL Encodings_EXPORTS
)
)
target_link_libraries(Encodings PUBLIC Poco::Foundation)
target_include_directories(Encodings
@ -27,12 +27,12 @@ target_include_directories(Encodings
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:include>
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src
)
)
POCO_INSTALL(Encodings)
POCO_GENERATE_PACKAGE(Encodings)
if (ENABLE_TESTS)
if(ENABLE_TESTS)
add_subdirectory(samples)
add_subdirectory(testsuite)
endif ()
endif()

View File

@ -1,12 +1,12 @@
# Sources
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
PROPERTIES
OUTPUT_NAME tec
)
)
target_link_libraries(EncodingsCompiler PUBLIC Poco::Net Poco::Util)

View File

@ -1,25 +1,32 @@
# Sources
file(GLOB SRCS_G "src/*.cpp")
POCO_SOURCES_AUTO( TEST_SRCS ${SRCS_G})
POCO_SOURCES_AUTO(TEST_SRCS ${SRCS_G})
# Headers
file(GLOB_RECURSE HDRS_G "src/*.h" )
POCO_HEADERS_AUTO( TEST_SRCS ${HDRS_G})
file(GLOB_RECURSE HDRS_G "src/*.h")
POCO_HEADERS_AUTO(TEST_SRCS ${HDRS_G})
POCO_SOURCES_AUTO_PLAT( TEST_SRCS OFF
POCO_SOURCES_AUTO_PLAT(TEST_SRCS OFF
src/WinDriver.cpp
)
POCO_SOURCES_AUTO_PLAT( TEST_SRCS WINCE
POCO_SOURCES_AUTO_PLAT(TEST_SRCS WINCE
src/WinCEDriver.cpp
)
add_executable(Encodings-testrunner ${TEST_SRCS} )
add_executable(Encodings-testrunner ${TEST_SRCS})
if(ANDROID)
add_test(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)
add_test(
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()
add_test(NAME Encodings WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND Encodings-testrunner -ignore ${CMAKE_SOURCE_DIR}/cppignore.lnx -all)
add_test(
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()

View File

@ -1,23 +1,23 @@
# Sources
file(GLOB SRCS_G "src/*.cpp")
POCO_SOURCES_AUTO( SRCS ${SRCS_G})
POCO_SOURCES_AUTO(SRCS ${SRCS_G})
# Headers
file(GLOB_RECURSE HDRS_G "include/*.h" )
POCO_HEADERS_AUTO( SRCS ${HDRS_G})
file(GLOB_RECURSE HDRS_G "include/*.h")
POCO_HEADERS_AUTO(SRCS ${HDRS_G})
# Platform Specific
POCO_SOURCES_AUTO_PLAT( SRCS UNIX src/SyslogChannel.cpp )
POCO_HEADERS_AUTO( SRCS include/Poco/SyslogChannel.h )
POCO_SOURCES_AUTO_PLAT(SRCS UNIX src/SyslogChannel.cpp)
POCO_HEADERS_AUTO(SRCS include/Poco/SyslogChannel.h)
# For Windows CE we need to disable these
if(WINCE)
POCO_SOURCES_AUTO_PLAT( SRCS OFF
POCO_SOURCES_AUTO_PLAT(SRCS OFF
src/WindowsConsoleChannel.cpp
src/EventLogChannel.cpp
)
else()
POCO_SOURCES_AUTO_PLAT( SRCS WIN32
POCO_SOURCES_AUTO_PLAT(SRCS WIN32
src/WindowsConsoleChannel.cpp
src/EventLogChannel.cpp
)
@ -30,23 +30,23 @@ if(MSVC AND BUILD_SHARED_LIBS)
endif()
# 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
# The configuration will fail if the packages are not found
if (POCO_UNBUNDLED)
if(POCO_UNBUNDLED)
find_package(PCRE REQUIRED)
find_package(ZLIB REQUIRED)
#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_tables.c
)
else()
# pcre
POCO_SOURCES( SRCS pcre
POCO_SOURCES(SRCS pcre
src/pcre_config.c
src/pcre_byte_order.c
src/pcre_chartables.c
@ -71,12 +71,12 @@ else()
)
# zlib
POCO_HEADERS( SRCS zlib
POCO_HEADERS(SRCS zlib
include/Poco/zconf.h
include/Poco/zlib.h
)
POCO_SOURCES( SRCS zlib
POCO_SOURCES(SRCS zlib
src/adler32.c
src/compress.c
src/crc32.c
@ -88,7 +88,7 @@ else()
src/trees.c
src/zutil.c
)
endif (POCO_UNBUNDLED)
endif(POCO_UNBUNDLED)
add_library(Foundation ${SRCS})
@ -98,19 +98,19 @@ set_target_properties(Foundation
VERSION ${SHARED_LIBRARY_VERSION} SOVERSION ${SHARED_LIBRARY_VERSION}
OUTPUT_NAME PocoFoundation
DEFINE_SYMBOL Foundation_EXPORTS
)
)
if (POCO_UNBUNDLED)
if(POCO_UNBUNDLED)
target_link_libraries(Foundation PUBLIC Pcre::Pcre ZLIB::ZLIB)
target_compile_definitions(Foundation PUBLIC POCO_UNBUNDLED)
endif (POCO_UNBUNDLED)
endif(POCO_UNBUNDLED)
target_include_directories(Foundation
PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:include>
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src
)
)
target_compile_definitions(Foundation
PUBLIC
@ -140,17 +140,17 @@ if(WIN32)
target_link_libraries(Foundation PUBLIC iphlpapi)
endif()
if (CYGWIN)
if(CYGWIN)
target_compile_definitions(Foundation PUBLIC POCO_NO_FPENVIRONMENT POCO_NO_WSTRING _XOPEN_SOURCE=500 __BSD_VISIBLE)
else()
if (UNIX AND NOT ANDROID )
if(UNIX AND NOT ANDROID)
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_link_libraries(Foundation PUBLIC ${CMAKE_DL_LIBS})
else()
target_compile_definitions(Foundation PUBLIC _REENTRANT _THREAD_SAFE _LARGEFILE64_SOURCE _FILE_OFFSET_BITS=64)
if (QNX)
if(QNX)
target_compile_definitions(Foundation PUBLIC POCO_HAVE_FD_POLL)
target_link_libraries(Foundation PUBLIC m socket)
elseif("${CMAKE_SYSTEM_NAME}" STREQUAL "FreeBSD")
@ -163,11 +163,11 @@ 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)
endif(APPLE)
endif(UNIX AND NOT ANDROID)
endif(CYGWIN)
if (CMAKE_SYSTEM MATCHES "SunOS")
if(CMAKE_SYSTEM MATCHES "SunOS")
target_compile_definitions(Foundation
PUBLIC
POCO_OS_FAMILY_UNIX
@ -200,7 +200,7 @@ if(${CMAKE_CXX_COMPILER_ID} MATCHES "SunPro")
endif()
# iOS
if (IOS)
if(IOS)
target_compile_definitions(Foundation
PUBLIC
POCO_HAVE_IPv6
@ -212,7 +212,7 @@ if (IOS)
endif()
#Android
if (ANDROID)
if(ANDROID)
target_compile_definitions(Foundation
PUBLIC
POCO_NO_FPENVIRONMENT
@ -225,11 +225,10 @@ endif()
POCO_INSTALL(Foundation)
POCO_GENERATE_PACKAGE(Foundation)
if (ENABLE_TESTS)
if(ENABLE_TESTS)
if(NOT BUILD_SHARED_LIBS)
set_property(TARGET Foundation PROPERTY POSITION_INDEPENDENT_CODE ON) # This is needed to build TestLibrary.so as shared.
endif()
add_subdirectory(samples)
add_subdirectory(testsuite)
endif ()
endif()

View File

@ -1,2 +1,2 @@
add_executable(ActiveMethod src/ActiveMethod.cpp)
target_link_libraries(ActiveMethod PUBLIC Poco::Foundation )
target_link_libraries(ActiveMethod PUBLIC Poco::Foundation)

View File

@ -1,2 +1,2 @@
add_executable(Activity src/Activity.cpp)
target_link_libraries(Activity PUBLIC Poco::Foundation )
target_link_libraries(Activity PUBLIC Poco::Foundation)

View File

@ -1,2 +1,2 @@
add_executable(BinaryReaderWriter src/BinaryReaderWriter.cpp)
target_link_libraries(BinaryReaderWriter PUBLIC Poco::Foundation )
target_link_libraries(BinaryReaderWriter PUBLIC Poco::Foundation)

View File

@ -1,2 +1,2 @@
add_executable(LineEndingConverter src/LineEndingConverter.cpp)
target_link_libraries(LineEndingConverter PUBLIC Poco::Foundation )
target_link_libraries(LineEndingConverter PUBLIC Poco::Foundation)

View File

@ -1,2 +1,2 @@
add_executable(LogRotation src/LogRotation.cpp)
target_link_libraries(LogRotation PUBLIC Poco::Foundation )
target_link_libraries(LogRotation PUBLIC Poco::Foundation)

View File

@ -1,2 +1,2 @@
add_executable(Logger src/Logger.cpp)
target_link_libraries(Logger PUBLIC Poco::Foundation )
target_link_libraries(Logger PUBLIC Poco::Foundation)

View File

@ -1,2 +1,2 @@
add_executable(NotificationQueue src/NotificationQueue.cpp)
target_link_libraries(NotificationQueue PUBLIC Poco::Foundation )
target_link_libraries(NotificationQueue PUBLIC Poco::Foundation)

View File

@ -1,2 +1,2 @@
add_executable(Timer src/Timer.cpp)
target_link_libraries(Timer PUBLIC Poco::Foundation )
target_link_libraries(Timer PUBLIC Poco::Foundation)

View File

@ -1,2 +1,2 @@
add_executable(URI src/URI.cpp)
target_link_libraries(URI PUBLIC Poco::Foundation )
target_link_libraries(URI PUBLIC Poco::Foundation)

View File

@ -1,2 +1,2 @@
add_executable(base64decode src/base64decode.cpp)
target_link_libraries(base64decode PUBLIC Poco::Foundation )
target_link_libraries(base64decode PUBLIC Poco::Foundation)

View File

@ -1,2 +1,2 @@
add_executable(base64encode src/base64encode.cpp)
target_link_libraries(base64encode PUBLIC Poco::Foundation )
target_link_libraries(base64encode PUBLIC Poco::Foundation)

View File

@ -1,2 +1,2 @@
add_executable(deflate src/deflate.cpp)
target_link_libraries(deflate PUBLIC Poco::Foundation )
target_link_libraries(deflate PUBLIC Poco::Foundation)

View File

@ -1,2 +1,2 @@
add_executable(dir src/dir.cpp)
target_link_libraries(dir PUBLIC Poco::Foundation )
target_link_libraries(dir PUBLIC Poco::Foundation)

View File

@ -1,2 +1,2 @@
add_executable(grep src/grep.cpp)
target_link_libraries(grep PUBLIC Poco::Foundation )
target_link_libraries(grep PUBLIC Poco::Foundation)

View File

@ -1,2 +1,2 @@
add_executable(hmacmd5 src/hmacmd5.cpp)
target_link_libraries(hmacmd5 PUBLIC Poco::Foundation )
target_link_libraries(hmacmd5 PUBLIC Poco::Foundation)

View File

@ -1,2 +1,2 @@
add_executable(inflate src/inflate.cpp)
target_link_libraries(inflate PUBLIC Poco::Foundation )
target_link_libraries(inflate PUBLIC Poco::Foundation)

View File

@ -1,2 +1,2 @@
add_executable(md5 src/md5.cpp)
target_link_libraries(md5 PUBLIC Poco::Foundation )
target_link_libraries(md5 PUBLIC Poco::Foundation)

View File

@ -1,2 +1,2 @@
add_executable(uuidgen src/uuidgen.cpp)
target_link_libraries(uuidgen PUBLIC Poco::Foundation )
target_link_libraries(uuidgen PUBLIC Poco::Foundation)

View File

@ -9,56 +9,65 @@ file(GLOB SRCS_G_REMOVE
src/TestPlugin.cpp
)
list(REMOVE_ITEM SRCS_G ${SRCS_G_REMOVE})
POCO_SOURCES_AUTO( TEST_SRCS ${SRCS_G})
POCO_SOURCES_AUTO(TEST_SRCS ${SRCS_G})
# Headers
file(GLOB_RECURSE HDRS_G "src/*.h" )
POCO_HEADERS_AUTO( TEST_SRCS ${HDRS_G})
file(GLOB_RECURSE HDRS_G "src/*.h")
POCO_HEADERS_AUTO(TEST_SRCS ${HDRS_G})
# 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
)
POCO_SOURCES_AUTO_PLAT( TEST_SRCS WINCE
POCO_SOURCES_AUTO_PLAT(TEST_SRCS WINCE
src/WinCEDriver.cpp
)
add_executable(Foundation-testrunner ${TEST_SRCS} )
add_executable(Foundation-testrunner ${TEST_SRCS})
if(ANDROID)
add_test(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)
add_test(
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()
add_test(NAME Foundation WORKING_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY} COMMAND Foundation-testrunner -ignore ${CMAKE_SOURCE_DIR}/cppignore.lnx -all)
add_test(
NAME Foundation
WORKING_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
COMMAND Foundation-testrunner -ignore ${CMAKE_SOURCE_DIR}/cppignore.lnx -all
)
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
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 )
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()
target_link_libraries(Foundation-testrunner PUBLIC Poco::Foundation CppUnit )
target_link_libraries(Foundation-testrunner PUBLIC Poco::Foundation CppUnit)
if(UNIX AND NOT ANDROID)
target_link_libraries(Foundation-testrunner PUBLIC pthread)
endif(UNIX AND NOT ANDROID)
# TestApp
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")
else()
add_executable( TestApp src/TestApp.cpp )
add_executable(TestApp src/TestApp.cpp)
endif()
# 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} )
target_link_libraries( TestApp PUBLIC Poco::Foundation )
set_target_properties(TestApp PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
target_link_libraries(TestApp PUBLIC Poco::Foundation)
# 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.
# 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} )
target_link_libraries(TestLibrary PUBLIC Poco::Foundation )
set_target_properties(TestLibrary PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
target_link_libraries(TestLibrary PUBLIC Poco::Foundation)
add_dependencies(Foundation-testrunner TestApp TestLibrary)

View File

@ -1,10 +1,10 @@
# Sources
file(GLOB SRCS_G "src/*.cpp")
POCO_SOURCES_AUTO( SRCS ${SRCS_G})
POCO_SOURCES_AUTO(SRCS ${SRCS_G})
# Headers
file(GLOB_RECURSE HDRS_G "include/*.h" )
POCO_HEADERS_AUTO( SRCS ${HDRS_G})
file(GLOB_RECURSE HDRS_G "include/*.h")
POCO_HEADERS_AUTO(SRCS ${HDRS_G})
POCO_SOURCES(SRCS pdjson src/pdjson.c)
# Version Resource
@ -13,14 +13,14 @@ if(MSVC AND BUILD_SHARED_LIBS)
list(APPEND SRCS ${PROJECT_SOURCE_DIR}/DLLVersion.rc)
endif()
add_library(JSON ${SRCS} )
add_library(JSON ${SRCS})
add_library(Poco::JSON ALIAS JSON)
set_target_properties(JSON
PROPERTIES
VERSION ${SHARED_LIBRARY_VERSION} SOVERSION ${SHARED_LIBRARY_VERSION}
OUTPUT_NAME PocoJSON
DEFINE_SYMBOL JSON_EXPORTS
)
)
target_link_libraries(JSON PUBLIC Poco::Foundation)
target_include_directories(JSON
@ -28,7 +28,7 @@ target_include_directories(JSON
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:include>
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src
)
)
if(WIN32)
target_compile_definitions(JSON PRIVATE _CRT_SECURE_NO_WARNINGS)
@ -41,8 +41,7 @@ endif()
POCO_INSTALL(JSON)
POCO_GENERATE_PACKAGE(JSON)
if (ENABLE_TESTS)
if(ENABLE_TESTS)
add_subdirectory(samples)
add_subdirectory(testsuite)
endif ()
endif()

View File

@ -1 +1 @@
add_subdirectory( Benchmark )
add_subdirectory(Benchmark)

View File

@ -1,29 +1,37 @@
# Sources
file(GLOB SRCS_G "src/*.cpp")
POCO_SOURCES_AUTO( TEST_SRCS ${SRCS_G})
POCO_SOURCES_AUTO(TEST_SRCS ${SRCS_G})
# Headers
file(GLOB_RECURSE HDRS_G "src/*.h" )
POCO_HEADERS_AUTO( TEST_SRCS ${HDRS_G})
file(GLOB_RECURSE HDRS_G "src/*.h")
POCO_HEADERS_AUTO(TEST_SRCS ${HDRS_G})
POCO_SOURCES_AUTO_PLAT( TEST_SRCS OFF
POCO_SOURCES_AUTO_PLAT(TEST_SRCS OFF
src/WinDriver.cpp
)
POCO_SOURCES_AUTO_PLAT( TEST_SRCS WINCE
POCO_SOURCES_AUTO_PLAT(TEST_SRCS WINCE
src/WinCEDriver.cpp
)
add_executable(JSON-testrunner ${TEST_SRCS} )
add_executable(JSON-testrunner ${TEST_SRCS})
if(ANDROID)
add_test(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)
add_test(
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()
add_test(NAME JSON WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND JSON-testrunner -ignore ${CMAKE_SOURCE_DIR}/cppignore.lnx -all)
add_test(
NAME JSON
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
COMMAND JSON-testrunner -ignore ${CMAKE_SOURCE_DIR}/cppignore.lnx -all
)
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 )
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()
target_link_libraries(JSON-testrunner PUBLIC Poco::JSON CppUnit)

View File

@ -1,10 +1,10 @@
# Sources
file(GLOB SRCS_G "src/*.cpp")
POCO_SOURCES_AUTO( SRCS ${SRCS_G})
POCO_SOURCES_AUTO(SRCS ${SRCS_G})
# Headers
file(GLOB_RECURSE HDRS_G "include/*.h" )
POCO_HEADERS_AUTO( SRCS ${HDRS_G})
file(GLOB_RECURSE HDRS_G "include/*.h")
POCO_HEADERS_AUTO(SRCS ${HDRS_G})
# Version Resource
if(MSVC AND BUILD_SHARED_LIBS)
@ -12,14 +12,14 @@ if(MSVC AND BUILD_SHARED_LIBS)
list(APPEND SRCS ${PROJECT_SOURCE_DIR}/DLLVersion.rc)
endif()
add_library(JWT ${SRCS} )
add_library(JWT ${SRCS})
add_library(Poco::JWT ALIAS JWT)
set_target_properties( JWT
set_target_properties(JWT
PROPERTIES
VERSION ${SHARED_LIBRARY_VERSION} SOVERSION ${SHARED_LIBRARY_VERSION}
OUTPUT_NAME PocoJWT
DEFINE_SYMBOL JWT_EXPORTS
)
)
target_link_libraries(JWT PUBLIC Poco::JSON Poco::Crypto)
target_include_directories(JWT
@ -27,11 +27,11 @@ target_include_directories(JWT
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:include>
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src
)
)
POCO_INSTALL(JWT)
POCO_GENERATE_PACKAGE(JWT)
if (ENABLE_TESTS)
if(ENABLE_TESTS)
add_subdirectory(testsuite)
endif ()
endif()

View File

@ -1,25 +1,32 @@
# Sources
file(GLOB SRCS_G "src/*.cpp")
POCO_SOURCES_AUTO( TEST_SRCS ${SRCS_G})
POCO_SOURCES_AUTO(TEST_SRCS ${SRCS_G})
# Headers
file(GLOB_RECURSE HDRS_G "src/*.h" )
POCO_HEADERS_AUTO( TEST_SRCS ${HDRS_G})
file(GLOB_RECURSE HDRS_G "src/*.h")
POCO_HEADERS_AUTO(TEST_SRCS ${HDRS_G})
POCO_SOURCES_AUTO_PLAT( TEST_SRCS OFF
POCO_SOURCES_AUTO_PLAT(TEST_SRCS OFF
src/WinDriver.cpp
)
POCO_SOURCES_AUTO_PLAT( TEST_SRCS WINCE
POCO_SOURCES_AUTO_PLAT(TEST_SRCS WINCE
src/WinCEDriver.cpp
)
add_executable(JWT-testrunner ${TEST_SRCS} )
add_executable(JWT-testrunner ${TEST_SRCS})
if(ANDROID)
add_test(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)
add_test(
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()
add_test(NAME JWT WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND JWT-testrunner -ignore ${CMAKE_SOURCE_DIR}/cppignore.lnx -all)
add_test(
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()
target_link_libraries(JWT-testrunner PUBLIC Poco::JWT Poco::Crypto CppUnit)

View File

@ -1,10 +1,10 @@
# Sources
file(GLOB SRCS_G "src/*.cpp")
POCO_SOURCES_AUTO( SRCS ${SRCS_G})
POCO_SOURCES_AUTO(SRCS ${SRCS_G})
# Headers
file(GLOB_RECURSE HDRS_G "include/*.h" )
POCO_HEADERS_AUTO( SRCS ${HDRS_G})
file(GLOB_RECURSE HDRS_G "include/*.h")
POCO_HEADERS_AUTO(SRCS ${HDRS_G})
# Version Resource
if(MSVC AND BUILD_SHARED_LIBS)
@ -12,14 +12,14 @@ if(MSVC AND BUILD_SHARED_LIBS)
list(APPEND SRCS ${PROJECT_SOURCE_DIR}/DLLVersion.rc)
endif()
add_library(MongoDB ${SRCS} )
add_library(MongoDB ${SRCS})
add_library(Poco::MongoDB ALIAS MongoDB)
set_target_properties(MongoDB
PROPERTIES
VERSION ${SHARED_LIBRARY_VERSION} SOVERSION ${SHARED_LIBRARY_VERSION}
OUTPUT_NAME PocoMongoDB
DEFINE_SYMBOL MongoDB_EXPORTS
)
)
target_link_libraries(MongoDB PUBLIC Poco::Net)
target_include_directories(MongoDB
@ -27,13 +27,13 @@ target_include_directories(MongoDB
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:include>
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src
)
)
POCO_INSTALL(MongoDB)
POCO_GENERATE_PACKAGE(MongoDB)
if (ENABLE_TESTS)
if(ENABLE_TESTS)
add_subdirectory(samples)
add_subdirectory(testsuite)
endif ()
endif()

View File

@ -1 +1 @@
add_subdirectory( SQLToMongo )
add_subdirectory(SQLToMongo)

View File

@ -1,25 +1,31 @@
# Sources
file(GLOB SRCS_G "src/*.cpp")
POCO_SOURCES_AUTO( TEST_SRCS ${SRCS_G})
POCO_SOURCES_AUTO(TEST_SRCS ${SRCS_G})
# Headers
file(GLOB_RECURSE HDRS_G "src/*.h" )
POCO_HEADERS_AUTO( TEST_SRCS ${HDRS_G})
file(GLOB_RECURSE HDRS_G "src/*.h")
POCO_HEADERS_AUTO(TEST_SRCS ${HDRS_G})
POCO_SOURCES_AUTO_PLAT( TEST_SRCS OFF
POCO_SOURCES_AUTO_PLAT(TEST_SRCS OFF
src/WinDriver.cpp
)
POCO_SOURCES_AUTO_PLAT( TEST_SRCS WINCE
POCO_SOURCES_AUTO_PLAT(TEST_SRCS WINCE
src/WinCEDriver.cpp
)
add_executable(MongoDB-testrunner ${TEST_SRCS} )
add_executable(MongoDB-testrunner ${TEST_SRCS})
if(ANDROID)
add_test(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)
add_test(
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()
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})
endif()
target_link_libraries(MongoDB-testrunner PUBLIC Poco::MongoDB CppUnit)

View File

@ -1,10 +1,10 @@
# Sources
file(GLOB SRCS_G "src/*.cpp")
POCO_SOURCES_AUTO( SRCS ${SRCS_G})
POCO_SOURCES_AUTO(SRCS ${SRCS_G})
# Headers
file(GLOB_RECURSE HDRS_G "include/*.h" )
POCO_HEADERS_AUTO( SRCS ${HDRS_G})
file(GLOB_RECURSE HDRS_G "include/*.h")
POCO_HEADERS_AUTO(SRCS ${HDRS_G})
# Version Resource
if(MSVC AND BUILD_SHARED_LIBS)
@ -12,14 +12,14 @@ if(MSVC AND BUILD_SHARED_LIBS)
list(APPEND SRCS ${PROJECT_SOURCE_DIR}/DLLVersion.rc)
endif()
add_library(Net ${SRCS} )
add_library(Net ${SRCS})
add_library(Poco::Net ALIAS Net)
set_target_properties( Net
set_target_properties(Net
PROPERTIES
VERSION ${SHARED_LIBRARY_VERSION} SOVERSION ${SHARED_LIBRARY_VERSION}
OUTPUT_NAME PocoNet
DEFINE_SYMBOL Net_EXPORTS
)
)
target_link_libraries(Net PUBLIC Poco::Foundation)
# Windows and WindowsCE need additional libraries
@ -37,13 +37,13 @@ target_include_directories(Net
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:include>
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src
)
)
POCO_INSTALL(Net)
POCO_GENERATE_PACKAGE(Net)
if (ENABLE_TESTS)
if(ENABLE_TESTS)
add_subdirectory(samples)
add_subdirectory(testsuite)
endif ()
endif()

View File

@ -1,25 +1,32 @@
# Sources
file(GLOB SRCS_G "src/*.cpp")
POCO_SOURCES_AUTO( TEST_SRCS ${SRCS_G})
POCO_SOURCES_AUTO(TEST_SRCS ${SRCS_G})
# Headers
file(GLOB_RECURSE HDRS_G "src/*.h" )
POCO_HEADERS_AUTO( TEST_SRCS ${HDRS_G})
file(GLOB_RECURSE HDRS_G "src/*.h")
POCO_HEADERS_AUTO(TEST_SRCS ${HDRS_G})
POCO_SOURCES_AUTO_PLAT( TEST_SRCS OFF
POCO_SOURCES_AUTO_PLAT(TEST_SRCS OFF
src/WinDriver.cpp
)
POCO_SOURCES_AUTO_PLAT( TEST_SRCS WINCE
POCO_SOURCES_AUTO_PLAT(TEST_SRCS WINCE
src/WinCEDriver.cpp
)
add_executable(Net-testrunner ${TEST_SRCS} )
add_executable(Net-testrunner ${TEST_SRCS})
if(ANDROID)
add_test(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)
add_test(
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()
add_test(NAME Net WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND Net-testrunner -ignore ${CMAKE_SOURCE_DIR}/cppignore.lnx -all)
add_test(
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()
target_link_libraries(Net-testrunner PUBLIC Poco::Net Poco::Util Poco::XML CppUnit)

View File

@ -1,10 +1,10 @@
# Sources
file(GLOB SRCS_G "src/*.cpp")
POCO_SOURCES_AUTO( SRCS ${SRCS_G})
POCO_SOURCES_AUTO(SRCS ${SRCS_G})
# Headers
file(GLOB_RECURSE HDRS_G "include/*.h" )
POCO_HEADERS_AUTO( SRCS ${HDRS_G})
file(GLOB_RECURSE HDRS_G "include/*.h")
POCO_HEADERS_AUTO(SRCS ${HDRS_G})
# Version Resource
if(MSVC AND BUILD_SHARED_LIBS)
@ -12,14 +12,14 @@ if(MSVC AND BUILD_SHARED_LIBS)
list(APPEND SRCS ${PROJECT_SOURCE_DIR}/DLLVersion.rc)
endif()
add_library(NetSSL ${SRCS} )
add_library(NetSSL ${SRCS})
add_library(Poco::NetSSL ALIAS NetSSL)
set_target_properties( NetSSL
set_target_properties(NetSSL
PROPERTIES
VERSION ${SHARED_LIBRARY_VERSION} SOVERSION ${SHARED_LIBRARY_VERSION}
OUTPUT_NAME PocoNetSSL
DEFINE_SYMBOL NetSSL_EXPORTS
)
)
target_link_libraries(NetSSL PUBLIC Poco::Crypto Poco::Util Poco::Net)
target_include_directories(NetSSL
@ -27,7 +27,7 @@ target_include_directories(NetSSL
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:include>
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src
)
)
if(MSVC AND POCO_DISABLE_INTERNAL_OPENSSL AND OPENSSL_USE_STATIC_LIBS)
target_link_libraries(NetSSL PUBLIC ws2_32.lib Crypt32.lib)
@ -36,8 +36,8 @@ endif()
POCO_INSTALL(NetSSL)
POCO_GENERATE_PACKAGE(NetSSL)
if (ENABLE_TESTS)
if(ENABLE_TESTS)
add_subdirectory(samples)
add_subdirectory(testsuite)
endif ()
endif()

View File

@ -1,4 +1,4 @@
add_subdirectory( HTTPSTimeServer )
add_subdirectory( download )
add_subdirectory( Mail )
add_subdirectory( TwitterClient )
add_subdirectory(HTTPSTimeServer)
add_subdirectory(download)
add_subdirectory(Mail)
add_subdirectory(TwitterClient)

View File

@ -1,32 +1,39 @@
# Sources
file(GLOB SRCS_G "src/*.cpp")
POCO_SOURCES_AUTO( TEST_SRCS ${SRCS_G})
POCO_SOURCES_AUTO(TEST_SRCS ${SRCS_G})
# Headers
file(GLOB_RECURSE HDRS_G "src/*.h" )
POCO_HEADERS_AUTO( TEST_SRCS ${HDRS_G})
file(GLOB_RECURSE HDRS_G "src/*.h")
POCO_HEADERS_AUTO(TEST_SRCS ${HDRS_G})
POCO_SOURCES_AUTO_PLAT( TEST_SRCS OFF
POCO_SOURCES_AUTO_PLAT(TEST_SRCS OFF
src/WinDriver.cpp
)
POCO_SOURCES_AUTO_PLAT( TEST_SRCS WINCE
POCO_SOURCES_AUTO_PLAT(TEST_SRCS WINCE
src/WinCEDriver.cpp
)
add_executable(NetSSL-testrunner ${TEST_SRCS} )
add_executable(NetSSL-testrunner ${TEST_SRCS})
if(ANDROID)
add_test(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)
add_test(
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()
add_test(NAME NetSSL WORKING_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY} COMMAND NetSSL-testrunner -ignore ${CMAKE_SOURCE_DIR}/cppignore.lnx -all)
add_test(
NAME NetSSL
WORKING_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
COMMAND NetSSL-testrunner -ignore ${CMAKE_SOURCE_DIR}/cppignore.lnx -all
)
set_tests_properties(NetSSL 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 NetSSL-testrunner POST_BUILD
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()
target_link_libraries(NetSSL-testrunner PUBLIC Poco::NetSSL Poco::Util Poco::XML CppUnit)

View File

@ -1,10 +1,10 @@
# Sources
file(GLOB SRCS_G "src/*.cpp")
POCO_SOURCES_AUTO( SRCS ${SRCS_G})
POCO_SOURCES_AUTO(SRCS ${SRCS_G})
# Headers
file(GLOB_RECURSE HDRS_G "include/*.h" )
POCO_HEADERS_AUTO( SRCS ${HDRS_G})
file(GLOB_RECURSE HDRS_G "include/*.h")
POCO_HEADERS_AUTO(SRCS ${HDRS_G})
# Version Resource
if(MSVC AND BUILD_SHARED_LIBS)
@ -19,7 +19,7 @@ set_target_properties(NetSSLWin
VERSION ${SHARED_LIBRARY_VERSION} SOVERSION ${SHARED_LIBRARY_VERSION}
OUTPUT_NAME PocoNetSSLWin
DEFINE_SYMBOL NetSSL_Win_EXPORTS
)
)
target_link_libraries(NetSSLWin PUBLIC Poco::Net Poco::Util Crypt32.lib)
target_include_directories(NetSSLWin
@ -27,14 +27,14 @@ target_include_directories(NetSSLWin
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:include>
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src
)
)
POCO_INSTALL(NetSSLWin)
POCO_GENERATE_PACKAGE(NetSSLWin)
if (ENABLE_TESTS)
if(ENABLE_TESTS)
#TODO: Looks like the samples use crypto somehow?
#add_subdirectory(samples)
#add_subdirectory(testsuite)
endif ()
endif()

View File

@ -1,3 +1,3 @@
add_subdirectory( HTTPSTimeServer )
add_subdirectory( download )
add_subdirectory( Mail )
add_subdirectory(HTTPSTimeServer)
add_subdirectory(download)
add_subdirectory(Mail)

View File

@ -1,27 +1,32 @@
# Sources
file(GLOB SRCS_G "src/*.cpp")
POCO_SOURCES_AUTO( TEST_SRCS ${SRCS_G})
POCO_SOURCES_AUTO(TEST_SRCS ${SRCS_G})
# Headers
file(GLOB_RECURSE HDRS_G "src/*.h" )
POCO_HEADERS_AUTO( TEST_SRCS ${HDRS_G})
file(GLOB_RECURSE HDRS_G "src/*.h")
POCO_HEADERS_AUTO(TEST_SRCS ${HDRS_G})
POCO_SOURCES_AUTO_PLAT( TEST_SRCS OFF
POCO_SOURCES_AUTO_PLAT(TEST_SRCS OFF
src/WinDriver.cpp
)
POCO_SOURCES_AUTO_PLAT( TEST_SRCS WINCE
POCO_SOURCES_AUTO_PLAT(TEST_SRCS WINCE
src/WinCEDriver.cpp
)
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_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
)
set_tests_properties(NetSSLWin PROPERTIES ENVIRONMENT POCO_BASE=${CMAKE_SOURCE_DIR})
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
add_custom_command(TARGET NetSSLWin-testrunner POST_BUILD
add_custom_command(
TARGET NetSSLWin-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}/NetSSLWin.xml
)
)

View File

@ -1,18 +1,18 @@
# Sources
file(GLOB SRCS_G "src/*.cpp")
POCO_SOURCES_AUTO( SRCS ${SRCS_G})
POCO_SOURCES_AUTO(SRCS ${SRCS_G})
# Headers
file(GLOB_RECURSE HDRS_G "include/*.h" )
POCO_HEADERS_AUTO( SRCS ${HDRS_G})
file(GLOB_RECURSE HDRS_G "include/*.h")
POCO_HEADERS_AUTO(SRCS ${HDRS_G})
# If POCO_UNBUNDLED is enabled we try to find the required packages
# The configuration will fail if the packages are not found
if (POCO_UNBUNDLED)
if(POCO_UNBUNDLED)
find_package(ZLIB REQUIRED)
else()
# zlib
POCO_SOURCES( SRCS zlib
POCO_SOURCES(SRCS zlib
src/adler32.c
src/compress.c
src/crc32.c
@ -25,7 +25,7 @@ else()
src/trees.c
src/zutil.c
)
endif (POCO_UNBUNDLED)
endif(POCO_UNBUNDLED)
# TODO: Currently only bundled is supported, in future this should also be possible
# with an unbundled version of hpdf
@ -92,7 +92,7 @@ POCO_SOURCES(SRCS hpdf
# TODO: Currently only bundled is supported, in future this should also be possible
# with an unbundled version of libpng
POCO_SOURCES( SRCS libpng
POCO_SOURCES(SRCS libpng
src/png.c
src/pngerror.c
src/pnggccrd.c
@ -120,34 +120,34 @@ if(MSVC AND BUILD_SHARED_LIBS)
endif()
#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)
set_target_properties(PDF
PROPERTIES
VERSION ${SHARED_LIBRARY_VERSION} SOVERSION ${SHARED_LIBRARY_VERSION}
OUTPUT_NAME PocoPDF
DEFINE_SYMBOL PDF_EXPORTS
)
)
if (POCO_UNBUNDLED)
if(POCO_UNBUNDLED)
target_link_libraries(PDF PUBLIC ZLIB::ZLIB)
target_compile_definitions(PDF PUBLIC POCO_UNBUNDLED)
endif (POCO_UNBUNDLED)
endif(POCO_UNBUNDLED)
target_link_libraries(PDF PUBLIC Poco::XML Poco::Util)
target_include_directories(PDF
PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:include>
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src
)
)
POCO_INSTALL(PDF)
POCO_GENERATE_PACKAGE(PDF)
if (ENABLE_TESTS)
if(ENABLE_TESTS)
add_subdirectory(samples)
add_subdirectory(testsuite)
endif ()
endif()

View File

@ -1,21 +1,28 @@
# Sources
file(GLOB SRCS_G "src/*.cpp")
POCO_SOURCES_AUTO( TEST_SRCS ${SRCS_G})
POCO_SOURCES_AUTO(TEST_SRCS ${SRCS_G})
# Headers
file(GLOB_RECURSE HDRS_G "src/*.h" )
POCO_HEADERS_AUTO( TEST_SRCS ${HDRS_G})
file(GLOB_RECURSE HDRS_G "src/*.h")
POCO_HEADERS_AUTO(TEST_SRCS ${HDRS_G})
POCO_SOURCES_AUTO_PLAT( TEST_SRCS OFF
POCO_SOURCES_AUTO_PLAT(TEST_SRCS OFF
src/WinDriver.cpp
)
add_executable(PDF-testrunner ${TEST_SRCS} )
add_executable(PDF-testrunner ${TEST_SRCS})
if(ANDROID)
add_test(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)
add_test(
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()
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})
endif()
target_link_libraries(PDF-testrunner PUBLIC Poco::PDF CppUnit )
target_link_libraries(PDF-testrunner PUBLIC Poco::PDF CppUnit)

View File

@ -2,13 +2,13 @@ set(POCO_EXENAME "PageCompiler")
# Sources
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
PROPERTIES
OUTPUT_NAME cpspc
)
)
target_link_libraries(PageCompiler PUBLIC Poco::Net Poco::Util)
@ -18,4 +18,4 @@ install(
ARCHIVE DESTINATION lib${LIB_SUFFIX}
RUNTIME DESTINATION bin
INCLUDES DESTINATION include
)
)

View File

@ -1,12 +1,12 @@
# Sources
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
PROPERTIES
OUTPUT_NAME f2cpsp
)
)
target_link_libraries(File2Page PUBLIC Poco::Util)
@ -16,4 +16,4 @@ install(
ARCHIVE DESTINATION lib${LIB_SUFFIX}
RUNTIME DESTINATION bin
INCLUDES DESTINATION include
)
)

View File

@ -1,8 +1,8 @@
# Sources
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)
@ -12,4 +12,4 @@ install(
ARCHIVE DESTINATION lib${LIB_SUFFIX}
RUNTIME DESTINATION bin
INCLUDES DESTINATION include
)
)

View File

@ -1,10 +1,10 @@
# Sources
file(GLOB SRCS_G "src/*.cpp")
POCO_SOURCES_AUTO( SRCS ${SRCS_G})
POCO_SOURCES_AUTO(SRCS ${SRCS_G})
# Headers
file(GLOB_RECURSE HDRS_G "include/*.h" )
POCO_HEADERS_AUTO( SRCS ${HDRS_G})
file(GLOB_RECURSE HDRS_G "include/*.h")
POCO_HEADERS_AUTO(SRCS ${HDRS_G})
# Version Resource
if(MSVC AND BUILD_SHARED_LIBS)
@ -12,14 +12,14 @@ if(MSVC AND BUILD_SHARED_LIBS)
list(APPEND SRCS ${PROJECT_SOURCE_DIR}/DLLVersion.rc)
endif()
add_library(Redis ${SRCS} )
add_library(Redis ${SRCS})
add_library(Poco::Redis ALIAS Redis)
set_target_properties(Redis
PROPERTIES
VERSION ${SHARED_LIBRARY_VERSION} SOVERSION ${SHARED_LIBRARY_VERSION}
OUTPUT_NAME PocoRedis
DEFINE_SYMBOL Redis_EXPORTS
)
)
target_link_libraries(Redis PUBLIC Poco::Net)
target_include_directories(Redis
@ -27,13 +27,13 @@ target_include_directories(Redis
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:include>
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src
)
)
POCO_INSTALL(Redis)
POCO_GENERATE_PACKAGE(Redis)
if (ENABLE_TESTS)
if(ENABLE_TESTS)
add_subdirectory(testsuite)
# add_subdirectory(samples)
endif ()
endif()

View File

@ -1,29 +1,36 @@
# Sources
file(GLOB SRCS_G "src/*.cpp")
POCO_SOURCES_AUTO( TEST_SRCS ${SRCS_G})
POCO_SOURCES_AUTO(TEST_SRCS ${SRCS_G})
# Headers
file(GLOB_RECURSE HDRS_G "src/*.h" )
POCO_HEADERS_AUTO( TEST_SRCS ${HDRS_G})
file(GLOB_RECURSE HDRS_G "src/*.h")
POCO_HEADERS_AUTO(TEST_SRCS ${HDRS_G})
POCO_SOURCES_AUTO_PLAT( TEST_SRCS OFF
POCO_SOURCES_AUTO_PLAT(TEST_SRCS OFF
src/WinDriver.cpp
)
POCO_SOURCES_AUTO_PLAT( TEST_SRCS WINCE
POCO_SOURCES_AUTO_PLAT(TEST_SRCS WINCE
src/WinCEDriver.cpp
)
add_executable(Redis-testrunner ${TEST_SRCS} )
add_executable(Redis-testrunner ${TEST_SRCS})
if(ANDROID)
add_test(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)
add_test(
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()
add_test(NAME Redis WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND Redis-testrunner -ignore ${CMAKE_SOURCE_DIR}/cppignore.lnx -all)
add_test(
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()
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)
target_compile_definitions(Redis-testrunner PRIVATE OLD_REDIS_VERSION)

View File

@ -1,14 +1,14 @@
# Sources
file(GLOB SRCS_G "src/*.cpp")
POCO_SOURCES_AUTO( SRCS ${SRCS_G})
POCO_SOURCES_AUTO(SRCS ${SRCS_G})
# Headers
file(GLOB_RECURSE HDRS_G "include/*.h" )
POCO_HEADERS_AUTO( SRCS ${HDRS_G})
file(GLOB_RECURSE HDRS_G "include/*.h")
POCO_HEADERS_AUTO(SRCS ${HDRS_G})
# TODO: Currently only bundled is supported, in future this should also be possible
# with an unbundled version of 7z
POCO_SOURCES( SRCS 7z
POCO_SOURCES(SRCS 7z
src/7zAlloc.c
src/7zBuf2.c
src/7zBuf.c
@ -53,14 +53,14 @@ if(MSVC AND BUILD_SHARED_LIBS)
list(APPEND SRCS ${PROJECT_SOURCE_DIR}/DLLVersion.rc)
endif()
add_library(SevenZip ${SRCS} )
add_library(SevenZip ${SRCS})
add_library(Poco::SevenZip ALIAS SevenZip)
set_target_properties(SevenZip
PROPERTIES
VERSION ${SHARED_LIBRARY_VERSION} SOVERSION ${SHARED_LIBRARY_VERSION}
OUTPUT_NAME PocoSevenZip
DEFINE_SYMBOL SevenZip_EXPORTS
)
)
target_link_libraries(SevenZip PUBLIC Poco::Util Poco::XML)
target_include_directories(SevenZip
@ -68,14 +68,14 @@ target_include_directories(SevenZip
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:include>
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src
)
)
POCO_INSTALL(SevenZip)
POCO_GENERATE_PACKAGE(SevenZip)
if (ENABLE_TESTS)
if(ENABLE_TESTS)
add_subdirectory(samples)
# TODO: Add tests
#add_subdirectory(testsuite)
endif ()
endif()

View File

@ -1 +1 @@
add_subdirectory( un7zip )
add_subdirectory(un7zip)

View File

@ -1,10 +1,10 @@
# Sources
file(GLOB SRCS_G "src/*.cpp")
POCO_SOURCES_AUTO( SRCS ${SRCS_G})
POCO_SOURCES_AUTO(SRCS ${SRCS_G})
# Headers
file(GLOB_RECURSE HDRS_G "include/*.h" )
POCO_HEADERS_AUTO( SRCS ${HDRS_G})
file(GLOB_RECURSE HDRS_G "include/*.h")
POCO_HEADERS_AUTO(SRCS ${HDRS_G})
# Version Resource
if(MSVC AND BUILD_SHARED_LIBS)
@ -12,31 +12,31 @@ if(MSVC AND BUILD_SHARED_LIBS)
list(APPEND SRCS ${PROJECT_SOURCE_DIR}/DLLVersion.rc)
endif()
POCO_SOURCES_AUTO_PLAT( SRCS WIN32
POCO_SOURCES_AUTO_PLAT(SRCS WIN32
src/WinRegistryConfiguration.cpp
src/WinRegistryKey.cpp
src/WinService.cpp
)
add_library(Util ${SRCS} )
add_library(Util ${SRCS})
add_library(Poco::Util ALIAS Util)
set_target_properties(Util
PROPERTIES
VERSION ${SHARED_LIBRARY_VERSION} SOVERSION ${SHARED_LIBRARY_VERSION}
OUTPUT_NAME PocoUtil
DEFINE_SYMBOL Util_EXPORTS
)
)
target_link_libraries(Util PUBLIC Poco::Foundation)
if (ENABLE_XML)
if(ENABLE_XML)
target_link_libraries(Util PUBLIC Poco::XML)
else ()
target_compile_definitions(Util PUBLIC POCO_UTIL_NO_XMLCONFIGURATION )
else()
target_compile_definitions(Util PUBLIC POCO_UTIL_NO_XMLCONFIGURATION)
endif()
if (ENABLE_JSON)
if(ENABLE_JSON)
target_link_libraries(Util PUBLIC Poco::JSON)
else ()
target_compile_definitions(Util PUBLIC POCO_UTIL_NO_JSONCONFIGURATION )
else()
target_compile_definitions(Util PUBLIC POCO_UTIL_NO_JSONCONFIGURATION)
endif()
target_include_directories(Util
@ -49,7 +49,7 @@ target_include_directories(Util
POCO_INSTALL(Util)
POCO_GENERATE_PACKAGE(Util)
if (ENABLE_TESTS)
if(ENABLE_TESTS)
add_subdirectory(samples)
add_subdirectory(testsuite)
endif ()
endif()

View File

@ -1,4 +1,4 @@
add_subdirectory( SampleApp )
add_subdirectory( SampleServer )
add_subdirectory( Units )
add_subdirectory( pkill )
add_subdirectory(SampleApp)
add_subdirectory(SampleServer)
add_subdirectory(Units)
add_subdirectory(pkill)

View File

@ -1,32 +1,39 @@
# Sources
file(GLOB SRCS_G "src/*.cpp")
POCO_SOURCES_AUTO( TEST_SRCS ${SRCS_G})
POCO_SOURCES_AUTO(TEST_SRCS ${SRCS_G})
# Headers
file(GLOB_RECURSE HDRS_G "src/*.h" )
POCO_HEADERS_AUTO( TEST_SRCS ${HDRS_G})
file(GLOB_RECURSE HDRS_G "src/*.h")
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/WinRegistryTest.cpp
src/WinServiceTest.cpp
src/WindowsTestSuite.cpp
)
POCO_SOURCES_AUTO_PLAT( TEST_SRCS OFF
POCO_SOURCES_AUTO_PLAT(TEST_SRCS OFF
src/WinDriver.cpp
)
POCO_SOURCES_AUTO_PLAT( TEST_SRCS WINCE
POCO_SOURCES_AUTO_PLAT(TEST_SRCS WINCE
src/WinCEDriver.cpp
)
add_executable(Util-testrunner ${TEST_SRCS} )
add_executable(Util-testrunner ${TEST_SRCS})
if(ANDROID)
add_test(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)
add_test(
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()
add_test(NAME Util WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND Util-testrunner -ignore ${CMAKE_SOURCE_DIR}/cppignore.lnx -all)
add_test(
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()
target_link_libraries(Util-testrunner PUBLIC Poco::Util Poco::JSON Poco::XML CppUnit)

View File

@ -5,11 +5,11 @@ set(EXPAT_CPP "${CMAKE_CURRENT_SOURCE_DIR}/src/xmlparse.cpp")
# Sources
file(GLOB SRCS_G "src/*.cpp")
list(REMOVE_ITEM SRCS_G ${EXPAT_CPP})
POCO_SOURCES_AUTO( SRCS ${SRCS_G})
POCO_SOURCES_AUTO(SRCS ${SRCS_G})
# Headers
file(GLOB_RECURSE HDRS_G "include/*.h" )
POCO_HEADERS_AUTO( SRCS ${HDRS_G})
file(GLOB_RECURSE HDRS_G "include/*.h")
POCO_HEADERS_AUTO(SRCS ${HDRS_G})
# Version Resource
if(MSVC AND BUILD_SHARED_LIBS)
@ -19,27 +19,27 @@ endif()
# If POCO_UNBUNDLED is enabled we try to find the required packages
# The configuration will fail if the packages are not found
if (POCO_UNBUNDLED)
if(POCO_UNBUNDLED)
find_package(EXPAT REQUIRED)
else()
POCO_SOURCES( SRCS expat
POCO_SOURCES(SRCS expat
src/xmlparse.cpp
src/xmlrole.c
src/xmltok.c
src/xmltok_impl.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)
set_target_properties( XML
set_target_properties(XML
PROPERTIES
VERSION ${SHARED_LIBRARY_VERSION} SOVERSION ${SHARED_LIBRARY_VERSION}
OUTPUT_NAME PocoXML
DEFINE_SYMBOL XML_EXPORTS
)
)
target_link_libraries(XML PUBLIC Poco::Foundation)
target_include_directories(XML
@ -47,9 +47,9 @@ target_include_directories(XML
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:include>
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src
)
)
if (POCO_UNBUNDLED)
if(POCO_UNBUNDLED)
target_link_libraries(XML PUBLIC EXPAT::EXPAT)
target_compile_definitions(XML PUBLIC POCO_UNBUNDLED)
else()
@ -65,8 +65,8 @@ endif()
POCO_INSTALL(XML)
POCO_GENERATE_PACKAGE(XML)
if (ENABLE_TESTS)
if(ENABLE_TESTS)
add_subdirectory(samples)
add_subdirectory(testsuite)
endif ()
endif()

View File

@ -1,25 +1,32 @@
# Sources
file(GLOB SRCS_G "src/*.cpp")
POCO_SOURCES_AUTO( TEST_SRCS ${SRCS_G})
POCO_SOURCES_AUTO(TEST_SRCS ${SRCS_G})
# Headers
file(GLOB_RECURSE HDRS_G "src/*.h" )
POCO_HEADERS_AUTO( TEST_SRCS ${HDRS_G})
file(GLOB_RECURSE HDRS_G "src/*.h")
POCO_HEADERS_AUTO(TEST_SRCS ${HDRS_G})
POCO_SOURCES_AUTO_PLAT( TEST_SRCS OFF
POCO_SOURCES_AUTO_PLAT(TEST_SRCS OFF
src/WinDriver.cpp
)
POCO_SOURCES_AUTO_PLAT( TEST_SRCS WINCE
POCO_SOURCES_AUTO_PLAT(TEST_SRCS WINCE
src/WinCEDriver.cpp
)
add_executable(XML-testrunner ${TEST_SRCS} )
add_executable(XML-testrunner ${TEST_SRCS})
if(ANDROID)
add_test(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)
add_test(
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()
add_test(NAME XML WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND XML-testrunner -ignore ${CMAKE_SOURCE_DIR}/cppignore.lnx -all)
add_test(
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()
target_link_libraries(XML-testrunner PUBLIC Poco::XML CppUnit)

View File

@ -1,10 +1,10 @@
# Sources
file(GLOB SRCS_G "src/*.cpp")
POCO_SOURCES_AUTO( SRCS ${SRCS_G})
POCO_SOURCES_AUTO(SRCS ${SRCS_G})
# Headers
file(GLOB_RECURSE HDRS_G "include/*.h" )
POCO_HEADERS_AUTO( SRCS ${HDRS_G})
file(GLOB_RECURSE HDRS_G "include/*.h")
POCO_HEADERS_AUTO(SRCS ${HDRS_G})
# Version Resource
if(MSVC AND BUILD_SHARED_LIBS)
@ -12,14 +12,14 @@ if(MSVC AND BUILD_SHARED_LIBS)
list(APPEND SRCS ${PROJECT_SOURCE_DIR}/DLLVersion.rc)
endif()
add_library(Zip ${SRCS} )
add_library(Zip ${SRCS})
add_library(Poco::Zip ALIAS Zip)
set_target_properties( Zip
set_target_properties(Zip
PROPERTIES
VERSION ${SHARED_LIBRARY_VERSION} SOVERSION ${SHARED_LIBRARY_VERSION}
OUTPUT_NAME PocoZip
DEFINE_SYMBOL Zip_EXPORTS
)
)
target_link_libraries(Zip PUBLIC Poco::Util Poco::XML)
target_include_directories(Zip
@ -27,13 +27,13 @@ target_include_directories(Zip
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:include>
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src
)
)
POCO_INSTALL(Zip)
POCO_GENERATE_PACKAGE(Zip)
if (ENABLE_TESTS)
if(ENABLE_TESTS)
add_subdirectory(samples)
add_subdirectory(testsuite)
endif ()
endif()

View File

@ -1,2 +1,2 @@
add_subdirectory( zip )
add_subdirectory( unzip )
add_subdirectory(zip)
add_subdirectory(unzip)

View File

@ -1,29 +1,36 @@
# Sources
file(GLOB SRCS_G "src/*.cpp")
POCO_SOURCES_AUTO( TEST_SRCS ${SRCS_G})
POCO_SOURCES_AUTO(TEST_SRCS ${SRCS_G})
# Headers
file(GLOB_RECURSE HDRS_G "src/*.h" )
POCO_HEADERS_AUTO( TEST_SRCS ${HDRS_G})
file(GLOB_RECURSE HDRS_G "src/*.h")
POCO_HEADERS_AUTO(TEST_SRCS ${HDRS_G})
POCO_SOURCES_AUTO_PLAT( TEST_SRCS OFF
POCO_SOURCES_AUTO_PLAT(TEST_SRCS OFF
src/WinDriver.cpp
)
POCO_SOURCES_AUTO_PLAT( TEST_SRCS WINCE
POCO_SOURCES_AUTO_PLAT(TEST_SRCS WINCE
src/WinCEDriver.cpp
)
add_executable(Zip-testrunner ${TEST_SRCS} )
add_executable(Zip-testrunner ${TEST_SRCS})
if(ANDROID)
add_test(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)
add_test(
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()
add_test(NAME Zip WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND Zip-testrunner -ignore ${CMAKE_SOURCE_DIR}/cppignore.lnx -all)
add_test(
NAME Zip
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND Zip-testrunner -ignore ${CMAKE_SOURCE_DIR}/cppignore.lnx -all
)
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 )
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()
target_link_libraries(Zip-testrunner PUBLIC Poco::Zip Poco::Net CppUnit)

View File

@ -76,7 +76,7 @@ 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")
# Define additional search paths for root directories.
set( PostgreSQL_ROOT_DIRECTORIES
set(PostgreSQL_ROOT_DIRECTORIES
ENV PostgreSQL_ROOT
${PostgreSQL_ROOT}
${PostgreSQL_ROOT_DIR}
@ -144,12 +144,12 @@ find_path(PostgreSQL_INCLUDE_DIR
# )
# The PostgreSQL library.
set (PostgreSQL_LIBRARY_TO_FIND pq)
set(PostgreSQL_LIBRARY_TO_FIND pq)
# Setting some more prefixes for the library
set (PostgreSQL_LIB_PREFIX "")
if ( WIN32 )
set (PostgreSQL_LIB_PREFIX ${PostgreSQL_LIB_PREFIX} "lib")
set (PostgreSQL_LIBRARY_TO_FIND ${PostgreSQL_LIB_PREFIX}${PostgreSQL_LIBRARY_TO_FIND})
set(PostgreSQL_LIB_PREFIX "")
if(WIN32)
set(PostgreSQL_LIB_PREFIX ${PostgreSQL_LIB_PREFIX} "lib")
set(PostgreSQL_LIBRARY_TO_FIND ${PostgreSQL_LIB_PREFIX}${PostgreSQL_LIBRARY_TO_FIND})
endif()
find_library(PostgreSQL_LIBRARY
@ -166,7 +166,7 @@ find_library(PostgreSQL_LIBRARY
)
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
# This is a temporary workaround. A better solution would be to compile
# a dummy c file and extract the value of the symbol.
@ -187,9 +187,11 @@ endif()
# Did we find anything?
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(PostgreSQL
find_package_handle_standard_args(
PostgreSQL
REQUIRED_VARS PostgreSQL_LIBRARY PostgreSQL_INCLUDE_DIR #PostgreSQL_TYPE_INCLUDE_DIR
VERSION_VAR PostgreSQL_VERSION)
VERSION_VAR PostgreSQL_VERSION
)
set(PostgreSQL_FOUND ${POSTGRESQL_FOUND})
# Now try to get the include and library path.

View File

@ -9,9 +9,9 @@
# Find the Microsoft mc.exe message compiler
#
# CMAKE_MC_COMPILER - where to find mc.exe
if (WIN32)
if(WIN32)
# 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
# be set up anyway
get_filename_component(sdk_dir "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Microsoft SDKs\\Windows;CurrentInstallFolder]" REALPATH)
@ -20,31 +20,31 @@ if (WIN32)
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)
file(GLOB kit10_list ${kit10_dir}/bin/10.* ${kit10wow_dir}/bin/10.*)
if (X64)
if(X64)
set(sdk_bindir "${sdk_dir}/bin/x64")
set(kit_bindir "${kit_dir}/bin/x64")
set(kit81_bindir "${kit81_dir}/bin/x64")
foreach (tmp_elem ${kit10_list})
if (IS_DIRECTORY ${tmp_elem})
foreach(tmp_elem ${kit10_list})
if(IS_DIRECTORY ${tmp_elem})
list(APPEND kit10_bindir "${tmp_elem}/x64")
endif()
endforeach()
else (X64)
else(X64)
set(sdk_bindir "${sdk_dir}/bin")
set(kit_bindir "${kit_dir}/bin/x86")
set(kit81_bindir "${kit81_dir}/bin/x86")
foreach (tmp_elem ${kit10_list})
if (IS_DIRECTORY ${tmp_elem})
foreach(tmp_elem ${kit10_list})
if(IS_DIRECTORY ${tmp_elem})
list(APPEND kit10_bindir "${tmp_elem}/x86")
endif()
endforeach()
endif (X64)
endif ()
endif(X64)
endif()
find_program(CMAKE_MC_COMPILER mc.exe HINTS "${sdk_bindir}" "${kit_bindir}" "${kit81_bindir}" ${kit10_bindir}
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")
endif (NOT CMAKE_MC_COMPILER)
endif(NOT CMAKE_MC_COMPILER)
message(STATUS "Found message compiler: ${CMAKE_MC_COMPILER}")
mark_as_advanced(CMAKE_MC_COMPILER)
endif(WIN32)
@ -98,11 +98,10 @@ endif(WIN32)
# Example: POCO_MESSAGES( HDRS Foundation include/Poco/Foundation.mc )
#
macro(POCO_SOURCES_PLAT out name platform)
source_group("${name}\\Source Files" FILES ${ARGN})
list(APPEND ${out} ${ARGN})
if(NOT (${platform}))
if(NOT(${platform}))
set_source_files_properties(${ARGN} PROPERTIES HEADER_FILE_ONLY TRUE)
endif()
endmacro()
@ -116,8 +115,7 @@ macro(POCO_SOURCES_AUTO out)
endmacro()
macro(POCO_SOURCES_AUTO_PLAT out platform)
foreach( f ${ARGN})
foreach(f ${ARGN})
get_filename_component(fname ${f} NAME)
# Read the package name from the source file
@ -140,10 +138,8 @@ macro(POCO_SOURCES_AUTO_PLAT out platform)
endforeach()
endmacro()
macro(POCO_HEADERS_AUTO out)
foreach( f ${ARGN})
foreach(f ${ARGN})
get_filename_component(fname ${f} NAME)
# Read the package name from the source file
@ -165,9 +161,8 @@ macro(POCO_HEADERS out name)
list(APPEND ${out} ${ARGN})
endmacro()
macro(POCO_MESSAGES out name)
if (WIN32)
if(WIN32)
foreach(msg ${ARGN})
get_filename_component(msg_name ${msg} NAME)
get_filename_component(msg_path ${msg} ABSOLUTE)
@ -196,10 +191,9 @@ macro(POCO_MESSAGES out name)
source_group("${name}\\Message Files" FILES ${ARGN})
list(APPEND ${out} ${ARGN})
endif (WIN32)
endif(WIN32)
endmacro()
#===============================================================================
# Macros for Package generation
#
@ -215,19 +209,19 @@ write_basic_package_version_file(
VERSION ${PROJECT_VERSION}
COMPATIBILITY AnyNewerVersion
)
if ("${CMAKE_VERSION}" VERSION_LESS "3.0.0")
if (NOT EXISTS "${CMAKE_BINARY_DIR}/${PROJECT_NAME}/${PROJECT_NAME}${target_name}Targets.cmake")
if("${CMAKE_VERSION}" VERSION_LESS "3.0.0")
if(NOT EXISTS "${CMAKE_BINARY_DIR}/${PROJECT_NAME}/${PROJECT_NAME}${target_name}Targets.cmake")
export(TARGETS "${target_name}" APPEND
FILE "${CMAKE_BINARY_DIR}/${PROJECT_NAME}/${PROJECT_NAME}${target_name}Targets.cmake"
NAMESPACE "${PROJECT_NAME}::"
)
endif ()
else ()
endif()
else()
export(EXPORT "${target_name}Targets"
FILE "${CMAKE_BINARY_DIR}/${PROJECT_NAME}/${PROJECT_NAME}${target_name}Targets.cmake"
NAMESPACE "${PROJECT_NAME}::"
)
endif ()
endif()
configure_file("cmake/Poco${target_name}Config.cmake"
"${CMAKE_BINARY_DIR}/${PROJECT_NAME}/${PROJECT_NAME}${target_name}Config.cmake"
@ONLY
@ -236,7 +230,7 @@ configure_file("cmake/Poco${target_name}Config.cmake"
# Set config script install location in a location that find_package() will
# look for, which is different on MS Windows than for UNIX
# Note: also set in root CMakeLists.txt
if (WIN32)
if(WIN32)
set(PocoConfigPackageLocation "cmake")
else()
set(PocoConfigPackageLocation "lib${LIB_SUFFIX}/cmake/${PROJECT_NAME}")
@ -247,7 +241,7 @@ install(
FILE "${PROJECT_NAME}${target_name}Targets.cmake"
NAMESPACE "${PROJECT_NAME}::"
DESTINATION "${PocoConfigPackageLocation}"
)
)
install(
FILES
@ -255,7 +249,7 @@ install(
"${CMAKE_BINARY_DIR}/${PROJECT_NAME}/${PROJECT_NAME}${target_name}ConfigVersion.cmake"
DESTINATION "${PocoConfigPackageLocation}"
COMPONENT Devel
)
)
endmacro()
@ -273,7 +267,7 @@ install(
DESTINATION include
COMPONENT Devel
PATTERN ".svn" EXCLUDE
)
)
install(
TARGETS "${target_name}" EXPORT "${target_name}Targets"
@ -281,9 +275,9 @@ install(
ARCHIVE DESTINATION lib${LIB_SUFFIX}
RUNTIME DESTINATION bin
INCLUDES DESTINATION include
)
)
if (MSVC)
if(MSVC)
# install the targets pdb
POCO_INSTALL_PDB(${target_name})
endif()
@ -298,9 +292,8 @@ endmacro()
#
# This is an internal macro meant only to be used by POCO_INSTALL.
macro(POCO_INSTALL_PDB target_name)
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(
FILES $<TARGET_PDB_FILE:${target_name}>
DESTINATION bin