[CMake] RE: CMake 2.2 beta - QT_WRAP syntax change?

David Cole david.cole at kitware.com
Mon Jul 11 16:58:58 EDT 2005


Use this line instead:

ADD_LIBRARY(project_moc STATIC ${project_moc_files})

Also, you should prefer TARGET_LINK_LIBRARIES to LINK_LIBRARIES if it's 
not too complicated to change; see the documentation for each for the 
reasoning behind this.

This time it really should be helpful, ;-) ,
David

Bitter, Ingmar (NIH/CC/DRD) wrote:

>Hi,
>
>I updated from 1.8.3 to 2.2 beta
>
>The following lines in my CMakeLists.txt file used to work:
>
>QT_WRAP_CPP( project_moc project_moc_files project_hpp_files )
>ADD_LIBRARY(project_moc STATIC project_moc_files)
>LINK_LIBRARIES(project_moc)
>
>But now the second line causes an error:
>CMake Error: can not find file c:/projectDir/project_moc_files
>
>CMake used to interpret project_moc_files as a variable holding the
>filenames created by the moc process, but now it seems to think it is not a
>variable but a concrete filename.  What do I need to do to fix this?
>
>Ingmar
>_______________________________________________
>CMake mailing list
>CMake at cmake.org
>http://www.cmake.org/mailman/listinfo/cmake
>
>  
>


More information about the CMake mailing list