Re: [CMake] how to get cmake and custom qt widget to work?
On Wed 13 Oct 22:29 2010 Alexander Neundorf wrote: On Tuesday 05 October 2010, e...@cs.bgu.ac.il wrote: the project's one? I've copied the hpp and cpp files into one of my src dirs. still not compiling Don't use file(GLOB ...) to collect your source files. Use explicit set(GUI_SRCS a.cpp b.cpp ...) calls. This avoids problems like wrong files getting picked up or new files not getting picked up. Alex ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake ok, so if I use explicit file deceleration, with problem will be solved? ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] how to get cmake and custom qt widget to work?
On Tuesday 05 October 2010, e...@cs.bgu.ac.il wrote: the project's one? I've copied the hpp and cpp files into one of my src dirs. still not compiling Don't use file(GLOB ...) to collect your source files. Use explicit set(GUI_SRCS a.cpp b.cpp ...) calls. This avoids problems like wrong files getting picked up or new files not getting picked up. Alex ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] how to get cmake and custom qt widget to work?
tried that, no go On Tue 05 Oct 21:44 2010 John Drescher wrote: On Tue, Oct 5, 2010 at 3:41 PM, e...@cs.bgu.ac.il e...@cs.bgu.ac.il wrote: nope, like I wrote in the first post, I need a string spinbox so I've extended qspinbox to support strings. that is the custom widget in question. You need to add the path of where ever your custom widget is into one of the INCLUDE_DIRECTORIES statements in your CMakeLists.txt John ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
[CMake] how to get cmake and custom qt widget to work?
hello. I have a cmake+qt4 project, I needed to extend a certain gui item to suit my needs, I've been able to insert it into qtcreator and incorporate it into the project's gui, now when I run compilation, I get this: /home/dagg/workspace/OSSM/src/GUI/ui_TrainingActivityManager.h:29:28: error: qstringspinbox.h: No such file or directory the relevant part of /home/dagg/workspace/OSSM/src/GUI/ui_TrainingActivityManager.h is this: / ** Form generated from reading UI file 'TrainingActivityManager.ui' ** ** Created: Tue Oct 5 20:29:00 2010 ** by: Qt User Interface Compiler version 4.6.3 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! / #ifndef UI_TRAININGACTIVITYMANAGER_H #define UI_TRAININGACTIVITYMANAGER_H #include QtCore/QLocale #include QtCore/QVariant #include QtGui/QAction #include QtGui/QApplication #include QtGui/QButtonGroup #include QtGui/QDialog #include QtGui/QDialogButtonBox #include QtGui/QFormLayout #include QtGui/QGridLayout #include QtGui/QHeaderView #include QtGui/QLabel #include QtGui/QLineEdit #include QtGui/QPushButton #include QtGui/QTreeWidget #include QtGui/QVBoxLayout #include QtGui/QWidget #include qstringspinbox.h // line 28 QT_BEGIN_NAMESPACE class Ui_TrainingActivityManager { public: QTreeWidget *mTrainActManList; QWidget *layoutWidget; how can I make cmake work with this plugin, I've putted the hpp and cpp of the plugin within one of my sub project's src folder, also the file is called qstringspinbox.hpp. any help would be appreciated. ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] how to get cmake and custom qt widget to work?
On Tue, Oct 5, 2010 at 2:59 PM, e...@cs.bgu.ac.il e...@cs.bgu.ac.il wrote: hello. I have a cmake+qt4 project, I needed to extend a certain gui item to suit my needs, I've been able to insert it into qtcreator and incorporate it into the project's gui, now when I run compilation, I get this: /home/dagg/workspace/OSSM/src/GUI/ui_TrainingActivityManager.h:29:28: error: qstringspinbox.h: No such file or directory the relevant part of /home/dagg/workspace/OSSM/src/GUI/ui_TrainingActivityManager.h is this: / ** Form generated from reading UI file 'TrainingActivityManager.ui' ** ** Created: Tue Oct 5 20:29:00 2010 ** by: Qt User Interface Compiler version 4.6.3 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! / #ifndef UI_TRAININGACTIVITYMANAGER_H #define UI_TRAININGACTIVITYMANAGER_H #include QtCore/QLocale #include QtCore/QVariant #include QtGui/QAction #include QtGui/QApplication #include QtGui/QButtonGroup #include QtGui/QDialog #include QtGui/QDialogButtonBox #include QtGui/QFormLayout #include QtGui/QGridLayout #include QtGui/QHeaderView #include QtGui/QLabel #include QtGui/QLineEdit #include QtGui/QPushButton #include QtGui/QTreeWidget #include QtGui/QVBoxLayout #include QtGui/QWidget #include qstringspinbox.h // line 28 QT_BEGIN_NAMESPACE class Ui_TrainingActivityManager { public: QTreeWidget *mTrainActManList; QWidget *layoutWidget; how can I make cmake work with this plugin, I've putted the hpp and cpp of the plugin within one of my sub project's src folder, also the file is called qstringspinbox.hpp. any help would be appreciated. The problem is most likely with your CMakeLists.txt John ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] how to get cmake and custom qt widget to work?
Did you have SET(QT_USE_QTGUI TRUE) in your CMakeLists.txt file? Am 05.10.2010 um 20:59 schrieb e...@cs.bgu.ac.il e...@cs.bgu.ac.il: hello. I have a cmake+qt4 project, I needed to extend a certain gui item to suit my needs, I've been able to insert it into qtcreator and incorporate it into the project's gui, now when I run compilation, I get this: /home/dagg/workspace/OSSM/src/GUI/ui_TrainingActivityManager.h:29:28: error: qstringspinbox.h: No such file or directory the relevant part of /home/dagg/workspace/OSSM/src/GUI/ui_TrainingActivityManager.h is this: / ** Form generated from reading UI file 'TrainingActivityManager.ui' ** ** Created: Tue Oct 5 20:29:00 2010 ** by: Qt User Interface Compiler version 4.6.3 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! / #ifndef UI_TRAININGACTIVITYMANAGER_H #define UI_TRAININGACTIVITYMANAGER_H #include QtCore/QLocale #include QtCore/QVariant #include QtGui/QAction #include QtGui/QApplication #include QtGui/QButtonGroup #include QtGui/QDialog #include QtGui/QDialogButtonBox #include QtGui/QFormLayout #include QtGui/QGridLayout #include QtGui/QHeaderView #include QtGui/QLabel #include QtGui/QLineEdit #include QtGui/QPushButton #include QtGui/QTreeWidget #include QtGui/QVBoxLayout #include QtGui/QWidget #include qstringspinbox.h // line 28 QT_BEGIN_NAMESPACE class Ui_TrainingActivityManager { public: QTreeWidget *mTrainActManList; QWidget *layoutWidget; how can I make cmake work with this plugin, I've putted the hpp and cpp of the plugin within one of my sub project's src folder, also the file is called qstringspinbox.hpp. any help would be appreciated. ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] how to get cmake and custom qt widget to work?
yes, there is a possibility I've posted it in the wrong one. On Tue 05 Oct 21:03 2010 norulez wrote: Did you have SET(QT_USE_QTGUI TRUE) in your CMakeLists.txt file? Am 05.10.2010 um 20:59 schrieb e...@cs.bgu.ac.il e...@cs.bgu.ac.il: hello. I have a cmake+qt4 project, I needed to extend a certain gui item to suit my needs, I've been able to insert it into qtcreator and incorporate it into the project's gui, now when I run compilation, I get this: /home/dagg/workspace/OSSM/src/GUI/ui_TrainingActivityManager.h:29:28: error: qstringspinbox.h: No such file or directory the relevant part of /home/dagg/workspace/OSSM/src/GUI/ui_TrainingActivityManager.h is this: / ** Form generated from reading UI file 'TrainingActivityManager.ui' ** ** Created: Tue Oct 5 20:29:00 2010 ** by: Qt User Interface Compiler version 4.6.3 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! / #ifndef UI_TRAININGACTIVITYMANAGER_H #define UI_TRAININGACTIVITYMANAGER_H #include QtCore/QLocale #include QtCore/QVariant #include QtGui/QAction #include QtGui/QApplication #include QtGui/QButtonGroup #include QtGui/QDialog #include QtGui/QDialogButtonBox #include QtGui/QFormLayout #include QtGui/QGridLayout #include QtGui/QHeaderView #include QtGui/QLabel #include QtGui/QLineEdit #include QtGui/QPushButton #include QtGui/QTreeWidget #include QtGui/QVBoxLayout #include QtGui/QWidget #include qstringspinbox.h // line 28 QT_BEGIN_NAMESPACE class Ui_TrainingActivityManager { public: QTreeWidget *mTrainActManList; QWidget *layoutWidget; how can I make cmake work with this plugin, I've putted the hpp and cpp of the plugin within one of my sub project's src folder, also the file is called qstringspinbox.hpp. any help would be appreciated. ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] how to get cmake and custom qt widget to work?
probably, here is the gui libs CMakeList.txt: #get all cpp files in libs FILE(GLOB GUI_CPP *.cpp) FILE(GLOB GUI_HPP *.hpp) FILE(GLOB GUI_UI *.ui) SET(QT_USE_QTGUI TRUE) #splice out all non UI headers, still in testing, currently disabled. SET (SPLICED_GUI_HPP ) foreach (SITEM ${GUI_HPP}) set (FILECONTENT ) FILE (READ ${SITEM} FILECONTENT) set (VAL ) STRING(REGEX MATCH Q_OBJECT VAL ${FILECONTENT}) if (VAL) LIST (APPEND SPLICED_GUI_HPP ${SITEM}) endif (VAL) endforeach(SITEM ${GUI_HPP}) QT4_WRAP_UI(GUI_UI_H ${GUI_UI}) QT4_WRAP_CPP(GUI_MOC_SRCS ${SPLICED_GUI_HPP}) #build a shared library ADD_LIBRARY(GUI SHARED ${GUI_CPP} ${GUI_MOC_SRCS} ${GUI_UI_H}) #link libs TARGET_LINK_LIBRARIES(GUI ${QT_QTCORE_LIBRARIES} ${QT_QTGUI_LIBRARIES} Utilities DataObjects) and project's CMakeList.txt: CMAKE_MINIMUM_REQUIRED(VERSION 2.6) PROJECT(ossm) SET(CMAKE_VERBOSE_MAKEFILE ON) SET(EXECUTABLE_OUTPUT_PATH ${CMAKE_SOURCE_DIR}/build) SET(LIBRARY_OUTPUT_PATH ${CMAKE_SOURCE_DIR}/build/libs) SET(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/modules) SET(Boost_MINIMUM_VERSION 1.37) include(CheckCXXCompilerFlag) CHECK_CXX_COMPILER_FLAG(-std=c++0x COMPILER_SUPPORTS_NEW_ISO_STD) IF(COMPILER_SUPPORTS_NEW_ISO_STD) SET(CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} -std=c++0x) MESSAGE(STATUS Found c++0x support) ELSE(COMPILER_SUPPORTS_NEW_ISO_STD) MESSAGE(SEND_ERROR no c++0x support found, this program must be compiled with c++0x support.) ENDIF(COMPILER_SUPPORTS_NEW_ISO_STD) FIND_PACKAGE(Boost 1.37.0 COMPONENTS thread-mt unit_test_framework-mt iostreams-mt filesystem-mt REQUIRED) FIND_PACKAGE(Qt4 COMPONENTS QtCore QtGui QtXml REQUIRED) FIND_PACKAGE(LibLZMA REQUIRED) INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIR} ${QT_INCLUDE_DIR} ${LIBLZMA_INCLUDE_DIRS} ${CMAKE_CURRENT_BINARY_DIR}/src src) SUBDIRS(src) On Tue 05 Oct 21:02 2010 John Drescher wrote: On Tue, Oct 5, 2010 at 2:59 PM, e...@cs.bgu.ac.il e...@cs.bgu.ac.il wrote: hello. I have a cmake+qt4 project, I needed to extend a certain gui item to suit my needs, I've been able to insert it into qtcreator and incorporate it into the project's gui, now when I run compilation, I get this: /home/dagg/workspace/OSSM/src/GUI/ui_TrainingActivityManager.h:29:28: error: qstringspinbox.h: No such file or directory the relevant part of /home/dagg/workspace/OSSM/src/GUI/ui_TrainingActivityManager.h is this: / ** Form generated from reading UI file 'TrainingActivityManager.ui' ** ** Created: Tue Oct 5 20:29:00 2010 ** by: Qt User Interface Compiler version 4.6.3 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! / #ifndef UI_TRAININGACTIVITYMANAGER_H #define UI_TRAININGACTIVITYMANAGER_H #include QtCore/QLocale #include QtCore/QVariant #include QtGui/QAction #include QtGui/QApplication #include QtGui/QButtonGroup #include QtGui/QDialog #include QtGui/QDialogButtonBox #include QtGui/QFormLayout #include QtGui/QGridLayout #include QtGui/QHeaderView #include QtGui/QLabel #include QtGui/QLineEdit #include QtGui/QPushButton #include QtGui/QTreeWidget #include QtGui/QVBoxLayout #include QtGui/QWidget #include qstringspinbox.h // line 28 QT_BEGIN_NAMESPACE class Ui_TrainingActivityManager { public: QTreeWidget *mTrainActManList; QWidget *layoutWidget; how can I make cmake work with this plugin, I've putted the hpp and cpp of the plugin within one of my sub project's src folder, also the file is called qstringspinbox.hpp. any help would be appreciated. The problem is most likely with your CMakeLists.txt John ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] how to get cmake and custom qt widget to work?
I don't know about a qstringspinbox, did you mean QSpinBox instead? Am 05.10.2010 um 21:15 schrieb e...@cs.bgu.ac.il e...@cs.bgu.ac.il: probably, here is the gui libs CMakeList.txt: #get all cpp files in libs FILE(GLOB GUI_CPP *.cpp) FILE(GLOB GUI_HPP *.hpp) FILE(GLOB GUI_UI *.ui) SET(QT_USE_QTGUI TRUE) #splice out all non UI headers, still in testing, currently disabled. SET (SPLICED_GUI_HPP ) foreach (SITEM ${GUI_HPP}) set (FILECONTENT ) FILE (READ ${SITEM} FILECONTENT) set (VAL ) STRING(REGEX MATCH Q_OBJECT VAL ${FILECONTENT}) if (VAL) LIST (APPEND SPLICED_GUI_HPP ${SITEM}) endif (VAL) endforeach(SITEM ${GUI_HPP}) QT4_WRAP_UI(GUI_UI_H ${GUI_UI}) QT4_WRAP_CPP(GUI_MOC_SRCS ${SPLICED_GUI_HPP}) #build a shared library ADD_LIBRARY(GUI SHARED ${GUI_CPP} ${GUI_MOC_SRCS} ${GUI_UI_H}) #link libs TARGET_LINK_LIBRARIES(GUI ${QT_QTCORE_LIBRARIES} ${QT_QTGUI_LIBRARIES} Utilities DataObjects) and project's CMakeList.txt: CMAKE_MINIMUM_REQUIRED(VERSION 2.6) PROJECT(ossm) SET(CMAKE_VERBOSE_MAKEFILE ON) SET(EXECUTABLE_OUTPUT_PATH ${CMAKE_SOURCE_DIR}/build) SET(LIBRARY_OUTPUT_PATH ${CMAKE_SOURCE_DIR}/build/libs) SET(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/modules) SET(Boost_MINIMUM_VERSION 1.37) include(CheckCXXCompilerFlag) CHECK_CXX_COMPILER_FLAG(-std=c++0x COMPILER_SUPPORTS_NEW_ISO_STD) IF(COMPILER_SUPPORTS_NEW_ISO_STD) SET(CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} -std=c++0x) MESSAGE(STATUS Found c++0x support) ELSE(COMPILER_SUPPORTS_NEW_ISO_STD) MESSAGE(SEND_ERROR no c++0x support found, this program must be compiled with c++0x support.) ENDIF(COMPILER_SUPPORTS_NEW_ISO_STD) FIND_PACKAGE(Boost 1.37.0 COMPONENTS thread-mt unit_test_framework-mt iostreams-mt filesystem-mt REQUIRED) FIND_PACKAGE(Qt4 COMPONENTS QtCore QtGui QtXml REQUIRED) FIND_PACKAGE(LibLZMA REQUIRED) INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIR} ${QT_INCLUDE_DIR} ${LIBLZMA_INCLUDE_DIRS} ${CMAKE_CURRENT_BINARY_DIR}/src src) SUBDIRS(src) On Tue 05 Oct 21:02 2010 John Drescher wrote: On Tue, Oct 5, 2010 at 2:59 PM, e...@cs.bgu.ac.il e...@cs.bgu.ac.il wrote: hello. I have a cmake+qt4 project, I needed to extend a certain gui item to suit my needs, I've been able to insert it into qtcreator and incorporate it into the project's gui, now when I run compilation, I get this: /home/dagg/workspace/OSSM/src/GUI/ui_TrainingActivityManager.h:29:28: error: qstringspinbox.h: No such file or directory the relevant part of /home/dagg/workspace/OSSM/src/GUI/ui_TrainingActivityManager.h is this: / ** Form generated from reading UI file 'TrainingActivityManager.ui' ** ** Created: Tue Oct 5 20:29:00 2010 ** by: Qt User Interface Compiler version 4.6.3 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! / #ifndef UI_TRAININGACTIVITYMANAGER_H #define UI_TRAININGACTIVITYMANAGER_H #include QtCore/QLocale #include QtCore/QVariant #include QtGui/QAction #include QtGui/QApplication #include QtGui/QButtonGroup #include QtGui/QDialog #include QtGui/QDialogButtonBox #include QtGui/QFormLayout #include QtGui/QGridLayout #include QtGui/QHeaderView #include QtGui/QLabel #include QtGui/QLineEdit #include QtGui/QPushButton #include QtGui/QTreeWidget #include QtGui/QVBoxLayout #include QtGui/QWidget #include qstringspinbox.h // line 28 QT_BEGIN_NAMESPACE class Ui_TrainingActivityManager { public: QTreeWidget *mTrainActManList; QWidget *layoutWidget; how can I make cmake work with this plugin, I've putted the hpp and cpp of the plugin within one of my sub project's src folder, also the file is called qstringspinbox.hpp. any help would be appreciated. The problem is most likely with your CMakeLists.txt John ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] how to get cmake and custom qt widget to work?
nope, like I wrote in the first post, I need a string spinbox so I've extended qspinbox to support strings. that is the custom widget in question. On Tue 05 Oct 21:32 2010 NoRulez wrote: I don't know about a qstringspinbox, did you mean QSpinBox instead? Am 05.10.2010 um 21:15 schrieb e...@cs.bgu.ac.il e...@cs.bgu.ac.il: probably, here is the gui libs CMakeList.txt: #get all cpp files in libs FILE(GLOB GUI_CPP *.cpp) FILE(GLOB GUI_HPP *.hpp) FILE(GLOB GUI_UI *.ui) SET(QT_USE_QTGUI TRUE) #splice out all non UI headers, still in testing, currently disabled. SET (SPLICED_GUI_HPP ) foreach (SITEM ${GUI_HPP}) set (FILECONTENT ) FILE (READ ${SITEM} FILECONTENT) set (VAL ) STRING(REGEX MATCH Q_OBJECT VAL ${FILECONTENT}) if (VAL) LIST (APPEND SPLICED_GUI_HPP ${SITEM}) endif (VAL) endforeach(SITEM ${GUI_HPP}) QT4_WRAP_UI(GUI_UI_H ${GUI_UI}) QT4_WRAP_CPP(GUI_MOC_SRCS ${SPLICED_GUI_HPP}) #build a shared library ADD_LIBRARY(GUI SHARED ${GUI_CPP} ${GUI_MOC_SRCS} ${GUI_UI_H}) #link libs TARGET_LINK_LIBRARIES(GUI ${QT_QTCORE_LIBRARIES} ${QT_QTGUI_LIBRARIES} Utilities DataObjects) and project's CMakeList.txt: CMAKE_MINIMUM_REQUIRED(VERSION 2.6) PROJECT(ossm) SET(CMAKE_VERBOSE_MAKEFILE ON) SET(EXECUTABLE_OUTPUT_PATH ${CMAKE_SOURCE_DIR}/build) SET(LIBRARY_OUTPUT_PATH ${CMAKE_SOURCE_DIR}/build/libs) SET(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/modules) SET(Boost_MINIMUM_VERSION 1.37) include(CheckCXXCompilerFlag) CHECK_CXX_COMPILER_FLAG(-std=c++0x COMPILER_SUPPORTS_NEW_ISO_STD) IF(COMPILER_SUPPORTS_NEW_ISO_STD) SET(CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} -std=c++0x) MESSAGE(STATUS Found c++0x support) ELSE(COMPILER_SUPPORTS_NEW_ISO_STD) MESSAGE(SEND_ERROR no c++0x support found, this program must be compiled with c++0x support.) ENDIF(COMPILER_SUPPORTS_NEW_ISO_STD) FIND_PACKAGE(Boost 1.37.0 COMPONENTS thread-mt unit_test_framework-mt iostreams-mt filesystem-mt REQUIRED) FIND_PACKAGE(Qt4 COMPONENTS QtCore QtGui QtXml REQUIRED) FIND_PACKAGE(LibLZMA REQUIRED) INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIR} ${QT_INCLUDE_DIR} ${LIBLZMA_INCLUDE_DIRS} ${CMAKE_CURRENT_BINARY_DIR}/src src) SUBDIRS(src) On Tue 05 Oct 21:02 2010 John Drescher wrote: On Tue, Oct 5, 2010 at 2:59 PM, e...@cs.bgu.ac.il e...@cs.bgu.ac.il wrote: hello. I have a cmake+qt4 project, I needed to extend a certain gui item to suit my needs, I've been able to insert it into qtcreator and incorporate it into the project's gui, now when I run compilation, I get this: /home/dagg/workspace/OSSM/src/GUI/ui_TrainingActivityManager.h:29:28: error: qstringspinbox.h: No such file or directory the relevant part of /home/dagg/workspace/OSSM/src/GUI/ui_TrainingActivityManager.h is this: / ** Form generated from reading UI file 'TrainingActivityManager.ui' ** ** Created: Tue Oct 5 20:29:00 2010 ** by: Qt User Interface Compiler version 4.6.3 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! / #ifndef UI_TRAININGACTIVITYMANAGER_H #define UI_TRAININGACTIVITYMANAGER_H #include QtCore/QLocale #include QtCore/QVariant #include QtGui/QAction #include QtGui/QApplication #include QtGui/QButtonGroup #include QtGui/QDialog #include QtGui/QDialogButtonBox #include QtGui/QFormLayout #include QtGui/QGridLayout #include QtGui/QHeaderView #include QtGui/QLabel #include QtGui/QLineEdit #include QtGui/QPushButton #include QtGui/QTreeWidget #include QtGui/QVBoxLayout #include QtGui/QWidget #include qstringspinbox.h // line 28 QT_BEGIN_NAMESPACE class Ui_TrainingActivityManager { public: QTreeWidget *mTrainActManList; QWidget *layoutWidget; how can I make cmake work with this plugin, I've putted the hpp and cpp of the plugin within one of my sub project's src folder, also the file is called qstringspinbox.hpp. any help would be appreciated. The problem is most likely with your CMakeLists.txt John ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe:
Re: [CMake] how to get cmake and custom qt widget to work?
On Tue, Oct 5, 2010 at 3:41 PM, e...@cs.bgu.ac.il e...@cs.bgu.ac.il wrote: nope, like I wrote in the first post, I need a string spinbox so I've extended qspinbox to support strings. that is the custom widget in question. You need to add the path of where ever your custom widget is into one of the INCLUDE_DIRECTORIES statements in your CMakeLists.txt John ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] how to get cmake and custom qt widget to work?
the project's one? I've copied the hpp and cpp files into one of my src dirs. still not compiling On Tue 05 Oct 21:44 2010 John Drescher wrote: On Tue, Oct 5, 2010 at 3:41 PM, e...@cs.bgu.ac.il e...@cs.bgu.ac.il wrote: nope, like I wrote in the first post, I need a string spinbox so I've extended qspinbox to support strings. that is the custom widget in question. You need to add the path of where ever your custom widget is into one of the INCLUDE_DIRECTORIES statements in your CMakeLists.txt John ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] how to get cmake and custom qt widget to work?
On 05.10.10 20:59:27, e...@cs.bgu.ac.il wrote: hello. I have a cmake+qt4 project, I needed to extend a certain gui item to suit my needs, I've been able to insert it into qtcreator and incorporate it into the project's gui, now when I run compilation, I get this: /home/dagg/workspace/OSSM/src/GUI/ui_TrainingActivityManager.h:29:28: error: qstringspinbox.h: No such file or directory the relevant part of /home/dagg/workspace/OSSM/src/GUI/ui_TrainingActivityManager.h is this: This file is generated by uic from TrainingActivityManager.ui. If you've used qstringspinbox.hpp, then you need to put that into the .ui file, so that uic picks it up and generates the right header code. Or you rename your header file to .h. How you tell uic to generate an include with .hpp depends on wether this is a designer plugin or just using the promoting-feature in Qt designer. The Qt docs will have details on how to set the proper header filename. Also make sure that the directory containing the header is in the list of include-dirs by using include_directories() in cmake. Andreas -- Cheer Up! Things are getting worse at a slower rate. ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake