From c7514c975f52a252fe031945c7af52ba193c0e75 Mon Sep 17 00:00:00 2001 From: Matt Williams Date: Fri, 2 Jul 2010 13:57:34 +0000 Subject: [PATCH] More cleaning up of the Qt 'dependency'. Qt is now used by the tests, the OpenGL example and the documentation. These are of course all optional components. --- CMakeLists.txt | 12 ++++++------ examples/OpenGL/CMakeLists.txt | 3 --- library/CMakeLists.txt | 1 + 3 files changed, 7 insertions(+), 9 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 51f8f7bb..d1f0cb4d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -9,8 +9,8 @@ SET(POLYVOX_VERSION "${POLYVOX_VERSION_MAJOR}.${POLYVOX_VERSION_MINOR}.${POLYVOX FIND_PACKAGE(Doxygen) -# Qt is required for building the tests and optionally for bundling the documentation -FIND_PACKAGE(Qt4 COMPONENTS QtCore QtTest REQUIRED) +# 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}) IF(WIN32) @@ -44,11 +44,11 @@ IF(BUILD_TESTING) ADD_SUBDIRECTORY(tests) ENDIF(BUILD_TESTING) -#Check if we will be making the 'doc' target available +#Check if we will building _and_ bundling the docs IF(DOXYGEN_FOUND AND QT_QCOLLECTIONGENERATOR_EXECUTABLE) - SET(BUILD_DOCS YES) + SET(BUILD_AND_BUNDLE_DOCS YES) ELSE() - SET(BUILD_DOCS NO) + SET(BUILD_AND_BUNDLE_DOCS NO) ENDIF() @@ -59,5 +59,5 @@ MESSAGE(STATUS "-------") MESSAGE(STATUS "Build examples: " ${ENABLE_EXAMPLES}) MESSAGE(STATUS "Build tests: " ${BUILD_TESTING}) MESSAGE(STATUS "API Docs available: " ${DOXYGEN_FOUND}) -MESSAGE(STATUS " - Qt Help bundling: " ${BUILD_DOCS}) +MESSAGE(STATUS " - Qt Help bundling: " ${BUILD_AND_BUNDLE_DOCS}) MESSAGE(STATUS "") diff --git a/examples/OpenGL/CMakeLists.txt b/examples/OpenGL/CMakeLists.txt index b39de1b0..b7d18687 100644 --- a/examples/OpenGL/CMakeLists.txt +++ b/examples/OpenGL/CMakeLists.txt @@ -32,9 +32,6 @@ ADD_DEFINITIONS(-DGLEW_STATIC) SOURCE_GROUP("Sources" FILES ${SRC_FILES}) SOURCE_GROUP("Headers" FILES ${INC_FILES}) -FIND_PACKAGE(Qt4 COMPONENTS QtCore QtGui QtOpenGL REQUIRED) -INCLUDE(${QT_USE_FILE}) - FIND_PACKAGE(OpenGL REQUIRED) #Tell CMake the paths for OpenGL and for PolyVox (which is just relative to our current location) diff --git a/library/CMakeLists.txt b/library/CMakeLists.txt index e3aab9e6..5d20f605 100644 --- a/library/CMakeLists.txt +++ b/library/CMakeLists.txt @@ -33,6 +33,7 @@ if(DOXYGEN_FOUND) COMMAND ${DOXYGEN_EXECUTABLE} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMENT "Building documentation" + SOURCES Doxyfile.in polyvox.qhcp.in Mainpage.dox VERBATIM ) set_target_properties(doc PROPERTIES PROJECT_LABEL "Documentation") #Set label seen in IDE