mirror of
https://github.com/pocoproject/poco.git
synced 2025-11-24 14:20:10 +01:00
@@ -3,18 +3,22 @@
|
||||
# POCO_UNBUNDLED
|
||||
# POCO_NO_LOCALE
|
||||
|
||||
PROJECT(Poco)
|
||||
project(Poco)
|
||||
|
||||
cmake_minimum_required(VERSION 2.8.0)
|
||||
|
||||
set(SHARED_LIBRARY_VERSION "22")
|
||||
file(STRINGS "${CMAKE_SOURCE_DIR}/libversion" SHARED_LIBRARY_VERSION)
|
||||
|
||||
set(CPACK_PACKAGE_VERSION_MAJOR "1")
|
||||
set(CPACK_PACKAGE_VERSION_MINOR "5")
|
||||
set(CPACK_PACKAGE_VERSION_PATCH "2")
|
||||
SET(COMPLETE_VERSION ${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH})
|
||||
SET(RELEASE_NAME "Unstable-trunk")
|
||||
SET(PROJECT_VERSION ${COMPLETE_VERSION})
|
||||
# Read the version information from the VERSION file
|
||||
file (STRINGS "${CMAKE_SOURCE_DIR}/VERSION" PACKAGE_VERSION )
|
||||
message(STATUS "Poco package version: ${PACKAGE_VERSION}")
|
||||
string(REGEX REPLACE "([0-9]+)\\.[0-9]+\\.[0-9]+" "\\1" CPACK_PACKAGE_VERSION_MAJOR ${PACKAGE_VERSION})
|
||||
string(REGEX REPLACE "[0-9]+\\.([0-9])+\\.[0-9]+" "\\1" CPACK_PACKAGE_VERSION_MINOR ${PACKAGE_VERSION})
|
||||
string(REGEX REPLACE "[0-9]+\\.[0-9]+\\.([0-9]+)" "\\1" CPACK_PACKAGE_VERSION_PATCH ${PACKAGE_VERSION})
|
||||
|
||||
set(COMPLETE_VERSION ${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH})
|
||||
set(RELEASE_NAME "Unstable-trunk")
|
||||
set(PROJECT_VERSION ${COMPLETE_VERSION})
|
||||
|
||||
# Put the libaries and binaries that get built into directories at the
|
||||
# top of the build tree rather than in hard-to-find leaf
|
||||
@@ -43,14 +47,14 @@ if (CMAKE_BUILD_TYPE STREQUAL "")
|
||||
endif ()
|
||||
|
||||
# http://www.cmake.org/Wiki/CMake_Useful_Variables :
|
||||
# CMAKE_BUILD_TYPE
|
||||
# Choose the type of build. CMake has default flags for these:
|
||||
# CMAKE_BUILD_TYPE
|
||||
# Choose the type of build. CMake has default flags for these:
|
||||
#
|
||||
# * None (CMAKE_C_FLAGS or CMAKE_CXX_FLAGS used)
|
||||
# * Debug (CMAKE_C_FLAGS_DEBUG or CMAKE_CXX_FLAGS_DEBUG)
|
||||
# * Release (CMAKE_C_FLAGS_RELEASE or CMAKE_CXX_FLAGS_RELEASE)
|
||||
# * RelWithDebInfo (CMAKE_C_FLAGS_RELWITHDEBINFO or CMAKE_CXX_FLAGS_RELWITHDEBINFO
|
||||
# * MinSizeRel (CMAKE_C_FLAGS_MINSIZEREL or CMAKE_CXX_FLAGS_MINSIZEREL)
|
||||
# * MinSizeRel (CMAKE_C_FLAGS_MINSIZEREL or CMAKE_CXX_FLAGS_MINSIZEREL)
|
||||
|
||||
# For Debug build types, append a "d" to the library names.
|
||||
set(CMAKE_DEBUG_POSTFIX "d" CACHE STRING "Set debug library postfix" FORCE)
|
||||
@@ -66,7 +70,7 @@ option(POCO_UNBUNDLED
|
||||
|
||||
# Uncomment from next two lines to force statitc or dynamic library, default is autodetection
|
||||
if(POCO_STATIC)
|
||||
add_definitions( -DPOCO_STATIC -DPOCO_NO_AUTOMATIC_LIBS)
|
||||
add_definitions( -DPOCO_STATIC -DPOCO_NO_AUTOMATIC_LIBS)
|
||||
set( LIB_MODE STATIC )
|
||||
message(STATUS "Building static libraries")
|
||||
else(POCO_STATIC)
|
||||
@@ -74,40 +78,35 @@ else(POCO_STATIC)
|
||||
message(STATUS "Building dynamic libraries")
|
||||
endif(POCO_STATIC)
|
||||
|
||||
IF (ENABLE_TESTS)
|
||||
if (ENABLE_TESTS)
|
||||
include(CTest)
|
||||
ENABLE_TESTING()
|
||||
enable_testing()
|
||||
message(STATUS "Building with unittests & samples")
|
||||
ELSE ()
|
||||
else ()
|
||||
message(STATUS "Building without tests & samples")
|
||||
ENDIF ()
|
||||
endif ()
|
||||
|
||||
IF (POCO_UNBUNDLED)
|
||||
if (POCO_UNBUNDLED)
|
||||
add_definitions( -DPOCO_UNBUNDLED)
|
||||
message(STATUS "Build with using external sqlite, libz, pcre, expat ...")
|
||||
ELSE ()
|
||||
else ()
|
||||
message(STATUS "Build with using internal copy of sqlite, libz, pcre, expat, ...")
|
||||
ENDIF ()
|
||||
endif ()
|
||||
|
||||
# Set local include path
|
||||
include_directories( CppUnit/include Foundation/include XML/include Net/include NetSSL_OpenSSL/include Util/include Data/include WebWidgets/include Zip/include Crypto/include Web/include JSON/include MongoDB/include PDF/include)
|
||||
|
||||
include(CheckTypeSize)
|
||||
include(FindCygwin)
|
||||
include(FindOpenSSL)
|
||||
find_package(Cygwin)
|
||||
|
||||
#include(CMakeDetermineCompilerId)
|
||||
|
||||
include(FindMySQL)
|
||||
|
||||
#include(FindAPR)
|
||||
#include(FindApache2)
|
||||
|
||||
# OS Detection
|
||||
if(CMAKE_SYSTEM MATCHES "Windows")
|
||||
|
||||
|
||||
add_definitions( -DPOCO_OS_FAMILY_WINDOWS)
|
||||
set(SYSLIBS iphlpapi gdi32 odbc32)
|
||||
|
||||
|
||||
if (CMAKE_C_COMPILER_ID MATCHES "MSVC")
|
||||
message(STATUS "XXX: MS Visual Compiler detected")
|
||||
endif (CMAKE_C_COMPILER_ID MATCHES "MSVC")
|
||||
@@ -154,9 +153,9 @@ if (ANDROID)
|
||||
add_definitions( -DPOCO_ANDROID -DPOCO_NO_FPENVIRONMENT -DPOCO_NO_WSTRING -DPOCO_NO_SHAREDMEMORY )
|
||||
endif()
|
||||
|
||||
IF (ENABLE_TESTS)
|
||||
if (ENABLE_TESTS)
|
||||
add_subdirectory(CppUnit)
|
||||
ENDIF ()
|
||||
endif ()
|
||||
|
||||
add_subdirectory(Foundation)
|
||||
add_subdirectory(XML)
|
||||
@@ -165,9 +164,9 @@ add_subdirectory(MongoDB)
|
||||
add_subdirectory(PDF)
|
||||
add_subdirectory(Util)
|
||||
add_subdirectory(Net)
|
||||
#add_subdirectory(Web)
|
||||
|
||||
# OPENSSL_SSL_LIBRARY
|
||||
find_package(OpenSSL)
|
||||
if(OPENSSL_FOUND)
|
||||
include_directories(${OPENSSL_INCLUDE_DIR})
|
||||
add_subdirectory(NetSSL_OpenSSL)
|
||||
@@ -175,35 +174,37 @@ if(OPENSSL_FOUND)
|
||||
endif(OPENSSL_FOUND)
|
||||
|
||||
add_subdirectory(Data)
|
||||
#add_subdirectory(WebWidgets)
|
||||
add_subdirectory(SevenZip)
|
||||
add_subdirectory(Zip)
|
||||
|
||||
#find_package(ARP)
|
||||
#find_package(Apache2)
|
||||
if(APRUTIL_FOUND AND APACHE_FOUND)
|
||||
add_subdirectory(ApacheConnector)
|
||||
endif(APRUTIL_FOUND AND APACHE_FOUND)
|
||||
|
||||
#############################################################
|
||||
# Uninstall stuff see: http://www.vtk.org/Wiki/CMake_FAQ
|
||||
CONFIGURE_FILE(
|
||||
configure_file(
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/cmake/cmake_uninstall.cmake.in"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
|
||||
IMMEDIATE @ONLY)
|
||||
|
||||
ADD_CUSTOM_TARGET(uninstall
|
||||
add_custom_target(uninstall
|
||||
"${CMAKE_COMMAND}" -P "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake")
|
||||
|
||||
#############################################################
|
||||
# Enable packaging
|
||||
|
||||
INCLUDE(InstallRequiredSystemLibraries)
|
||||
include(InstallRequiredSystemLibraries)
|
||||
|
||||
SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Poco Libraries")
|
||||
SET(CPACK_PACKAGE_VENDOR "Applied Informatics Software Engineering GmbH")
|
||||
SET(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/README")
|
||||
SET(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE")
|
||||
SET(CPACK_PACKAGE_INSTALL_DIRECTORY "/usr/local")
|
||||
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Poco Libraries")
|
||||
set(CPACK_PACKAGE_VENDOR "Applied Informatics Software Engineering GmbH")
|
||||
set(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/README")
|
||||
set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE")
|
||||
set(CPACK_PACKAGE_INSTALL_DIRECTORY "/usr/local")
|
||||
|
||||
INCLUDE(CPack)
|
||||
include(CPack)
|
||||
|
||||
message(STATUS "CMake ${CMAKE_VERSION} successfully configured ${PROJECT_NAME} using ${CMAKE_GENERATOR} generator")
|
||||
message(STATUS "Installation target path: ${CMAKE_INSTALL_PREFIX}")
|
||||
|
||||
@@ -1,9 +1,18 @@
|
||||
set(LIBNAME "CppUnit")
|
||||
|
||||
aux_source_directory(src SRCS)
|
||||
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
|
||||
)
|
||||
|
||||
add_library( ${LIBNAME} ${LIB_MODE} ${SRCS} )
|
||||
set_target_properties( ${LIBNAME}
|
||||
set_target_properties( ${LIBNAME}
|
||||
PROPERTIES
|
||||
VERSION "1"
|
||||
SOVERSION "1")
|
||||
|
||||
@@ -1,26 +1,35 @@
|
||||
set(LIBNAME "PocoCrypto")
|
||||
|
||||
aux_source_directory(src SRCS)
|
||||
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)
|
||||
include_directories( include ${OPENSSL_INCLUDE_DIR} )
|
||||
|
||||
add_library( ${LIBNAME} ${LIB_MODE} ${SRCS} )
|
||||
set_target_properties( ${LIBNAME} PROPERTIES VERSION ${SHARED_LIBRARY_VERSION} SOVERSION ${SHARED_LIBRARY_VERSION} )
|
||||
|
||||
#if(CMAKE_SYSTEM MATCHES "Windows")
|
||||
# target_link_libraries( ${LIBNAME} PocoFoundation ${LIB_EAY_RELEASE} ${OPENSSL_LIBRARIES} )
|
||||
#ELSE()
|
||||
# target_link_libraries( ${LIBNAME} PocoFoundation ${OPENSSL_SSL_LIBRARY} ${OPENSSL_CRYPTO_LIBRARY} )
|
||||
#ENDIF()
|
||||
|
||||
target_link_libraries( ${LIBNAME} PocoFoundation ${OPENSSL_LIBRARIES} )
|
||||
target_link_libraries( ${LIBNAME} PocoFoundation ${OPENSSL_LIBRARIES} )
|
||||
|
||||
install(
|
||||
DIRECTORY include/Poco
|
||||
DESTINATION include
|
||||
PATTERN ".svn" EXCLUDE
|
||||
)
|
||||
|
||||
|
||||
install(
|
||||
TARGETS ${LIBNAME}
|
||||
LIBRARY DESTINATION lib${LIB_SUFFIX}
|
||||
|
||||
@@ -1,11 +1,46 @@
|
||||
set(LIBNAME "PocoData")
|
||||
|
||||
set(SRCS "")
|
||||
aux_source_directory(src SRCS)
|
||||
include_directories( SQLite/include )
|
||||
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
|
||||
)
|
||||
|
||||
|
||||
if (NOT POCO_STATIC)
|
||||
add_definitions(-DData_EXPORTS -DTHREADSAFE -DODBC_EXPORTS -DMySQL_EXPORTS -DSQLite_EXPORTS)
|
||||
add_definitions(-DData_EXPORTS -DTHREADSAFE -DODBC_EXPORTS -DMySQL_EXPORTS -DSQLite_EXPORTS)
|
||||
endif (NOT POCO_STATIC)
|
||||
|
||||
if(MSVC AND NOT(MSVC_VERSION LESS 1400))
|
||||
@@ -14,9 +49,9 @@ if(MSVC AND NOT(MSVC_VERSION LESS 1400))
|
||||
endif()
|
||||
|
||||
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} )
|
||||
target_link_libraries( ${LIBNAME} PocoFoundation)
|
||||
|
||||
install(
|
||||
@@ -24,7 +59,7 @@ install(
|
||||
DESTINATION include
|
||||
PATTERN ".svn" EXCLUDE
|
||||
)
|
||||
|
||||
|
||||
install(
|
||||
TARGETS ${LIBNAME}
|
||||
LIBRARY DESTINATION lib${LIB_SUFFIX}
|
||||
@@ -32,27 +67,28 @@ install(
|
||||
RUNTIME DESTINATION bin
|
||||
)
|
||||
|
||||
# SQlite3 is built in any case
|
||||
add_subdirectory( SQLite )
|
||||
|
||||
find_package(MySQL)
|
||||
if(MYSQL_FOUND)
|
||||
add_subdirectory( MySQL )
|
||||
endif(MYSQL_FOUND)
|
||||
|
||||
include(FindODBC)
|
||||
|
||||
find_package(ODBC)
|
||||
if(CMAKE_SYSTEM MATCHES "Windows")
|
||||
message(STATUS "Windows native ODBC Support Enabled")
|
||||
add_subdirectory( ODBC )
|
||||
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 ()
|
||||
message(STATUS "ODBC Support Enabled")
|
||||
add_subdirectory( ODBC )
|
||||
endif ()
|
||||
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 ()
|
||||
message(STATUS "ODBC Support Enabled")
|
||||
add_subdirectory( ODBC )
|
||||
endif ()
|
||||
endif()
|
||||
|
||||
if (ENABLE_TESTS)
|
||||
add_subdirectory(samples)
|
||||
add_subdirectory(testsuite)
|
||||
add_subdirectory(samples)
|
||||
add_subdirectory(testsuite)
|
||||
endif ()
|
||||
|
||||
@@ -1,17 +1,26 @@
|
||||
set(LIBNAME "PocoDataMySQL")
|
||||
|
||||
set(SRCS "")
|
||||
aux_source_directory(src SRCS)
|
||||
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
|
||||
)
|
||||
|
||||
add_definitions(-DTHREADSAFE -DNO_TCL)
|
||||
|
||||
include_directories( include ${MYSQL_INCLUDE_DIR})
|
||||
#link_directories( )
|
||||
|
||||
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} )
|
||||
target_link_libraries( ${LIBNAME} PocoData PocoFoundation ${MYSQL_LIB})
|
||||
|
||||
install(
|
||||
@@ -28,5 +37,5 @@ install(
|
||||
)
|
||||
|
||||
if (ENABLE_TESTS)
|
||||
add_subdirectory(testsuite)
|
||||
add_subdirectory(testsuite)
|
||||
endif ()
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
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
|
||||
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
|
||||
)
|
||||
|
||||
add_definitions( ${ODBC_CFLAGS} )
|
||||
@@ -23,8 +23,8 @@ 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} )
|
||||
target_link_libraries( ${LIBNAME} PocoData PocoFoundation ${ODBC_LINK_FLAGS})
|
||||
|
||||
install(
|
||||
@@ -41,5 +41,5 @@ install(
|
||||
)
|
||||
|
||||
if (ENABLE_TESTS)
|
||||
add_subdirectory(testsuite)
|
||||
add_subdirectory(testsuite)
|
||||
endif ()
|
||||
|
||||
@@ -1,34 +1,33 @@
|
||||
set(LIBNAME "PocoDataSQLite")
|
||||
|
||||
include_directories( include src )
|
||||
|
||||
set(SRCS "")
|
||||
|
||||
set(SRCS
|
||||
src/Binder.cpp
|
||||
src/Connector.cpp
|
||||
src/Extractor.cpp
|
||||
src/Notifier.cpp
|
||||
src/SQLiteException.cpp
|
||||
src/SQLiteStatementImpl.cpp
|
||||
src/SessionImpl.cpp
|
||||
src/Utility.cpp
|
||||
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
|
||||
)
|
||||
|
||||
include_directories( "include" src )
|
||||
|
||||
if (POCO_UNBUNDLED)
|
||||
set(DATASQLITELIBS PocoData PocoFoundation sqlite3)
|
||||
find_package(SQLite3)
|
||||
set(DATASQLITELIBS PocoData PocoFoundation ${SQLITE3_LIBRARIES})
|
||||
include_directories(${SQLITE3_INCLUDE_DIRS})
|
||||
else()
|
||||
set(SRCS ${SRCS} src/sqlite3.c)
|
||||
set(DATASQLITELIBS PocoData PocoFoundation)
|
||||
set(SRCS ${SRCS} src/sqlite3.c)
|
||||
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} )
|
||||
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} )
|
||||
target_link_libraries( ${LIBNAME} ${DATASQLITELIBS} )
|
||||
|
||||
install(
|
||||
@@ -36,7 +35,7 @@ install(
|
||||
DESTINATION include
|
||||
PATTERN ".svn" EXCLUDE
|
||||
)
|
||||
|
||||
|
||||
install(
|
||||
TARGETS ${LIBNAME}
|
||||
LIBRARY DESTINATION lib${LIB_SUFFIX}
|
||||
@@ -45,6 +44,6 @@ install(
|
||||
)
|
||||
|
||||
if (ENABLE_TESTS)
|
||||
add_subdirectory(testsuite)
|
||||
add_subdirectory(testsuite)
|
||||
endif ()
|
||||
|
||||
|
||||
@@ -23,8 +23,8 @@ if (WIN32)
|
||||
message(STATUS "Found message compiler: ${CMAKE_MC_COMPILER}")
|
||||
mark_as_advanced(CMAKE_MC_COMPILER)
|
||||
endif(WIN32)
|
||||
|
||||
set( BASE_SRCS
|
||||
|
||||
set( BASE_SRCS
|
||||
src/ASCIIEncoding.cpp
|
||||
src/Ascii.cpp
|
||||
src/AtomicCounter.cpp
|
||||
@@ -108,7 +108,7 @@ set( BASE_SRCS
|
||||
src/NullStream.cpp
|
||||
src/NumberFormatter.cpp
|
||||
src/NumberParser.cpp
|
||||
# src/OpcomChannel.cpp
|
||||
src/NumericString.cpp
|
||||
src/Path.cpp
|
||||
src/PatternFormatter.cpp
|
||||
src/Pipe.cpp
|
||||
@@ -176,71 +176,95 @@ set( BASE_SRCS
|
||||
src/Windows1250Encoding.cpp
|
||||
src/Windows1251Encoding.cpp
|
||||
src/Windows1252Encoding.cpp
|
||||
src/adler32.c
|
||||
src/compress.c
|
||||
src/crc32.c
|
||||
src/deflate.c
|
||||
src/infback.c
|
||||
src/inffast.c
|
||||
src/inflate.c
|
||||
src/inftrees.c
|
||||
src/pcre_chartables.c
|
||||
src/pcre_compile.c
|
||||
src/pcre_exec.c
|
||||
src/pcre_fullinfo.c
|
||||
src/pcre_globals.c
|
||||
src/pcre_maketables.c
|
||||
src/pcre_newline.c
|
||||
src/pcre_ord2utf8.c
|
||||
src/pcre_study.c
|
||||
src/pcre_tables.c
|
||||
src/pcre_try_flipped.c
|
||||
src/pcre_ucd.c
|
||||
src/pcre_valid_utf8.c
|
||||
src/pcre_xclass.c
|
||||
src/pocomsg.mc
|
||||
src/trees.c
|
||||
src/zutil.c
|
||||
)
|
||||
|
||||
# If POCO_UNBUNDLED is enabled we try to find the required packages
|
||||
# The configuration will fail if the packages are not found
|
||||
if (POCO_UNBUNDLED)
|
||||
find_package(PCRE REQUIRED)
|
||||
set(SYSLIBS ${SYSLIBS} ${PCRE_LIBRARIES})
|
||||
include_directories(${PCRE_INCLUDE_DIRS})
|
||||
|
||||
find_package(ZLIB REQUIRED)
|
||||
set(SYSLIBS ${SYSLIBS} ${ZLIB_LIBRARIES})
|
||||
include_directories(${ZLIB_INCLUDE_DIRS})
|
||||
else()
|
||||
# PCRE
|
||||
list(APPEND BASE_SRCS
|
||||
src/pcre_chartables.c
|
||||
src/pcre_compile.c
|
||||
src/pcre_exec.c
|
||||
src/pcre_fullinfo.c
|
||||
src/pcre_globals.c
|
||||
src/pcre_maketables.c
|
||||
src/pcre_newline.c
|
||||
src/pcre_ord2utf8.c
|
||||
src/pcre_study.c
|
||||
src/pcre_tables.c
|
||||
src/pcre_try_flipped.c
|
||||
src/pcre_ucd.c
|
||||
src/pcre_valid_utf8.c
|
||||
src/pcre_xclass.c
|
||||
)
|
||||
|
||||
# ZLIB
|
||||
list(APPEND BASE_SRCS
|
||||
src/adler32.c
|
||||
src/compress.c
|
||||
src/crc32.c
|
||||
src/deflate.c
|
||||
src/infback.c
|
||||
src/inffast.c
|
||||
src/inflate.c
|
||||
src/inftrees.c
|
||||
src/trees.c
|
||||
src/zutil.c
|
||||
)
|
||||
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})
|
||||
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)
|
||||
set(SYSLIBS ${SYSLIBS} iphlpapi)
|
||||
set(SRCS ${BASE_SRCS} ${WIN_SRCS})
|
||||
add_definitions( -DPCRE_STATIC -DFoundation_EXPORTS)
|
||||
set(SYSLIBS ${SYSLIBS} iphlpapi)
|
||||
else (CMAKE_SYSTEM MATCHES "Windows")
|
||||
set(SRCS ${BASE_SRCS} ${LIN_SRCS})
|
||||
add_definitions( -DPCRE_STATIC)
|
||||
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} )
|
||||
if (${CMAKE_CXX_COMPILER_ID} MATCHES "SunPro")
|
||||
set_target_properties( ${LIBNAME} PROPERTIES LINK_FLAGS "-library=stlport4")
|
||||
set_target_properties( ${LIBNAME} PROPERTIES LINK_FLAGS "-library=stlport4")
|
||||
endif (${CMAKE_CXX_COMPILER_ID} MATCHES "SunPro")
|
||||
target_link_libraries( ${LIBNAME} ${SYSLIBS})
|
||||
|
||||
@@ -249,7 +273,7 @@ install(
|
||||
DESTINATION include
|
||||
PATTERN ".svn" EXCLUDE
|
||||
)
|
||||
|
||||
|
||||
install(
|
||||
TARGETS ${LIBNAME}
|
||||
LIBRARY DESTINATION lib${LIB_SUFFIX}
|
||||
|
||||
@@ -1,6 +1,18 @@
|
||||
set(LIBNAME "PocoJSON")
|
||||
|
||||
aux_source_directory(src SRCS)
|
||||
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
|
||||
)
|
||||
|
||||
if (NOT POCO_STATIC)
|
||||
add_definitions(-DJSON_EXPORTS)
|
||||
|
||||
@@ -1,13 +1,35 @@
|
||||
set(LIBNAME "PocoMongoDB")
|
||||
|
||||
aux_source_directory(src SRCS)
|
||||
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
|
||||
)
|
||||
|
||||
if (NOT POCO_STATIC)
|
||||
add_definitions(-DMongoDB_EXPORTS)
|
||||
endif (NOT POCO_STATIC)
|
||||
|
||||
add_library( ${LIBNAME} ${LIB_MODE} ${SRCS} )
|
||||
set_target_properties( ${LIBNAME}
|
||||
set_target_properties( ${LIBNAME}
|
||||
PROPERTIES
|
||||
VERSION ${SHARED_LIBRARY_VERSION} SOVERSION ${SHARED_LIBRARY_VERSION} )
|
||||
target_link_libraries( ${LIBNAME} PocoNet PocoFoundation)
|
||||
@@ -17,7 +39,7 @@ install(
|
||||
DESTINATION include
|
||||
PATTERN ".svn" EXCLUDE
|
||||
)
|
||||
|
||||
|
||||
install(
|
||||
TARGETS ${LIBNAME}
|
||||
LIBRARY DESTINATION lib${LIB_SUFFIX}
|
||||
|
||||
@@ -1,6 +1,35 @@
|
||||
set(LIBNAME "PocoNetSSL")
|
||||
|
||||
aux_source_directory(src SRCS)
|
||||
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
|
||||
)
|
||||
|
||||
include_directories( ${OPENSSL_INCLUDE_DIR} )
|
||||
|
||||
if (NOT POCO_STATIC)
|
||||
@@ -8,7 +37,7 @@ if (NOT POCO_STATIC)
|
||||
endif (NOT POCO_STATIC)
|
||||
|
||||
add_library( ${LIBNAME} ${LIB_MODE} ${SRCS} )
|
||||
set_target_properties( ${LIBNAME}
|
||||
set_target_properties( ${LIBNAME}
|
||||
PROPERTIES
|
||||
VERSION ${SHARED_LIBRARY_VERSION} SOVERSION ${SHARED_LIBRARY_VERSION} )
|
||||
target_link_libraries( ${LIBNAME} PocoCrypto PocoNet PocoUtil PocoFoundation ${OPENSSL_SSL_LIBRARY} ${OPENSSL_CRYPTO_LIBRARY} )
|
||||
@@ -18,7 +47,7 @@ install(
|
||||
DESTINATION include
|
||||
PATTERN ".svn" EXCLUDE
|
||||
)
|
||||
|
||||
|
||||
install(
|
||||
TARGETS ${LIBNAME}
|
||||
LIBRARY DESTINATION lib${LIB_SUFFIX}
|
||||
|
||||
@@ -1,6 +1,120 @@
|
||||
set(LIBNAME "PocoPDF")
|
||||
|
||||
aux_source_directory(src SRCS)
|
||||
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
|
||||
)
|
||||
|
||||
# If POCO_UNBUNDLED is enabled we try to find the required packages
|
||||
# The configuration will fail if the packages are not found
|
||||
if (POCO_UNBUNDLED)
|
||||
find_package(ZLIB REQUIRED)
|
||||
set(SYSLIBS ${SYSLIBS} ${ZLIB_LIBRARIES})
|
||||
include_directories(${ZLIB_INCLUDE_DIRS})
|
||||
else()
|
||||
# ZLIB
|
||||
list(APPEND SRCS
|
||||
src/adler32.c
|
||||
src/compress.c
|
||||
src/crc32.c
|
||||
src/deflate.c
|
||||
src/gzio.c
|
||||
src/infback.c
|
||||
src/inffast.c
|
||||
src/inflate.c
|
||||
src/inftrees.c
|
||||
src/trees.c
|
||||
src/zutil.c
|
||||
)
|
||||
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
|
||||
src/hpdf_annotation.c
|
||||
src/hpdf_array.c
|
||||
src/hpdf_binary.c
|
||||
src/hpdf_boolean.c
|
||||
src/hpdf_catalog.c
|
||||
src/hpdf_destination.c
|
||||
src/hpdf_dict.c
|
||||
src/hpdf_doc.c
|
||||
src/hpdf_doc_png.c
|
||||
src/hpdf_encoder.c
|
||||
src/hpdf_encoder_cns.c
|
||||
src/hpdf_encoder_cnt.c
|
||||
src/hpdf_encoder_jp.c
|
||||
src/hpdf_encoder_kr.c
|
||||
src/hpdf_encrypt.c
|
||||
src/hpdf_encryptdict.c
|
||||
src/hpdf_error.c
|
||||
src/hpdf_ext_gstate.c
|
||||
src/hpdf_font.c
|
||||
src/hpdf_font_cid.c
|
||||
src/hpdf_fontdef_base14.c
|
||||
src/hpdf_fontdef.c
|
||||
src/hpdf_fontdef_cid.c
|
||||
src/hpdf_fontdef_cns.c
|
||||
src/hpdf_fontdef_cnt.c
|
||||
src/hpdf_fontdef_jp.c
|
||||
src/hpdf_fontdef_kr.c
|
||||
src/hpdf_fontdef_tt.c
|
||||
src/hpdf_fontdef_type1.c
|
||||
src/hpdf_font_tt.c
|
||||
src/hpdf_font_type1.c
|
||||
src/hpdf_gstate.c
|
||||
src/hpdf_image.c
|
||||
src/hpdf_image_png.c
|
||||
src/hpdf_info.c
|
||||
src/hpdf_list.c
|
||||
src/hpdf_mmgr.c
|
||||
src/hpdf_name.c
|
||||
src/hpdf_null.c
|
||||
src/hpdf_number.c
|
||||
src/hpdf_objects.c
|
||||
src/hpdf_outline.c
|
||||
src/hpdf_page_label.c
|
||||
src/hpdf_page_operator.c
|
||||
src/hpdf_pages.c
|
||||
src/hpdf_real.c
|
||||
src/hpdf_streams.c
|
||||
src/hpdf_string.c
|
||||
src/hpdf_utils.c
|
||||
src/hpdf_xref.c
|
||||
)
|
||||
|
||||
# TODO: Currently only bundled is supported, in future this should also be possible
|
||||
# with an unbundled version of libpng
|
||||
list(APPEND SRCS
|
||||
src/png.c
|
||||
src/pngerror.c
|
||||
src/pnggccrd.c
|
||||
src/pngget.c
|
||||
src/pngmem.c
|
||||
src/pngpread.c
|
||||
src/pngread.c
|
||||
src/pngrio.c
|
||||
src/pngrtran.c
|
||||
src/pngrutil.c
|
||||
src/pngset.c
|
||||
src/pngtest.c
|
||||
src/pngtrans.c
|
||||
src/pngvcrd.c
|
||||
src/pngwio.c
|
||||
src/pngwrite.c
|
||||
src/pngwtran.c
|
||||
src/pngwutil.c
|
||||
)
|
||||
|
||||
include_directories(include/Poco/PDF) # zip src
|
||||
|
||||
if (NOT POCO_STATIC)
|
||||
@@ -8,17 +122,17 @@ if (NOT POCO_STATIC)
|
||||
endif (NOT POCO_STATIC)
|
||||
|
||||
add_library( ${LIBNAME} ${LIB_MODE} ${SRCS} )
|
||||
set_target_properties( ${LIBNAME}
|
||||
set_target_properties( ${LIBNAME}
|
||||
PROPERTIES
|
||||
VERSION ${SHARED_LIBRARY_VERSION} SOVERSION ${SHARED_LIBRARY_VERSION} )
|
||||
target_link_libraries( ${LIBNAME} PocoFoundation)
|
||||
target_link_libraries( ${LIBNAME} ${SYSLIBS} PocoFoundation )
|
||||
|
||||
install(
|
||||
DIRECTORY include/Poco
|
||||
DESTINATION include
|
||||
PATTERN ".svn" EXCLUDE
|
||||
)
|
||||
|
||||
|
||||
install(
|
||||
TARGETS ${LIBNAME}
|
||||
LIBRARY DESTINATION lib${LIB_SUFFIX}
|
||||
|
||||
80
SevenZip/CMakeLists.txt
Normal file
80
SevenZip/CMakeLists.txt
Normal file
@@ -0,0 +1,80 @@
|
||||
set(LIBNAME "PocoSevenZip")
|
||||
|
||||
set(SRCS
|
||||
src/Archive.cpp
|
||||
src/ArchiveEntry.cpp
|
||||
)
|
||||
|
||||
# TODO: Currently only bundled is supported, in future this should also be possible
|
||||
# with an unbundled version of 7z
|
||||
list(APPEND SRCS
|
||||
src/7zAlloc.c
|
||||
src/7zBuf2.c
|
||||
src/7zBuf.c
|
||||
src/7zCrc.c
|
||||
src/7zCrcOpt.c
|
||||
src/7zDec.c
|
||||
src/7zFile.c
|
||||
src/7zIn.c
|
||||
src/7zStream.c
|
||||
# src/Alloc.c
|
||||
src/Bcj2.c
|
||||
src/Bra86.c
|
||||
src/Bra.c
|
||||
# src/BraIA64.c
|
||||
src/CpuArch.c
|
||||
# src/Delta.c
|
||||
# src/LzFind.c
|
||||
# src/LzFindMt.c
|
||||
src/Lzma2Dec.c
|
||||
# src/Lzma2Enc.c
|
||||
src/Lzma86Dec.c
|
||||
# src/Lzma86Enc.c
|
||||
src/LzmaDec.c
|
||||
# src/LzmaEnc.c
|
||||
# src/LzmaLib.c
|
||||
# src/MtCoder.c
|
||||
src/Ppmd7.c
|
||||
src/Ppmd7Dec.c
|
||||
# src/Ppmd7Enc.c
|
||||
# src/Sha256.c
|
||||
# src/Threads.c
|
||||
# src/Xz.c
|
||||
# src/XzCrc64.c
|
||||
# src/XzDec.c
|
||||
# src/XzEnc.c
|
||||
# src/XzIn.c
|
||||
)
|
||||
|
||||
include_directories( "include" )
|
||||
|
||||
if (NOT POCO_STATIC)
|
||||
add_definitions(-DSevenZip_EXPORTS)
|
||||
endif (NOT POCO_STATIC)
|
||||
|
||||
add_library( ${LIBNAME} ${LIB_MODE} ${SRCS} )
|
||||
set_target_properties( ${LIBNAME}
|
||||
PROPERTIES
|
||||
VERSION ${SHARED_LIBRARY_VERSION} SOVERSION ${SHARED_LIBRARY_VERSION} )
|
||||
target_link_libraries( ${LIBNAME} PocoUtil PocoXML PocoFoundation)
|
||||
|
||||
install(
|
||||
DIRECTORY include/Poco
|
||||
DESTINATION include
|
||||
PATTERN ".svn" EXCLUDE
|
||||
)
|
||||
|
||||
install(
|
||||
TARGETS ${LIBNAME}
|
||||
LIBRARY DESTINATION lib${LIB_SUFFIX}
|
||||
ARCHIVE DESTINATION lib${LIB_SUFFIX}
|
||||
RUNTIME DESTINATION bin
|
||||
)
|
||||
|
||||
if (ENABLE_TESTS)
|
||||
# TODO: Enable CMake for samples
|
||||
#add_subdirectory(samples)
|
||||
# TODO: Add tests
|
||||
#add_subdirectory(testsuite)
|
||||
endif ()
|
||||
|
||||
@@ -1,52 +1,54 @@
|
||||
set(LIBNAME "PocoUtil")
|
||||
|
||||
set( BASE_SRCS
|
||||
src/AbstractConfiguration.cpp
|
||||
src/JSONConfiguration.cpp
|
||||
src/Application.cpp
|
||||
src/ConfigurationMapper.cpp
|
||||
src/ConfigurationView.cpp
|
||||
src/FilesystemConfiguration.cpp
|
||||
src/HelpFormatter.cpp
|
||||
src/IniFileConfiguration.cpp
|
||||
src/IntValidator.cpp
|
||||
src/LayeredConfiguration.cpp
|
||||
src/LoggingConfigurator.cpp
|
||||
src/LoggingSubsystem.cpp
|
||||
src/MapConfiguration.cpp
|
||||
src/Option.cpp
|
||||
src/OptionCallback.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/Validator.cpp
|
||||
src/XMLConfiguration.cpp
|
||||
src/Timer.cpp
|
||||
src/TimerTask.cpp
|
||||
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
|
||||
)
|
||||
|
||||
set( WIN_SRCS
|
||||
src/WinRegistryConfiguration.cpp
|
||||
src/WinRegistryKey.cpp
|
||||
src/WinService.cpp
|
||||
src/WinRegistryConfiguration.cpp
|
||||
src/WinRegistryKey.cpp
|
||||
src/WinService.cpp
|
||||
)
|
||||
|
||||
include_directories( "include" )
|
||||
|
||||
if(CMAKE_SYSTEM MATCHES "Windows")
|
||||
set(SRCS ${BASE_SRCS} ${WIN_SRCS})
|
||||
add_definitions(-DUtil_EXPORTS)
|
||||
set(SRCS ${BASE_SRCS} ${WIN_SRCS})
|
||||
add_definitions(-DUtil_EXPORTS)
|
||||
else (CMAKE_SYSTEM MATCHES "Windows")
|
||||
set(SRCS ${BASE_SRCS})
|
||||
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} )
|
||||
set_target_properties( ${LIBNAME}
|
||||
PROPERTIES
|
||||
VERSION ${SHARED_LIBRARY_VERSION} SOVERSION ${SHARED_LIBRARY_VERSION} )
|
||||
target_link_libraries( ${LIBNAME} PocoJSON PocoXML PocoFoundation)
|
||||
|
||||
install(
|
||||
@@ -54,7 +56,7 @@ install(
|
||||
DESTINATION include
|
||||
PATTERN ".svn" EXCLUDE
|
||||
)
|
||||
|
||||
|
||||
install(
|
||||
TARGETS ${LIBNAME}
|
||||
LIBRARY DESTINATION lib${LIB_SUFFIX}
|
||||
@@ -63,6 +65,6 @@ install(
|
||||
)
|
||||
|
||||
if (ENABLE_TESTS)
|
||||
add_subdirectory(samples)
|
||||
add_subdirectory(testsuite)
|
||||
add_subdirectory(samples)
|
||||
add_subdirectory(testsuite)
|
||||
endif ()
|
||||
|
||||
@@ -1,21 +1,111 @@
|
||||
set(LIBNAME "PocoXML")
|
||||
|
||||
aux_source_directory(src SRCS)
|
||||
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
|
||||
)
|
||||
|
||||
# If POCO_UNBUNDLED is enabled we try to find the required packages
|
||||
# The configuration will fail if the packages are not found
|
||||
if (POCO_UNBUNDLED)
|
||||
find_package(EXPAT REQUIRED)
|
||||
set(SYSLIBS ${SYSLIBS} ${EXPAT_LIBRARIES})
|
||||
include_directories(${EXPAT_INCLUDE_DIRS})
|
||||
else()
|
||||
list(APPEND SRCS
|
||||
src/xmlparse.cpp
|
||||
src/xmlrole.c
|
||||
src/xmltok.c
|
||||
src/xmltok_impl.c
|
||||
src/xmltok_ns.c
|
||||
)
|
||||
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_library( ${LIBNAME} ${LIB_MODE} ${SRCS} )
|
||||
set_target_properties( ${LIBNAME}
|
||||
PROPERTIES
|
||||
set_target_properties( ${LIBNAME}
|
||||
PROPERTIES
|
||||
VERSION ${SHARED_LIBRARY_VERSION} SOVERSION ${SHARED_LIBRARY_VERSION} )
|
||||
target_link_libraries( ${LIBNAME} PocoFoundation)
|
||||
target_link_libraries( ${LIBNAME} ${SYSLIBS} PocoFoundation)
|
||||
|
||||
install(
|
||||
DIRECTORY include/Poco
|
||||
DESTINATION include
|
||||
PATTERN ".svn" EXCLUDE
|
||||
)
|
||||
|
||||
|
||||
install(
|
||||
TARGETS ${LIBNAME}
|
||||
LIBRARY DESTINATION lib${LIB_SUFFIX}
|
||||
|
||||
@@ -1,13 +1,36 @@
|
||||
set(LIBNAME "PocoZip")
|
||||
|
||||
aux_source_directory(src SRCS)
|
||||
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
|
||||
)
|
||||
|
||||
if (NOT POCO_STATIC)
|
||||
add_definitions(-DZip_EXPORTS)
|
||||
endif (NOT POCO_STATIC)
|
||||
|
||||
add_library( ${LIBNAME} ${LIB_MODE} ${SRCS} )
|
||||
set_target_properties( ${LIBNAME}
|
||||
set_target_properties( ${LIBNAME}
|
||||
PROPERTIES
|
||||
VERSION ${SHARED_LIBRARY_VERSION} SOVERSION ${SHARED_LIBRARY_VERSION} )
|
||||
target_link_libraries( ${LIBNAME} PocoUtil PocoXML PocoFoundation)
|
||||
@@ -17,7 +40,7 @@ install(
|
||||
DESTINATION include
|
||||
PATTERN ".svn" EXCLUDE
|
||||
)
|
||||
|
||||
|
||||
install(
|
||||
TARGETS ${LIBNAME}
|
||||
LIBRARY DESTINATION lib${LIB_SUFFIX}
|
||||
|
||||
35
cmake/FindPCRE.cmake
Normal file
35
cmake/FindPCRE.cmake
Normal file
@@ -0,0 +1,35 @@
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
# - Find pcre
|
||||
# Find the native PCRE includes and library
|
||||
#
|
||||
# PCRE_INCLUDE_DIRS - where to find pcre.h, etc.
|
||||
# PCRE_LIBRARIES - List of libraries when using pcre.
|
||||
# PCRE_FOUND - True if pcre found.
|
||||
|
||||
|
||||
IF (PCRE_INCLUDE_DIRS)
|
||||
# Already in cache, be silent
|
||||
SET(PCRE_FIND_QUIETLY TRUE)
|
||||
ENDIF (PCRE_INCLUDE_DIRS)
|
||||
|
||||
FIND_PATH(PCRE_INCLUDE_DIR pcre.h)
|
||||
|
||||
SET(PCRE_NAMES pcre)
|
||||
FIND_LIBRARY(PCRE_LIBRARY NAMES ${PCRE_NAMES} )
|
||||
|
||||
# handle the QUIETLY and REQUIRED arguments and set PCRE_FOUND to TRUE if
|
||||
# all listed variables are TRUE
|
||||
INCLUDE(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(PCRE DEFAULT_MSG PCRE_LIBRARY PCRE_INCLUDE_DIR)
|
||||
|
||||
IF(PCRE_FOUND)
|
||||
SET( PCRE_LIBRARIES ${PCRE_LIBRARY} )
|
||||
SET( PCRE_INCLUDE_DIRS ${PCRE_INCLUDE_DIR} )
|
||||
ELSE(PCRE_FOUND)
|
||||
SET( PCRE_LIBRARIES )
|
||||
SET( PCRE_INCLUDE_DIRS )
|
||||
ENDIF(PCRE_FOUND)
|
||||
|
||||
MARK_AS_ADVANCED( PCRE_LIBRARIES PCRE_INCLUDE_DIRS )
|
||||
87
cmake/FindSQLite3.cmake
Normal file
87
cmake/FindSQLite3.cmake
Normal file
@@ -0,0 +1,87 @@
|
||||
# - Try to find Sqlite3
|
||||
# Once done this will define
|
||||
#
|
||||
# SQLITE3_FOUND - system has Sqlite3
|
||||
# SQLITE3_INCLUDE_DIRS - the Sqlite3 include directory
|
||||
# SQLITE3_LIBRARIES - Link these to use Sqlite3
|
||||
# SQLITE3_DEFINITIONS - Compiler switches required for using Sqlite3
|
||||
#
|
||||
# Copyright (c) 2008 Andreas Schneider <mail@cynapses.org>
|
||||
#
|
||||
# Redistribution and use is allowed according to the terms of the New
|
||||
# BSD license.
|
||||
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
|
||||
#
|
||||
|
||||
|
||||
if (SQLITE3_LIBRARIES AND SQLITE3_INCLUDE_DIRS)
|
||||
# in cache already
|
||||
set(SQLITE3_FOUND TRUE)
|
||||
else (SQLITE3_LIBRARIES AND SQLITE3_INCLUDE_DIRS)
|
||||
# use pkg-config to get the directories and then use these values
|
||||
# in the FIND_PATH() and FIND_LIBRARY() calls
|
||||
if (${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} EQUAL 4)
|
||||
include(UsePkgConfig)
|
||||
pkgconfig(sqlite3 _SQLITE3_INCLUDEDIR _SQLITE3_LIBDIR _SQLITE3_LDFLAGS _SQLITE3_CFLAGS)
|
||||
else (${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} EQUAL 4)
|
||||
find_package(PkgConfig)
|
||||
if (PKG_CONFIG_FOUND)
|
||||
pkg_check_modules(_SQLITE3 sqlite3)
|
||||
endif (PKG_CONFIG_FOUND)
|
||||
endif (${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} EQUAL 4)
|
||||
find_path(SQLITE3_INCLUDE_DIR
|
||||
NAMES
|
||||
sqlite3.h
|
||||
PATHS
|
||||
${_SQLITE3_INCLUDEDIR}
|
||||
/usr/include
|
||||
/usr/local/include
|
||||
/opt/local/include
|
||||
/sw/include
|
||||
)
|
||||
|
||||
find_library(SQLITE3_LIBRARY
|
||||
NAMES
|
||||
sqlite3
|
||||
PATHS
|
||||
${_SQLITE3_LIBDIR}
|
||||
/usr/lib
|
||||
/usr/local/lib
|
||||
/opt/local/lib
|
||||
/sw/lib
|
||||
)
|
||||
|
||||
if (SQLITE3_LIBRARY)
|
||||
set(SQLITE3_FOUND TRUE)
|
||||
endif (SQLITE3_LIBRARY)
|
||||
|
||||
set(SQLITE3_INCLUDE_DIRS
|
||||
${SQLITE3_INCLUDE_DIR}
|
||||
)
|
||||
|
||||
if (SQLITE3_FOUND)
|
||||
set(SQLITE3_LIBRARIES
|
||||
${SQLITE3_LIBRARIES}
|
||||
${SQLITE3_LIBRARY}
|
||||
)
|
||||
endif (SQLITE3_FOUND)
|
||||
|
||||
if (SQLITE3_INCLUDE_DIRS AND SQLITE3_LIBRARIES)
|
||||
set(SQLITE3_FOUND TRUE)
|
||||
endif (SQLITE3_INCLUDE_DIRS AND SQLITE3_LIBRARIES)
|
||||
|
||||
if (SQLITE3_FOUND)
|
||||
if (NOT Sqlite3_FIND_QUIETLY)
|
||||
message(STATUS "Found Sqlite3: ${SQLITE3_LIBRARIES}")
|
||||
endif (NOT Sqlite3_FIND_QUIETLY)
|
||||
else (SQLITE3_FOUND)
|
||||
if (Sqlite3_FIND_REQUIRED)
|
||||
message(FATAL_ERROR "Could not find Sqlite3")
|
||||
endif (Sqlite3_FIND_REQUIRED)
|
||||
endif (SQLITE3_FOUND)
|
||||
|
||||
# show the SQLITE3_INCLUDE_DIRS and SQLITE3_LIBRARIES variables only in the advanced view
|
||||
mark_as_advanced(SQLITE3_INCLUDE_DIRS SQLITE3_LIBRARIES)
|
||||
|
||||
endif (SQLITE3_LIBRARIES AND SQLITE3_INCLUDE_DIRS)
|
||||
|
||||
Reference in New Issue
Block a user