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.
This commit is contained in:
@ -9,8 +9,8 @@ SET(POLYVOX_VERSION "${POLYVOX_VERSION_MAJOR}.${POLYVOX_VERSION_MINOR}.${POLYVOX
|
|||||||
|
|
||||||
FIND_PACKAGE(Doxygen)
|
FIND_PACKAGE(Doxygen)
|
||||||
|
|
||||||
# Qt is required for building the tests and optionally for bundling the documentation
|
# Qt is required for building the tests, the example and optionally for bundling the documentation
|
||||||
FIND_PACKAGE(Qt4 COMPONENTS QtCore QtTest REQUIRED)
|
FIND_PACKAGE(Qt4 COMPONENTS QtCore QtGui QtOpenGL QtTest)
|
||||||
INCLUDE(${QT_USE_FILE})
|
INCLUDE(${QT_USE_FILE})
|
||||||
|
|
||||||
IF(WIN32)
|
IF(WIN32)
|
||||||
@ -44,11 +44,11 @@ IF(BUILD_TESTING)
|
|||||||
ADD_SUBDIRECTORY(tests)
|
ADD_SUBDIRECTORY(tests)
|
||||||
ENDIF(BUILD_TESTING)
|
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)
|
IF(DOXYGEN_FOUND AND QT_QCOLLECTIONGENERATOR_EXECUTABLE)
|
||||||
SET(BUILD_DOCS YES)
|
SET(BUILD_AND_BUNDLE_DOCS YES)
|
||||||
ELSE()
|
ELSE()
|
||||||
SET(BUILD_DOCS NO)
|
SET(BUILD_AND_BUNDLE_DOCS NO)
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
|
|
||||||
@ -59,5 +59,5 @@ MESSAGE(STATUS "-------")
|
|||||||
MESSAGE(STATUS "Build examples: " ${ENABLE_EXAMPLES})
|
MESSAGE(STATUS "Build examples: " ${ENABLE_EXAMPLES})
|
||||||
MESSAGE(STATUS "Build tests: " ${BUILD_TESTING})
|
MESSAGE(STATUS "Build tests: " ${BUILD_TESTING})
|
||||||
MESSAGE(STATUS "API Docs available: " ${DOXYGEN_FOUND})
|
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 "")
|
MESSAGE(STATUS "")
|
||||||
|
@ -32,9 +32,6 @@ ADD_DEFINITIONS(-DGLEW_STATIC)
|
|||||||
SOURCE_GROUP("Sources" FILES ${SRC_FILES})
|
SOURCE_GROUP("Sources" FILES ${SRC_FILES})
|
||||||
SOURCE_GROUP("Headers" FILES ${INC_FILES})
|
SOURCE_GROUP("Headers" FILES ${INC_FILES})
|
||||||
|
|
||||||
FIND_PACKAGE(Qt4 COMPONENTS QtCore QtGui QtOpenGL REQUIRED)
|
|
||||||
INCLUDE(${QT_USE_FILE})
|
|
||||||
|
|
||||||
FIND_PACKAGE(OpenGL REQUIRED)
|
FIND_PACKAGE(OpenGL REQUIRED)
|
||||||
|
|
||||||
#Tell CMake the paths for OpenGL and for PolyVox (which is just relative to our current location)
|
#Tell CMake the paths for OpenGL and for PolyVox (which is just relative to our current location)
|
||||||
|
@ -33,6 +33,7 @@ if(DOXYGEN_FOUND)
|
|||||||
COMMAND ${DOXYGEN_EXECUTABLE}
|
COMMAND ${DOXYGEN_EXECUTABLE}
|
||||||
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
||||||
COMMENT "Building documentation"
|
COMMENT "Building documentation"
|
||||||
|
SOURCES Doxyfile.in polyvox.qhcp.in Mainpage.dox
|
||||||
VERBATIM
|
VERBATIM
|
||||||
)
|
)
|
||||||
set_target_properties(doc PROPERTIES PROJECT_LABEL "Documentation") #Set label seen in IDE
|
set_target_properties(doc PROPERTIES PROJECT_LABEL "Documentation") #Set label seen in IDE
|
||||||
|
Reference in New Issue
Block a user