<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">
Couple of things:<div><br></div><div> _I_ suggest adding the following to your CMakeLists.txt file:</div><div><br></div><div><div># ---------- Setup output Directories -------------------------</div><div>SET (LIBRARY_OUTPUT_PATH</div><div> ${PROJECT_BINARY_DIR}/Bin</div><div> CACHE PATH</div><div> "Single Directory for all Libraries"</div><div> )</div><div><br></div><div># --------- Setup the Executable output Directory -------------</div><div>SET (EXECUTABLE_OUTPUT_PATH</div><div> ${PROJECT_BINARY_DIR}/Bin</div><div> CACHE PATH</div><div> "Single Directory for all Executables."</div><div> )</div><div><br></div><div>just AFTER the </div><div><br></div><div>CMAKE_MINIMUM_REQUIRED(VERSION 2.6.0)</div><div><br></div><div><br></div><div>Also, in your mainwindow.h and loginwindow.h files you have something like:</div><div><br></div><div>#include "../../build/ui_mainwindow.h"</div><div><br></div><div>change that to:</div><div><br></div><div>#include "ui_mainwindow.h"</div><div><br></div><div>Lastly, you had a typo in this line</div><div>ADD_EXECUTABLE( dummy ${DUMMY_SRCS} ${DUMMY_MOC_SRCS} ${DUMMY_RC_SRCS} ${DUMMY_UI_HDRS} )</div><div><br></div><div>It should be:</div><div><br></div><div>ADD_EXECUTABLE( dummy ${DUMMY_SRCS} ${DUMMY_MOC_SRCS} ${DUMMY_RC_SRCS} ${DUMMY_UIS_HDRS} )</div><div><br></div><div>After all that the ui_* files will be generated. Still doesn't compile but I'll let you figure that part out.</div><div><br></div><div>Cheers</div><div> <span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Bitstream Vera Sans; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">-- </div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Mike Jackson Senior Research Engineer</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Innovative Management & Technology Services</div><br class="Apple-interchange-newline"></span> </div><br><div><div>On Aug 2, 2008, at 8:39 AM, Jan Dinger wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div dir="ltr">Hello,<br><br>sorry, but it don't works, same error. I've no idea what I can do. I've toke a look at other QtApps that use cmake, I can't see any mistakes in my CMakeLists.txt (after changes by Leo). <br> <br>I've uploaded my dummy program, this is only a test program. All needed files included. I hope someone has time to test it, than we can locate the error, because I hope this was my mistake and not a bug.<br><br>Cmake is a nice tool but I don't understand the logic. This error is unbelievable, other qtApps use cmake too. <br> If cmake don't work with my small dummy program I can't use it on my projects...<br><br>Here you can download my test program: <a href="http://www.jan-fox.org/downloads/dummy.tar.gz">http://www.jan-fox.org/downloads/dummy.tar.gz</a><br> <br>If there someone to can't test it here is the new CMakeLists.txt:<br><br>###snip###<br>PROJECT( dummy )<br><br>CMAKE_MINIMUM_REQUIRED(VERSION 2.6.0)<br><br>FIND_PACKAGE( Qt4 REQUIRED )<br><br>IF(QT_QTSQL_NOTFOUND)<br> MESSAGE(FATAL_ERROR "Looking for QtSQL -- not found, this projects needs QTSQL")<br>ELSE(QT_QTSQL_NOTFOUND)<br> MESSAGE(STATUS "Looking for QtSQL -- found")<br> set(QT_USE_QTSQL TRUE)<br>ENDIF(QT_QTSQL_NOTFOUND)<br> <br>SET( DUMMY_SRCS<br> ./src/main.cpp<br> ./src/logindialog/logindialog.cpp<br> ./src/mainwindow/mainwindow.cpp<br>)<br><br>SET( DUMMY_MOC_HDRS<br> ./src/logindialog/logindialog.h<br> ./src/mainwindow/mainwindow.h<br> )<br><br>SET( DUMMY_UIS<br> ./ui/logindialog.ui<br> ./ui/mainwindow.ui<br>)<br><br>SET( DUMMY_RCS<br> ./images/dummy.qrc<br>)<br><br>ADD_DEFINITIONS( -Wall )<br><br>INCLUDE( ${QT_USE_FILE} )<br><br>INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR})<br> <br>QT4_ADD_RESOURCES( DUMMY_RC_SRCS ${DUMMY_RCS} )<br><br>QT4_WRAP_CPP( DUMMY_MOC_SRCS ${DUMMY_MOC_HDRS} )<br><br>QT4_WRAP_UI(DUMMY_UIS_HDRS ${DUMMY_UIS} )<br><br>ADD_EXECUTABLE( dummy ${DUMMY_SRCS} ${DUMMY_MOC_SRCS} ${DUMMY_RC_SRCS}<br> ${DUMMY_UI_HDRS} )<br><br>TARGET_LINK_LIBRARIES( dummy ${QT_LIBRARIES} )<br>###snap###<br><br>Special thanks at all <br><br>so long<br>jd<br></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">_______________________________________________</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">CMake mailing list</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><a href="mailto:CMake@cmake.org">CMake@cmake.org</a></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><a href="http://www.cmake.org/mailman/listinfo/cmake">http://www.cmake.org/mailman/listinfo/cmake</a></div> </blockquote></div><br></div></body></html>