From 8ac27912ae72fc9144bb0fdd300f96dce167de43 Mon Sep 17 00:00:00 2001 From: Matt Williams Date: Mon, 23 Jul 2012 11:11:31 +0100 Subject: [PATCH] Fix CMake files so it actually works on CMake 2.8.3 --- CMakeLists.txt | 13 +++++++++---- library/bindings/CMakeLists.txt | 9 +++++++-- 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 426cd63a..126df3a2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -11,7 +11,6 @@ MARK_AS_ADVANCED(FORCE POLYVOX_VERSION) include(FeatureSummary) FIND_PACKAGE(Doxygen) -set_package_properties(Doxygen PROPERTIES URL http://www.doxygen.org DESCRIPTION "API documentation generator" TYPE OPTIONAL PURPOSE "Building the API documentation") OPTION(ENABLE_EXAMPLES "Should the examples be built" ON) SET(LIBRARY_TYPE "DYNAMIC" CACHE STRING "Should the library be STATIC or DYNAMIC") @@ -23,9 +22,15 @@ ENDIF() # Qt is required for building the tests, the example and optionally for bundling the documentation FIND_PACKAGE(Qt4 COMPONENTS QtCore QtGui QtOpenGL QtTest) INCLUDE(${QT_USE_FILE}) -set_package_properties(Qt4 PROPERTIES DESCRIPTION "C++ framework" URL http://qt-project.org) -set_package_properties(Qt4 PROPERTIES TYPE RECOMMENDED PURPOSE "Building the examples") -set_package_properties(Qt4 PROPERTIES TYPE OPTIONAL PURPOSE "Building the tests") +if(CMAKE_VERSION VERSION_LESS "2.8.6") + set_package_info(Doxygen "API documentation generator" http://www.doxygen.org "Building the API documentation") + set_package_info(Qt4 "C++ framework" http://qt-project.org "Building the examples and tests") +else() + set_package_properties(Doxygen PROPERTIES URL http://www.doxygen.org DESCRIPTION "API documentation generator" TYPE OPTIONAL PURPOSE "Building the API documentation") + set_package_properties(Qt4 PROPERTIES DESCRIPTION "C++ framework" URL http://qt-project.org) + set_package_properties(Qt4 PROPERTIES TYPE RECOMMENDED PURPOSE "Building the examples") + set_package_properties(Qt4 PROPERTIES TYPE OPTIONAL PURPOSE "Building the tests") +endif() if(MSVC AND (MSVC_VERSION LESS 1600)) # Require boost for older (pre-vc2010) Visual Studio compilers diff --git a/library/bindings/CMakeLists.txt b/library/bindings/CMakeLists.txt index 20cefd92..bcaae8ac 100644 --- a/library/bindings/CMakeLists.txt +++ b/library/bindings/CMakeLists.txt @@ -2,9 +2,14 @@ option(ENABLE_BINDINGS "Build Python bindings" ON) if(ENABLE_BINDINGS) find_package(SWIG) mark_as_advanced(SWIG_DIR SWIG_VERSION) - set_package_properties(SWIG PROPERTIES DESCRIPTION "Bindings generator" URL http://www.swig.org) find_package(PythonLibs) - set_package_properties(PythonLibs PROPERTIES DESCRIPTION "Programming language" URL http://www.python.org) + if(CMAKE_VERSION VERSION_LESS "2.8.6") + set_package_info(SWIG "Bindings generator" http://www.swig.org) + set_package_info(PythonLibs "Programming language" http://www.python.org) + else() + set_package_properties(SWIG PROPERTIES DESCRIPTION "Bindings generator" URL http://www.swig.org) + set_package_properties(PythonLibs PROPERTIES DESCRIPTION "Programming language" URL http://www.python.org) + endif() if(SWIG_FOUND AND PYTHONLIBS_FOUND) set(BUILD_BINDINGS ON CACHE BOOL "Will the bindings be built" FORCE ) include(${SWIG_USE_FILE})