Qt World Summit: Register Today!

CMake moc.exe and Paths - "\" "/"

  • Hi people,

    I have a cmake file, inwhich has:

    list all class files which implement Q_OBJECT

    entered. I have entered the last 3 lines with Header1-3.h

    My plattform is Windows XP, Visual Studio 2008, Qt. I get this error when compiling:
    2>------ Build started: Project: MainSolution, Configuration: Debug Win32 ------
    2>Generating path1/project2/moc_Header1.cxx
    2>moc: M:/Eigene Dateien/path1/project2/Header1.h: No such file
    2>Project : error PRJ0019: A tool returned an error code from "Generating path1/project2/moc_Header1.cxx"
    2>Build log was saved at "file://m:\Eigene Dateien\MainSolution.dir\Debug\BuildLog.htm"
    2>MainSolution - 1 error(s), 0 warning(s)
    ========== Build: 1 succeeded, 1 failed, 3 up-to-date, 0 skipped ==========

    In the CMakeList.txt I have to enter "/" otherwise I get error.
    But then "M:/Eigene Dateien/path1/project2/DialogWindowSettings.h" is not going to be found, because of the other slashes "/" instead of ""

    How do I solve this problem?

    Thank you very much

    Cheers mrt

  • I just found out that the "/" is replaced automatically to corresponding OS' pathseperator; here ""
    I just wrote my header1-3.h files into the CMakeList.txt, which is located in path1/project2/ by adding there:


    list all class files which implement Q_OBJECT



Log in to reply