mirror of
https://github.com/pocoproject/poco.git
synced 2025-03-26 16:32:45 +01:00
cmake build system cleanup
This commit is contained in:
parent
ddaceef0ec
commit
b59d198396
@ -1,47 +1,51 @@
|
|||||||
set(LIBNAME "PocoData")
|
set(LIBNAME "PocoData")
|
||||||
|
|
||||||
set(SRCS "")
|
set(SRCS "")
|
||||||
aux_source_directory(src SRCS)
|
aux_source_directory(src SRCS)
|
||||||
include_directories( SQLite/include )
|
include_directories( SQLite/include )
|
||||||
|
|
||||||
add_library( ${LIBNAME} ${LIB_MODE} ${SRCS} )
|
if (NOT POCO_STATIC)
|
||||||
set_target_properties( ${LIBNAME}
|
add_definitions(-DData_EXPORTS -DTHREADSAFE -DODBC_EXPORTS -DMySQL_EXPORTS -DSQLite_EXPORTS)
|
||||||
PROPERTIES
|
endif (NOT POCO_STATIC)
|
||||||
VERSION ${SHARED_LIBRARY_VERSION} SOVERSION ${SHARED_LIBRARY_VERSION} )
|
|
||||||
target_link_libraries( ${LIBNAME} PocoFoundation )
|
add_library( ${LIBNAME} ${LIB_MODE} ${SRCS} )
|
||||||
|
set_target_properties( ${LIBNAME}
|
||||||
install(
|
PROPERTIES
|
||||||
DIRECTORY include/Poco
|
VERSION ${SHARED_LIBRARY_VERSION} SOVERSION ${SHARED_LIBRARY_VERSION} )
|
||||||
DESTINATION include
|
target_link_libraries( ${LIBNAME} PocoFoundation )
|
||||||
PATTERN ".svn" EXCLUDE
|
|
||||||
)
|
install(
|
||||||
|
DIRECTORY include/Poco
|
||||||
install(
|
DESTINATION include
|
||||||
TARGETS ${LIBNAME}
|
PATTERN ".svn" EXCLUDE
|
||||||
DESTINATION lib
|
)
|
||||||
)
|
|
||||||
|
install(
|
||||||
add_subdirectory( SQLite )
|
TARGETS ${LIBNAME}
|
||||||
|
DESTINATION lib
|
||||||
if(MYSQL_FOUND)
|
)
|
||||||
add_subdirectory( MySQL )
|
|
||||||
endif(MYSQL_FOUND)
|
add_subdirectory( SQLite )
|
||||||
|
|
||||||
include(../contrib/cmake/FindODBC.cmake)
|
if(MYSQL_FOUND)
|
||||||
|
add_subdirectory( MySQL )
|
||||||
if(CMAKE_SYSTEM MATCHES "Windows")
|
endif(MYSQL_FOUND)
|
||||||
message(STATUS "Windows native ODBC Support Enabled")
|
|
||||||
add_subdirectory( ODBC )
|
include(../contrib/cmake/FindODBC.cmake)
|
||||||
else ()
|
|
||||||
if ( ${UNIX_ODBC_CONFIG} STREQUAL UNIX_ODBC_CONFIG-NOTFOUND AND ${IODBC_CONFIG} STREQUAL IODBC_CONFIG-NOTFOUND)
|
if(CMAKE_SYSTEM MATCHES "Windows")
|
||||||
message(STATUS "ODBC Support Disabled - no ODBC runtime")
|
message(STATUS "Windows native ODBC Support Enabled")
|
||||||
else ()
|
add_subdirectory( ODBC )
|
||||||
message(STATUS "ODBC Support Enabled")
|
else ()
|
||||||
add_subdirectory( ODBC )
|
if ( ${UNIX_ODBC_CONFIG} STREQUAL UNIX_ODBC_CONFIG-NOTFOUND AND ${IODBC_CONFIG} STREQUAL IODBC_CONFIG-NOTFOUND)
|
||||||
endif ()
|
message(STATUS "ODBC Support Disabled - no ODBC runtime")
|
||||||
endif()
|
else ()
|
||||||
|
message(STATUS "ODBC Support Enabled")
|
||||||
if (ENABLE_TESTS)
|
add_subdirectory( ODBC )
|
||||||
add_subdirectory(samples)
|
endif ()
|
||||||
add_subdirectory(testsuite)
|
endif()
|
||||||
endif ()
|
|
||||||
|
if (ENABLE_TESTS)
|
||||||
|
add_subdirectory(samples)
|
||||||
|
add_subdirectory(testsuite)
|
||||||
|
endif ()
|
||||||
|
@ -188,7 +188,7 @@ set(LIN_SRCS
|
|||||||
|
|
||||||
if(CMAKE_SYSTEM MATCHES "Windows")
|
if(CMAKE_SYSTEM MATCHES "Windows")
|
||||||
set(SRCS ${BASE_SRCS} ${WIN_SRCS})
|
set(SRCS ${BASE_SRCS} ${WIN_SRCS})
|
||||||
add_definitions( -DPOCO_NO_FPENVIRONMENT -DPCRE_STATIC -DFoundation_EXPORTS)
|
add_definitions( -DPCRE_STATIC -DFoundation_EXPORTS)
|
||||||
set(SYSLIBS ${SYSLIBS} iphlpapi)
|
set(SYSLIBS ${SYSLIBS} iphlpapi)
|
||||||
else (CMAKE_SYSTEM MATCHES "Windows")
|
else (CMAKE_SYSTEM MATCHES "Windows")
|
||||||
set(SRCS ${BASE_SRCS} ${LIN_SRCS})
|
set(SRCS ${BASE_SRCS} ${LIN_SRCS})
|
||||||
|
@ -1,26 +1,31 @@
|
|||||||
set(LIBNAME "PocoNetSSL")
|
set(LIBNAME "PocoNetSSL")
|
||||||
|
|
||||||
aux_source_directory(src SRCS)
|
aux_source_directory(src SRCS)
|
||||||
|
include_directories( ${OPENSSL_INCLUDE_DIR} )
|
||||||
add_library( ${LIBNAME} ${LIB_MODE} ${SRCS} )
|
|
||||||
set_target_properties( ${LIBNAME}
|
if (NOT POCO_STATIC)
|
||||||
PROPERTIES
|
add_definitions(-DNetSSL_EXPORTS)
|
||||||
VERSION ${SHARED_LIBRARY_VERSION} SOVERSION ${SHARED_LIBRARY_VERSION} )
|
endif (NOT POCO_STATIC)
|
||||||
target_link_libraries( ${LIBNAME} ssl crypto)
|
|
||||||
|
add_library( ${LIBNAME} ${LIB_MODE} ${SRCS} )
|
||||||
install(
|
set_target_properties( ${LIBNAME}
|
||||||
DIRECTORY include/Poco
|
PROPERTIES
|
||||||
DESTINATION include
|
VERSION ${SHARED_LIBRARY_VERSION} SOVERSION ${SHARED_LIBRARY_VERSION} )
|
||||||
PATTERN ".svn" EXCLUDE
|
target_link_libraries( ${LIBNAME} ssl crypto)
|
||||||
)
|
|
||||||
|
install(
|
||||||
install(
|
DIRECTORY include/Poco
|
||||||
TARGETS ${LIBNAME}
|
DESTINATION include
|
||||||
DESTINATION lib
|
PATTERN ".svn" EXCLUDE
|
||||||
)
|
)
|
||||||
|
|
||||||
if (ENABLE_TESTS)
|
install(
|
||||||
add_subdirectory(samples)
|
TARGETS ${LIBNAME}
|
||||||
add_subdirectory(testsuite)
|
DESTINATION lib
|
||||||
endif ()
|
)
|
||||||
|
|
||||||
|
if (ENABLE_TESTS)
|
||||||
|
add_subdirectory(samples)
|
||||||
|
add_subdirectory(testsuite)
|
||||||
|
endif ()
|
||||||
|
|
||||||
|
@ -1,64 +1,65 @@
|
|||||||
set(LIBNAME "PocoUtil")
|
set(LIBNAME "PocoUtil")
|
||||||
|
|
||||||
set( BASE_SRCS
|
set( BASE_SRCS
|
||||||
src/AbstractConfiguration.cpp
|
src/AbstractConfiguration.cpp
|
||||||
src/Application.cpp
|
src/Application.cpp
|
||||||
src/ConfigurationMapper.cpp
|
src/ConfigurationMapper.cpp
|
||||||
src/ConfigurationView.cpp
|
src/ConfigurationView.cpp
|
||||||
src/FilesystemConfiguration.cpp
|
src/FilesystemConfiguration.cpp
|
||||||
src/HelpFormatter.cpp
|
src/HelpFormatter.cpp
|
||||||
src/IniFileConfiguration.cpp
|
src/IniFileConfiguration.cpp
|
||||||
src/IntValidator.cpp
|
src/IntValidator.cpp
|
||||||
src/LayeredConfiguration.cpp
|
src/LayeredConfiguration.cpp
|
||||||
src/LoggingConfigurator.cpp
|
src/LoggingConfigurator.cpp
|
||||||
src/LoggingSubsystem.cpp
|
src/LoggingSubsystem.cpp
|
||||||
src/MapConfiguration.cpp
|
src/MapConfiguration.cpp
|
||||||
src/Option.cpp
|
src/Option.cpp
|
||||||
src/OptionCallback.cpp
|
src/OptionCallback.cpp
|
||||||
src/OptionException.cpp
|
src/OptionException.cpp
|
||||||
src/OptionProcessor.cpp
|
src/OptionProcessor.cpp
|
||||||
src/OptionSet.cpp
|
src/OptionSet.cpp
|
||||||
src/PropertyFileConfiguration.cpp
|
src/PropertyFileConfiguration.cpp
|
||||||
src/RegExpValidator.cpp
|
src/RegExpValidator.cpp
|
||||||
src/ServerApplication.cpp
|
src/ServerApplication.cpp
|
||||||
src/Subsystem.cpp
|
src/Subsystem.cpp
|
||||||
src/SystemConfiguration.cpp
|
src/SystemConfiguration.cpp
|
||||||
src/Validator.cpp
|
src/Validator.cpp
|
||||||
src/XMLConfiguration.cpp
|
src/XMLConfiguration.cpp
|
||||||
src/Timer.cpp
|
src/Timer.cpp
|
||||||
src/TimerTask.cpp
|
src/TimerTask.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
set( WIN_SRCS
|
set( WIN_SRCS
|
||||||
src/WinRegistryConfiguration.cpp
|
src/WinRegistryConfiguration.cpp
|
||||||
src/WinRegistryKey.cpp
|
src/WinRegistryKey.cpp
|
||||||
src/WinService.cpp
|
src/WinService.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
if(CMAKE_SYSTEM MATCHES "Windows")
|
if(CMAKE_SYSTEM MATCHES "Windows")
|
||||||
set(SRCS ${BASE_SRCS} ${WIN_SRCS})
|
set(SRCS ${BASE_SRCS} ${WIN_SRCS})
|
||||||
else (CMAKE_SYSTEM MATCHES "Windows")
|
add_definitions(-DUtil_EXPORTS)
|
||||||
set(SRCS ${BASE_SRCS})
|
else (CMAKE_SYSTEM MATCHES "Windows")
|
||||||
endif(CMAKE_SYSTEM MATCHES "Windows")
|
set(SRCS ${BASE_SRCS})
|
||||||
|
endif(CMAKE_SYSTEM MATCHES "Windows")
|
||||||
add_library( ${LIBNAME} ${LIB_MODE} ${SRCS} )
|
|
||||||
set_target_properties( ${LIBNAME}
|
add_library( ${LIBNAME} ${LIB_MODE} ${SRCS} )
|
||||||
PROPERTIES
|
set_target_properties( ${LIBNAME}
|
||||||
VERSION ${SHARED_LIBRARY_VERSION} SOVERSION ${SHARED_LIBRARY_VERSION} )
|
PROPERTIES
|
||||||
target_link_libraries( ${LIBNAME} PocoXML PocoFoundation)
|
VERSION ${SHARED_LIBRARY_VERSION} SOVERSION ${SHARED_LIBRARY_VERSION} )
|
||||||
|
target_link_libraries( ${LIBNAME} PocoXML PocoFoundation)
|
||||||
install(
|
|
||||||
DIRECTORY include/Poco
|
install(
|
||||||
DESTINATION include
|
DIRECTORY include/Poco
|
||||||
PATTERN ".svn" EXCLUDE
|
DESTINATION include
|
||||||
)
|
PATTERN ".svn" EXCLUDE
|
||||||
|
)
|
||||||
install(
|
|
||||||
TARGETS ${LIBNAME}
|
install(
|
||||||
DESTINATION lib
|
TARGETS ${LIBNAME}
|
||||||
)
|
DESTINATION lib
|
||||||
|
)
|
||||||
if (ENABLE_TESTS)
|
|
||||||
add_subdirectory(samples)
|
if (ENABLE_TESTS)
|
||||||
add_subdirectory(testsuite)
|
add_subdirectory(samples)
|
||||||
endif ()
|
add_subdirectory(testsuite)
|
||||||
|
endif ()
|
||||||
|
@ -1,28 +1,32 @@
|
|||||||
set(LIBNAME "PocoWebWidgets")
|
set(LIBNAME "PocoWebWidgets")
|
||||||
|
|
||||||
set(SRCS "")
|
set(SRCS "")
|
||||||
aux_source_directory(src SRCS)
|
aux_source_directory(src SRCS)
|
||||||
|
|
||||||
add_library( ${LIBNAME} ${LIB_MODE} ${SRCS} )
|
if (NOT POCO_STATIC)
|
||||||
set_target_properties( ${LIBNAME}
|
add_definitions(-DWebWidgets_EXPORTS)
|
||||||
PROPERTIES
|
endif (NOT POCO_STATIC)
|
||||||
VERSION ${SHARED_LIBRARY_VERSION} SOVERSION ${SHARED_LIBRARY_VERSION} )
|
|
||||||
target_link_libraries( ${LIBNAME} PocoNet PocoUtil PocoXML PocoFoundation )
|
add_library( ${LIBNAME} ${LIB_MODE} ${SRCS} )
|
||||||
|
set_target_properties( ${LIBNAME}
|
||||||
install(
|
PROPERTIES
|
||||||
DIRECTORY include/Poco
|
VERSION ${SHARED_LIBRARY_VERSION} SOVERSION ${SHARED_LIBRARY_VERSION} )
|
||||||
DESTINATION include
|
target_link_libraries( ${LIBNAME} PocoNet PocoUtil PocoXML PocoFoundation )
|
||||||
PATTERN ".svn" EXCLUDE
|
|
||||||
)
|
install(
|
||||||
|
DIRECTORY include/Poco
|
||||||
install(
|
DESTINATION include
|
||||||
TARGETS ${LIBNAME}
|
PATTERN ".svn" EXCLUDE
|
||||||
DESTINATION lib
|
)
|
||||||
)
|
|
||||||
|
install(
|
||||||
add_subdirectory( ExtJS )
|
TARGETS ${LIBNAME}
|
||||||
|
DESTINATION lib
|
||||||
if (ENABLE_TESTS)
|
)
|
||||||
add_subdirectory(testsuite)
|
|
||||||
endif ()
|
add_subdirectory( ExtJS )
|
||||||
|
|
||||||
|
if (ENABLE_TESTS)
|
||||||
|
add_subdirectory(testsuite)
|
||||||
|
endif ()
|
||||||
|
|
||||||
|
@ -5,7 +5,9 @@ include_directories( include src )
|
|||||||
set(SRCS "")
|
set(SRCS "")
|
||||||
aux_source_directory(src SRCS)
|
aux_source_directory(src SRCS)
|
||||||
|
|
||||||
add_definitions(-DSQLITE_OMIT_UTF16 -DSQLITE_OMIT_PROGRESS_CALLBACK -DSQLITE_OMIT_COMPLETE -DSQLITE_OMIT_TCL_VARIABLE)
|
if (NOT POCO_STATIC)
|
||||||
|
add_definitions(-DExtJS_EXPORTS)
|
||||||
|
endif (NOT POCO_STATIC)
|
||||||
|
|
||||||
add_library( ${LIBNAME} ${LIB_MODE} ${SRCS} )
|
add_library( ${LIBNAME} ${LIB_MODE} ${SRCS} )
|
||||||
set_target_properties( ${LIBNAME}
|
set_target_properties( ${LIBNAME}
|
||||||
|
@ -1,28 +1,28 @@
|
|||||||
set(LIBNAME "PocoXML")
|
set(LIBNAME "PocoXML")
|
||||||
|
|
||||||
aux_source_directory(src SRCS)
|
aux_source_directory(src SRCS)
|
||||||
|
|
||||||
add_definitions(-DXML_NS -DXML_DTD -DHAVE_EXPAT_CONFIG_H)
|
add_definitions(-D_USRDLL -DXML_NS -DXML_DTD -DHAVE_EXPAT_CONFIG_H -DXML_EXPORTS)
|
||||||
|
|
||||||
add_library( ${LIBNAME} ${LIB_MODE} ${SRCS} )
|
add_library( ${LIBNAME} ${LIB_MODE} ${SRCS} )
|
||||||
set_target_properties( ${LIBNAME}
|
set_target_properties( ${LIBNAME}
|
||||||
PROPERTIES
|
PROPERTIES
|
||||||
VERSION ${SHARED_LIBRARY_VERSION} SOVERSION ${SHARED_LIBRARY_VERSION} )
|
VERSION ${SHARED_LIBRARY_VERSION} SOVERSION ${SHARED_LIBRARY_VERSION} )
|
||||||
target_link_libraries( ${LIBNAME} PocoFoundation)
|
target_link_libraries( ${LIBNAME} PocoFoundation)
|
||||||
|
|
||||||
install(
|
install(
|
||||||
DIRECTORY include/Poco
|
DIRECTORY include/Poco
|
||||||
DESTINATION include
|
DESTINATION include
|
||||||
PATTERN ".svn" EXCLUDE
|
PATTERN ".svn" EXCLUDE
|
||||||
)
|
)
|
||||||
|
|
||||||
install(
|
install(
|
||||||
TARGETS ${LIBNAME}
|
TARGETS ${LIBNAME}
|
||||||
DESTINATION lib
|
DESTINATION lib
|
||||||
)
|
)
|
||||||
|
|
||||||
if (ENABLE_TESTS)
|
if (ENABLE_TESTS)
|
||||||
add_subdirectory(samples)
|
add_subdirectory(samples)
|
||||||
add_subdirectory(testsuite)
|
add_subdirectory(testsuite)
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
|
@ -1,26 +1,30 @@
|
|||||||
set(LIBNAME "PocoZip")
|
set(LIBNAME "PocoZip")
|
||||||
|
|
||||||
aux_source_directory(src SRCS)
|
aux_source_directory(src SRCS)
|
||||||
|
|
||||||
add_library( ${LIBNAME} ${LIB_MODE} ${SRCS} )
|
if (NOT POCO_STATIC)
|
||||||
set_target_properties( ${LIBNAME}
|
add_definitions(-DZip_EXPORTS)
|
||||||
PROPERTIES
|
endif (NOT POCO_STATIC)
|
||||||
VERSION ${SHARED_LIBRARY_VERSION} SOVERSION ${SHARED_LIBRARY_VERSION} )
|
|
||||||
target_link_libraries( ${LIBNAME} PocoUtil PocoXML PocoFoundation)
|
add_library( ${LIBNAME} ${LIB_MODE} ${SRCS} )
|
||||||
|
set_target_properties( ${LIBNAME}
|
||||||
install(
|
PROPERTIES
|
||||||
DIRECTORY include/Poco
|
VERSION ${SHARED_LIBRARY_VERSION} SOVERSION ${SHARED_LIBRARY_VERSION} )
|
||||||
DESTINATION include
|
target_link_libraries( ${LIBNAME} PocoUtil PocoXML PocoFoundation)
|
||||||
PATTERN ".svn" EXCLUDE
|
|
||||||
)
|
install(
|
||||||
|
DIRECTORY include/Poco
|
||||||
install(
|
DESTINATION include
|
||||||
TARGETS ${LIBNAME}
|
PATTERN ".svn" EXCLUDE
|
||||||
DESTINATION lib
|
)
|
||||||
)
|
|
||||||
|
install(
|
||||||
if (ENABLE_TESTS)
|
TARGETS ${LIBNAME}
|
||||||
add_subdirectory(samples)
|
DESTINATION lib
|
||||||
add_subdirectory(testsuite)
|
)
|
||||||
endif ()
|
|
||||||
|
if (ENABLE_TESTS)
|
||||||
|
add_subdirectory(samples)
|
||||||
|
add_subdirectory(testsuite)
|
||||||
|
endif ()
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user