mirror of
https://github.com/pocoproject/poco.git
synced 2025-02-24 07:21:30 +01:00

For a unix system, this commit implies no changes by default. However, the ${LIB_SUFFIX} convention was added so the build can be configured for a red-hat style installation which uses lib64 by specifying cmake -DLIB_SUFFIX=64 For a windows build (msvc), this commit will cause the .dll files to be installed in the bin/ path; import libraries .lib are still installed in the lib/ path. Installing dlls into the bin path is preferable because dlls must be in the executable %PATH% to be found at runtime, as there is not equivalent of a separate library path as there is on unix.
69 lines
1.5 KiB
CMake
69 lines
1.5 KiB
CMake
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( WIN_SRCS
|
|
src/WinRegistryConfiguration.cpp
|
|
src/WinRegistryKey.cpp
|
|
src/WinService.cpp
|
|
)
|
|
|
|
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} )
|
|
target_link_libraries( ${LIBNAME} PocoJSON 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)
|
|
add_subdirectory(samples)
|
|
add_subdirectory(testsuite)
|
|
endif ()
|