mirror of
https://github.com/pocoproject/poco.git
synced 2024-12-12 18:20:26 +01:00
added Data, Foundation, Net and Util samples + some global cmake fixes
This commit is contained in:
parent
d141423a56
commit
129f21cc79
@ -10,14 +10,14 @@ set_target_properties( ${LIBNAME}
|
||||
PROPERTIES COMPILE_FLAGS ${DEBUG_CXX_FLAGS}
|
||||
VERSION ${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}
|
||||
SOVERSION ${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH})
|
||||
target_link_libraries( ${LIBNAME} ssl crypto)
|
||||
target_link_libraries( ${LIBNAME} PocoNetSSL PocoNet ssl crypto)
|
||||
|
||||
add_library( ${LIBNAMED} ${LIB_MODE} ${SRCS} )
|
||||
set_target_properties( ${LIBNAMED}
|
||||
PROPERTIES COMPILE_FLAGS "${RELEASE_CXX_FLAGS}"
|
||||
VERSION ${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}
|
||||
SOVERSION ${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH})
|
||||
target_link_libraries( ${LIBNAMED} ssl crypto)
|
||||
target_link_libraries( ${LIBNAMED} PocoNetSSLd PocoNetd ssl crypto)
|
||||
|
||||
install(
|
||||
DIRECTORY include/Poco
|
||||
@ -28,3 +28,5 @@ install(
|
||||
TARGETS ${LIBNAME} ${LIBNAMED}
|
||||
DESTINATION lib
|
||||
)
|
||||
|
||||
add_subdirectory(samples)
|
||||
|
@ -36,4 +36,5 @@ if(ODBC_CONFIG)
|
||||
# add_subdirectory( ODBC )
|
||||
endif(ODBC_CONFIG)
|
||||
|
||||
add_subdirectory( samples )
|
||||
#add_subdirectory( testsuite )
|
||||
|
@ -13,14 +13,14 @@ set_target_properties( ${LIBNAME}
|
||||
PROPERTIES COMPILE_FLAGS ${DEBUG_CXX_FLAGS}
|
||||
VERSION ${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}
|
||||
SOVERSION ${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH})
|
||||
target_link_libraries( ${LIBNAME} PocoData )
|
||||
target_link_libraries( ${LIBNAME} PocoData PocoFoundation)
|
||||
|
||||
add_library( ${LIBNAMED} ${LIB_MODE} ${SRCS} )
|
||||
set_target_properties( ${LIBNAMED}
|
||||
PROPERTIES COMPILE_FLAGS "${RELEASE_CXX_FLAGS}"
|
||||
VERSION ${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}
|
||||
SOVERSION ${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH})
|
||||
target_link_libraries( ${LIBNAMED} PocoDatad )
|
||||
target_link_libraries( ${LIBNAMED} PocoDatad PocoFoundationd )
|
||||
|
||||
install(
|
||||
DIRECTORY include/Poco
|
||||
|
@ -131,6 +131,8 @@ set( BASE_SRCS
|
||||
src/UUIDGenerator.cpp
|
||||
src/Unicode.cpp
|
||||
src/UnicodeConverter.cpp
|
||||
src/Var.cpp
|
||||
src/VarHolder.cpp
|
||||
src/Void.cpp
|
||||
src/Windows1252Encoding.cpp
|
||||
src/adler32.c
|
||||
@ -207,4 +209,5 @@ install(
|
||||
DESTINATION lib
|
||||
)
|
||||
|
||||
add_subdirectory( samples )
|
||||
#add_subdirectory( testsuite )
|
||||
|
@ -1,92 +1,7 @@
|
||||
set(LIBNAME "PocoNet")
|
||||
set(LIBNAMED "${LIBNAME}d")
|
||||
|
||||
set( BASE_SRCS
|
||||
src/AbstractHTTPRequestHandler.cpp
|
||||
src/DNS.cpp
|
||||
src/DatagramSocket.cpp
|
||||
src/DatagramSocketImpl.cpp
|
||||
src/DialogSocket.cpp
|
||||
src/FTPClientSession.cpp
|
||||
src/FTPStreamFactory.cpp
|
||||
src/FilePartSource.cpp
|
||||
src/HTMLForm.cpp
|
||||
src/HTTPBasicCredentials.cpp
|
||||
src/HTTPBufferAllocator.cpp
|
||||
src/HTTPChunkedStream.cpp
|
||||
src/HTTPClientSession.cpp
|
||||
src/HTTPCookie.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/HostEntry.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/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/NetException.cpp
|
||||
src/NetworkInterface.cpp
|
||||
src/NullPartHandler.cpp
|
||||
src/POP3ClientSession.cpp
|
||||
src/PartHandler.cpp
|
||||
src/PartSource.cpp
|
||||
src/QuotedPrintableDecoder.cpp
|
||||
src/QuotedPrintableEncoder.cpp
|
||||
src/RawSocket.cpp
|
||||
src/RawSocketImpl.cpp
|
||||
src/RemoteSyslogChannel.cpp
|
||||
src/RemoteSyslogListener.cpp
|
||||
src/SMTPClientSession.cpp
|
||||
src/ServerSocket.cpp
|
||||
src/ServerSocketImpl.cpp
|
||||
src/Socket.cpp
|
||||
src/SocketAddress.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
|
||||
)
|
||||
aux_source_directory(src BASE_SRCS)
|
||||
|
||||
set( WIN_SRCS
|
||||
)
|
||||
@ -109,14 +24,14 @@ set_target_properties( ${LIBNAME}
|
||||
PROPERTIES COMPILE_FLAGS ${DEBUG_CXX_FLAGS}
|
||||
VERSION ${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}
|
||||
SOVERSION ${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH})
|
||||
target_link_libraries( ${LIBNAME} )
|
||||
target_link_libraries( ${LIBNAME} PocoFoundation)
|
||||
|
||||
add_library( ${LIBNAMED} ${LIB_MODE} ${SRCS} )
|
||||
set_target_properties( ${LIBNAMED}
|
||||
PROPERTIES COMPILE_FLAGS "${RELEASE_CXX_FLAGS}"
|
||||
VERSION ${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}
|
||||
SOVERSION ${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH})
|
||||
target_link_libraries( ${LIBNAMED} )
|
||||
target_link_libraries( ${LIBNAMED} PocoFoundationd)
|
||||
|
||||
install(
|
||||
DIRECTORY include/Poco
|
||||
@ -128,4 +43,5 @@ install(
|
||||
DESTINATION lib
|
||||
)
|
||||
|
||||
add_subdirectory( samples )
|
||||
#add_subdirectory( testsuite )
|
||||
|
@ -65,3 +65,4 @@ install(
|
||||
)
|
||||
|
||||
add_subdirectory( testsuite )
|
||||
add_subdirectory( samples )
|
||||
|
35
Util/testsuite/CMakeLists.txt
Normal file
35
Util/testsuite/CMakeLists.txt
Normal file
@ -0,0 +1,35 @@
|
||||
set( TEST_SRCS
|
||||
src/AbstractConfigurationTest.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
|
||||
)
|
||||
|
||||
set( WIN_TEST_SRCS
|
||||
src/WinConfigurationTest.cpp
|
||||
src/WinDriver.cpp
|
||||
src/WinRegistryTest.cpp
|
||||
src/WindowsTestSuite.cpp
|
||||
)
|
||||
|
||||
set(TESTUNIT "${LIBNAME}-testrunner")
|
||||
|
||||
add_executable( ${TESTUNIT} ${TEST_SRCS} )
|
||||
set_target_properties( ${TESTUNIT} PROPERTIES COMPILE_FLAGS ${RELEASE_CXX_FLAGS} )
|
||||
target_link_libraries( ${TESTUNIT} PocoUtil PocoXML PocoFoundation CppUnit pthread)
|
@ -47,11 +47,9 @@ endif(MYSQL_LIB)
|
||||
|
||||
if (MYSQL_INCLUDE_DIR AND MYSQL_LIB_DIR)
|
||||
set(MYSQL_FOUND TRUE)
|
||||
|
||||
message(STATUS "MySQL Include directory: ${MYSQL_INCLUDE_DIR} library directory: ${MYSQL_LIB_DIR}")
|
||||
|
||||
include_directories(${MYSQL_INCLUDE_DIR})
|
||||
link_directories(${MYSQL_LIB_DIR})
|
||||
else (MYSQL_INCLUDE_DIR AND MYSQL_LIB_DIR)
|
||||
message(WARNING "Cannot find MySQL, include directory: ${MYSQL_INCLUDE_DIR} library directory: ${MYSQL_LIB_DIR}")
|
||||
message(STATUS "Cannot find MySQL, include directory: ${MYSQL_INCLUDE_DIR} library directory: ${MYSQL_LIB_DIR}")
|
||||
endif (MYSQL_INCLUDE_DIR AND MYSQL_LIB_DIR)
|
||||
|
@ -3,8 +3,8 @@ if(WITH_UNIXODBC)
|
||||
find_program(ODBC_CONFIG odbc_config $ENV{ODBC_PATH}/bin PATHS)
|
||||
|
||||
if(NOT ODBC_CONFIG)
|
||||
message(FATAL_ERROR "Couldn't find unixODBC")
|
||||
endif(NOT ODBC_CONFIG)
|
||||
message(STATUS "Couldn't find unixODBC")
|
||||
else(NOT ODBC_CONFIG)
|
||||
|
||||
message(STATUS "unixODBC: Found odbc_config in ${ODBC_CONFIG}")
|
||||
|
||||
@ -12,14 +12,15 @@ if(WITH_UNIXODBC)
|
||||
set (CMAKE_FLAGS "${CMAKE_FLAGS} -I${ODBC_INCLUDE_DIR}")
|
||||
|
||||
exec_program(${ODBC_CONFIG} ARGS "--libs" OUTPUT_VARIABLE ODBC_LINK_FLAGS)
|
||||
endif(NOT ODBC_CONFIG)
|
||||
|
||||
else(WITH_UNIXODBC)
|
||||
|
||||
find_program(ODBC_CONFIG iodbc-config $ENV{ODBC_PATH}/bin PATHS)
|
||||
|
||||
if(NOT ODBC_CONFIG)
|
||||
message(FATAL_ERROR "Couldn't find iODBC")
|
||||
endif(NOT ODBC_CONFIG)
|
||||
message(STATUS "Couldn't find iODBC")
|
||||
else(NOT ODBC_CONFIG)
|
||||
|
||||
message(STATUS "iODBC: Found iodbc-config in ${ODBC_CONFIG}")
|
||||
|
||||
@ -27,6 +28,7 @@ else(WITH_UNIXODBC)
|
||||
set(CMAKE_FLAGS "${CMAKE_FLAGS} ${ODBC_CFLAGS}")
|
||||
|
||||
exec_program(${ODBC_CONFIG} ARGS "--libs" OUTPUT_VARIABLE ODBC_LINK_FLAGS)
|
||||
endif(NOT ODBC_CONFIG)
|
||||
|
||||
endif(WITH_UNIXODBC)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user