[CMake] Custom target failing to build on Mac

Matthew Smith indigojo at blogistan.co.uk
Sat Jun 7 10:39:52 EDT 2008


Hi everyone,

I am trying to build a cross-platform Qt application, and use a header
file, generated at build time, to produce a version number definition
which can be included by any other source file, so I can define the
version number once in the CMakeLists.txt file and have it reproduced
anywhere else that it's needed.  The problem is that it is failing to
generate on the Mac, which results in a compilation failure for the
first source file that includes it.  This does not happen on Windows or
Linux (using CMake 2.6 on all platforms).

I have attached the CMakeLists.txt file; the bit where the source file
is built starts at line 158.  Looking at the CMakeFiles directory, a
target directory (VERSION_HEADER.dir) has been produced, but the target
is not generated before the actual compilation starts; on other targets,
it is generated before "scanning dependencies" for the main executable
target.  Can anyone help me with this?

Regards,

Matt Smith

-- 

http://qtm.blogistan.co.uk/
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: CMakeLists.txt
URL: <http://www.cmake.org/pipermail/cmake/attachments/20080607/62a551d0/attachment.txt>


More information about the CMake mailing list