From 786c8b558c0a56d830578de589b6c15bf6ab23ca Mon Sep 17 00:00:00 2001 From: Kimmo Varis Date: Sun, 3 Jan 2010 21:01:40 +0200 Subject: [PATCH] CMake - Create folders for GUI files in Visual Studio IDE. --- gui/CMakeLists.txt | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/gui/CMakeLists.txt b/gui/CMakeLists.txt index 37241b02d..326344be2 100644 --- a/gui/CMakeLists.txt +++ b/gui/CMakeLists.txt @@ -119,10 +119,15 @@ QT4_WRAP_CPP(CHECK_MOC_SRCS ${CHECK_HEADERS}) # add translations ... QT4_ADD_TRANSLATION(CHECK_QM ${CHECK_TRANS}) +# Create folders for Visual Studio IDE +SOURCE_GROUP("Header Files" FILES ${CHECK_HEADERS}) +SOURCE_GROUP("Ui Files" ".ui$") +SOURCE_GROUP("Moc Files" "moc_.*cxx$") + # Include binary directory where code from UI files gets created include_directories(${CMAKE_CURRENT_BINARY_DIR}) -ADD_EXECUTABLE(gui WIN32 ${CHECKGUI_SRCS} ${CHECK_MOC_SRCS} ${CHECK_UIS_H} - ${CHECK_RCC_SRCS} ${CHECK_QM}) +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})