Do not build the gui if Qt4 headers are not present.

This commit is contained in:
Duraffort 2010-01-23 19:33:37 +01:00 committed by Daniel Marjamäki
parent 744c385097
commit eda60f6483
1 changed files with 4 additions and 1 deletions

View File

@ -1,7 +1,9 @@
# Minimal CMake build file to build cppcheck Qt GUI # Minimal CMake build file to build cppcheck Qt GUI
# find and setup Qt4 for this project # find and setup Qt4 for this project
find_package(Qt4 REQUIRED) find_package(Qt4)
IF(QT4_FOUND)
# Add needed Qt modules # Add needed Qt modules
set(QT_USE_QTMAIN TRUE) 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}) ${CHECK_UIS_H} ${CHECK_RCC_SRCS})
TARGET_LINK_LIBRARIES(gui ${CHECK_LIBS} ${QT_LIBRARIES}) TARGET_LINK_LIBRARIES(gui ${CHECK_LIBS} ${QT_LIBRARIES})
ENDIF(QT4_FOUND)