From eda60f6483b8df9215c1e19201abad2b3aa9617a Mon Sep 17 00:00:00 2001 From: Duraffort Date: Sat, 23 Jan 2010 19:33:37 +0100 Subject: [PATCH] Do not build the gui if Qt4 headers are not present. --- gui/CMakeLists.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gui/CMakeLists.txt b/gui/CMakeLists.txt index 326344be2..019fee166 100644 --- a/gui/CMakeLists.txt +++ b/gui/CMakeLists.txt @@ -1,7 +1,9 @@ # Minimal CMake build file to build cppcheck Qt GUI # find and setup Qt4 for this project -find_package(Qt4 REQUIRED) +find_package(Qt4) + +IF(QT4_FOUND) # Add needed Qt modules set(QT_USE_QTMAIN TRUE) @@ -131,3 +133,4 @@ ADD_EXECUTABLE(gui WIN32 ${CHECKGUI_SRCS} ${CHECK_MOC_SRCS} ${CHECK_HEADERS} ${CHECK_UIS_H} ${CHECK_RCC_SRCS}) TARGET_LINK_LIBRARIES(gui ${CHECK_LIBS} ${QT_LIBRARIES}) +ENDIF(QT4_FOUND)