mirror of
https://github.com/pocoproject/poco.git
synced 2025-01-31 06:35:03 +01:00
minor change to support cmake2.8 builds
Reduce cmake version requirement to 2.8.12 (ubuntu trusty), and conditionalize export() in PocoMacros to support 2.8 syntax.
This commit is contained in:
parent
910e2f3f29
commit
df8b868da6
@ -6,7 +6,7 @@
|
||||
# ENABLE_{COMPONENT}
|
||||
# ENABLE_TESTS
|
||||
|
||||
cmake_minimum_required(VERSION 3.0.0)
|
||||
cmake_minimum_required(VERSION 2.8.12)
|
||||
|
||||
project(Poco)
|
||||
|
||||
|
@ -202,10 +202,19 @@ write_basic_package_version_file(
|
||||
VERSION ${PROJECT_VERSION}
|
||||
COMPATIBILITY AnyNewerVersion
|
||||
)
|
||||
export(EXPORT "${target_name}Targets"
|
||||
FILE "${CMAKE_BINARY_DIR}/${PROJECT_NAME}/${PROJECT_NAME}${target_name}Targets.cmake"
|
||||
NAMESPACE "${PROJECT_NAME}::"
|
||||
)
|
||||
if ("${CMAKE_VERSION}" VERSION_LESS "3.0.0")
|
||||
if (NOT EXISTS "${CMAKE_BINARY_DIR}/${PROJECT_NAME}/${PROJECT_NAME}${target_name}Targets.cmake")
|
||||
export(TARGETS "${target_name}" APPEND
|
||||
FILE "${CMAKE_BINARY_DIR}/${PROJECT_NAME}/${PROJECT_NAME}${target_name}Targets.cmake"
|
||||
NAMESPACE "${PROJECT_NAME}::"
|
||||
)
|
||||
endif ()
|
||||
else ()
|
||||
export(EXPORT "${target_name}Targets"
|
||||
FILE "${CMAKE_BINARY_DIR}/${PROJECT_NAME}/${PROJECT_NAME}${target_name}Targets.cmake"
|
||||
NAMESPACE "${PROJECT_NAME}::"
|
||||
)
|
||||
endif ()
|
||||
configure_file("cmake/Poco${target_name}Config.cmake"
|
||||
"${CMAKE_BINARY_DIR}/${PROJECT_NAME}/${PROJECT_NAME}${target_name}Config.cmake"
|
||||
@ONLY
|
||||
|
Loading…
x
Reference in New Issue
Block a user