Fix CMake files so it actually works on CMake 2.8.3

This commit is contained in:
Matt Williams 2012-07-23 11:11:31 +01:00
parent 01fd3f9be5
commit 8ac27912ae
2 changed files with 16 additions and 6 deletions

View File

@ -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

View File

@ -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})