mirror of
https://github.com/pocoproject/poco.git
synced 2025-11-03 11:26:20 +01:00
Merges.
This commit is contained in:
@@ -1,11 +1,20 @@
|
||||
set(LIBNAME "mod_poco")
|
||||
|
||||
include_directories( include ${APACHE_INCLUDE_DIR} ${APRUTIL_INCLUDE_DIR} )
|
||||
# Sources
|
||||
file(GLOB SRCS_G "src/*.cpp")
|
||||
POCO_SOURCES_AUTO( SRCS ${SRCS_G})
|
||||
|
||||
aux_source_directory(src SRCS)
|
||||
# Headers
|
||||
file(GLOB_RECURSE HDRS_G "include/*.h" )
|
||||
POCO_HEADERS_AUTO( SRCS ${HDRS_G})
|
||||
|
||||
include_directories( "include" )
|
||||
|
||||
add_library( ${LIBNAME} SHARED ${SRCS} )
|
||||
set_target_properties( ${LIBNAME} PROPERTIES VERSION ${SHARED_LIBRARY_VERSION} SOVERSION ${SHARED_LIBRARY_VERSION} )
|
||||
set_target_properties( ${LIBNAME}
|
||||
PROPERTIES
|
||||
VERSION ${SHARED_LIBRARY_VERSION} SOVERSION ${SHARED_LIBRARY_VERSION}
|
||||
DEFINE_SYMBOL ApacheHandlers_EXPORTS)
|
||||
target_link_libraries( ${LIBNAME} )
|
||||
|
||||
if (ENABLE_TESTS)
|
||||
|
||||
@@ -4,5 +4,4 @@ set(LOCAL_SRCS "")
|
||||
aux_source_directory(src LOCAL_SRCS)
|
||||
|
||||
add_library( ${SAMPLE_NAME} ${LOCAL_SRCS} )
|
||||
#set_target_properties( ${SAMPLE_NAME} PROPERTIES COMPILE_FLAGS ${RELEASE_CXX_FLAGS} )
|
||||
target_link_libraries( ${SAMPLE_NAME} PocoNet PocoFoundation )
|
||||
|
||||
@@ -4,5 +4,4 @@ set(LOCAL_SRCS "")
|
||||
aux_source_directory(src LOCAL_SRCS)
|
||||
|
||||
add_library( ${SAMPLE_NAME} ${LOCAL_SRCS} )
|
||||
#set_target_properties( ${SAMPLE_NAME} PROPERTIES COMPILE_FLAGS ${RELEASE_CXX_FLAGS} )
|
||||
target_link_libraries( ${SAMPLE_NAME} PocoNet PocoFoundation )
|
||||
|
||||
@@ -2,6 +2,9 @@
|
||||
# POCO_STATIC
|
||||
# POCO_UNBUNDLED
|
||||
# POCO_NO_LOCALE
|
||||
#
|
||||
# ENABLE_{COMPONENT}
|
||||
# ENABLE_TESTS
|
||||
|
||||
project(Poco)
|
||||
|
||||
@@ -61,6 +64,23 @@ endif ()
|
||||
# For Debug build types, append a "d" to the library names.
|
||||
set(CMAKE_DEBUG_POSTFIX "d" CACHE STRING "Set debug library postfix" FORCE)
|
||||
|
||||
# Include some common macros to simpilfy the Poco CMake files
|
||||
include(PocoMacros)
|
||||
|
||||
# Allow enabling and disabling components
|
||||
option(ENABLE_XML "Enable the XML" ON)
|
||||
option(ENABLE_JSON "Enable the JSON" ON)
|
||||
option(ENABLE_MONGODB "Enable MongoDB" ON)
|
||||
option(ENABLE_PDF "Enable PDF" ON)
|
||||
option(ENABLE_UTIL "Enable Util" ON)
|
||||
option(ENABLE_NET "Enable Net" ON)
|
||||
option(ENABLE_NETSSL "Enable NetSSL" ON)
|
||||
option(ENABLE_CRYPTO "Enable Crypto" ON)
|
||||
option(ENABLE_DATA "Enable Data" ON)
|
||||
option(ENABLE_SEVENZIP "Enable SevenZip" ON)
|
||||
option(ENABLE_ZIP "Enable Zip" ON)
|
||||
option(ENABLE_APACHECONNECTOR "Enable ApacheConnector" ON)
|
||||
|
||||
option(ENABLE_TESTS
|
||||
"Set to OFF|ON (default is OFF) to control build of POCO tests & samples" OFF)
|
||||
|
||||
@@ -96,7 +116,7 @@ else ()
|
||||
endif ()
|
||||
|
||||
# Set local include path
|
||||
include_directories( CppUnit/include Foundation/include XML/include Net/include NetSSL_OpenSSL/include Util/include Data/include Data/MySQL/include Data/SQLite/include Data/ODBC/include Zip/include Crypto/include Web/include JSON/include MongoDB/include PDF/include SevenZip/include)
|
||||
include_directories( CppUnit/include CppUnit/WinTestRunner/include Foundation/include XML/include Net/include NetSSL_OpenSSL/include Util/include Data/include Data/MySQL/include Data/SQLite/include Data/ODBC/include Zip/include Crypto/include Web/include JSON/include MongoDB/include PDF/include SevenZip/include)
|
||||
|
||||
include(CheckTypeSize)
|
||||
find_package(Cygwin)
|
||||
@@ -160,29 +180,54 @@ if (ENABLE_TESTS)
|
||||
endif ()
|
||||
|
||||
add_subdirectory(Foundation)
|
||||
if(ENABLE_XML)
|
||||
add_subdirectory(XML)
|
||||
endif()
|
||||
if(ENABLE_JSON)
|
||||
add_subdirectory(JSON)
|
||||
endif()
|
||||
if(ENABLE_MONGODB)
|
||||
add_subdirectory(MongoDB)
|
||||
endif()
|
||||
if(ENABLE_PDF)
|
||||
add_subdirectory(PDF)
|
||||
endif()
|
||||
if(ENABLE_UTIL)
|
||||
add_subdirectory(Util)
|
||||
endif()
|
||||
if(ENABLE_NET)
|
||||
add_subdirectory(Net)
|
||||
endif()
|
||||
|
||||
# OPENSSL_SSL_LIBRARY
|
||||
find_package(OpenSSL)
|
||||
if(OPENSSL_FOUND)
|
||||
include_directories(${OPENSSL_INCLUDE_DIR})
|
||||
include_directories("${OPENSSL_INCLUDE_DIR}")
|
||||
if(ENABLE_NETSSL)
|
||||
add_subdirectory(NetSSL_OpenSSL)
|
||||
endif()
|
||||
if(ENABLE_CRYPTO)
|
||||
add_subdirectory(Crypto)
|
||||
endif()
|
||||
endif(OPENSSL_FOUND)
|
||||
|
||||
if(ENABLE_DATA)
|
||||
add_subdirectory(Data)
|
||||
endif()
|
||||
if(ENABLE_SEVENZIP)
|
||||
add_subdirectory(SevenZip)
|
||||
endif()
|
||||
if(ENABLE_ZIP)
|
||||
add_subdirectory(Zip)
|
||||
endif()
|
||||
|
||||
#find_package(ARP)
|
||||
#find_package(Apache2)
|
||||
find_package(APR)
|
||||
find_package(Apache2)
|
||||
if(APRUTIL_FOUND AND APACHE_FOUND)
|
||||
include_directories( "${APACHE_INCLUDE_DIR}" "${APRUTIL_INCLUDE_DIR}" )
|
||||
if(ENABLE_APACHECONNECTOR)
|
||||
add_subdirectory(ApacheConnector)
|
||||
endif()
|
||||
endif(APRUTIL_FOUND AND APACHE_FOUND)
|
||||
|
||||
#############################################################
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
set(LIBNAME "CppUnit")
|
||||
|
||||
set(SRCS
|
||||
src/CppUnitException.cpp
|
||||
src/TestCase.cpp
|
||||
src/TestDecorator.cpp
|
||||
src/TestFailure.cpp
|
||||
src/TestResult.cpp
|
||||
src/TestRunner.cpp
|
||||
src/TestSuite.cpp
|
||||
src/TextTestResult.cpp
|
||||
)
|
||||
# Sources
|
||||
file(GLOB SRCS_G "src/*.cpp")
|
||||
POCO_SOURCES_AUTO( SRCS ${SRCS_G})
|
||||
|
||||
# Headers
|
||||
file(GLOB_RECURSE HDRS_G "include/*.h" )
|
||||
POCO_HEADERS_AUTO( SRCS ${HDRS_G})
|
||||
|
||||
add_library( ${LIBNAME} ${LIB_MODE} ${SRCS} )
|
||||
set_target_properties( ${LIBNAME}
|
||||
PROPERTIES
|
||||
VERSION "1"
|
||||
SOVERSION "1")
|
||||
PROPERTIES
|
||||
VERSION "1" SOVERSION "1"
|
||||
DEFINE_SYMBOL CppUnit_EXPORTS)
|
||||
target_link_libraries( ${LIBNAME} )
|
||||
|
||||
if(WIN32)
|
||||
add_subdirectory(WinTestRunner)
|
||||
endif(WIN32)
|
||||
|
||||
29
CppUnit/WinTestRunner/CMakeLists.txt
Normal file
29
CppUnit/WinTestRunner/CMakeLists.txt
Normal file
@@ -0,0 +1,29 @@
|
||||
set(LIBNAME "WinTestRunner")
|
||||
|
||||
# Sources
|
||||
file(GLOB SRCS_G "src/*.cpp")
|
||||
POCO_SOURCES_AUTO( WIN_SRCS ${SRCS_G})
|
||||
|
||||
# Headers
|
||||
file(GLOB_RECURSE HDRS_G "include/*.h" )
|
||||
POCO_HEADERS_AUTO( WIN_SRCS ${HDRS_G})
|
||||
|
||||
file(GLOB_RECURSE HDRS_G "src/*.h" )
|
||||
POCO_HEADERS_AUTO( WIN_SRCS ${HDRS_G})
|
||||
|
||||
# TODO: Is this flag always required?
|
||||
add_definitions("-D_AFXDLL")
|
||||
|
||||
include_directories( "src" )
|
||||
|
||||
add_library( ${LIBNAME} ${LIB_MODE} ${WIN_SRCS} )
|
||||
set_target_properties( ${LIBNAME}
|
||||
PROPERTIES
|
||||
VERSION "1" SOVERSION "1"
|
||||
DEFINE_SYMBOL WinTestRunner_EXPORTS)
|
||||
target_link_libraries( ${LIBNAME} CppUnit )
|
||||
if(WIN32)
|
||||
target_link_libraries( ${LIBNAME} winmm )
|
||||
endif(WIN32)
|
||||
|
||||
|
||||
@@ -1,27 +1,21 @@
|
||||
set(LIBNAME "PocoCrypto")
|
||||
|
||||
set(SRCS
|
||||
src/Cipher.cpp
|
||||
src/CipherFactory.cpp
|
||||
src/CipherImpl.cpp
|
||||
src/CipherKey.cpp
|
||||
src/CipherKeyImpl.cpp
|
||||
src/CryptoStream.cpp
|
||||
src/CryptoTransform.cpp
|
||||
src/DigestEngine.cpp
|
||||
src/OpenSSLInitializer.cpp
|
||||
src/RSACipherImpl.cpp
|
||||
src/RSADigestEngine.cpp
|
||||
src/RSAKey.cpp
|
||||
src/RSAKeyImpl.cpp
|
||||
src/X509Certificate.cpp
|
||||
)
|
||||
add_definitions(-D_USRDLL -DCrypto_EXPORTS)
|
||||
include_directories( include ${OPENSSL_INCLUDE_DIR} )
|
||||
# Sources
|
||||
file(GLOB SRCS_G "src/*.cpp")
|
||||
POCO_SOURCES_AUTO( SRCS ${SRCS_G})
|
||||
|
||||
# Headers
|
||||
file(GLOB_RECURSE HDRS_G "include/*.h" )
|
||||
POCO_HEADERS_AUTO( SRCS ${HDRS_G})
|
||||
|
||||
add_definitions(-D_USRDLL)
|
||||
include_directories( "include" )
|
||||
|
||||
add_library( ${LIBNAME} ${LIB_MODE} ${SRCS} )
|
||||
set_target_properties( ${LIBNAME} PROPERTIES VERSION ${SHARED_LIBRARY_VERSION} SOVERSION ${SHARED_LIBRARY_VERSION} )
|
||||
|
||||
set_target_properties( ${LIBNAME}
|
||||
PROPERTIES
|
||||
VERSION ${SHARED_LIBRARY_VERSION} SOVERSION ${SHARED_LIBRARY_VERSION}
|
||||
DEFINE_SYMBOL Crypto_EXPORTS)
|
||||
target_link_libraries( ${LIBNAME} PocoFoundation ${OPENSSL_LIBRARIES} )
|
||||
|
||||
install(
|
||||
|
||||
@@ -4,5 +4,4 @@ set(LOCAL_SRCS "")
|
||||
aux_source_directory(src LOCAL_SRCS)
|
||||
|
||||
add_executable( ${SAMPLE_NAME} ${LOCAL_SRCS} )
|
||||
#set_target_properties( ${SAMPLE_NAME} PROPERTIES COMPILE_FLAGS ${RELEASE_CXX_FLAGS} )
|
||||
target_link_libraries( ${SAMPLE_NAME} PocoCrypto PocoUtil PocoXML PocoFoundation )
|
||||
|
||||
@@ -1,21 +1,29 @@
|
||||
set( TEST_SRCS
|
||||
src/CryptoTest.cpp
|
||||
src/DigestEngineTest.cpp
|
||||
src/CryptoTestSuite.cpp
|
||||
src/Driver.cpp
|
||||
src/RSATest.cpp
|
||||
)
|
||||
|
||||
#include_directories()
|
||||
|
||||
set( WIN_TEST_SRCS
|
||||
src/WinDriver.cpp
|
||||
)
|
||||
|
||||
set(TESTUNIT "${LIBNAME}-testrunner")
|
||||
|
||||
# Sources
|
||||
file(GLOB SRCS_G "src/*.cpp")
|
||||
POCO_SOURCES_AUTO( TEST_SRCS ${SRCS_G})
|
||||
|
||||
# Headers
|
||||
file(GLOB_RECURSE HDRS_G "src/*.h" )
|
||||
POCO_HEADERS_AUTO( TEST_SRCS ${HDRS_G})
|
||||
|
||||
POCO_SOURCES_AUTO_PLAT( TEST_SRCS WIN32
|
||||
src/WinDriver.cpp
|
||||
)
|
||||
|
||||
POCO_SOURCES_AUTO_PLAT( TEST_SRCS WINCE
|
||||
src/WinCEDriver.cpp
|
||||
)
|
||||
|
||||
add_executable( ${TESTUNIT} ${TEST_SRCS} )
|
||||
add_test(NAME ${LIBNAME} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND ${TESTUNIT} -all)
|
||||
#set_target_properties( ${TESTUNIT} PROPERTIES COMPILE_FLAGS ${RELEASE_CXX_FLAGS} )
|
||||
target_link_libraries( ${TESTUNIT} PocoCrypto PocoNetSSL PocoXML PocoUtil PocoFoundation CppUnit pthread)
|
||||
target_link_libraries( ${TESTUNIT} PocoCrypto PocoNetSSL PocoXML PocoUtil PocoFoundation CppUnit )
|
||||
if( WIN32)
|
||||
#TODO: Is this flag always required?
|
||||
add_definitions("-D_AFXDLL")
|
||||
target_link_libraries( ${TESTUNIT} WinTestRunner)
|
||||
else()
|
||||
target_link_libraries( ${TESTUNIT} pthread)
|
||||
endif(WIN32)
|
||||
|
||||
|
||||
@@ -1,46 +1,15 @@
|
||||
set(LIBNAME "PocoData")
|
||||
|
||||
set(SRCS
|
||||
src/AbstractBinder.cpp
|
||||
src/AbstractBinding.cpp
|
||||
src/AbstractExtraction.cpp
|
||||
src/AbstractExtractor.cpp
|
||||
src/AbstractPreparation.cpp
|
||||
src/AbstractPreparator.cpp
|
||||
src/ArchiveStrategy.cpp
|
||||
src/Bulk.cpp
|
||||
src/Connector.cpp
|
||||
src/DataException.cpp
|
||||
src/Date.cpp
|
||||
src/DynamicLOB.cpp
|
||||
src/Limit.cpp
|
||||
src/MetaColumn.cpp
|
||||
src/PooledSessionHolder.cpp
|
||||
src/PooledSessionImpl.cpp
|
||||
src/Position.cpp
|
||||
src/Range.cpp
|
||||
src/RecordSet.cpp
|
||||
src/Row.cpp
|
||||
src/RowFilter.cpp
|
||||
src/RowFormatter.cpp
|
||||
src/RowIterator.cpp
|
||||
src/Session.cpp
|
||||
src/SessionFactory.cpp
|
||||
src/SessionImpl.cpp
|
||||
src/SessionPoolContainer.cpp
|
||||
src/SessionPool.cpp
|
||||
src/SimpleRowFormatter.cpp
|
||||
src/SQLChannel.cpp
|
||||
src/Statement.cpp
|
||||
src/StatementCreator.cpp
|
||||
src/StatementImpl.cpp
|
||||
src/Time.cpp
|
||||
src/Transaction.cpp
|
||||
)
|
||||
# Sources
|
||||
file(GLOB SRCS_G "src/*.cpp")
|
||||
POCO_SOURCES_AUTO( SRCS ${SRCS_G})
|
||||
|
||||
# Headers
|
||||
file(GLOB_RECURSE HDRS_G "include/*.h" )
|
||||
POCO_HEADERS_AUTO( SRCS ${HDRS_G})
|
||||
|
||||
if (NOT POCO_STATIC)
|
||||
add_definitions(-DData_EXPORTS -DTHREADSAFE -DODBC_EXPORTS -DMySQL_EXPORTS -DSQLite_EXPORTS)
|
||||
add_definitions(-DTHREADSAFE)
|
||||
endif (NOT POCO_STATIC)
|
||||
|
||||
if(MSVC AND NOT(MSVC_VERSION LESS 1400))
|
||||
@@ -51,7 +20,8 @@ endif()
|
||||
add_library( ${LIBNAME} ${LIB_MODE} ${SRCS} )
|
||||
set_target_properties( ${LIBNAME}
|
||||
PROPERTIES
|
||||
VERSION ${SHARED_LIBRARY_VERSION} SOVERSION ${SHARED_LIBRARY_VERSION} )
|
||||
VERSION ${SHARED_LIBRARY_VERSION} SOVERSION ${SHARED_LIBRARY_VERSION}
|
||||
DEFINE_SYMBOL Data_EXPORTS)
|
||||
target_link_libraries( ${LIBNAME} PocoFoundation)
|
||||
|
||||
install(
|
||||
@@ -72,19 +42,25 @@ add_subdirectory( SQLite )
|
||||
|
||||
find_package(MySQL)
|
||||
if(MYSQL_FOUND)
|
||||
include_directories("${MYSQL_INCLUDE_DIR}")
|
||||
message(STATUS "MySQL Support Enabled")
|
||||
add_subdirectory( MySQL )
|
||||
else()
|
||||
message(STATUS "MySQL Support Disabled - no MySQL library")
|
||||
endif(MYSQL_FOUND)
|
||||
|
||||
find_package(ODBC)
|
||||
if(CMAKE_SYSTEM MATCHES "Windows")
|
||||
set(ODBC_LIBRARIES "")
|
||||
message(STATUS "Windows native ODBC Support Enabled")
|
||||
add_subdirectory( ODBC )
|
||||
else ()
|
||||
if ( ${UNIX_ODBC_CONFIG} STREQUAL UNIX_ODBC_CONFIG-NOTFOUND AND ${IODBC_CONFIG} STREQUAL IODBC_CONFIG-NOTFOUND)
|
||||
message(STATUS "ODBC Support Disabled - no ODBC runtime")
|
||||
else ()
|
||||
if (ODBC_FOUND)
|
||||
include_directories("${ODBC_INCLUDE_DIRECTORIES}")
|
||||
message(STATUS "ODBC Support Enabled")
|
||||
add_subdirectory( ODBC )
|
||||
else ()
|
||||
message(STATUS "ODBC Support Disabled - no ODBC runtime")
|
||||
endif ()
|
||||
endif()
|
||||
|
||||
|
||||
@@ -1,26 +1,22 @@
|
||||
set(LIBNAME "PocoDataMySQL")
|
||||
|
||||
set(SRCS
|
||||
src/Binder.cpp
|
||||
src/Connector.cpp
|
||||
src/Extractor.cpp
|
||||
src/MySQLException.cpp
|
||||
src/MySQLStatementImpl.cpp
|
||||
src/ResultMetadata.cpp
|
||||
src/SessionHandle.cpp
|
||||
src/SessionImpl.cpp
|
||||
src/StatementExecutor.cpp
|
||||
src/Utility.cpp
|
||||
)
|
||||
# Sources
|
||||
file(GLOB SRCS_G "src/*.cpp")
|
||||
POCO_SOURCES_AUTO( MYSQL_SRCS ${SRCS_G})
|
||||
|
||||
# Headers
|
||||
file(GLOB_RECURSE HDRS_G "include/*.h" )
|
||||
POCO_HEADERS_AUTO( MYSQL_SRCS ${HDRS_G})
|
||||
|
||||
add_definitions(-DTHREADSAFE -DNO_TCL)
|
||||
|
||||
include_directories( include ${MYSQL_INCLUDE_DIR})
|
||||
include_directories( "include" )
|
||||
|
||||
add_library( ${LIBNAME} ${LIB_MODE} ${SRCS} )
|
||||
add_library( ${LIBNAME} ${LIB_MODE} ${MYSQL_SRCS} )
|
||||
set_target_properties( ${LIBNAME}
|
||||
PROPERTIES
|
||||
VERSION ${SHARED_LIBRARY_VERSION} SOVERSION ${SHARED_LIBRARY_VERSION} )
|
||||
VERSION ${SHARED_LIBRARY_VERSION} SOVERSION ${SHARED_LIBRARY_VERSION}
|
||||
DEFINE_SYMBOL MySQL_EXPORTS)
|
||||
target_link_libraries( ${LIBNAME} PocoData PocoFoundation ${MYSQL_LIB})
|
||||
|
||||
install(
|
||||
|
||||
@@ -1,19 +1,18 @@
|
||||
set( TEST_SRCS
|
||||
src/Driver.cpp
|
||||
src/MySQLTest.cpp
|
||||
src/MySQLTestSuite.cpp
|
||||
src/SQLExecutor.cpp
|
||||
)
|
||||
|
||||
#include_directories()
|
||||
|
||||
set( WIN_TEST_SRCS
|
||||
src/WinDriver.cpp
|
||||
)
|
||||
|
||||
set(TESTUNIT "${LIBNAME}-testrunner")
|
||||
|
||||
# Sources
|
||||
file(GLOB SRCS_G "src/*.cpp")
|
||||
POCO_SOURCES_AUTO( TEST_SRCS ${SRCS_G})
|
||||
|
||||
# Headers
|
||||
file(GLOB_RECURSE HDRS_G "src/*.h" )
|
||||
POCO_HEADERS_AUTO( TEST_SRCS ${HDRS_G})
|
||||
|
||||
POCO_SOURCES_AUTO_PLAT( TEST_SRCS WIN32
|
||||
src/WinDriver.cpp
|
||||
)
|
||||
|
||||
add_executable( ${TESTUNIT} ${TEST_SRCS} )
|
||||
#set_target_properties( ${TESTUNIT} PROPERTIES COMPILE_FLAGS ${RELEASE_CXX_FLAGS} )
|
||||
add_test(NAME ${LIBNAME} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND ${TESTUNIT} -all)
|
||||
target_link_libraries( ${TESTUNIT} PocoDataMySQL PocoData PocoFoundation CppUnit )
|
||||
|
||||
|
||||
@@ -1,31 +1,23 @@
|
||||
set(LIBNAME "PocoDataODBC")
|
||||
|
||||
set(SRCS
|
||||
src/Binder.cpp
|
||||
src/ConnectionHandle.cpp
|
||||
src/Connector.cpp
|
||||
src/EnvironmentHandle.cpp
|
||||
src/Extractor.cpp
|
||||
src/ODBCException.cpp
|
||||
src/ODBCMetaColumn.cpp
|
||||
src/ODBCStatementImpl.cpp
|
||||
src/Parameter.cpp
|
||||
src/Preparator.cpp
|
||||
src/SessionImpl.cpp
|
||||
src/TypeInfo.cpp
|
||||
src/Unicode.cpp
|
||||
src/Utility.cpp
|
||||
)
|
||||
# Sources
|
||||
file(GLOB SRCS_G "src/*.cpp")
|
||||
POCO_SOURCES_AUTO( ODBC_SRCS ${SRCS_G})
|
||||
|
||||
# Headers
|
||||
file(GLOB_RECURSE HDRS_G "include/*.h" )
|
||||
POCO_HEADERS_AUTO( ODBC_SRCS ${HDRS_G})
|
||||
|
||||
add_definitions( ${ODBC_CFLAGS} )
|
||||
|
||||
include_directories( include )
|
||||
include_directories( "include" )
|
||||
|
||||
add_library( ${LIBNAME} ${LIB_MODE} ${SRCS} )
|
||||
add_library( ${LIBNAME} ${LIB_MODE} ${ODBC_SRCS} )
|
||||
set_target_properties( ${LIBNAME}
|
||||
PROPERTIES
|
||||
VERSION ${SHARED_LIBRARY_VERSION} SOVERSION ${SHARED_LIBRARY_VERSION} )
|
||||
target_link_libraries( ${LIBNAME} PocoData PocoFoundation ${ODBC_LINK_FLAGS})
|
||||
VERSION ${SHARED_LIBRARY_VERSION} SOVERSION ${SHARED_LIBRARY_VERSION}
|
||||
DEFINE_SYMBOL ODBC_EXPORTS)
|
||||
target_link_libraries( ${LIBNAME} PocoData PocoFoundation ${ODBC_LIBRARIES})
|
||||
|
||||
install(
|
||||
DIRECTORY include/Poco
|
||||
|
||||
@@ -1,26 +1,22 @@
|
||||
set( TEST_SRCS
|
||||
src/Driver.cpp
|
||||
src/ODBCAccessTest.cpp
|
||||
src/ODBCDB2Test.cpp
|
||||
src/ODBCMySQLTest.cpp
|
||||
src/ODBCOracleTest.cpp
|
||||
src/ODBCPostgreSQLTest.cpp
|
||||
src/ODBCSQLServerTest.cpp
|
||||
src/ODBCSQLiteTest.cpp
|
||||
src/ODBCTest.cpp
|
||||
src/ODBCTestSuite.cpp
|
||||
src/SQLExecutor.cpp
|
||||
)
|
||||
|
||||
#include_directories()
|
||||
|
||||
set( WIN_TEST_SRCS
|
||||
src/WinDriver.cpp
|
||||
)
|
||||
|
||||
set(TESTUNIT "${LIBNAME}-testrunner")
|
||||
|
||||
add_executable( ${TESTUNIT} ${TEST_SRCS} )
|
||||
#set_target_properties( ${TESTUNIT} PROPERTIES COMPILE_FLAGS ${RELEASE_CXX_FLAGS} )
|
||||
target_link_libraries( ${TESTUNIT} PocoDataODBC PocoData PocoFoundation CppUnit )
|
||||
# Sources
|
||||
file(GLOB SRCS_G "src/*.cpp")
|
||||
POCO_SOURCES_AUTO( TEST_SRCS ${SRCS_G})
|
||||
|
||||
# Headers
|
||||
file(GLOB_RECURSE HDRS_G "src/*.h" )
|
||||
POCO_HEADERS_AUTO( TEST_SRCS ${HDRS_G})
|
||||
|
||||
POCO_SOURCES_AUTO_PLAT( TEST_SRCS WIN32
|
||||
src/WinDriver.cpp
|
||||
)
|
||||
|
||||
add_executable( ${TESTUNIT} ${TEST_SRCS} )
|
||||
add_test(NAME ${LIBNAME} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND ${TESTUNIT} -all)
|
||||
target_link_libraries( ${TESTUNIT} PocoDataODBC PocoData PocoFoundation CppUnit )
|
||||
if( WIN32)
|
||||
add_definitions("-D_AFXDLL")
|
||||
target_link_libraries( ${TESTUNIT} WinTestRunner)
|
||||
endif(WIN32)
|
||||
|
||||
|
||||
@@ -1,33 +1,39 @@
|
||||
set(LIBNAME "PocoDataSQLite")
|
||||
|
||||
set(SRCS
|
||||
src/Binder.cpp
|
||||
src/Connector.cpp
|
||||
src/Extractor.cpp
|
||||
src/Notifier.cpp
|
||||
src/SessionImpl.cpp
|
||||
src/SQLiteException.cpp
|
||||
src/SQLiteStatementImpl.cpp
|
||||
src/Utility.cpp
|
||||
)
|
||||
# Sources
|
||||
file(GLOB SRCS_G "src/*.cpp")
|
||||
POCO_SOURCES_AUTO( SQLITE_SRCS ${SRCS_G})
|
||||
|
||||
include_directories( "include" src )
|
||||
# Headers
|
||||
file(GLOB_RECURSE HDRS_G "include/*.h" )
|
||||
POCO_HEADERS_AUTO( SQLITE_SRCS ${HDRS_G})
|
||||
|
||||
include_directories( "include" "src" )
|
||||
|
||||
if (POCO_UNBUNDLED)
|
||||
find_package(SQLite3)
|
||||
set(DATASQLITELIBS PocoData PocoFoundation ${SQLITE3_LIBRARIES})
|
||||
include_directories(${SQLITE3_INCLUDE_DIRS})
|
||||
include_directories("${SQLITE3_INCLUDE_DIRS}")
|
||||
else()
|
||||
set(SRCS ${SRCS} src/sqlite3.c)
|
||||
# sqlite3
|
||||
POCO_SOURCES( SQLITE_SRCS sqlite3
|
||||
src/sqlite3.c
|
||||
)
|
||||
|
||||
POCO_HEADERS( SQLITE_SRCS sqlite3
|
||||
src/sqlite3.h
|
||||
)
|
||||
|
||||
set(DATASQLITELIBS PocoData PocoFoundation)
|
||||
endif()
|
||||
|
||||
add_definitions(-DSQLITE_THREADSAFE=1 -DSQLITE_DISABLE_LFS -DSQLITE_OMIT_UTF16 -DSQLITE_OMIT_PROGRESS_CALLBACK -DSQLITE_OMIT_COMPLETE -DSQLITE_OMIT_TCL_VARIABLE -DSQLITE_OMIT_DEPRECATED)
|
||||
|
||||
add_library( ${LIBNAME} ${LIB_MODE} ${SRCS} )
|
||||
add_library( ${LIBNAME} ${LIB_MODE} ${SQLITE_SRCS} )
|
||||
set_target_properties( ${LIBNAME}
|
||||
PROPERTIES
|
||||
VERSION ${SHARED_LIBRARY_VERSION} SOVERSION ${SHARED_LIBRARY_VERSION} )
|
||||
VERSION ${SHARED_LIBRARY_VERSION} SOVERSION ${SHARED_LIBRARY_VERSION}
|
||||
DEFINE_SYMBOL SQLite_EXPORTS)
|
||||
target_link_libraries( ${LIBNAME} ${DATASQLITELIBS} )
|
||||
|
||||
install(
|
||||
|
||||
@@ -1,18 +1,23 @@
|
||||
set( TEST_SRCS
|
||||
src/Driver.cpp
|
||||
src/SQLiteTest.cpp
|
||||
src/SQLiteTestSuite.cpp
|
||||
)
|
||||
|
||||
#include_directories()
|
||||
|
||||
set( WIN_TEST_SRCS
|
||||
src/WinDriver.cpp
|
||||
)
|
||||
|
||||
set(TESTUNIT "${LIBNAME}-testrunner")
|
||||
|
||||
add_executable( ${TESTUNIT} ${TEST_SRCS} )
|
||||
#set_target_properties( ${TESTUNIT} PROPERTIES COMPILE_FLAGS ${RELEASE_CXX_FLAGS} )
|
||||
target_link_libraries( ${TESTUNIT} PocoDataSQLite PocoData PocoFoundation CppUnit )
|
||||
# Sources
|
||||
file(GLOB SRCS_G "src/*.cpp")
|
||||
POCO_SOURCES_AUTO( TEST_SRCS ${SRCS_G})
|
||||
|
||||
# Headers
|
||||
file(GLOB_RECURSE HDRS_G "src/*.h" )
|
||||
POCO_HEADERS_AUTO( TEST_SRCS ${HDRS_G})
|
||||
|
||||
POCO_SOURCES_AUTO_PLAT( TEST_SRCS WIN32
|
||||
src/WinDriver.cpp
|
||||
)
|
||||
|
||||
add_executable( ${TESTUNIT} ${TEST_SRCS} )
|
||||
add_test(NAME ${LIBNAME} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND ${TESTUNIT} -all)
|
||||
target_link_libraries( ${TESTUNIT} PocoDataSQLite PocoData PocoFoundation CppUnit )
|
||||
if( WIN32)
|
||||
#TODO: Is this flag always required?
|
||||
add_definitions("-D_AFXDLL")
|
||||
target_link_libraries( ${TESTUNIT} WinTestRunner)
|
||||
endif(WIN32)
|
||||
|
||||
|
||||
@@ -4,5 +4,4 @@ set(LOCAL_SRCS "")
|
||||
aux_source_directory(src LOCAL_SRCS)
|
||||
|
||||
add_executable( ${SAMPLE_NAME} ${LOCAL_SRCS} )
|
||||
#set_target_properties( ${SAMPLE_NAME} PROPERTIES COMPILE_FLAGS ${RELEASE_CXX_FLAGS} )
|
||||
target_link_libraries( ${SAMPLE_NAME} PocoDataSQLite PocoData PocoFoundation )
|
||||
|
||||
@@ -4,5 +4,4 @@ set(LOCAL_SRCS "")
|
||||
aux_source_directory(src LOCAL_SRCS)
|
||||
|
||||
add_executable( ${SAMPLE_NAME} ${LOCAL_SRCS} )
|
||||
#set_target_properties( ${SAMPLE_NAME} PROPERTIES COMPILE_FLAGS ${RELEASE_CXX_FLAGS} )
|
||||
target_link_libraries( ${SAMPLE_NAME} PocoDataSQLite PocoData PocoFoundation )
|
||||
|
||||
@@ -4,5 +4,4 @@ set(LOCAL_SRCS "")
|
||||
aux_source_directory(src LOCAL_SRCS)
|
||||
|
||||
add_executable( ${SAMPLE_NAME} ${LOCAL_SRCS} )
|
||||
#set_target_properties( ${SAMPLE_NAME} PROPERTIES COMPILE_FLAGS ${RELEASE_CXX_FLAGS} )
|
||||
target_link_libraries( ${SAMPLE_NAME} PocoDataSQLite PocoData PocoFoundation )
|
||||
|
||||
@@ -4,5 +4,4 @@ set(LOCAL_SRCS "")
|
||||
aux_source_directory(src LOCAL_SRCS)
|
||||
|
||||
add_executable( ${SAMPLE_NAME} ${LOCAL_SRCS} )
|
||||
#set_target_properties( ${SAMPLE_NAME} PROPERTIES COMPILE_FLAGS ${RELEASE_CXX_FLAGS} )
|
||||
target_link_libraries( ${SAMPLE_NAME} PocoDataSQLite PocoData PocoFoundation )
|
||||
|
||||
@@ -4,5 +4,4 @@ set(LOCAL_SRCS "")
|
||||
aux_source_directory(src LOCAL_SRCS)
|
||||
|
||||
add_executable( ${SAMPLE_NAME} ${LOCAL_SRCS} )
|
||||
#set_target_properties( ${SAMPLE_NAME} PROPERTIES COMPILE_FLAGS ${RELEASE_CXX_FLAGS} )
|
||||
target_link_libraries( ${SAMPLE_NAME} PocoDataSQLite PocoData PocoFoundation )
|
||||
|
||||
@@ -4,5 +4,4 @@ set(LOCAL_SRCS "")
|
||||
aux_source_directory(src LOCAL_SRCS)
|
||||
|
||||
add_executable( ${SAMPLE_NAME} ${LOCAL_SRCS} )
|
||||
#set_target_properties( ${SAMPLE_NAME} PROPERTIES COMPILE_FLAGS ${RELEASE_CXX_FLAGS} )
|
||||
target_link_libraries( ${SAMPLE_NAME} PocoDataSQLite PocoData PocoNet PocoFoundation )
|
||||
|
||||
@@ -1,26 +1,27 @@
|
||||
set( TEST_SRCS
|
||||
src/Binder.cpp
|
||||
src/Connector.cpp
|
||||
src/DataTest.cpp
|
||||
src/Driver.cpp
|
||||
src/DataTestSuite.cpp
|
||||
src/Extractor.cpp
|
||||
src/Preparator.cpp
|
||||
src/SessionImpl.cpp
|
||||
src/SessionPoolTest.cpp
|
||||
src/TestStatementImpl.cpp
|
||||
)
|
||||
|
||||
#include_directories()
|
||||
|
||||
set( WIN_TEST_SRCS
|
||||
src/WinDriver.cpp
|
||||
)
|
||||
|
||||
set(TESTUNIT "${LIBNAME}-testrunner")
|
||||
|
||||
# Sources
|
||||
file(GLOB SRCS_G "src/*.cpp")
|
||||
POCO_SOURCES_AUTO( TEST_SRCS ${SRCS_G})
|
||||
|
||||
# Headers
|
||||
file(GLOB_RECURSE HDRS_G "src/*.h" )
|
||||
POCO_HEADERS_AUTO( TEST_SRCS ${HDRS_G})
|
||||
|
||||
POCO_SOURCES_AUTO_PLAT( TEST_SRCS WIN32
|
||||
src/WinDriver.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
|
||||
src/StatementImpl.cpp
|
||||
)
|
||||
|
||||
add_executable( ${TESTUNIT} ${TEST_SRCS} )
|
||||
add_test(NAME ${LIBNAME} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND ${TESTUNIT} -all)
|
||||
#set_target_properties( ${TESTUNIT} PROPERTIES COMPILE_FLAGS ${RELEASE_CXX_FLAGS} )
|
||||
target_link_libraries( ${TESTUNIT} PocoData PocoUtil PocoXML PocoFoundation CppUnit)
|
||||
|
||||
if( WIN32)
|
||||
#TODO: Is this flag always required?
|
||||
add_definitions("-D_AFXDLL")
|
||||
target_link_libraries( ${TESTUNIT} WinTestRunner)
|
||||
endif(WIN32)
|
||||
|
||||
@@ -1,182 +1,32 @@
|
||||
set(LIBNAME "PocoFoundation")
|
||||
|
||||
if (WIN32)
|
||||
# cmake has CMAKE_RC_COMPILER, but no message compiler
|
||||
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)
|
||||
get_filename_component(kit_dir "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows Kits\\Installed Roots;KitsRoot]" REALPATH)
|
||||
if (X64)
|
||||
set(sdk_bindir "${sdk_dir}/bin/x64")
|
||||
set(kit_bindir "${kit_dir}/bin/x64")
|
||||
else (X64)
|
||||
set(sdk_bindir "${sdk_dir}/bin")
|
||||
set(kit_bindir "${kit_dir}/bin/x86")
|
||||
endif (X64)
|
||||
endif ()
|
||||
find_program(CMAKE_MC_COMPILER mc.exe HINTS "${sdk_bindir}" "${kit_bindir}"
|
||||
DOC "path to message compiler")
|
||||
if (NOT CMAKE_MC_COMPILER)
|
||||
message(FATAL_ERROR "message compiler not found: required to build")
|
||||
endif (NOT CMAKE_MC_COMPILER)
|
||||
message(STATUS "Found message compiler: ${CMAKE_MC_COMPILER}")
|
||||
mark_as_advanced(CMAKE_MC_COMPILER)
|
||||
endif(WIN32)
|
||||
# Sources
|
||||
file(GLOB SRCS_G "src/*.cpp")
|
||||
POCO_SOURCES_AUTO( SRCS ${SRCS_G})
|
||||
|
||||
set( BASE_SRCS
|
||||
src/ASCIIEncoding.cpp
|
||||
src/Ascii.cpp
|
||||
src/AtomicCounter.cpp
|
||||
src/AbstractObserver.cpp
|
||||
src/ActiveDispatcher.cpp
|
||||
src/ArchiveStrategy.cpp
|
||||
src/AsyncChannel.cpp
|
||||
src/Base64Decoder.cpp
|
||||
src/Base64Encoder.cpp
|
||||
src/Base32Decoder.cpp
|
||||
src/Base32Encoder.cpp
|
||||
src/BinaryReader.cpp
|
||||
src/BinaryWriter.cpp
|
||||
src/Bugcheck.cpp
|
||||
src/ByteOrder.cpp
|
||||
src/Channel.cpp
|
||||
src/Checksum.cpp
|
||||
src/Clock.cpp
|
||||
src/Condition.cpp
|
||||
src/Configurable.cpp
|
||||
src/ConsoleChannel.cpp
|
||||
src/CountingStream.cpp
|
||||
src/DateTime.cpp
|
||||
src/DateTimeFormat.cpp
|
||||
src/DateTimeFormatter.cpp
|
||||
src/DateTimeParser.cpp
|
||||
src/Debugger.cpp
|
||||
src/DeflatingStream.cpp
|
||||
src/DigestEngine.cpp
|
||||
src/DigestStream.cpp
|
||||
src/DirectoryIterator.cpp
|
||||
src/DirectoryIteratorStrategy.cpp
|
||||
src/DirectoryWatcher.cpp
|
||||
src/Environment.cpp
|
||||
src/Error.cpp
|
||||
src/ErrorHandler.cpp
|
||||
src/Event.cpp
|
||||
src/EventArgs.cpp
|
||||
src/Exception.cpp
|
||||
src/FPEnvironment.cpp
|
||||
src/File.cpp
|
||||
src/FIFOBufferStream.cpp
|
||||
src/FileChannel.cpp
|
||||
src/FileStream.cpp
|
||||
src/FileStreamFactory.cpp
|
||||
src/Format.cpp
|
||||
src/Formatter.cpp
|
||||
src/FormattingChannel.cpp
|
||||
src/Glob.cpp
|
||||
src/Hash.cpp
|
||||
src/HashStatistic.cpp
|
||||
src/HexBinaryDecoder.cpp
|
||||
src/HexBinaryEncoder.cpp
|
||||
src/InflatingStream.cpp
|
||||
src/Latin1Encoding.cpp
|
||||
src/Latin2Encoding.cpp
|
||||
src/Latin9Encoding.cpp
|
||||
src/LineEndingConverter.cpp
|
||||
src/LocalDateTime.cpp
|
||||
src/LogFile.cpp
|
||||
src/LogStream.cpp
|
||||
src/Logger.cpp
|
||||
src/LoggingFactory.cpp
|
||||
src/LoggingRegistry.cpp
|
||||
src/MD4Engine.cpp
|
||||
src/MD5Engine.cpp
|
||||
src/Manifest.cpp
|
||||
src/MemoryPool.cpp
|
||||
src/MemoryStream.cpp
|
||||
src/Message.cpp
|
||||
src/Mutex.cpp
|
||||
src/NamedEvent.cpp
|
||||
src/NamedMutex.cpp
|
||||
src/NestedDiagnosticContext.cpp
|
||||
src/Notification.cpp
|
||||
src/NotificationCenter.cpp
|
||||
src/NotificationQueue.cpp
|
||||
src/TimedNotificationQueue.cpp
|
||||
src/PriorityNotificationQueue.cpp
|
||||
src/NullChannel.cpp
|
||||
src/NullStream.cpp
|
||||
src/NumberFormatter.cpp
|
||||
src/NumberParser.cpp
|
||||
src/NumericString.cpp
|
||||
src/Path.cpp
|
||||
src/PatternFormatter.cpp
|
||||
src/Pipe.cpp
|
||||
src/PipeImpl.cpp
|
||||
src/PipeStream.cpp
|
||||
src/Process.cpp
|
||||
src/PurgeStrategy.cpp
|
||||
src/RWLock.cpp
|
||||
src/Random.cpp
|
||||
src/RandomStream.cpp
|
||||
src/RefCountedObject.cpp
|
||||
src/RegularExpression.cpp
|
||||
src/RotateStrategy.cpp
|
||||
src/Runnable.cpp
|
||||
src/SHA1Engine.cpp
|
||||
src/Semaphore.cpp
|
||||
src/SharedLibrary.cpp
|
||||
src/SharedMemory.cpp
|
||||
src/SignalHandler.cpp
|
||||
src/SimpleFileChannel.cpp
|
||||
src/SortedDirectoryIterator.cpp
|
||||
src/SplitterChannel.cpp
|
||||
src/Stopwatch.cpp
|
||||
src/StreamChannel.cpp
|
||||
src/StreamConverter.cpp
|
||||
src/StreamCopier.cpp
|
||||
src/StreamTokenizer.cpp
|
||||
src/String.cpp
|
||||
src/NumericString.cpp
|
||||
src/StringTokenizer.cpp
|
||||
src/SynchronizedObject.cpp
|
||||
src/Task.cpp
|
||||
src/TaskManager.cpp
|
||||
src/TaskNotification.cpp
|
||||
src/TeeStream.cpp
|
||||
src/TemporaryFile.cpp
|
||||
src/TextConverter.cpp
|
||||
src/TextEncoding.cpp
|
||||
src/TextIterator.cpp
|
||||
src/TextBufferIterator.cpp
|
||||
src/Thread.cpp
|
||||
src/ThreadTarget.cpp
|
||||
src/ThreadLocal.cpp
|
||||
src/ThreadPool.cpp
|
||||
src/Timer.cpp
|
||||
src/Timespan.cpp
|
||||
src/Timestamp.cpp
|
||||
src/Timezone.cpp
|
||||
src/Token.cpp
|
||||
src/URI.cpp
|
||||
src/URIStreamFactory.cpp
|
||||
src/URIStreamOpener.cpp
|
||||
src/UTF16Encoding.cpp
|
||||
src/UTF32Encoding.cpp
|
||||
src/UTF8Encoding.cpp
|
||||
src/UTF8String.cpp
|
||||
src/UUID.cpp
|
||||
src/UUIDGenerator.cpp
|
||||
src/Unicode.cpp
|
||||
src/UnicodeConverter.cpp
|
||||
src/Var.cpp
|
||||
src/VarHolder.cpp
|
||||
src/VarIterator.cpp
|
||||
src/Void.cpp
|
||||
src/Windows1250Encoding.cpp
|
||||
src/Windows1251Encoding.cpp
|
||||
src/Windows1252Encoding.cpp
|
||||
)
|
||||
# Headers
|
||||
file(GLOB_RECURSE HDRS_G "include/*.h" )
|
||||
POCO_HEADERS_AUTO( SRCS ${HDRS_G})
|
||||
|
||||
# Platform Specific
|
||||
POCO_SOURCES_AUTO_PLAT( SRCS OPENVMS src/OpcomChannel.cpp )
|
||||
POCO_HEADERS_AUTO( SRCS include/Poco/OpcomChannel.h )
|
||||
|
||||
POCO_SOURCES_AUTO_PLAT( SRCS UNIX src/SyslogChannel.cpp )
|
||||
POCO_HEADERS_AUTO( SRCS include/Poco/SyslogChannel.h )
|
||||
|
||||
POCO_SOURCES_AUTO_PLAT( SRCS WIN32
|
||||
src/WindowsConsoleChannel.cpp
|
||||
src/EventLogChannel.cpp
|
||||
)
|
||||
|
||||
POCO_HEADERS_AUTO( SRCS
|
||||
include/Poco/WindowsConsoleChannel.h
|
||||
include/Poco/EventLogChannel.h
|
||||
)
|
||||
|
||||
# Messages
|
||||
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
|
||||
@@ -186,7 +36,7 @@ if (POCO_UNBUNDLED)
|
||||
include_directories(${PCRE_INCLUDE_DIRS})
|
||||
|
||||
#HACK: Unicode.cpp requires functions from these files. The can't be taken from the library
|
||||
list(APPEND BASE_SRCS
|
||||
POCO_SOURCES( SRCS RegExp
|
||||
src/pcre_ucd.c
|
||||
src/pcre_tables.c
|
||||
)
|
||||
@@ -195,8 +45,8 @@ if (POCO_UNBUNDLED)
|
||||
set(SYSLIBS ${SYSLIBS} ${ZLIB_LIBRARIES})
|
||||
include_directories(${ZLIB_INCLUDE_DIRS})
|
||||
else()
|
||||
# PCRE
|
||||
list(APPEND BASE_SRCS
|
||||
# pcre
|
||||
POCO_SOURCES( SRCS pcre
|
||||
src/pcre_chartables.c
|
||||
src/pcre_compile.c
|
||||
src/pcre_exec.c
|
||||
@@ -213,8 +63,13 @@ else()
|
||||
src/pcre_xclass.c
|
||||
)
|
||||
|
||||
# ZLIB
|
||||
list(APPEND BASE_SRCS
|
||||
# zlib
|
||||
POCO_HEADERS( SRCS zlib
|
||||
include/Poco/zconf.h
|
||||
include/Poco/zlib.h
|
||||
)
|
||||
|
||||
POCO_SOURCES( SRCS zlib
|
||||
src/adler32.c
|
||||
src/compress.c
|
||||
src/crc32.c
|
||||
@@ -228,47 +83,18 @@ else()
|
||||
)
|
||||
endif (POCO_UNBUNDLED)
|
||||
|
||||
set(WIN_SRCS
|
||||
src/EventLogChannel.cpp
|
||||
src/WindowsConsoleChannel.cpp
|
||||
)
|
||||
|
||||
if (WIN32)
|
||||
set(RES_SRCS ${CMAKE_SOURCE_DIR}/Foundation/src/pocomsg.h)
|
||||
set_source_files_properties(${RES_SRCS} PROPERTIES GENERATED true)
|
||||
add_custom_command(
|
||||
OUTPUT ${RES_SRCS}
|
||||
DEPENDS ${CMAKE_SOURCE_DIR}/Foundation/src/pocomsg.mc
|
||||
COMMAND ${CMAKE_MC_COMPILER}
|
||||
ARGS
|
||||
-h ${CMAKE_SOURCE_DIR}/Foundation/src
|
||||
-r ${CMAKE_SOURCE_DIR}/Foundation/src
|
||||
${CMAKE_SOURCE_DIR}/Foundation/src/pocomsg.mc
|
||||
VERBATIM # recommended: p260
|
||||
)
|
||||
list(APPEND WIN_SRCS ${RES_SRCS})
|
||||
endif (WIN32)
|
||||
|
||||
set(LIN_SRCS
|
||||
src/SyslogChannel.cpp
|
||||
)
|
||||
|
||||
# TODO: Use this sources somewhere if built on OpenVMS
|
||||
set(OPENVMS_SRCS
|
||||
src/OpcomChannel.cpp
|
||||
)
|
||||
|
||||
if(CMAKE_SYSTEM MATCHES "Windows")
|
||||
set(SRCS ${BASE_SRCS} ${WIN_SRCS})
|
||||
add_definitions( -DPCRE_STATIC -DFoundation_EXPORTS)
|
||||
add_definitions( -DPCRE_STATIC)
|
||||
set(SYSLIBS ${SYSLIBS} iphlpapi)
|
||||
else (CMAKE_SYSTEM MATCHES "Windows")
|
||||
set(SRCS ${BASE_SRCS} ${LIN_SRCS})
|
||||
add_definitions( -DPCRE_STATIC)
|
||||
endif(CMAKE_SYSTEM MATCHES "Windows")
|
||||
|
||||
add_library( ${LIBNAME} ${LIB_MODE} ${SRCS} )
|
||||
set_target_properties( ${LIBNAME} PROPERTIES VERSION ${SHARED_LIBRARY_VERSION} SOVERSION ${SHARED_LIBRARY_VERSION} )
|
||||
add_library( ${LIBNAME} ${LIB_MODE} ${SRCS})
|
||||
set_target_properties( ${LIBNAME}
|
||||
PROPERTIES
|
||||
VERSION ${SHARED_LIBRARY_VERSION} SOVERSION ${SHARED_LIBRARY_VERSION}
|
||||
DEFINE_SYMBOL Foundation_EXPORTS)
|
||||
if (${CMAKE_CXX_COMPILER_ID} MATCHES "SunPro")
|
||||
set_target_properties( ${LIBNAME} PROPERTIES LINK_FLAGS "-library=stlport4")
|
||||
endif (${CMAKE_CXX_COMPILER_ID} MATCHES "SunPro")
|
||||
|
||||
@@ -4,5 +4,4 @@ set(LOCAL_SRCS "")
|
||||
aux_source_directory(src LOCAL_SRCS)
|
||||
|
||||
add_executable( ${SAMPLE_NAME} ${LOCAL_SRCS} )
|
||||
#set_target_properties( ${SAMPLE_NAME} PROPERTIES COMPILE_FLAGS ${CMAKE_CXX_FLAGS} )
|
||||
target_link_libraries( ${SAMPLE_NAME} PocoFoundation )
|
||||
|
||||
@@ -4,5 +4,4 @@ set(LOCAL_SRCS "")
|
||||
aux_source_directory(src LOCAL_SRCS)
|
||||
|
||||
add_executable( ${SAMPLE_NAME} ${LOCAL_SRCS} )
|
||||
#set_target_properties( ${SAMPLE_NAME} PROPERTIES COMPILE_FLAGS ${RELEASE_CXX_FLAGS} )
|
||||
target_link_libraries( ${SAMPLE_NAME} PocoFoundation )
|
||||
|
||||
@@ -4,5 +4,4 @@ set(LOCAL_SRCS "")
|
||||
aux_source_directory(src LOCAL_SRCS)
|
||||
|
||||
add_executable( ${SAMPLE_NAME} ${LOCAL_SRCS} )
|
||||
#set_target_properties( ${SAMPLE_NAME} PROPERTIES COMPILE_FLAGS ${RELEASE_CXX_FLAGS} )
|
||||
target_link_libraries( ${SAMPLE_NAME} PocoFoundation )
|
||||
|
||||
@@ -4,5 +4,4 @@ set(LOCAL_SRCS "")
|
||||
aux_source_directory(src LOCAL_SRCS)
|
||||
|
||||
add_executable( ${SAMPLE_NAME} ${LOCAL_SRCS} )
|
||||
#set_target_properties( ${SAMPLE_NAME} PROPERTIES COMPILE_FLAGS ${RELEASE_CXX_FLAGS} )
|
||||
target_link_libraries( ${SAMPLE_NAME} PocoFoundation)
|
||||
|
||||
@@ -4,5 +4,4 @@ set(LOCAL_SRCS "")
|
||||
aux_source_directory(src LOCAL_SRCS)
|
||||
|
||||
add_executable( ${SAMPLE_NAME} ${LOCAL_SRCS} )
|
||||
#set_target_properties( ${SAMPLE_NAME} PROPERTIES COMPILE_FLAGS ${RELEASE_CXX_FLAGS} )
|
||||
target_link_libraries( ${SAMPLE_NAME} PocoFoundation )
|
||||
|
||||
@@ -4,5 +4,4 @@ set(LOCAL_SRCS "")
|
||||
aux_source_directory(src LOCAL_SRCS)
|
||||
|
||||
add_executable( ${SAMPLE_NAME} ${LOCAL_SRCS} )
|
||||
#set_target_properties( ${SAMPLE_NAME} PROPERTIES COMPILE_FLAGS ${RELEASE_CXX_FLAGS} )
|
||||
target_link_libraries( ${SAMPLE_NAME} PocoFoundation )
|
||||
|
||||
@@ -4,5 +4,4 @@ set(LOCAL_SRCS "")
|
||||
aux_source_directory(src LOCAL_SRCS)
|
||||
|
||||
add_executable( ${SAMPLE_NAME} ${LOCAL_SRCS} )
|
||||
#set_target_properties( ${SAMPLE_NAME} PROPERTIES COMPILE_FLAGS ${RELEASE_CXX_FLAGS} )
|
||||
target_link_libraries( ${SAMPLE_NAME} PocoFoundation )
|
||||
|
||||
@@ -4,5 +4,4 @@ set(LOCAL_SRCS "")
|
||||
aux_source_directory(src LOCAL_SRCS)
|
||||
|
||||
add_executable( ${SAMPLE_NAME} ${LOCAL_SRCS} )
|
||||
#set_target_properties( ${SAMPLE_NAME} PROPERTIES COMPILE_FLAGS ${RELEASE_CXX_FLAGS} )
|
||||
target_link_libraries( ${SAMPLE_NAME} PocoFoundation )
|
||||
|
||||
@@ -4,5 +4,4 @@ set(LOCAL_SRCS "")
|
||||
aux_source_directory(src LOCAL_SRCS)
|
||||
|
||||
add_executable( ${SAMPLE_NAME} ${LOCAL_SRCS} )
|
||||
#set_target_properties( ${SAMPLE_NAME} PROPERTIES COMPILE_FLAGS ${RELEASE_CXX_FLAGS} )
|
||||
target_link_libraries( ${SAMPLE_NAME} PocoFoundation )
|
||||
|
||||
@@ -4,5 +4,4 @@ set(LOCAL_SRCS "")
|
||||
aux_source_directory(src LOCAL_SRCS)
|
||||
|
||||
add_executable( ${SAMPLE_NAME} ${LOCAL_SRCS} )
|
||||
#set_target_properties( ${SAMPLE_NAME} PROPERTIES COMPILE_FLAGS ${RELEASE_CXX_FLAGS} )
|
||||
target_link_libraries( ${SAMPLE_NAME} PocoFoundation )
|
||||
|
||||
@@ -4,5 +4,4 @@ set(LOCAL_SRCS "")
|
||||
aux_source_directory(src LOCAL_SRCS)
|
||||
|
||||
add_executable( ${SAMPLE_NAME} ${LOCAL_SRCS} )
|
||||
#set_target_properties( ${SAMPLE_NAME} PROPERTIES COMPILE_FLAGS ${RELEASE_CXX_FLAGS} )
|
||||
target_link_libraries( ${SAMPLE_NAME} PocoFoundation )
|
||||
|
||||
@@ -4,5 +4,4 @@ set(LOCAL_SRCS "")
|
||||
aux_source_directory(src LOCAL_SRCS)
|
||||
|
||||
add_executable( ${SAMPLE_NAME} ${LOCAL_SRCS} )
|
||||
#set_target_properties( ${SAMPLE_NAME} PROPERTIES COMPILE_FLAGS ${RELEASE_CXX_FLAGS} )
|
||||
target_link_libraries( ${SAMPLE_NAME} PocoFoundation )
|
||||
|
||||
@@ -4,5 +4,4 @@ set(LOCAL_SRCS "")
|
||||
aux_source_directory(src LOCAL_SRCS)
|
||||
|
||||
add_executable( ${SAMPLE_NAME} ${LOCAL_SRCS} )
|
||||
#set_target_properties( ${SAMPLE_NAME} PROPERTIES COMPILE_FLAGS ${RELEASE_CXX_FLAGS} )
|
||||
target_link_libraries( ${SAMPLE_NAME} PocoFoundation )
|
||||
|
||||
@@ -4,5 +4,4 @@ set(LOCAL_SRCS "")
|
||||
aux_source_directory(src LOCAL_SRCS)
|
||||
|
||||
add_executable( ${SAMPLE_NAME} ${LOCAL_SRCS} )
|
||||
#set_target_properties( ${SAMPLE_NAME} PROPERTIES COMPILE_FLAGS ${RELEASE_CXX_FLAGS} )
|
||||
target_link_libraries( ${SAMPLE_NAME} PocoFoundation )
|
||||
|
||||
@@ -4,5 +4,4 @@ set(LOCAL_SRCS "")
|
||||
aux_source_directory(src LOCAL_SRCS)
|
||||
|
||||
add_executable( ${SAMPLE_NAME} ${LOCAL_SRCS} )
|
||||
#set_target_properties( ${SAMPLE_NAME} PROPERTIES COMPILE_FLAGS ${RELEASE_CXX_FLAGS} )
|
||||
target_link_libraries( ${SAMPLE_NAME} PocoFoundation )
|
||||
|
||||
@@ -4,5 +4,4 @@ set(LOCAL_SRCS "")
|
||||
aux_source_directory(src LOCAL_SRCS)
|
||||
|
||||
add_executable( ${SAMPLE_NAME} ${LOCAL_SRCS} )
|
||||
#set_target_properties( ${SAMPLE_NAME} PROPERTIES COMPILE_FLAGS ${RELEASE_CXX_FLAGS} )
|
||||
target_link_libraries( ${SAMPLE_NAME} PocoFoundation )
|
||||
|
||||
@@ -4,5 +4,4 @@ set(LOCAL_SRCS "")
|
||||
aux_source_directory(src LOCAL_SRCS)
|
||||
|
||||
add_executable( ${SAMPLE_NAME} ${LOCAL_SRCS} )
|
||||
#set_target_properties( ${SAMPLE_NAME} PROPERTIES COMPILE_FLAGS ${RELEASE_CXX_FLAGS} )
|
||||
target_link_libraries( ${SAMPLE_NAME} PocoFoundation )
|
||||
|
||||
@@ -4,5 +4,4 @@ set(LOCAL_SRCS "")
|
||||
aux_source_directory(src LOCAL_SRCS)
|
||||
|
||||
add_executable( ${SAMPLE_NAME} ${LOCAL_SRCS} )
|
||||
#set_target_properties( ${SAMPLE_NAME} PROPERTIES COMPILE_FLAGS ${RELEASE_CXX_FLAGS} )
|
||||
target_link_libraries( ${SAMPLE_NAME} PocoFoundation )
|
||||
|
||||
@@ -4,5 +4,4 @@ set(LOCAL_SRCS "")
|
||||
aux_source_directory(src LOCAL_SRCS)
|
||||
|
||||
add_executable( ${SAMPLE_NAME} ${LOCAL_SRCS} )
|
||||
#set_target_properties( ${SAMPLE_NAME} PROPERTIES COMPILE_FLAGS ${RELEASE_CXX_FLAGS} )
|
||||
target_link_libraries( ${SAMPLE_NAME} PocoFoundation )
|
||||
|
||||
@@ -4,5 +4,4 @@ set(LOCAL_SRCS "")
|
||||
aux_source_directory(src LOCAL_SRCS)
|
||||
|
||||
add_executable( ${SAMPLE_NAME} ${LOCAL_SRCS} )
|
||||
#set_target_properties( ${SAMPLE_NAME} PROPERTIES COMPILE_FLAGS ${RELEASE_CXX_FLAGS} )
|
||||
target_link_libraries( ${SAMPLE_NAME} PocoFoundation )
|
||||
|
||||
@@ -1,172 +1,55 @@
|
||||
set( TEST_SRCS
|
||||
src/ActiveDispatcherTest.cpp
|
||||
src/ActiveMethodTest.cpp
|
||||
src/ActivityTest.cpp
|
||||
src/AnyTest.cpp
|
||||
src/ArrayTest.cpp
|
||||
src/AutoPtrTest.cpp
|
||||
src/AutoReleasePoolTest.cpp
|
||||
src/Base32Test.cpp
|
||||
src/Base64Test.cpp
|
||||
src/BasicEventTest.cpp
|
||||
src/BinaryReaderWriterTest.cpp
|
||||
src/ByteOrderTest.cpp
|
||||
src/CacheTestSuite.cpp
|
||||
src/ChannelTest.cpp
|
||||
src/ClassLoaderTest.cpp
|
||||
src/ClockTest.cpp
|
||||
src/ConditionTest.cpp
|
||||
src/CoreTest.cpp
|
||||
src/CoreTestSuite.cpp
|
||||
src/CountingStreamTest.cpp
|
||||
src/CryptTestSuite.cpp
|
||||
src/DateTimeFormatterTest.cpp
|
||||
src/DateTimeParserTest.cpp
|
||||
src/DateTimeTest.cpp
|
||||
src/DateTimeTestSuite.cpp
|
||||
src/DigestStreamTest.cpp
|
||||
src/DirectoryIteratorsTest.cpp
|
||||
src/DirectoryWatcherTest.cpp
|
||||
src/Driver.cpp
|
||||
src/DummyDelegate.cpp
|
||||
src/DynamicFactoryTest.cpp
|
||||
src/DynamicTestSuite.cpp
|
||||
src/EventTestSuite.cpp
|
||||
src/ExpireCacheTest.cpp
|
||||
src/ExpireLRUCacheTest.cpp
|
||||
src/FIFOEventTest.cpp
|
||||
src/FIFOBufferStreamTest.cpp
|
||||
src/FPETest.cpp
|
||||
src/FileChannelTest.cpp
|
||||
src/FileStreamTest.cpp
|
||||
src/FileTest.cpp
|
||||
src/FilesystemTestSuite.cpp
|
||||
src/FormatTest.cpp
|
||||
src/FoundationTestSuite.cpp
|
||||
src/GlobTest.cpp
|
||||
src/HMACEngineTest.cpp
|
||||
src/HashMapTest.cpp
|
||||
src/HashSetTest.cpp
|
||||
src/HashTableTest.cpp
|
||||
src/HashingTestSuite.cpp
|
||||
src/HexBinaryTest.cpp
|
||||
src/LRUCacheTest.cpp
|
||||
src/LineEndingConverterTest.cpp
|
||||
src/LinearHashTableTest.cpp
|
||||
src/ListMapTest.cpp
|
||||
src/LocalDateTimeTest.cpp
|
||||
src/LogStreamTest.cpp
|
||||
src/LoggerTest.cpp
|
||||
src/LoggingFactoryTest.cpp
|
||||
src/LoggingRegistryTest.cpp
|
||||
src/LoggingTestSuite.cpp
|
||||
src/MD4EngineTest.cpp
|
||||
src/MD5EngineTest.cpp
|
||||
src/ManifestTest.cpp
|
||||
src/MemoryPoolTest.cpp
|
||||
src/MemoryStreamTest.cpp
|
||||
src/NDCTest.cpp
|
||||
src/NamedEventTest.cpp
|
||||
src/NamedMutexTest.cpp
|
||||
src/NamedTuplesTest.cpp
|
||||
src/NotificationCenterTest.cpp
|
||||
src/NotificationQueueTest.cpp
|
||||
src/ObjectPoolTest.cpp
|
||||
src/PriorityNotificationQueueTest.cpp
|
||||
src/TimedNotificationQueueTest.cpp
|
||||
src/NotificationsTestSuite.cpp
|
||||
src/NullStreamTest.cpp
|
||||
src/NumberFormatterTest.cpp
|
||||
src/NumberParserTest.cpp
|
||||
src/PathTest.cpp
|
||||
src/PatternFormatterTest.cpp
|
||||
src/PBKDF2EngineTest.cpp
|
||||
src/PriorityEventTest.cpp
|
||||
src/ProcessTest.cpp
|
||||
src/ProcessesTestSuite.cpp
|
||||
src/RWLockTest.cpp
|
||||
src/RandomStreamTest.cpp
|
||||
src/RandomTest.cpp
|
||||
src/RegularExpressionTest.cpp
|
||||
src/SHA1EngineTest.cpp
|
||||
src/SemaphoreTest.cpp
|
||||
src/SharedLibraryTest.cpp
|
||||
src/SharedLibraryTestSuite.cpp
|
||||
src/SharedMemoryTest.cpp
|
||||
src/SharedPtrTest.cpp
|
||||
src/SimpleFileChannelTest.cpp
|
||||
src/SimpleHashTableTest.cpp
|
||||
src/StopwatchTest.cpp
|
||||
src/StreamConverterTest.cpp
|
||||
src/StreamCopierTest.cpp
|
||||
src/StreamTokenizerTest.cpp
|
||||
src/StreamsTestSuite.cpp
|
||||
src/StringTest.cpp
|
||||
src/StringTokenizerTest.cpp
|
||||
src/TaskManagerTest.cpp
|
||||
src/TaskTest.cpp
|
||||
src/TaskTestSuite.cpp
|
||||
src/TeeStreamTest.cpp
|
||||
src/TestChannel.cpp
|
||||
src/TestPlugin.cpp
|
||||
src/TextConverterTest.cpp
|
||||
src/TextEncodingTest.cpp
|
||||
src/TextIteratorTest.cpp
|
||||
src/TextBufferIteratorTest.cpp
|
||||
src/TextTestSuite.cpp
|
||||
src/ThreadLocalTest.cpp
|
||||
src/ThreadPoolTest.cpp
|
||||
src/ThreadTest.cpp
|
||||
src/ThreadingTestSuite.cpp
|
||||
src/TimerTest.cpp
|
||||
src/TimespanTest.cpp
|
||||
src/TimestampTest.cpp
|
||||
src/TimezoneTest.cpp
|
||||
src/TuplesTest.cpp
|
||||
src/TypeListTest.cpp
|
||||
src/URIStreamOpenerTest.cpp
|
||||
src/URITest.cpp
|
||||
src/URITestSuite.cpp
|
||||
src/UTF8StringTest.cpp
|
||||
src/UUIDGeneratorTest.cpp
|
||||
src/UUIDTest.cpp
|
||||
src/UUIDTestSuite.cpp
|
||||
src/UniqueExpireCacheTest.cpp
|
||||
src/UnicodeConverterTest.cpp
|
||||
src/UniqueExpireLRUCacheTest.cpp
|
||||
src/VarTest.cpp
|
||||
src/ZLibTest.cpp
|
||||
)
|
||||
|
||||
set( WIN_TEST_SRCS
|
||||
src/WinDriver.cpp
|
||||
)
|
||||
|
||||
set(TESTUNIT "${LIBNAME}-testrunner")
|
||||
|
||||
# Sources
|
||||
file(GLOB SRCS_G "src/*.cpp")
|
||||
file(GLOB SRCS_G_REMOVE
|
||||
src/TestApp.cpp
|
||||
src/TestApp_WINCE.cpp
|
||||
src/TestLibrary.cpp
|
||||
src/TestPlugin.cpp
|
||||
)
|
||||
list(REMOVE_ITEM SRCS_G ${SRCS_G_REMOVE})
|
||||
POCO_SOURCES_AUTO( TEST_SRCS ${SRCS_G})
|
||||
|
||||
# Headers
|
||||
file(GLOB_RECURSE HDRS_G "src/*.h" )
|
||||
POCO_HEADERS_AUTO( TEST_SRCS ${HDRS_G})
|
||||
|
||||
POCO_SOURCES_AUTO_PLAT( TEST_SRCS WIN32
|
||||
src/WinDriver.cpp
|
||||
)
|
||||
|
||||
POCO_SOURCES_PLAT( TEST_SRCS FoundationTest WINCE
|
||||
src/WinCEDriver.cpp
|
||||
)
|
||||
|
||||
add_executable( ${TESTUNIT} ${TEST_SRCS} )
|
||||
add_test(NAME ${LIBNAME} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND ${TESTUNIT} -all)
|
||||
add_test(NAME ${LIBNAME} WORKING_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY} COMMAND ${TESTUNIT} -all)
|
||||
set_tests_properties(${LIBNAME} PROPERTIES ENVIRONMENT "LD_LIBRARY_PATH=.") # The SharedLibaryTest has to look for shared libraries in the working directory
|
||||
#set_target_properties( ${TESTUNIT} PROPERTIES COMPILE_FLAGS ${RELEASE_CXX_FLAGS} )
|
||||
target_link_libraries( ${TESTUNIT} PocoFoundation CppUnit )
|
||||
if (NOT ANDROID)
|
||||
target_link_libraries( ${TESTUNIT} pthread)
|
||||
endif ()
|
||||
if( WIN32)
|
||||
add_definitions("-D_AFXDLL")
|
||||
target_link_libraries( ${TESTUNIT} WinTestRunner)
|
||||
else()
|
||||
target_link_libraries( ${TESTUNIT} pthread)
|
||||
endif(WIN32)
|
||||
|
||||
# The test is run in the build directory. So the test data is copied there too
|
||||
# The test is run in the runtime directory. So the test data is copied there too
|
||||
add_custom_command(TARGET ${TESTUNIT} POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/data ${CMAKE_CURRENT_BINARY_DIR}/data )
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/data ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/data )
|
||||
|
||||
# TestApp
|
||||
add_executable( TestApp src/TestApp.cpp )
|
||||
# The test is run in the build directory. So the TestApp is built there too because it is used by the tests
|
||||
set_target_properties( TestApp PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} )
|
||||
#set_target_properties( TestApp PROPERTIES COMPILE_FLAGS ${RELEASE_CXX_FLAGS} )
|
||||
# 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 PocoFoundation )
|
||||
# TODO: Add TestApp_WINCE
|
||||
|
||||
add_library( TestLibrary SHARED src/TestLibrary.cpp )
|
||||
set_target_properties( TestLibrary PROPERTIES PREFIX "") # The test requires the library named TestLibrary. By default it is prefixed with lib.
|
||||
# The test is run in the build directory. So the TestLibrary is built there too because it is used by the tests
|
||||
set_target_properties( TestLibrary PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} )
|
||||
#set_target_properties( TestLibrary PROPERTIES COMPILE_FLAGS ${RELEASE_CXX_FLAGS} )
|
||||
# TestLibrary
|
||||
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 PocoFoundation )
|
||||
|
||||
|
||||
@@ -1,27 +1,18 @@
|
||||
set(LIBNAME "PocoJSON")
|
||||
|
||||
set(SRCS
|
||||
src/Array.cpp
|
||||
src/Handler.cpp
|
||||
src/JSONException.cpp
|
||||
src/Object.cpp
|
||||
src/ParseHandler.cpp
|
||||
src/Parser.cpp
|
||||
src/PrintHandler.cpp
|
||||
src/Query.cpp
|
||||
src/Stringifier.cpp
|
||||
src/TemplateCache.cpp
|
||||
src/Template.cpp
|
||||
)
|
||||
# Sources
|
||||
file(GLOB SRCS_G "src/*.cpp")
|
||||
POCO_SOURCES_AUTO( SRCS ${SRCS_G})
|
||||
|
||||
if (NOT POCO_STATIC)
|
||||
add_definitions(-DJSON_EXPORTS)
|
||||
endif (NOT POCO_STATIC)
|
||||
# Headers
|
||||
file(GLOB_RECURSE HDRS_G "include/*.h" )
|
||||
POCO_HEADERS_AUTO( SRCS ${HDRS_G})
|
||||
|
||||
add_library( ${LIBNAME} ${LIB_MODE} ${SRCS} )
|
||||
set_target_properties( ${LIBNAME}
|
||||
PROPERTIES
|
||||
VERSION ${SHARED_LIBRARY_VERSION} SOVERSION ${SHARED_LIBRARY_VERSION} )
|
||||
PROPERTIES
|
||||
VERSION ${SHARED_LIBRARY_VERSION} SOVERSION ${SHARED_LIBRARY_VERSION}
|
||||
DEFINE_SYMBOL JSON_EXPORTS)
|
||||
target_link_libraries( ${LIBNAME} PocoFoundation)
|
||||
|
||||
install(
|
||||
|
||||
@@ -4,5 +4,4 @@ set(LOCAL_SRCS "")
|
||||
aux_source_directory(src LOCAL_SRCS)
|
||||
|
||||
add_executable( ${SAMPLE_NAME} ${LOCAL_SRCS} )
|
||||
#set_target_properties( ${SAMPLE_NAME} PROPERTIES COMPILE_FLAGS ${RELEASE_CXX_FLAGS} )
|
||||
target_link_libraries( ${SAMPLE_NAME} PocoJSON PocoFoundation )
|
||||
|
||||
@@ -1,23 +1,24 @@
|
||||
set( TEST_SRCS
|
||||
src/Driver.cpp
|
||||
src/JSONTest.cpp
|
||||
src/JSONTest.h
|
||||
src/JSONTestSuite.cpp
|
||||
src/JSONTestSuite.h
|
||||
)
|
||||
|
||||
#include_directories()
|
||||
|
||||
set( WIN_TEST_SRCS
|
||||
src/WinDriver.cpp
|
||||
)
|
||||
|
||||
set(TESTUNIT "${LIBNAME}-testrunner")
|
||||
|
||||
# Sources
|
||||
file(GLOB SRCS_G "src/*.cpp")
|
||||
POCO_SOURCES_AUTO( TEST_SRCS ${SRCS_G})
|
||||
|
||||
# Headers
|
||||
file(GLOB_RECURSE HDRS_G "src/*.h" )
|
||||
POCO_HEADERS_AUTO( TEST_SRCS ${HDRS_G})
|
||||
|
||||
POCO_SOURCES_AUTO_PLAT( TEST_SRCS WIN32
|
||||
src/WinDriver.cpp
|
||||
)
|
||||
|
||||
add_executable( ${TESTUNIT} ${TEST_SRCS} )
|
||||
add_test(NAME ${LIBNAME} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND ${TESTUNIT} -all)
|
||||
#set_target_properties( ${TESTUNIT} PROPERTIES COMPILE_FLAGS ${RELEASE_CXX_FLAGS} )
|
||||
target_link_libraries( ${TESTUNIT} PocoJSON PocoFoundation CppUnit )
|
||||
if( WIN32)
|
||||
add_definitions("-D_AFXDLL")
|
||||
target_link_libraries( ${TESTUNIT} WinTestRunner)
|
||||
endif(WIN32)
|
||||
|
||||
# The test is run in the build directory. So the test data is copied there too
|
||||
add_custom_command(TARGET ${TESTUNIT} POST_BUILD
|
||||
|
||||
@@ -1,37 +1,18 @@
|
||||
set(LIBNAME "PocoMongoDB")
|
||||
|
||||
set(SRCS
|
||||
src/Array.cpp
|
||||
src/Binary.cpp
|
||||
src/Connection.cpp
|
||||
src/Cursor.cpp
|
||||
src/Database.cpp
|
||||
src/DeleteRequest.cpp
|
||||
src/Document.cpp
|
||||
src/Element.cpp
|
||||
src/GetMoreRequest.cpp
|
||||
src/InsertRequest.cpp
|
||||
src/JavaScriptCode.cpp
|
||||
src/KillCursorsRequest.cpp
|
||||
src/Message.cpp
|
||||
src/MessageHeader.cpp
|
||||
src/ObjectId.cpp
|
||||
src/QueryRequest.cpp
|
||||
src/RegularExpression.cpp
|
||||
src/ReplicaSet.cpp
|
||||
src/RequestMessage.cpp
|
||||
src/ResponseMessage.cpp
|
||||
src/UpdateRequest.cpp
|
||||
)
|
||||
# Sources
|
||||
file(GLOB SRCS_G "src/*.cpp")
|
||||
POCO_SOURCES_AUTO( SRCS ${SRCS_G})
|
||||
|
||||
if (NOT POCO_STATIC)
|
||||
add_definitions(-DMongoDB_EXPORTS)
|
||||
endif (NOT POCO_STATIC)
|
||||
# Headers
|
||||
file(GLOB_RECURSE HDRS_G "include/*.h" )
|
||||
POCO_HEADERS_AUTO( SRCS ${HDRS_G})
|
||||
|
||||
add_library( ${LIBNAME} ${LIB_MODE} ${SRCS} )
|
||||
set_target_properties( ${LIBNAME}
|
||||
PROPERTIES
|
||||
VERSION ${SHARED_LIBRARY_VERSION} SOVERSION ${SHARED_LIBRARY_VERSION} )
|
||||
PROPERTIES
|
||||
VERSION ${SHARED_LIBRARY_VERSION} SOVERSION ${SHARED_LIBRARY_VERSION}
|
||||
DEFINE_SYMBOL MongoDB_EXPORTS)
|
||||
target_link_libraries( ${LIBNAME} PocoNet PocoFoundation)
|
||||
|
||||
install(
|
||||
@@ -48,6 +29,7 @@ install(
|
||||
)
|
||||
|
||||
if (ENABLE_TESTS)
|
||||
add_subdirectory(samples)
|
||||
add_subdirectory(testsuite)
|
||||
endif ()
|
||||
|
||||
|
||||
@@ -4,5 +4,4 @@ set(LOCAL_SRCS "")
|
||||
aux_source_directory(src LOCAL_SRCS)
|
||||
|
||||
add_executable( ${SAMPLE_NAME} ${LOCAL_SRCS} )
|
||||
#set_target_properties( ${SAMPLE_NAME} PROPERTIES COMPILE_FLAGS ${RELEASE_CXX_FLAGS} )
|
||||
target_link_libraries( ${SAMPLE_NAME} PocoMongoDB PocoNet PocoFoundation )
|
||||
|
||||
@@ -1,21 +1,24 @@
|
||||
set( TEST_SRCS
|
||||
src/Driver.cpp
|
||||
src/MongoDBTest.cpp
|
||||
src/MongoDBTest.h
|
||||
src/MongoDBTestSuite.cpp
|
||||
src/MongoDBTestSuite.h
|
||||
)
|
||||
set(TESTUNIT "${LIBNAME}-testrunner")
|
||||
|
||||
#include_directories()
|
||||
# Sources
|
||||
file(GLOB SRCS_G "src/*.cpp")
|
||||
POCO_SOURCES_AUTO( TEST_SRCS ${SRCS_G})
|
||||
|
||||
set( WIN_TEST_SRCS
|
||||
src/WinDriver.cpp
|
||||
# Headers
|
||||
file(GLOB_RECURSE HDRS_G "src/*.h" )
|
||||
POCO_HEADERS_AUTO( TEST_SRCS ${HDRS_G})
|
||||
|
||||
POCO_SOURCES_AUTO_PLAT( TEST_SRCS WIN32
|
||||
src/WinDriver.cpp
|
||||
)
|
||||
|
||||
set(TESTUNIT "${LIBNAME}-testrunner")
|
||||
|
||||
add_executable( ${TESTUNIT} ${TEST_SRCS} )
|
||||
add_test(NAME ${LIBNAME} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND ${TESTUNIT} -all)
|
||||
#set_target_properties( ${TESTUNIT} PROPERTIES COMPILE_FLAGS ${RELEASE_CXX_FLAGS} )
|
||||
target_link_libraries( ${TESTUNIT} PocoMongoDB PocoFoundation CppUnit )
|
||||
|
||||
if( WIN32)
|
||||
#TODO: Is this flag always required?
|
||||
add_definitions("-D_AFXDLL")
|
||||
target_link_libraries( ${TESTUNIT} WinTestRunner)
|
||||
endif(WIN32)
|
||||
|
||||
@@ -1,126 +1,23 @@
|
||||
set(LIBNAME "PocoNet")
|
||||
|
||||
set( BASE_SRCS
|
||||
src/AbstractHTTPRequestHandler.cpp
|
||||
src/DatagramSocket.cpp
|
||||
src/DatagramSocketImpl.cpp
|
||||
src/DialogSocket.cpp
|
||||
src/DNS.cpp
|
||||
src/FilePartSource.cpp
|
||||
src/FTPClientSession.cpp
|
||||
src/FTPStreamFactory.cpp
|
||||
src/HostEntry.cpp
|
||||
src/HTMLForm.cpp
|
||||
src/HTTPAuthenticationParams.cpp
|
||||
src/HTTPBasicCredentials.cpp
|
||||
src/HTTPBufferAllocator.cpp
|
||||
src/HTTPChunkedStream.cpp
|
||||
src/HTTPClientSession.cpp
|
||||
src/HTTPCookie.cpp
|
||||
src/HTTPCredentials.cpp
|
||||
src/HTTPDigestCredentials.cpp
|
||||
src/HTTPFixedLengthStream.cpp
|
||||
src/HTTPHeaderStream.cpp
|
||||
src/HTTPIOStream.cpp
|
||||
src/HTTPMessage.cpp
|
||||
src/HTTPRequest.cpp
|
||||
src/HTTPRequestHandler.cpp
|
||||
src/HTTPRequestHandlerFactory.cpp
|
||||
src/HTTPResponse.cpp
|
||||
src/HTTPServer.cpp
|
||||
src/HTTPServerConnection.cpp
|
||||
src/HTTPServerConnectionFactory.cpp
|
||||
src/HTTPServerParams.cpp
|
||||
src/HTTPServerRequest.cpp
|
||||
src/HTTPServerRequestImpl.cpp
|
||||
src/HTTPServerResponse.cpp
|
||||
src/HTTPServerResponseImpl.cpp
|
||||
src/HTTPServerSession.cpp
|
||||
src/HTTPSession.cpp
|
||||
src/HTTPSessionFactory.cpp
|
||||
src/HTTPSessionInstantiator.cpp
|
||||
src/HTTPStream.cpp
|
||||
src/HTTPStreamFactory.cpp
|
||||
src/ICMPClient.cpp
|
||||
src/ICMPEventArgs.cpp
|
||||
src/ICMPPacket.cpp
|
||||
src/ICMPPacketImpl.cpp
|
||||
src/ICMPSocket.cpp
|
||||
src/ICMPSocketImpl.cpp
|
||||
src/ICMPv4PacketImpl.cpp
|
||||
src/IPAddress.cpp
|
||||
src/IPAddressImpl.cpp
|
||||
src/MailMessage.cpp
|
||||
src/MailRecipient.cpp
|
||||
src/MailStream.cpp
|
||||
src/MediaType.cpp
|
||||
src/MessageHeader.cpp
|
||||
src/MulticastSocket.cpp
|
||||
src/MultipartReader.cpp
|
||||
src/MultipartWriter.cpp
|
||||
src/NameValueCollection.cpp
|
||||
src/Net.cpp
|
||||
src/NetException.cpp
|
||||
src/NetworkInterface.cpp
|
||||
src/NTPClient.cpp
|
||||
src/NTPEventArgs.cpp
|
||||
src/NTPPacket.cpp
|
||||
src/NullPartHandler.cpp
|
||||
src/PartHandler.cpp
|
||||
src/PartSource.cpp
|
||||
src/PartStore.cpp
|
||||
src/POP3ClientSession.cpp
|
||||
src/QuotedPrintableDecoder.cpp
|
||||
src/QuotedPrintableEncoder.cpp
|
||||
src/RawSocket.cpp
|
||||
src/RawSocketImpl.cpp
|
||||
src/RemoteSyslogChannel.cpp
|
||||
src/RemoteSyslogListener.cpp
|
||||
src/ServerSocket.cpp
|
||||
src/ServerSocketImpl.cpp
|
||||
src/SMTPChannel.cpp
|
||||
src/SMTPClientSession.cpp
|
||||
src/Socket.cpp
|
||||
src/SocketAddress.cpp
|
||||
src/SocketAddressImpl.cpp
|
||||
src/SocketImpl.cpp
|
||||
src/SocketNotification.cpp
|
||||
src/SocketNotifier.cpp
|
||||
src/SocketReactor.cpp
|
||||
src/SocketStream.cpp
|
||||
src/StreamSocket.cpp
|
||||
src/StreamSocketImpl.cpp
|
||||
src/StringPartSource.cpp
|
||||
src/TCPServer.cpp
|
||||
src/TCPServerConnection.cpp
|
||||
src/TCPServerConnectionFactory.cpp
|
||||
src/TCPServerDispatcher.cpp
|
||||
src/TCPServerParams.cpp
|
||||
src/WebSocket.cpp
|
||||
src/WebSocketImpl.cpp
|
||||
)
|
||||
# Sources
|
||||
file(GLOB SRCS_G "src/*.cpp")
|
||||
POCO_SOURCES_AUTO( SRCS ${SRCS_G})
|
||||
|
||||
set( WIN_SRCS
|
||||
)
|
||||
|
||||
set( LIN_SRCS
|
||||
)
|
||||
# Headers
|
||||
file(GLOB_RECURSE HDRS_G "include/*.h" )
|
||||
POCO_HEADERS_AUTO( SRCS ${HDRS_G})
|
||||
|
||||
#TODO: Can WIN32 be used here?
|
||||
if(CMAKE_SYSTEM MATCHES "Windows")
|
||||
set(SRCS ${BASE_SRCS} ${WIN_SRCS})
|
||||
set(SYSLIBS ${SYSLIBS} "ws2_32.lib" "iphlpapi.lib")
|
||||
else (CMAKE_SYSTEM MATCHES "Windows")
|
||||
set(SRCS ${BASE_SRCS} ${LIN_SRCS})
|
||||
set(SYSLIBS ${SYSLIBS} "ws2_32.lib" "iphlpapi.lib")
|
||||
endif(CMAKE_SYSTEM MATCHES "Windows")
|
||||
|
||||
if (NOT POCO_STATIC)
|
||||
add_definitions(-DNet_EXPORTS)
|
||||
endif (NOT POCO_STATIC)
|
||||
|
||||
add_library( ${LIBNAME} ${LIB_MODE} ${SRCS} )
|
||||
set_target_properties( ${LIBNAME}
|
||||
PROPERTIES
|
||||
VERSION ${SHARED_LIBRARY_VERSION} SOVERSION ${SHARED_LIBRARY_VERSION} )
|
||||
PROPERTIES
|
||||
VERSION ${SHARED_LIBRARY_VERSION} SOVERSION ${SHARED_LIBRARY_VERSION}
|
||||
DEFINE_SYMBOL Net_EXPORTS)
|
||||
target_link_libraries( ${LIBNAME} PocoFoundation ${SYSLIBS})
|
||||
|
||||
install(
|
||||
|
||||
@@ -4,5 +4,4 @@ set(LOCAL_SRCS "")
|
||||
aux_source_directory(src LOCAL_SRCS)
|
||||
|
||||
add_executable( ${SAMPLE_NAME} ${LOCAL_SRCS} )
|
||||
#set_target_properties( ${SAMPLE_NAME} PROPERTIES COMPILE_FLAGS ${RELEASE_CXX_FLAGS} )
|
||||
target_link_libraries( ${SAMPLE_NAME} PocoNet PocoUtil PocoJSON PocoXML PocoFoundation )
|
||||
|
||||
@@ -4,5 +4,4 @@ set(LOCAL_SRCS "")
|
||||
aux_source_directory(src LOCAL_SRCS)
|
||||
|
||||
add_executable( ${SAMPLE_NAME} ${LOCAL_SRCS} )
|
||||
#set_target_properties( ${SAMPLE_NAME} PROPERTIES COMPILE_FLAGS ${RELEASE_CXX_FLAGS} )
|
||||
target_link_libraries( ${SAMPLE_NAME} PocoNet PocoUtil PocoJSON PocoXML PocoFoundation )
|
||||
|
||||
@@ -4,5 +4,4 @@ set(LOCAL_SRCS "")
|
||||
aux_source_directory(src LOCAL_SRCS)
|
||||
|
||||
add_executable( ${SAMPLE_NAME} ${LOCAL_SRCS} )
|
||||
#set_target_properties( ${SAMPLE_NAME} PROPERTIES COMPILE_FLAGS ${RELEASE_CXX_FLAGS} )
|
||||
target_link_libraries( ${SAMPLE_NAME} PocoNet PocoUtil PocoJSON PocoXML PocoFoundation )
|
||||
|
||||
@@ -4,5 +4,4 @@ set(LOCAL_SRCS "")
|
||||
aux_source_directory(src LOCAL_SRCS)
|
||||
|
||||
add_executable( ${SAMPLE_NAME} ${LOCAL_SRCS} )
|
||||
#set_target_properties( ${SAMPLE_NAME} PROPERTIES COMPILE_FLAGS ${RELEASE_CXX_FLAGS} )
|
||||
target_link_libraries( ${SAMPLE_NAME} PocoNet PocoUtil PocoJSON PocoXML PocoFoundation )
|
||||
|
||||
@@ -4,5 +4,4 @@ set(LOCAL_SRCS "")
|
||||
aux_source_directory(src LOCAL_SRCS)
|
||||
|
||||
add_executable( ${SAMPLE_NAME} ${LOCAL_SRCS} )
|
||||
#set_target_properties( ${SAMPLE_NAME} PROPERTIES COMPILE_FLAGS ${RELEASE_CXX_FLAGS} )
|
||||
target_link_libraries( ${SAMPLE_NAME} PocoNet PocoUtil PocoJSON PocoXML PocoFoundation )
|
||||
|
||||
@@ -4,5 +4,4 @@ set(LOCAL_SRCS "")
|
||||
aux_source_directory(src LOCAL_SRCS)
|
||||
|
||||
add_executable( ${SAMPLE_NAME} ${LOCAL_SRCS} )
|
||||
#set_target_properties( ${SAMPLE_NAME} PROPERTIES COMPILE_FLAGS ${RELEASE_CXX_FLAGS} )
|
||||
target_link_libraries( ${SAMPLE_NAME} PocoNet PocoUtil PocoJSON PocoXML PocoFoundation )
|
||||
|
||||
@@ -4,5 +4,4 @@ set(LOCAL_SRCS "")
|
||||
aux_source_directory(src LOCAL_SRCS)
|
||||
|
||||
add_executable( ${SAMPLE_NAME} ${LOCAL_SRCS} )
|
||||
#set_target_properties( ${SAMPLE_NAME} PROPERTIES COMPILE_FLAGS ${RELEASE_CXX_FLAGS} )
|
||||
target_link_libraries( ${SAMPLE_NAME} PocoNet PocoUtil PocoJSON PocoXML PocoFoundation )
|
||||
|
||||
@@ -4,5 +4,4 @@ set(LOCAL_SRCS "")
|
||||
aux_source_directory(src LOCAL_SRCS)
|
||||
|
||||
add_executable( ${SAMPLE_NAME} ${LOCAL_SRCS} )
|
||||
#set_target_properties( ${SAMPLE_NAME} PROPERTIES COMPILE_FLAGS ${RELEASE_CXX_FLAGS} )
|
||||
target_link_libraries( ${SAMPLE_NAME} PocoNet PocoUtil PocoJSON PocoXML PocoFoundation )
|
||||
|
||||
@@ -4,5 +4,4 @@ set(LOCAL_SRCS "")
|
||||
aux_source_directory(src LOCAL_SRCS)
|
||||
|
||||
add_executable( ${SAMPLE_NAME} ${LOCAL_SRCS} )
|
||||
#set_target_properties( ${SAMPLE_NAME} PROPERTIES COMPILE_FLAGS ${RELEASE_CXX_FLAGS} )
|
||||
target_link_libraries( ${SAMPLE_NAME} PocoNet PocoUtil PocoJSON PocoXML PocoFoundation )
|
||||
|
||||
@@ -4,5 +4,4 @@ set(LOCAL_SRCS "")
|
||||
aux_source_directory(src LOCAL_SRCS)
|
||||
|
||||
add_executable( ${SAMPLE_NAME} ${LOCAL_SRCS} )
|
||||
#set_target_properties( ${SAMPLE_NAME} PROPERTIES COMPILE_FLAGS ${RELEASE_CXX_FLAGS} )
|
||||
target_link_libraries( ${SAMPLE_NAME} PocoNet PocoUtil PocoJSON PocoXML PocoFoundation )
|
||||
|
||||
@@ -4,5 +4,4 @@ set(LOCAL_SRCS "")
|
||||
aux_source_directory(src LOCAL_SRCS)
|
||||
|
||||
add_executable( ${SAMPLE_NAME} ${LOCAL_SRCS} )
|
||||
#set_target_properties( ${SAMPLE_NAME} PROPERTIES COMPILE_FLAGS ${RELEASE_CXX_FLAGS} )
|
||||
target_link_libraries( ${SAMPLE_NAME} PocoNet PocoUtil PocoJSON PocoXML PocoFoundation )
|
||||
|
||||
@@ -4,5 +4,4 @@ set(LOCAL_SRCS "")
|
||||
aux_source_directory(src LOCAL_SRCS)
|
||||
|
||||
add_executable( ${SAMPLE_NAME} ${LOCAL_SRCS} )
|
||||
#set_target_properties( ${SAMPLE_NAME} PROPERTIES COMPILE_FLAGS ${RELEASE_CXX_FLAGS} )
|
||||
target_link_libraries( ${SAMPLE_NAME} PocoNet PocoUtil PocoJSON PocoXML PocoFoundation )
|
||||
|
||||
@@ -4,5 +4,4 @@ set(LOCAL_SRCS "")
|
||||
aux_source_directory(src LOCAL_SRCS)
|
||||
|
||||
add_executable( ${SAMPLE_NAME} ${LOCAL_SRCS} )
|
||||
#set_target_properties( ${SAMPLE_NAME} PROPERTIES COMPILE_FLAGS ${RELEASE_CXX_FLAGS} )
|
||||
target_link_libraries( ${SAMPLE_NAME} PocoNet PocoUtil PocoJSON PocoXML PocoFoundation )
|
||||
|
||||
@@ -4,5 +4,4 @@ set(LOCAL_SRCS "")
|
||||
aux_source_directory(src LOCAL_SRCS)
|
||||
|
||||
add_executable( ${SAMPLE_NAME} ${LOCAL_SRCS} )
|
||||
#set_target_properties( ${SAMPLE_NAME} PROPERTIES COMPILE_FLAGS ${RELEASE_CXX_FLAGS} )
|
||||
target_link_libraries( ${SAMPLE_NAME} PocoNet PocoUtil PocoJSON PocoXML PocoFoundation )
|
||||
|
||||
@@ -1,74 +1,21 @@
|
||||
set( TEST_SRCS
|
||||
src/DNSTest.cpp
|
||||
src/DatagramSocketTest.cpp
|
||||
src/DialogServer.cpp
|
||||
src/DialogSocketTest.cpp
|
||||
src/Driver.cpp
|
||||
src/EchoServer.cpp
|
||||
src/FTPClientSessionTest.cpp
|
||||
src/FTPClientTestSuite.cpp
|
||||
src/FTPStreamFactoryTest.cpp
|
||||
src/HTMLFormTest.cpp
|
||||
src/HTMLTestSuite.cpp
|
||||
src/HTTPClientSessionTest.cpp
|
||||
src/HTTPClientTestSuite.cpp
|
||||
src/HTTPCookieTest.cpp
|
||||
src/HTTPCredentialsTest.cpp
|
||||
src/HTTPRequestTest.cpp
|
||||
src/HTTPResponseTest.cpp
|
||||
src/HTTPServerTest.cpp
|
||||
src/HTTPServerTestSuite.cpp
|
||||
src/HTTPStreamFactoryTest.cpp
|
||||
src/HTTPTestServer.cpp
|
||||
src/HTTPTestSuite.cpp
|
||||
src/ICMPClientTest.cpp
|
||||
src/ICMPClientTestSuite.cpp
|
||||
src/ICMPSocketTest.cpp
|
||||
src/IPAddressTest.cpp
|
||||
src/MailMessageTest.cpp
|
||||
src/MailStreamTest.cpp
|
||||
src/MailTestSuite.cpp
|
||||
src/MediaTypeTest.cpp
|
||||
src/MessageHeaderTest.cpp
|
||||
src/MessagesTestSuite.cpp
|
||||
src/MulticastEchoServer.cpp
|
||||
src/MulticastSocketTest.cpp
|
||||
src/MultipartReaderTest.cpp
|
||||
src/MultipartWriterTest.cpp
|
||||
src/NameValueCollectionTest.cpp
|
||||
src/NetCoreTestSuite.cpp
|
||||
src/NetTestSuite.cpp
|
||||
src/NetworkInterfaceTest.cpp
|
||||
src/NTPClientTest.cpp
|
||||
src/NTPClientTestSuite.cpp
|
||||
src/POP3ClientSessionTest.cpp
|
||||
src/QuotedPrintableTest.cpp
|
||||
src/RawSocketTest.cpp
|
||||
src/ReactorTestSuite.cpp
|
||||
src/SMTPClientSessionTest.cpp
|
||||
src/SocketAddressTest.cpp
|
||||
src/SocketReactorTest.cpp
|
||||
src/SocketStreamTest.cpp
|
||||
src/SocketTest.cpp
|
||||
src/SocketsTestSuite.cpp
|
||||
src/SyslogTest.cpp
|
||||
src/TCPServerTest.cpp
|
||||
src/TCPServerTestSuite.cpp
|
||||
src/UDPEchoServer.cpp
|
||||
src/WebSocketTest.cpp
|
||||
src/WebSocketTestSuite.cpp
|
||||
)
|
||||
|
||||
#include_directories()
|
||||
|
||||
set( WIN_TEST_SRCS
|
||||
src/WinDriver.cpp
|
||||
)
|
||||
|
||||
set(TESTUNIT "${LIBNAME}-testrunner")
|
||||
|
||||
# Sources
|
||||
file(GLOB SRCS_G "src/*.cpp")
|
||||
POCO_SOURCES_AUTO( TEST_SRCS ${SRCS_G})
|
||||
|
||||
# Headers
|
||||
file(GLOB_RECURSE HDRS_G "src/*.h" )
|
||||
POCO_HEADERS_AUTO( TEST_SRCS ${HDRS_G})
|
||||
|
||||
POCO_SOURCES_AUTO_PLAT( TEST_SRCS WIN32
|
||||
src/WinDriver.cpp
|
||||
)
|
||||
|
||||
add_executable( ${TESTUNIT} ${TEST_SRCS} )
|
||||
add_test(NAME ${LIBNAME} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND ${TESTUNIT} -all)
|
||||
#set_target_properties( ${TESTUNIT} PROPERTIES COMPILE_FLAGS ${RELEASE_CXX_FLAGS} )
|
||||
target_link_libraries( ${TESTUNIT} PocoNet PocoUtil PocoXML PocoFoundation CppUnit)
|
||||
|
||||
if( WIN32)
|
||||
add_definitions("-D_AFXDLL")
|
||||
target_link_libraries( ${TESTUNIT} WinTestRunner)
|
||||
endif(WIN32)
|
||||
|
||||
@@ -1,45 +1,18 @@
|
||||
set(LIBNAME "PocoNetSSL")
|
||||
|
||||
set(SRCS
|
||||
src/AcceptCertificateHandler.cpp
|
||||
src/CertificateHandlerFactory.cpp
|
||||
src/CertificateHandlerFactoryMgr.cpp
|
||||
src/ConsoleCertificateHandler.cpp
|
||||
src/Context.cpp
|
||||
src/HTTPSClientSession.cpp
|
||||
src/HTTPSSessionInstantiator.cpp
|
||||
src/HTTPSStreamFactory.cpp
|
||||
src/InvalidCertificateHandler.cpp
|
||||
src/KeyConsoleHandler.cpp
|
||||
src/KeyFileHandler.cpp
|
||||
src/PrivateKeyFactory.cpp
|
||||
src/PrivateKeyFactoryMgr.cpp
|
||||
src/PrivateKeyPassphraseHandler.cpp
|
||||
src/RejectCertificateHandler.cpp
|
||||
src/SecureServerSocket.cpp
|
||||
src/SecureServerSocketImpl.cpp
|
||||
src/SecureSMTPClientSession.cpp
|
||||
src/SecureSocketImpl.cpp
|
||||
src/SecureStreamSocket.cpp
|
||||
src/SecureStreamSocketImpl.cpp
|
||||
src/Session.cpp
|
||||
src/SSLException.cpp
|
||||
src/SSLManager.cpp
|
||||
src/Utility.cpp
|
||||
src/VerificationErrorArgs.cpp
|
||||
src/X509Certificate.cpp
|
||||
)
|
||||
# Sources
|
||||
file(GLOB SRCS_G "src/*.cpp")
|
||||
POCO_SOURCES_AUTO( SRCS ${SRCS_G})
|
||||
|
||||
include_directories( ${OPENSSL_INCLUDE_DIR} )
|
||||
|
||||
if (NOT POCO_STATIC)
|
||||
add_definitions(-DNetSSL_EXPORTS)
|
||||
endif (NOT POCO_STATIC)
|
||||
# Headers
|
||||
file(GLOB_RECURSE HDRS_G "include/*.h" )
|
||||
POCO_HEADERS_AUTO( SRCS ${HDRS_G})
|
||||
|
||||
add_library( ${LIBNAME} ${LIB_MODE} ${SRCS} )
|
||||
set_target_properties( ${LIBNAME}
|
||||
PROPERTIES
|
||||
VERSION ${SHARED_LIBRARY_VERSION} SOVERSION ${SHARED_LIBRARY_VERSION} )
|
||||
PROPERTIES
|
||||
VERSION ${SHARED_LIBRARY_VERSION} SOVERSION ${SHARED_LIBRARY_VERSION}
|
||||
DEFINE_SYMBOL NetSSL_EXPORTS)
|
||||
target_link_libraries( ${LIBNAME} PocoCrypto PocoNet PocoUtil PocoFoundation ${OPENSSL_SSL_LIBRARY} ${OPENSSL_CRYPTO_LIBRARY} )
|
||||
|
||||
install(
|
||||
|
||||
@@ -1,2 +1,3 @@
|
||||
add_subdirectory( HTTPSTimeServer )
|
||||
add_subdirectory( download )
|
||||
add_subdirectory( Mail )
|
||||
|
||||
@@ -4,5 +4,4 @@ set(LOCAL_SRCS "")
|
||||
aux_source_directory(src LOCAL_SRCS)
|
||||
|
||||
add_executable( ${SAMPLE_NAME} ${LOCAL_SRCS} )
|
||||
#set_target_properties( ${SAMPLE_NAME} PROPERTIES COMPILE_FLAGS ${RELEASE_CXX_FLAGS} )
|
||||
target_link_libraries( ${SAMPLE_NAME} PocoNetSSL PocoCrypto PocoUtil PocoNet PocoXML PocoFoundation )
|
||||
|
||||
@@ -4,5 +4,4 @@ set(LOCAL_SRCS "")
|
||||
aux_source_directory(src LOCAL_SRCS)
|
||||
|
||||
add_executable( ${SAMPLE_NAME} ${LOCAL_SRCS} )
|
||||
#set_target_properties( ${SAMPLE_NAME} PROPERTIES COMPILE_FLAGS ${RELEASE_CXX_FLAGS} )
|
||||
target_link_libraries( ${SAMPLE_NAME} PocoNetSSL PocoCrypto PocoUtil PocoNet PocoXML PocoFoundation )
|
||||
|
||||
@@ -4,5 +4,4 @@ set(LOCAL_SRCS "")
|
||||
aux_source_directory(src LOCAL_SRCS)
|
||||
|
||||
add_executable( ${SAMPLE_NAME} ${LOCAL_SRCS} )
|
||||
#set_target_properties( ${SAMPLE_NAME} PROPERTIES COMPILE_FLAGS ${RELEASE_CXX_FLAGS} )
|
||||
target_link_libraries( ${SAMPLE_NAME} PocoNetSSL PocoCrypto PocoUtil PocoNet PocoXML PocoFoundation )
|
||||
|
||||
@@ -1,33 +1,33 @@
|
||||
set( TEST_SRCS
|
||||
src/Driver.cpp
|
||||
src/HTTPSClientSessionTest.cpp
|
||||
src/HTTPSClientTestSuite.cpp
|
||||
src/HTTPSServerTest.cpp
|
||||
src/HTTPSServerTestSuite.cpp
|
||||
src/HTTPSStreamFactoryTest.cpp
|
||||
src/HTTPSTestServer.cpp
|
||||
src/NetSSLTestSuite.cpp
|
||||
src/TCPServerTest.cpp
|
||||
src/TCPServerTestSuite.cpp
|
||||
)
|
||||
|
||||
#include_directories()
|
||||
|
||||
set( WIN_TEST_SRCS
|
||||
src/WinDriver.cpp
|
||||
)
|
||||
|
||||
set(TESTUNIT "${LIBNAME}-testrunner")
|
||||
|
||||
# Sources
|
||||
file(GLOB SRCS_G "src/*.cpp")
|
||||
POCO_SOURCES_AUTO( TEST_SRCS ${SRCS_G})
|
||||
|
||||
# Headers
|
||||
file(GLOB_RECURSE HDRS_G "src/*.h" )
|
||||
POCO_HEADERS_AUTO( TEST_SRCS ${HDRS_G})
|
||||
|
||||
POCO_SOURCES_AUTO_PLAT( TEST_SRCS WIN32
|
||||
src/WinDriver.cpp
|
||||
)
|
||||
|
||||
POCO_SOURCES_AUTO_PLAT( TEST_SRCS WINCE
|
||||
src/WinCEDriver.cpp
|
||||
)
|
||||
|
||||
add_executable( ${TESTUNIT} ${TEST_SRCS} )
|
||||
add_test(NAME ${LIBNAME} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND ${TESTUNIT} -all)
|
||||
#set_target_properties( ${TESTUNIT} PROPERTIES COMPILE_FLAGS ${RELEASE_CXX_FLAGS} )
|
||||
add_test(NAME ${LIBNAME} WORKING_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY} COMMAND ${TESTUNIT} -all)
|
||||
target_link_libraries( ${TESTUNIT} PocoNetSSL PocoCrypto PocoNet PocoUtil PocoXML PocoFoundation CppUnit)
|
||||
if( WIN32)
|
||||
add_definitions("-D_AFXDLL")
|
||||
target_link_libraries( ${TESTUNIT} WinTestRunner)
|
||||
endif(WIN32)
|
||||
|
||||
# The test is run in the build directory. So the test data is copied there too
|
||||
add_custom_command(TARGET ${TESTUNIT} POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/any.pem ${CMAKE_CURRENT_BINARY_DIR}
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/rootcert.pem ${CMAKE_CURRENT_BINARY_DIR}
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/testrunner.xml ${CMAKE_CURRENT_BINARY_DIR}/${TESTUNIT}.xml
|
||||
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}/${TESTUNIT}.xml
|
||||
)
|
||||
|
||||
|
||||
@@ -1,17 +1,12 @@
|
||||
set(LIBNAME "PocoPDF")
|
||||
|
||||
set(SRCS
|
||||
src/Destination.cpp
|
||||
src/Document.cpp
|
||||
src/Encoder.cpp
|
||||
src/Font.cpp
|
||||
src/Image.cpp
|
||||
src/LinkAnnotation.cpp
|
||||
src/Outline.cpp
|
||||
src/Page.cpp
|
||||
src/PDFException.cpp
|
||||
src/TextAnnotation.cpp
|
||||
)
|
||||
# Sources
|
||||
file(GLOB SRCS_G "src/*.cpp")
|
||||
POCO_SOURCES_AUTO( SRCS ${SRCS_G})
|
||||
|
||||
# Headers
|
||||
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
|
||||
@@ -20,8 +15,8 @@ if (POCO_UNBUNDLED)
|
||||
set(SYSLIBS ${SYSLIBS} ${ZLIB_LIBRARIES})
|
||||
include_directories(${ZLIB_INCLUDE_DIRS})
|
||||
else()
|
||||
# ZLIB
|
||||
list(APPEND SRCS
|
||||
# zlib
|
||||
POCO_SOURCES( SRCS zlib
|
||||
src/adler32.c
|
||||
src/compress.c
|
||||
src/crc32.c
|
||||
@@ -38,8 +33,8 @@ endif (POCO_UNBUNDLED)
|
||||
|
||||
# TODO: Currently only bundled is supported, in future this should also be possible
|
||||
# with an unbundled version of hpdf
|
||||
# HPDF
|
||||
list(APPEND SRCS
|
||||
# hpdf
|
||||
POCO_SOURCES( SRCS hpdf
|
||||
src/hpdf_annotation.c
|
||||
src/hpdf_array.c
|
||||
src/hpdf_binary.c
|
||||
@@ -94,7 +89,7 @@ list(APPEND SRCS
|
||||
|
||||
# TODO: Currently only bundled is supported, in future this should also be possible
|
||||
# with an unbundled version of libpng
|
||||
list(APPEND SRCS
|
||||
POCO_SOURCES( SRCS libpng
|
||||
src/png.c
|
||||
src/pngerror.c
|
||||
src/pnggccrd.c
|
||||
@@ -115,16 +110,13 @@ list(APPEND SRCS
|
||||
src/pngwutil.c
|
||||
)
|
||||
|
||||
include_directories(include/Poco/PDF) # zip src
|
||||
|
||||
if (NOT POCO_STATIC)
|
||||
add_definitions(-DPDF_EXPORTS)
|
||||
endif (NOT POCO_STATIC)
|
||||
include_directories( "include/Poco/PDF" ) # zip src
|
||||
|
||||
add_library( ${LIBNAME} ${LIB_MODE} ${SRCS} )
|
||||
set_target_properties( ${LIBNAME}
|
||||
PROPERTIES
|
||||
VERSION ${SHARED_LIBRARY_VERSION} SOVERSION ${SHARED_LIBRARY_VERSION} )
|
||||
PROPERTIES
|
||||
VERSION ${SHARED_LIBRARY_VERSION} SOVERSION ${SHARED_LIBRARY_VERSION}
|
||||
DEFINE_SYMBOL PDF_EXPORTS)
|
||||
target_link_libraries( ${LIBNAME} ${SYSLIBS} PocoFoundation )
|
||||
|
||||
install(
|
||||
|
||||
@@ -4,5 +4,4 @@ set(LOCAL_SRCS "")
|
||||
aux_source_directory(src LOCAL_SRCS)
|
||||
|
||||
add_executable( ${SAMPLE_NAME} ${LOCAL_SRCS} )
|
||||
#set_target_properties( ${SAMPLE_NAME} PROPERTIES COMPILE_FLAGS ${RELEASE_CXX_FLAGS} )
|
||||
target_link_libraries( ${SAMPLE_NAME} PocoPDF PocoFoundation )
|
||||
|
||||
@@ -4,5 +4,4 @@ set(LOCAL_SRCS "")
|
||||
aux_source_directory(src LOCAL_SRCS)
|
||||
|
||||
add_executable( ${SAMPLE_NAME} ${LOCAL_SRCS} )
|
||||
#set_target_properties( ${SAMPLE_NAME} PROPERTIES COMPILE_FLAGS ${RELEASE_CXX_FLAGS} )
|
||||
target_link_libraries( ${SAMPLE_NAME} PocoPDF PocoFoundation )
|
||||
|
||||
@@ -1,21 +1,22 @@
|
||||
set( TEST_SRCS
|
||||
src/Driver.cpp
|
||||
src/PDFTest.cpp
|
||||
src/PDFTest.h
|
||||
src/PDFTestSuite.cpp
|
||||
src/PDFTestSuite.h
|
||||
)
|
||||
|
||||
#include_directories()
|
||||
|
||||
set( WIN_TEST_SRCS
|
||||
src/WinDriver.cpp
|
||||
)
|
||||
|
||||
set(TESTUNIT "${LIBNAME}-testrunner")
|
||||
|
||||
# Sources
|
||||
file(GLOB SRCS_G "src/*.cpp")
|
||||
POCO_SOURCES_AUTO( TEST_SRCS ${SRCS_G})
|
||||
|
||||
# Headers
|
||||
file(GLOB_RECURSE HDRS_G "src/*.h" )
|
||||
POCO_HEADERS_AUTO( TEST_SRCS ${HDRS_G})
|
||||
|
||||
POCO_SOURCES_AUTO_PLAT( TEST_SRCS WIN32
|
||||
src/WinDriver.cpp
|
||||
)
|
||||
|
||||
add_executable( ${TESTUNIT} ${TEST_SRCS} )
|
||||
add_test(NAME ${LIBNAME} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND ${TESTUNIT} -all)
|
||||
#set_target_properties( ${TESTUNIT} PROPERTIES COMPILE_FLAGS ${RELEASE_CXX_FLAGS} )
|
||||
target_link_libraries( ${TESTUNIT} PocoPDF PocoFoundation CppUnit )
|
||||
if( WIN32)
|
||||
add_definitions("-D_AFXDLL")
|
||||
target_link_libraries( ${TESTUNIT} WinTestRunner)
|
||||
endif(WIN32)
|
||||
|
||||
|
||||
@@ -1,13 +1,16 @@
|
||||
set(LIBNAME "PocoSevenZip")
|
||||
|
||||
set(SRCS
|
||||
src/Archive.cpp
|
||||
src/ArchiveEntry.cpp
|
||||
)
|
||||
# Sources
|
||||
file(GLOB SRCS_G "src/*.cpp")
|
||||
POCO_SOURCES_AUTO( SRCS ${SRCS_G})
|
||||
|
||||
# Headers
|
||||
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
|
||||
list(APPEND SRCS
|
||||
POCO_SOURCES( SRCS 7z
|
||||
src/7zAlloc.c
|
||||
src/7zBuf2.c
|
||||
src/7zBuf.c
|
||||
@@ -17,7 +20,7 @@ list(APPEND SRCS
|
||||
src/7zFile.c
|
||||
src/7zIn.c
|
||||
src/7zStream.c
|
||||
# src/Alloc.c
|
||||
src/Alloc.c
|
||||
src/Bcj2.c
|
||||
src/Bra86.c
|
||||
src/Bra.c
|
||||
@@ -46,16 +49,13 @@ list(APPEND SRCS
|
||||
# src/XzIn.c
|
||||
)
|
||||
|
||||
include_directories( "include" )
|
||||
|
||||
if (NOT POCO_STATIC)
|
||||
add_definitions(-DSevenZip_EXPORTS)
|
||||
endif (NOT POCO_STATIC)
|
||||
include_directories( include )
|
||||
|
||||
add_library( ${LIBNAME} ${LIB_MODE} ${SRCS} )
|
||||
set_target_properties( ${LIBNAME}
|
||||
PROPERTIES
|
||||
VERSION ${SHARED_LIBRARY_VERSION} SOVERSION ${SHARED_LIBRARY_VERSION} )
|
||||
PROPERTIES
|
||||
VERSION ${SHARED_LIBRARY_VERSION} SOVERSION ${SHARED_LIBRARY_VERSION}
|
||||
DEFINE_SYMBOL SevenZip_EXPORTS)
|
||||
target_link_libraries( ${LIBNAME} PocoUtil PocoXML PocoFoundation)
|
||||
|
||||
install(
|
||||
@@ -72,8 +72,7 @@ install(
|
||||
)
|
||||
|
||||
if (ENABLE_TESTS)
|
||||
# TODO: Enable CMake for samples
|
||||
#add_subdirectory(samples)
|
||||
add_subdirectory(samples)
|
||||
# TODO: Add tests
|
||||
#add_subdirectory(testsuite)
|
||||
endif ()
|
||||
|
||||
1
SevenZip/samples/CMakeLists.txt
Normal file
1
SevenZip/samples/CMakeLists.txt
Normal file
@@ -0,0 +1 @@
|
||||
add_subdirectory( un7zip )
|
||||
7
SevenZip/samples/un7zip/CMakeLists.txt
Normal file
7
SevenZip/samples/un7zip/CMakeLists.txt
Normal file
@@ -0,0 +1,7 @@
|
||||
set(SAMPLE_NAME "un7zip")
|
||||
|
||||
set(LOCAL_SRCS "")
|
||||
aux_source_directory(src LOCAL_SRCS)
|
||||
|
||||
add_executable( ${SAMPLE_NAME} ${LOCAL_SRCS} )
|
||||
target_link_libraries( ${SAMPLE_NAME} PocoSevenZip PocoUtil PocoXML PocoFoundation )
|
||||
@@ -1,36 +1,14 @@
|
||||
set(LIBNAME "PocoUtil")
|
||||
|
||||
set(BASE_SRCS
|
||||
src/AbstractConfiguration.cpp
|
||||
src/Application.cpp
|
||||
src/ConfigurationMapper.cpp
|
||||
src/ConfigurationView.cpp
|
||||
src/FilesystemConfiguration.cpp
|
||||
src/HelpFormatter.cpp
|
||||
src/IniFileConfiguration.cpp
|
||||
src/IntValidator.cpp
|
||||
src/JSONConfiguration.cpp
|
||||
src/LayeredConfiguration.cpp
|
||||
src/LoggingConfigurator.cpp
|
||||
src/LoggingSubsystem.cpp
|
||||
src/MapConfiguration.cpp
|
||||
src/OptionCallback.cpp
|
||||
src/Option.cpp
|
||||
src/OptionException.cpp
|
||||
src/OptionProcessor.cpp
|
||||
src/OptionSet.cpp
|
||||
src/PropertyFileConfiguration.cpp
|
||||
src/RegExpValidator.cpp
|
||||
src/ServerApplication.cpp
|
||||
src/Subsystem.cpp
|
||||
src/SystemConfiguration.cpp
|
||||
src/Timer.cpp
|
||||
src/TimerTask.cpp
|
||||
src/Validator.cpp
|
||||
src/XMLConfiguration.cpp
|
||||
)
|
||||
# Sources
|
||||
file(GLOB SRCS_G "src/*.cpp")
|
||||
POCO_SOURCES_AUTO( SRCS ${SRCS_G})
|
||||
|
||||
set( WIN_SRCS
|
||||
# Headers
|
||||
file(GLOB_RECURSE HDRS_G "include/*.h" )
|
||||
POCO_HEADERS_AUTO( SRCS ${HDRS_G})
|
||||
|
||||
POCO_SOURCES_AUTO_PLAT( SRCS WIN32
|
||||
src/WinRegistryConfiguration.cpp
|
||||
src/WinRegistryKey.cpp
|
||||
src/WinService.cpp
|
||||
@@ -38,17 +16,11 @@ set( WIN_SRCS
|
||||
|
||||
include_directories( "include" )
|
||||
|
||||
if(CMAKE_SYSTEM MATCHES "Windows")
|
||||
set(SRCS ${BASE_SRCS} ${WIN_SRCS})
|
||||
add_definitions(-DUtil_EXPORTS)
|
||||
else (CMAKE_SYSTEM MATCHES "Windows")
|
||||
set(SRCS ${BASE_SRCS})
|
||||
endif(CMAKE_SYSTEM MATCHES "Windows")
|
||||
|
||||
add_library( ${LIBNAME} ${LIB_MODE} ${SRCS} )
|
||||
set_target_properties( ${LIBNAME}
|
||||
PROPERTIES
|
||||
VERSION ${SHARED_LIBRARY_VERSION} SOVERSION ${SHARED_LIBRARY_VERSION} )
|
||||
VERSION ${SHARED_LIBRARY_VERSION} SOVERSION ${SHARED_LIBRARY_VERSION}
|
||||
DEFINE_SYMBOL Util_EXPORTS)
|
||||
target_link_libraries( ${LIBNAME} PocoJSON PocoXML PocoFoundation)
|
||||
|
||||
install(
|
||||
|
||||
@@ -4,5 +4,4 @@ set(LOCAL_SRCS "")
|
||||
aux_source_directory(src LOCAL_SRCS)
|
||||
|
||||
add_executable( ${SAMPLE_NAME} ${LOCAL_SRCS} )
|
||||
#set_target_properties( ${SAMPLE_NAME} PROPERTIES COMPILE_FLAGS ${RELEASE_CXX_FLAGS} )
|
||||
target_link_libraries( ${SAMPLE_NAME} PocoUtil PocoJSON PocoXML PocoFoundation )
|
||||
|
||||
@@ -4,5 +4,4 @@ set(LOCAL_SRCS "")
|
||||
aux_source_directory(src LOCAL_SRCS)
|
||||
|
||||
add_executable( ${SAMPLE_NAME} ${LOCAL_SRCS} )
|
||||
#set_target_properties( ${SAMPLE_NAME} PROPERTIES COMPILE_FLAGS ${RELEASE_CXX_FLAGS} )
|
||||
target_link_libraries( ${SAMPLE_NAME} PocoUtil PocoJSON PocoXML PocoFoundation )
|
||||
|
||||
@@ -4,5 +4,4 @@ set(LOCAL_SRCS "")
|
||||
aux_source_directory(src LOCAL_SRCS)
|
||||
|
||||
add_executable( ${SAMPLE_NAME} ${LOCAL_SRCS} )
|
||||
#set_target_properties( ${SAMPLE_NAME} PROPERTIES COMPILE_FLAGS ${RELEASE_CXX_FLAGS} )
|
||||
target_link_libraries( ${SAMPLE_NAME} PocoUtil PocoJSON PocoXML PocoFoundation )
|
||||
|
||||
@@ -4,5 +4,4 @@ set(LOCAL_SRCS "")
|
||||
aux_source_directory(src LOCAL_SRCS)
|
||||
|
||||
add_executable( ${SAMPLE_NAME} ${LOCAL_SRCS} )
|
||||
#set_target_properties( ${SAMPLE_NAME} PROPERTIES COMPILE_FLAGS ${RELEASE_CXX_FLAGS} )
|
||||
target_link_libraries( ${SAMPLE_NAME} PocoUtil PocoJSON PocoXML PocoFoundation )
|
||||
|
||||
@@ -1,39 +1,28 @@
|
||||
set( TEST_SRCS
|
||||
src/AbstractConfigurationTest.cpp
|
||||
src/JSONConfigurationTest.cpp
|
||||
src/ConfigurationMapperTest.cpp
|
||||
src/ConfigurationTestSuite.cpp
|
||||
src/ConfigurationViewTest.cpp
|
||||
src/Driver.cpp
|
||||
src/FilesystemConfigurationTest.cpp
|
||||
src/HelpFormatterTest.cpp
|
||||
src/IniFileConfigurationTest.cpp
|
||||
src/LayeredConfigurationTest.cpp
|
||||
src/LoggingConfiguratorTest.cpp
|
||||
src/MapConfigurationTest.cpp
|
||||
src/OptionProcessorTest.cpp
|
||||
src/OptionSetTest.cpp
|
||||
src/OptionTest.cpp
|
||||
src/OptionsTestSuite.cpp
|
||||
src/PropertyFileConfigurationTest.cpp
|
||||
src/SystemConfigurationTest.cpp
|
||||
src/UtilTestSuite.cpp
|
||||
src/ValidatorTest.cpp
|
||||
src/XMLConfigurationTest.cpp
|
||||
src/TimerTestSuite.cpp
|
||||
src/TimerTest.cpp
|
||||
)
|
||||
|
||||
set( WIN_TEST_SRCS
|
||||
src/WinConfigurationTest.cpp
|
||||
src/WinDriver.cpp
|
||||
src/WinRegistryTest.cpp
|
||||
src/WindowsTestSuite.cpp
|
||||
)
|
||||
|
||||
set(TESTUNIT "${LIBNAME}-testrunner")
|
||||
|
||||
# Sources
|
||||
file(GLOB SRCS_G "src/*.cpp")
|
||||
POCO_SOURCES_AUTO( TEST_SRCS ${SRCS_G})
|
||||
|
||||
# Headers
|
||||
file(GLOB_RECURSE HDRS_G "src/*.h" )
|
||||
POCO_HEADERS_AUTO( TEST_SRCS ${HDRS_G})
|
||||
|
||||
POCO_SOURCES_AUTO_PLAT( TEST_SRCS WIN32
|
||||
src/WinDriver.cpp
|
||||
src/WinConfigurationTest.cpp
|
||||
src/WinRegistryTest.cpp
|
||||
src/WindowsTestSuite.cpp
|
||||
)
|
||||
|
||||
POCO_SOURCES_AUTO_PLAT( TEST_SRCS WINCE
|
||||
src/WinCEDriver.cpp
|
||||
)
|
||||
|
||||
add_executable( ${TESTUNIT} ${TEST_SRCS} )
|
||||
add_test(NAME ${LIBNAME} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND ${TESTUNIT} -all)
|
||||
#set_target_properties( ${TESTUNIT} PROPERTIES COMPILE_FLAGS ${RELEASE_CXX_FLAGS} )
|
||||
target_link_libraries( ${TESTUNIT} PocoUtil PocoJSON PocoXML PocoFoundation CppUnit)
|
||||
if( WIN32)
|
||||
add_definitions("-D_AFXDLL")
|
||||
target_link_libraries( ${TESTUNIT} WinTestRunner)
|
||||
endif(WIN32)
|
||||
|
||||
@@ -1,74 +1,12 @@
|
||||
set(LIBNAME "PocoXML")
|
||||
|
||||
set(SRCS
|
||||
src/AbstractContainerNode.cpp
|
||||
src/AbstractNode.cpp
|
||||
src/Attr.cpp
|
||||
src/Attributes.cpp
|
||||
src/AttributesImpl.cpp
|
||||
src/AttrMap.cpp
|
||||
src/CDATASection.cpp
|
||||
src/CharacterData.cpp
|
||||
src/ChildNodesList.cpp
|
||||
src/Comment.cpp
|
||||
src/ContentHandler.cpp
|
||||
src/DeclHandler.cpp
|
||||
src/DefaultHandler.cpp
|
||||
src/Document.cpp
|
||||
src/DocumentEvent.cpp
|
||||
src/DocumentFragment.cpp
|
||||
src/DocumentType.cpp
|
||||
src/DOMBuilder.cpp
|
||||
src/DOMException.cpp
|
||||
src/DOMImplementation.cpp
|
||||
src/DOMObject.cpp
|
||||
src/DOMParser.cpp
|
||||
src/DOMSerializer.cpp
|
||||
src/DOMWriter.cpp
|
||||
src/DTDHandler.cpp
|
||||
src/DTDMap.cpp
|
||||
src/Element.cpp
|
||||
src/ElementsByTagNameList.cpp
|
||||
src/Entity.cpp
|
||||
src/EntityReference.cpp
|
||||
src/EntityResolver.cpp
|
||||
src/EntityResolverImpl.cpp
|
||||
src/ErrorHandler.cpp
|
||||
src/Event.cpp
|
||||
src/EventDispatcher.cpp
|
||||
src/EventException.cpp
|
||||
src/EventListener.cpp
|
||||
src/EventTarget.cpp
|
||||
src/InputSource.cpp
|
||||
src/LexicalHandler.cpp
|
||||
src/Locator.cpp
|
||||
src/LocatorImpl.cpp
|
||||
src/MutationEvent.cpp
|
||||
src/Name.cpp
|
||||
src/NamedNodeMap.cpp
|
||||
src/NamePool.cpp
|
||||
src/NamespaceStrategy.cpp
|
||||
src/NamespaceSupport.cpp
|
||||
src/NodeAppender.cpp
|
||||
src/Node.cpp
|
||||
src/NodeFilter.cpp
|
||||
src/NodeIterator.cpp
|
||||
src/NodeList.cpp
|
||||
src/Notation.cpp
|
||||
src/ParserEngine.cpp
|
||||
src/ProcessingInstruction.cpp
|
||||
src/SAXException.cpp
|
||||
src/SAXParser.cpp
|
||||
src/Text.cpp
|
||||
src/TreeWalker.cpp
|
||||
src/WhitespaceFilter.cpp
|
||||
src/XMLException.cpp
|
||||
src/XMLFilter.cpp
|
||||
src/XMLFilterImpl.cpp
|
||||
src/XMLReader.cpp
|
||||
src/XMLString.cpp
|
||||
src/XMLWriter.cpp
|
||||
)
|
||||
# Sources
|
||||
file(GLOB SRCS_G "src/*.cpp")
|
||||
POCO_SOURCES_AUTO( SRCS ${SRCS_G})
|
||||
|
||||
# Headers
|
||||
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
|
||||
@@ -77,7 +15,7 @@ if (POCO_UNBUNDLED)
|
||||
set(SYSLIBS ${SYSLIBS} ${EXPAT_LIBRARIES})
|
||||
include_directories(${EXPAT_INCLUDE_DIRS})
|
||||
else()
|
||||
list(APPEND SRCS
|
||||
POCO_SOURCES( SRCS expat
|
||||
src/xmlparse.cpp
|
||||
src/xmlrole.c
|
||||
src/xmltok.c
|
||||
@@ -86,18 +24,13 @@ else()
|
||||
)
|
||||
endif (POCO_UNBUNDLED)
|
||||
|
||||
|
||||
|
||||
add_definitions(-D_USRDLL -DXML_NS -DXML_DTD -DHAVE_EXPAT_CONFIG_H -DXML_EXPORTS)
|
||||
|
||||
if (NOT POCO_STATIC)
|
||||
add_definitions(-DXML_EXPORTS)
|
||||
endif (NOT POCO_STATIC)
|
||||
add_definitions(-D_USRDLL -DXML_NS -DXML_DTD -DHAVE_EXPAT_CONFIG_H)
|
||||
|
||||
add_library( ${LIBNAME} ${LIB_MODE} ${SRCS} )
|
||||
set_target_properties( ${LIBNAME}
|
||||
PROPERTIES
|
||||
VERSION ${SHARED_LIBRARY_VERSION} SOVERSION ${SHARED_LIBRARY_VERSION} )
|
||||
PROPERTIES
|
||||
VERSION ${SHARED_LIBRARY_VERSION} SOVERSION ${SHARED_LIBRARY_VERSION}
|
||||
DEFINE_SYMBOL XML_EXPORTS)
|
||||
target_link_libraries( ${LIBNAME} ${SYSLIBS} PocoFoundation)
|
||||
|
||||
install(
|
||||
|
||||
@@ -4,5 +4,4 @@ set(LOCAL_SRCS "")
|
||||
aux_source_directory(src LOCAL_SRCS)
|
||||
|
||||
add_executable( ${SAMPLE_NAME} ${LOCAL_SRCS} )
|
||||
#set_target_properties( ${SAMPLE_NAME} PROPERTIES COMPILE_FLAGS ${RELEASE_CXX_FLAGS} )
|
||||
target_link_libraries( ${SAMPLE_NAME} PocoXML PocoFoundation )
|
||||
|
||||
@@ -4,5 +4,4 @@ set(LOCAL_SRCS "")
|
||||
aux_source_directory(src LOCAL_SRCS)
|
||||
|
||||
add_executable( ${SAMPLE_NAME} ${LOCAL_SRCS} )
|
||||
#set_target_properties( ${SAMPLE_NAME} PROPERTIES COMPILE_FLAGS ${RELEASE_CXX_FLAGS} )
|
||||
target_link_libraries( ${SAMPLE_NAME} PocoXML PocoFoundation )
|
||||
|
||||
@@ -4,5 +4,4 @@ set(LOCAL_SRCS "")
|
||||
aux_source_directory(src LOCAL_SRCS)
|
||||
|
||||
add_executable( ${SAMPLE_NAME} ${LOCAL_SRCS} )
|
||||
#set_target_properties( ${SAMPLE_NAME} PROPERTIES COMPILE_FLAGS ${RELEASE_CXX_FLAGS} )
|
||||
target_link_libraries( ${SAMPLE_NAME} PocoXML PocoFoundation )
|
||||
|
||||
@@ -4,5 +4,4 @@ set(LOCAL_SRCS "")
|
||||
aux_source_directory(src LOCAL_SRCS)
|
||||
|
||||
add_executable( ${SAMPLE_NAME} ${LOCAL_SRCS} )
|
||||
#set_target_properties( ${SAMPLE_NAME} PROPERTIES COMPILE_FLAGS ${RELEASE_CXX_FLAGS} )
|
||||
target_link_libraries( ${SAMPLE_NAME} PocoXML PocoFoundation )
|
||||
|
||||
@@ -1,37 +1,26 @@
|
||||
set( TEST_SRCS
|
||||
src/AttributesImplTest.cpp
|
||||
src/ChildNodesTest.cpp
|
||||
src/DOMTestSuite.cpp
|
||||
src/DocumentTest.cpp
|
||||
src/DocumentTypeTest.cpp
|
||||
src/Driver.cpp
|
||||
src/ElementTest.cpp
|
||||
src/EventTest.cpp
|
||||
src/NamePoolTest.cpp
|
||||
src/NameTest.cpp
|
||||
src/NamespaceSupportTest.cpp
|
||||
src/NodeAppenderTest.cpp
|
||||
src/NodeIteratorTest.cpp
|
||||
src/NodeTest.cpp
|
||||
src/ParserWriterTest.cpp
|
||||
src/SAXParserTest.cpp
|
||||
src/SAXTestSuite.cpp
|
||||
src/TextTest.cpp
|
||||
src/TreeWalkerTest.cpp
|
||||
src/XMLTestSuite.cpp
|
||||
src/XMLWriterTest.cpp
|
||||
)
|
||||
|
||||
#include_directories()
|
||||
|
||||
set( WIN_TEST_SRCS
|
||||
src/WinDriver.cpp
|
||||
)
|
||||
|
||||
set(TESTUNIT "${LIBNAME}-testrunner")
|
||||
|
||||
# Sources
|
||||
file(GLOB SRCS_G "src/*.cpp")
|
||||
POCO_SOURCES_AUTO( TEST_SRCS ${SRCS_G})
|
||||
|
||||
# Headers
|
||||
file(GLOB_RECURSE HDRS_G "src/*.h" )
|
||||
POCO_HEADERS_AUTO( TEST_SRCS ${HDRS_G})
|
||||
|
||||
POCO_SOURCES_AUTO_PLAT( TEST_SRCS WIN32
|
||||
src/WinDriver.cpp
|
||||
)
|
||||
|
||||
POCO_SOURCES_AUTO_PLAT( TEST_SRCS WINCE
|
||||
src/WinCEDriver.cpp
|
||||
)
|
||||
|
||||
add_executable( ${TESTUNIT} ${TEST_SRCS} )
|
||||
add_test(NAME ${LIBNAME} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND ${TESTUNIT} -all)
|
||||
#set_target_properties( ${TESTUNIT} PROPERTIES COMPILE_FLAGS ${RELEASE_CXX_FLAGS} )
|
||||
target_link_libraries( ${TESTUNIT} PocoXML PocoFoundation CppUnit)
|
||||
if( WIN32)
|
||||
add_definitions("-D_AFXDLL")
|
||||
target_link_libraries( ${TESTUNIT} WinTestRunner)
|
||||
endif(WIN32)
|
||||
|
||||
|
||||
@@ -1,38 +1,18 @@
|
||||
set(LIBNAME "PocoZip")
|
||||
|
||||
set(SRCS
|
||||
src/Add.cpp
|
||||
src/AutoDetectStream.cpp
|
||||
src/Compress.cpp
|
||||
src/Decompress.cpp
|
||||
src/Delete.cpp
|
||||
src/Keep.cpp
|
||||
src/ParseCallback.cpp
|
||||
src/PartialStream.cpp
|
||||
src/Rename.cpp
|
||||
src/Replace.cpp
|
||||
src/SkipCallback.cpp
|
||||
src/ZipArchive.cpp
|
||||
src/ZipArchiveInfo.cpp
|
||||
src/ZipCommon.cpp
|
||||
src/ZipDataInfo.cpp
|
||||
src/ZipException.cpp
|
||||
src/ZipFileInfo.cpp
|
||||
src/ZipLocalFileHeader.cpp
|
||||
src/ZipManipulator.cpp
|
||||
src/ZipOperation.cpp
|
||||
src/ZipStream.cpp
|
||||
src/ZipUtil.cpp
|
||||
)
|
||||
# Sources
|
||||
file(GLOB SRCS_G "src/*.cpp")
|
||||
POCO_SOURCES_AUTO( SRCS ${SRCS_G})
|
||||
|
||||
if (NOT POCO_STATIC)
|
||||
add_definitions(-DZip_EXPORTS)
|
||||
endif (NOT POCO_STATIC)
|
||||
# Headers
|
||||
file(GLOB_RECURSE HDRS_G "include/*.h" )
|
||||
POCO_HEADERS_AUTO( SRCS ${HDRS_G})
|
||||
|
||||
add_library( ${LIBNAME} ${LIB_MODE} ${SRCS} )
|
||||
set_target_properties( ${LIBNAME}
|
||||
PROPERTIES
|
||||
VERSION ${SHARED_LIBRARY_VERSION} SOVERSION ${SHARED_LIBRARY_VERSION} )
|
||||
PROPERTIES
|
||||
VERSION ${SHARED_LIBRARY_VERSION} SOVERSION ${SHARED_LIBRARY_VERSION}
|
||||
DEFINE_SYMBOL Zip_EXPORTS)
|
||||
target_link_libraries( ${LIBNAME} PocoUtil PocoXML PocoFoundation)
|
||||
|
||||
install(
|
||||
|
||||
@@ -4,5 +4,4 @@ set(LOCAL_SRCS "")
|
||||
aux_source_directory(src LOCAL_SRCS)
|
||||
|
||||
add_executable( ${SAMPLE_NAME} ${LOCAL_SRCS} )
|
||||
#set_target_properties( ${SAMPLE_NAME} PROPERTIES COMPILE_FLAGS ${RELEASE_CXX_FLAGS} )
|
||||
target_link_libraries( ${SAMPLE_NAME} PocoZip PocoUtil PocoXML PocoFoundation )
|
||||
|
||||
@@ -4,5 +4,4 @@ set(LOCAL_SRCS "")
|
||||
aux_source_directory(src LOCAL_SRCS)
|
||||
|
||||
add_executable( ${SAMPLE_NAME} ${LOCAL_SRCS} )
|
||||
#set_target_properties( ${SAMPLE_NAME} PROPERTIES COMPILE_FLAGS ${RELEASE_CXX_FLAGS} )
|
||||
target_link_libraries( ${SAMPLE_NAME} PocoZip PocoUtil PocoXML PocoFoundation )
|
||||
|
||||
@@ -1,23 +1,29 @@
|
||||
set( TEST_SRCS
|
||||
src/CompressTest.cpp
|
||||
src/Driver.cpp
|
||||
src/PartialStreamTest.cpp
|
||||
src/ZipTest.cpp
|
||||
src/ZipTestSuite.cpp
|
||||
)
|
||||
|
||||
#include_directories()
|
||||
|
||||
set( WIN_TEST_SRCS
|
||||
src/WinDriver.cpp
|
||||
)
|
||||
|
||||
set(TESTUNIT "${LIBNAME}-testrunner")
|
||||
|
||||
# Sources
|
||||
file(GLOB SRCS_G "src/*.cpp")
|
||||
POCO_SOURCES_AUTO( TEST_SRCS ${SRCS_G})
|
||||
|
||||
# Headers
|
||||
file(GLOB_RECURSE HDRS_G "src/*.h" )
|
||||
POCO_HEADERS_AUTO( TEST_SRCS ${HDRS_G})
|
||||
|
||||
POCO_SOURCES_AUTO_PLAT( TEST_SRCS WIN32
|
||||
src/WinDriver.cpp
|
||||
)
|
||||
|
||||
POCO_SOURCES_AUTO_PLAT( TEST_SRCS WINCE
|
||||
src/WinCEDriver.cpp
|
||||
)
|
||||
|
||||
add_executable( ${TESTUNIT} ${TEST_SRCS} )
|
||||
add_test(NAME ${LIBNAME} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND ${TESTUNIT} -all)
|
||||
#set_target_properties( ${TESTUNIT} PROPERTIES COMPILE_FLAGS ${RELEASE_CXX_FLAGS} )
|
||||
target_link_libraries( ${TESTUNIT} PocoZip PocoNet PocoFoundation CppUnit )
|
||||
if( WIN32)
|
||||
add_definitions("-D_AFXDLL")
|
||||
target_link_libraries( ${TESTUNIT} WinTestRunner)
|
||||
endif(WIN32)
|
||||
|
||||
# The test is run in the build directory. So the test data is copied there too
|
||||
add_custom_command(TARGET ${TESTUNIT} POST_BUILD
|
||||
|
||||
@@ -24,7 +24,7 @@ ARCHFLAGS = -march=armv7-a -mfloat-abi=softfp
|
||||
LINKFLAGS = -Wl,--fix-cortex-a8
|
||||
else
|
||||
ifeq ($(ANDROID_ABI),x86)
|
||||
TOOL = i686-android-linux
|
||||
TOOL = i686-linux-android
|
||||
ARCHFLAGS = -march=i686 -msse3 -mstackrealign -mfpmath=sse
|
||||
else
|
||||
$(error Invalid ABI specified in ANDROID_ABI)
|
||||
|
||||
13
buildwin.ps1
13
buildwin.ps1
@@ -337,6 +337,19 @@ function Build
|
||||
if ($omitArray -NotContains $component)
|
||||
{
|
||||
$vsProject = "$poco_base\$componentDir\$componentName$($platformName)$($suffix).$($extension)"
|
||||
|
||||
if (!(Test-Path -Path $vsProject)) # when VS project name is not same as directory name
|
||||
{
|
||||
$vsProject = "$poco_base\$componentDir$($platformName)$($suffix).$($extension)"
|
||||
if (!(Test-Path -Path $vsProject)) # not found
|
||||
{
|
||||
Write-Host "+------------------------------------------------------------------"
|
||||
Write-Host "| VS project $vsProject not found, skipping."
|
||||
Write-Host "+------------------------------------------------------------------"
|
||||
Return # since Foreach-Object is a function, this is actually loop "continue"
|
||||
}
|
||||
}
|
||||
|
||||
Write-Host "+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
|
||||
Write-Host "| Building $vsProject"
|
||||
Write-Host "+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
|
||||
|
||||
@@ -1,48 +1,58 @@
|
||||
# check for location of odbc_config
|
||||
find_program(UNIX_ODBC_CONFIG odbc_config
|
||||
$ENV{ODBC_PATH}/bin
|
||||
/usr/bin
|
||||
/usr/local/bin
|
||||
PATHS)
|
||||
#
|
||||
# Find the ODBC driver manager includes and library.
|
||||
#
|
||||
# ODBC is an open standard for connecting to different databases in a
|
||||
# semi-vendor-independent fashion. First you install the ODBC driver
|
||||
# manager. Then you need a driver for each separate database you want
|
||||
# to connect to (unless a generic one works). VTK includes neither
|
||||
# the driver manager nor the vendor-specific drivers: you have to find
|
||||
# those yourself.
|
||||
#
|
||||
# This module defines
|
||||
# ODBC_INCLUDE_DIRECTORIES, where to find sql.h
|
||||
# ODBC_LIBRARIES, the libraries to link against to use ODBC
|
||||
# ODBC_FOUND. If false, you cannot build anything that requires MySQL.
|
||||
|
||||
# Check that we can find the ODBC headers in `odbc_config --include-prefix`
|
||||
# location If the headers cannot be found, set UNIX_ODBC_CONFIG to
|
||||
# UNIX_ODBC_CONFIG-NOTFOUND since the odbc_config tool is essentially useless
|
||||
# if `odbc_config --include-prefix` doesn't actually point to ODBC headers
|
||||
if(NOT ${UNIX_ODBC_CONFIG} MATCHES "UNIX_ODBC_CONFIG-NOTFOUND")
|
||||
execute_process(COMMAND ${UNIX_ODBC_CONFIG} --include-prefix
|
||||
OUTPUT_VARIABLE UNIX_ODBC_INCLUDE_PREFIX
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
if(NOT EXISTS ${UNIX_ODBC_INCLUDE_PREFIX}/sqlext.h)
|
||||
set(UNIX_ODBC_CONFIG "UNIX_ODBC_CONFIG-NOTFOUND")
|
||||
endif(NOT EXISTS ${UNIX_ODBC_INCLUDE_PREFIX}/sqlext.h)
|
||||
endif(NOT ${UNIX_ODBC_CONFIG} MATCHES "UNIX_ODBC_CONFIG-NOTFOUND")
|
||||
find_path(ODBC_INCLUDE_DIRECTORIES
|
||||
NAMES sql.h
|
||||
HINTS
|
||||
/usr/include
|
||||
/usr/include/odbc
|
||||
/usr/local/include
|
||||
/usr/local/include/odbc
|
||||
/usr/local/odbc/include
|
||||
"C:/Program Files/ODBC/include"
|
||||
"C:/Program Files/Microsoft SDKs/Windows/v7.0/include"
|
||||
"C:/Program Files/Microsoft SDKs/Windows/v6.0a/include"
|
||||
"C:/ODBC/include"
|
||||
DOC "Specify the directory containing sql.h."
|
||||
)
|
||||
|
||||
if(${UNIX_ODBC_CONFIG} MATCHES "UNIX_ODBC_CONFIG-NOTFOUND")
|
||||
message(STATUS "Couldn't find unixODBC")
|
||||
else(${UNIX_ODBC_CONFIG} MATCHES "UNIX_ODBC_CONFIG-NOTFOUND")
|
||||
message(STATUS "Found unixODBC: odbc_config in ${UNIX_ODBC_CONFIG}")
|
||||
exec_program(${UNIX_ODBC_CONFIG} ARGS "--include-prefix" OUTPUT_VARIABLE ODBC_INCLUDE_DIR)
|
||||
include_directories(${ODBC_INCLUDE_DIR})
|
||||
exec_program(${UNIX_ODBC_CONFIG} ARGS "--libs" OUTPUT_VARIABLE ODBC_LINK_FLAGS)
|
||||
add_definitions(-DPOCO_UNIXODBC)
|
||||
endif(${UNIX_ODBC_CONFIG} MATCHES "UNIX_ODBC_CONFIG-NOTFOUND")
|
||||
find_library(ODBC_LIBRARIES
|
||||
NAMES iodbc odbc odbcinst odbc32
|
||||
HINTS
|
||||
/usr/lib
|
||||
/usr/lib/odbc
|
||||
/usr/local/lib
|
||||
/usr/local/lib/odbc
|
||||
/usr/local/odbc/lib
|
||||
"C:/Program Files/ODBC/lib"
|
||||
"C:/ODBC/lib/debug"
|
||||
"C:/Program Files (x86)/Microsoft SDKs/Windows/v7.0A/Lib"
|
||||
DOC "Specify the ODBC driver manager library here."
|
||||
)
|
||||
|
||||
find_program(IODBC_CONFIG iodbc-config
|
||||
$ENV{ODBC_PATH}/bin
|
||||
/usr/bin
|
||||
/usr/local/bin
|
||||
PATHS)
|
||||
# MinGW find usually fails
|
||||
if(MINGW)
|
||||
set(ODBC_INCLUDE_DIRECTORIES ".")
|
||||
set(ODBC_LIBRARIES odbc32)
|
||||
endif()
|
||||
|
||||
if(${IODBC_CONFIG} MATCHES "IODBC_CONFIG-NOTFOUND")
|
||||
message(STATUS "Couldn't find iODBC")
|
||||
else(${IODBC_CONFIG} MATCHES "IODBC_CONFIG-NOTFOUND")
|
||||
message(STATUS "Found iODBC: iodbc-config in ${IODBC_CONFIG}")
|
||||
exec_program(${IODBC_CONFIG} ARGS "--cflags" OUTPUT_VARIABLE ODBC_CFLAGS)
|
||||
add_definitions( ${ODBC_CFLAGS} )
|
||||
exec_program(${IODBC_CONFIG} ARGS "--libs" OUTPUT_VARIABLE ODBC_LINK_FLAGS)
|
||||
add_definitions(-DPOCO_IODBC)
|
||||
endif(${IODBC_CONFIG} MATCHES "IODBC_CONFIG-NOTFOUND")
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(ODBC
|
||||
DEFAULT_MSG
|
||||
ODBC_INCLUDE_DIRECTORIES
|
||||
ODBC_LIBRARIES
|
||||
)
|
||||
|
||||
message(STATUS "UNIX ODBC: ${UNIX_ODBC_CONFIG}")
|
||||
message(STATUS "IODBC: ${IODBC_CONFIG}")
|
||||
mark_as_advanced(ODBC_FOUND ODBC_LIBRARIES ODBC_INCLUDE_DIRECTORIES)
|
||||
|
||||
184
cmake/PocoMacros.cmake
Normal file
184
cmake/PocoMacros.cmake
Normal file
@@ -0,0 +1,184 @@
|
||||
# Copyright Siemens AG, 2014
|
||||
# Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
|
||||
# and Contributors.
|
||||
#
|
||||
# SPDX-License-Identifier: BSL-1.0
|
||||
#
|
||||
# Collection of common functionality for Poco CMake
|
||||
|
||||
# Find the Microsoft mc.exe message compiler
|
||||
#
|
||||
# CMAKE_MC_COMPILER - where to find mc.exe
|
||||
if (WIN32)
|
||||
# cmake has CMAKE_RC_COMPILER, but no message compiler
|
||||
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)
|
||||
get_filename_component(kit_dir "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows Kits\\Installed Roots;KitsRoot]" REALPATH)
|
||||
if (X64)
|
||||
set(sdk_bindir "${sdk_dir}/bin/x64")
|
||||
set(kit_bindir "${kit_dir}/bin/x64")
|
||||
else (X64)
|
||||
set(sdk_bindir "${sdk_dir}/bin")
|
||||
set(kit_bindir "${kit_dir}/bin/x86")
|
||||
endif (X64)
|
||||
endif ()
|
||||
find_program(CMAKE_MC_COMPILER mc.exe HINTS "${sdk_bindir}" "${kit_bindir}"
|
||||
DOC "path to message compiler")
|
||||
if (NOT CMAKE_MC_COMPILER)
|
||||
message(FATAL_ERROR "message compiler not found: required to build")
|
||||
endif (NOT CMAKE_MC_COMPILER)
|
||||
message(STATUS "Found message compiler: ${CMAKE_MC_COMPILER}")
|
||||
mark_as_advanced(CMAKE_MC_COMPILER)
|
||||
endif(WIN32)
|
||||
|
||||
#===============================================================================
|
||||
# Macros for Source file management
|
||||
#
|
||||
# POCO_SOURCES_PLAT - Adds a list of files to the sources of a components
|
||||
# Usage: POCO_SOURCES_PLAT( out name platform sources)
|
||||
# INPUT:
|
||||
# out the variable the sources are added to
|
||||
# name: the name of the components
|
||||
# platform: the platform this sources are for (ON = All, OFF = None, WIN32, UNIX ...)
|
||||
# sources: a list of files to add to ${out}
|
||||
# Example: POCO_SOURCES_PLAT( SRCS Foundation ON src/Foundation.cpp )
|
||||
#
|
||||
# POCO_SOURCES - Like POCO_SOURCES_PLAT with platform = ON (Built on all platforms)
|
||||
# Usage: POCO_SOURCES( out name sources)
|
||||
# Example: POCO_SOURCES( SRCS Foundation src/Foundation.cpp)
|
||||
#
|
||||
# POCO_SOURCES_AUTO - Like POCO_SOURCES but the name is read from the file header // Package: X
|
||||
# Usage: POCO_SOURCES_AUTO( out sources)
|
||||
# Example: POCO_SOURCES_AUTO( SRCS src/Foundation.cpp)
|
||||
#
|
||||
# POCO_SOURCES_AUTO_PLAT - Like POCO_SOURCES_PLAT but the name is read from the file header // Package: X
|
||||
# Usage: POCO_SOURCES_AUTO_PLAT(out platform sources)
|
||||
# Example: POCO_SOURCES_AUTO_PLAT( SRCS WIN32 src/Foundation.cpp)
|
||||
#
|
||||
#
|
||||
# POCO_HEADERS - Adds a list of files to the headers of a components
|
||||
# Usage: POCO_HEADERS( out name headers)
|
||||
# INPUT:
|
||||
# out the variable the headers are added to
|
||||
# name: the name of the components
|
||||
# headers: a list of files to add to HDRSt
|
||||
# Example: POCO_HEADERS( HDRS Foundation include/Poco/Foundation.h )
|
||||
#
|
||||
# POCO_HEADERS_AUTO - Like POCO_HEADERS but the name is read from the file header // Package: X
|
||||
# Usage: POCO_HEADERS_AUTO( out headers)
|
||||
# Example: POCO_HEADERS_AUTO( HDRS src/Foundation.cpp)
|
||||
#
|
||||
#
|
||||
# POCO_MESSAGES - Adds a list of files to the messages of a components
|
||||
# and adds the generated headers to the header list of the component.
|
||||
# On platforms other then Windows this does nothing
|
||||
# Usage: POCO_MESSAGES( out name messages)
|
||||
# INPUT:
|
||||
# out the variable the message and the resulting headers are added to
|
||||
# name: the name of the components
|
||||
# messages: a list of files to add to MSGS
|
||||
# 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})
|
||||
set_source_files_properties(${ARGN} PROPERTIES HEADER_FILE_ONLY TRUE)
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
macro(POCO_SOURCES out name)
|
||||
POCO_SOURCES_PLAT( ${out} ${name} ON ${ARGN})
|
||||
endmacro()
|
||||
|
||||
macro(POCO_SOURCES_AUTO out)
|
||||
POCO_SOURCES_AUTO_PLAT( ${out} ON ${ARGN})
|
||||
endmacro()
|
||||
|
||||
macro(POCO_SOURCES_AUTO_PLAT out platform)
|
||||
foreach( f ${ARGN})
|
||||
|
||||
get_filename_component(fname ${f} NAME)
|
||||
|
||||
# Read the package name from the source file
|
||||
file(STRINGS ${f} package REGEX "// Package: (.*)")
|
||||
if(package)
|
||||
string(REGEX REPLACE ".*: (.*)" "\\1" name ${package})
|
||||
|
||||
# Files of the Form X_UNIX.cpp are treated as headers
|
||||
if(${fname} MATCHES ".*_.*\\..*")
|
||||
#message(STATUS "Platform: ${name} ${f} ${platform}")
|
||||
POCO_SOURCES_PLAT( ${out} ${name} OFF ${f})
|
||||
else()
|
||||
#message(STATUS "Source: ${name} ${f} ${platform}")
|
||||
POCO_SOURCES_PLAT( ${out} ${name} ${platform} ${f})
|
||||
endif()
|
||||
else()
|
||||
#message(STATUS "Source: Unknown ${f} ${platform}")
|
||||
POCO_SOURCES_PLAT( ${out} Unknown ${platform} ${f})
|
||||
endif()
|
||||
endforeach()
|
||||
endmacro()
|
||||
|
||||
|
||||
macro(POCO_HEADERS_AUTO out)
|
||||
foreach( f ${ARGN})
|
||||
|
||||
get_filename_component(fname ${f} NAME)
|
||||
|
||||
# Read the package name from the source file
|
||||
file(STRINGS ${f} package REGEX "// Package: (.*)")
|
||||
if(package)
|
||||
string(REGEX REPLACE ".*: (.*)" "\\1" name ${package})
|
||||
#message(STATUS "Header: ${name} ${f}")
|
||||
POCO_HEADERS( ${out} ${name} ${f})
|
||||
else()
|
||||
#message(STATUS "Header: Unknown ${f}")
|
||||
POCO_HEADERS( ${out} Unknown ${f})
|
||||
endif()
|
||||
endforeach()
|
||||
endmacro()
|
||||
|
||||
macro(POCO_HEADERS out name)
|
||||
set_source_files_properties(${ARGN} PROPERTIES HEADER_FILE_ONLY TRUE)
|
||||
source_group("${name}\\Header Files" FILES ${ARGN})
|
||||
list(APPEND ${out} ${ARGN})
|
||||
endmacro()
|
||||
|
||||
|
||||
macro(POCO_MESSAGES out name)
|
||||
if (WIN32)
|
||||
foreach(msg ${ARGN})
|
||||
get_filename_component(msg_name ${msg} NAME)
|
||||
get_filename_component(msg_path ${msg} ABSOLUTE)
|
||||
string(REPLACE ".mc" ".h" hdr ${msg_name})
|
||||
set_source_files_properties(${hdr} PROPERTIES GENERATED TRUE)
|
||||
add_custom_command(
|
||||
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${hdr}
|
||||
DEPENDS ${msg}
|
||||
COMMAND ${CMAKE_MC_COMPILER}
|
||||
ARGS
|
||||
-h ${CMAKE_CURRENT_BINARY_DIR}
|
||||
-r ${CMAKE_CURRENT_BINARY_DIR}
|
||||
${msg_path}
|
||||
VERBATIM # recommended: p260
|
||||
)
|
||||
|
||||
# Add the generated file to the include directory
|
||||
include_directories(${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
||||
# Add the generated headers to POCO_HEADERS of the component
|
||||
POCO_HEADERS( ${out} ${name} ${CMAKE_CURRENT_BINARY_DIR}/${hdr})
|
||||
|
||||
endforeach()
|
||||
|
||||
set_source_files_properties(${ARGN} PROPERTIES HEADER_FILE_ONLY TRUE)
|
||||
source_group("${name}\\Message Files" FILES ${ARGN})
|
||||
list(APPEND ${out} ${ARGN})
|
||||
|
||||
endif (WIN32)
|
||||
endmacro()
|
||||
Reference in New Issue
Block a user