<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
</style>
</head>
<body class='hmmessage'>
Hi,<br><br> I have a project developed in visual Studio 2008, in C++. I was asked to compile it in Linux. I'm completely new to using CMAKE. I have created a CMakeLists.txt file for my project and was able to build successfully one library. However my main program needs Qt applications to run. Here is the file I have, I get an error of the type : QApplication no such file of directories. QApplication is included in this way: #include <QApplication> in top of a cpp file.<br><br>Also I have moc files generated by Qt in my program, I have read about qt4_wrap_cpp, however I use qt3. What are the equivalent commands for qt3?<br><br> Sorry if this question seems redundant for the mailing lists. I have read some posts concerning this but no one that could clearly guide me to the correct way.<br><br>Thanks in advance for the much needed help or references,<br>Pascale<br><br>_________________________________________________________________________<br>cmake_minimum_required(VERSION 2.6)<br> <br>project(MyProg)<br><br>SET(CMAKE_BUILD_TYPE debug)<br>set(EXECUTABLE_OUTPUT_PATH bin/${CMAKE_BUILD_TYPE})<br><br># -- to include openGL, automatic detection by CMAKE<br>INCLUDE(FindOpenGL)<br>INCLUDE_DIRECTORIES(${OPENGL_INCLUDE_DIR})<br><br><br># Here is where I'm having problems...<br>find_package(Qt3 REQUIRED)<br>add_definitions(${QT_DEFINITIONS})<br>include_directories(${QT_INCLUDE_DIR})<br><br>INCLUDE_DIRECTORIES(src)<br>INCLUDE_DIRECTORIES(inc)<br><br># -- Génération de la liste des fichiers sources<br>file(<br> GLOB_RECURSE<br> source_files_3D<br> src/*<br> inc/*<br>)<br><br># -- Déclaration de l'exécutable<br>add_executable(<br> MyProg_3D<br> ${source_files_3D}<br>)<br><br># On link notre projet avec les libs OpenGL<br>TARGET_LINK_LIBRARIES( MyProg_3D ${OPENGL_LIBRARIES})<br><br><br /><hr />Windows Live helps you keep up with all your friends, <a href='http://go.microsoft.com/?linkid=9660824' target='_new'>in one place.</a></body>
</html>