Don't fail if Qt isn't installed
If Qt isn't installed, set the reporting variables correctly but don't fail.
This commit is contained in:
parent
872bdc07f5
commit
2e71019d8f
@ -72,22 +72,28 @@ endif()
|
||||
ADD_SUBDIRECTORY(library)
|
||||
|
||||
OPTION(ENABLE_EXAMPLES "Should the examples be built" ON)
|
||||
IF(ENABLE_EXAMPLES)
|
||||
IF(ENABLE_EXAMPLES AND QT_QTOPENGL_FOUND)
|
||||
ADD_SUBDIRECTORY(examples/Basic)
|
||||
ADD_SUBDIRECTORY(examples/Paging)
|
||||
ADD_SUBDIRECTORY(examples/OpenGL)
|
||||
ADD_SUBDIRECTORY(examples/SmoothLOD)
|
||||
ENDIF(ENABLE_EXAMPLES)
|
||||
SET(BUILD_EXAMPLES ON)
|
||||
ELSE()
|
||||
SET(BUILD_EXAMPLES OFF)
|
||||
ENDIF()
|
||||
|
||||
INCLUDE(Packaging.cmake)
|
||||
|
||||
OPTION(ENABLE_TESTS "Should the tests be built" ON)
|
||||
IF(ENABLE_TESTS)
|
||||
IF(ENABLE_TESTS AND QT_QTTEST_FOUND)
|
||||
INCLUDE(CTest)
|
||||
MARK_AS_ADVANCED(FORCE DART_TESTING_TIMEOUT) #This is only needed to hide the variable in the GUI (CMake bug) until 2.8.5
|
||||
MARK_AS_ADVANCED(FORCE BUILD_TESTING)
|
||||
ADD_SUBDIRECTORY(tests)
|
||||
ENDIF(ENABLE_TESTS)
|
||||
SET(BUILD_TESTS ON)
|
||||
ELSE()
|
||||
SET(BUILD_TESTS OFF)
|
||||
ENDIF()
|
||||
|
||||
#Check if we will building _and_ bundling the docs
|
||||
IF(DOXYGEN_FOUND AND QT_QCOLLECTIONGENERATOR_EXECUTABLE)
|
||||
@ -98,8 +104,8 @@ ENDIF()
|
||||
|
||||
ADD_SUBDIRECTORY(documentation)
|
||||
|
||||
add_feature_info("Examples" ENABLE_EXAMPLES "Examples of PolyVox usage")
|
||||
add_feature_info("Tests" ENABLE_TESTS "Unit tests")
|
||||
add_feature_info("Examples" BUILD_EXAMPLES "Examples of PolyVox usage")
|
||||
add_feature_info("Tests" BUILD_TESTS "Unit tests")
|
||||
add_feature_info("Bindings" BUILD_BINDINGS "SWIG bindings")
|
||||
add_feature_info("API docs" DOXYGEN_FOUND "HTML documentation of the API")
|
||||
add_feature_info("Qt Help" BUILD_AND_BUNDLE_DOCS "API docs in Qt Help format")
|
||||
@ -112,8 +118,8 @@ MESSAGE(STATUS "")
|
||||
MESSAGE(STATUS "Summary")
|
||||
MESSAGE(STATUS "-------")
|
||||
MESSAGE(STATUS "Library type: " ${LIBRARY_TYPE})
|
||||
MESSAGE(STATUS "Build examples: " ${ENABLE_EXAMPLES})
|
||||
MESSAGE(STATUS "Build tests: " ${ENABLE_TESTS})
|
||||
MESSAGE(STATUS "Build examples: " ${BUILD_EXAMPLES})
|
||||
MESSAGE(STATUS "Build tests: " ${BUILD_TESTS})
|
||||
MESSAGE(STATUS "Build bindings: " ${BUILD_BINDINGS})
|
||||
MESSAGE(STATUS "API Docs available: " ${DOXYGEN_FOUND})
|
||||
MESSAGE(STATUS " - Qt Help bundling: " ${BUILD_AND_BUNDLE_DOCS})
|
||||
|
@ -39,10 +39,6 @@ MACRO(CREATE_TEST headerfile sourcefile executablename)
|
||||
SET_PROPERTY(TARGET ${executablename} PROPERTY FOLDER "Tests")
|
||||
ENDMACRO(CREATE_TEST)
|
||||
|
||||
IF(NOT QT_QTTEST_FOUND)
|
||||
MESSAGE(STATUS "QtTest not found. Either install it or disable tests by setting ENABLE_TESTS to OFF")
|
||||
ENDIF()
|
||||
|
||||
INCLUDE_DIRECTORIES(${PolyVox_SOURCE_DIR}/PolyVoxCore/include ${CMAKE_CURRENT_BINARY_DIR})
|
||||
REMOVE_DEFINITIONS(-DQT_GUI_LIB) #Make sure the tests don't link to the QtGui
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user