From c988b14fb564d797afa25ef4e1c406257b6b6614 Mon Sep 17 00:00:00 2001 From: Kimmo Varis Date: Sat, 19 Dec 2009 18:15:48 +0200 Subject: [PATCH] CMake- fix building GUI from different directory. --- gui/CMakeLists.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gui/CMakeLists.txt b/gui/CMakeLists.txt index e1c397fdc..680bd95eb 100644 --- a/gui/CMakeLists.txt +++ b/gui/CMakeLists.txt @@ -8,6 +8,10 @@ set(QT_USE_QTMAIN TRUE) set(QT_USE_QTXML TRUE) include(${QT_USE_FILE}) +include_directories (${CPPCHECK_SOURCE_DIR}/lib) +# Generated files (in build directory) need to know gui directory +include_directories (${CPPCHECK_SOURCE_DIR}/gui) + # Header files - listed for mocking SET(CHECK_HEADERS aboutdialog.h @@ -108,7 +112,6 @@ QT4_WRAP_CPP(CHECK_MOC_SRCS ${CHECK_HEADERS}) # add translations ... QT4_ADD_TRANSLATION(CHECK_QM ${CHECK_TRANS}) -include_directories (${CPPCHECK_SOURCE_DIR}/lib) # Include binary directory where code from UI files gets created include_directories(${CMAKE_CURRENT_BINARY_DIR})