On 20.07.10 12:06:11, kent williams wrote: > This is with cmake version 2.8.1 on OS X 10.6. > > I had a project using CMake and Qt. As long as I only used one QT > Designer-generated .ui file, everything worked perfectly. When I added > as second UI file, things no longer worked. I was working from the > CMake + Qt4 examples on the web. > > There are two problems: > > 1. If you give a list of more than one header file as the dependency > on set_source_files_properties, it throws a configure-time error: > > > CMake Error at CMakeLists.txt:33 (set_source_files_properties): > set_source_files_properties called with incorrect number of arguments. > > 2. If I work around that error (by setting each header dependency > individually), then only one of the UI files seems to get processed to > create the corresponding C++ header file: > > /scratch/kent/qtcmake/src/QTCMake.cxx:4:35: error: > ui_qvtkpropertydialog.h: No such file or directory > > I've put a succinct example illustrating the problem I'm having here: > http://www.cornwarning.com/xfer/QTCmakeTest.tar.gz
That url gives a 404. > The CMakeLists.txt file is as follows: > > project(QTCMake) > cmake_minimum_required(VERSION 2.8) > > #uses QT4 and associated CMake Macros > find_package( Qt4 REQUIRED ) > include(${QT_USE_FILE}) > set(QT_USE_QTXML 1) > > > #dummy test program > set(QTCMake_SRC QTCMake.cxx) > > > # list of QT Designer-generated XML designs > set(QTCMake_UIS > qvtkpropertydialog.ui qimagetransformdialog.ui > ) > > # > # this is supposed to wrap all the UI files > QT4_WRAP_UI(UIHeaders ${QTCMake_UIS} ) > include_directories(${CMAKE_CURRENT_BINARY_DIR}) > > add_executable(QTCMake ${QTCMake_SRC}) Usually you'd also add the UIHeaders to the list of sources. I'm using qt4_wrap_ui+qt4_automoc and add_executable and nothing else and ui-headers are being generated just fine. Andreas -- Your depth of comprehension may tend to make you lax in worldly ways. _______________________________________________ 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