mirror of
https://github.com/pocoproject/poco.git
synced 2024-12-12 18:20:26 +01:00
5b320c2894
for CMake build system . It is strongly recomended to use out-of-source build to preserve original Poco makefiles. http://www.cmake.org/Wiki/CMake_FAQ#Out-of-source_build_trees I have tested unix makefile generating and Eclipse CDT4 generating. Supported are static/dynamic and debug/release targets. On now only core libs are included: CppUnit, Foundation, Data, Data/SQLite, Util, Net and XML. But autodetection of OpenSSL, MySQL and ODBC is working OK already. CPack and CTest nor library install still doesn't work, only building. This is only the start.
58 lines
1.7 KiB
CMake
58 lines
1.7 KiB
CMake
set(LIBNAME "PocoUtil")
|
|
set(LIBNAMED "${LIBNAME}d")
|
|
|
|
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/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
|
|
)
|
|
|
|
set( WIN_SRCS
|
|
src/WinRegistryConfiguration.cpp
|
|
src/WinRegistryKey.cpp
|
|
src/WinService.cpp
|
|
)
|
|
|
|
if(CMAKE_SYSTEM MATCHES "Windows")
|
|
set(SRCS ${BASE_SRCS} ${WIN_SRCS})
|
|
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 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} )
|
|
|
|
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} )
|
|
|
|
add_subdirectory( testsuite )
|