Am Samstag, 6. Oktober 2012 um 19:39:42, schrieb Sebastian Audet 
<smau...@my.trine.edu>
> On Windows 7, the cmake build process fails to generate a correct .vcxproj
> for the frontend_qt4 project.
> 
> The problem is that Visual Studio decided that the header files are being
> included twice.
> 
> The solution is to not include the header files.
> 
> A patched CMakeLists.txt is attached.
> 
> NOTE: while this works, compiles, and runs, it removes all header files
> from the frontend_qt4 project. It is recommended that the lyx cmake symbols
> be updated so that a list of used headers is generated by the lyxautomoc()
> macro.
> 
> Tested on Windows 7, Visual Studio 2010, cmake 2.8

Some remarks first:
############################
1.) We like to see the differences, not complete files. Something like
-- a/CMakeLists.txt      2012-03-21 09:53:18.000000000 +0100
+++ /b/CMakeLists.txt  2012-10-07 09:29:09.000000000 +0200
@@ -20,6 +20,8 @@
 
 lyx_automoc(${frontends_qt4_sources})
 
+list(REMOVE_ITEM frontends_qt4_headers ${frontends_qt4_headers} .)
+
 lyx_add_ui_files(frontends_qt4_sources ui_files ${frontend_qt4_UI})
 
 file(GLOB_RECURSE frontend_qt4_images_png      ${TOP_SRC_DIR}/lib/images/*.png)

2.) which CMakeListst.txt? there are more
        src/frontends/qt4 (or is it development/cmake/src/frontends/qt4?)

3.) which version (2.0.x or master branch) (in this case it is valid for both)
############################

Really tested? Does it work if you select -DLYX_MERGE_FILES=ON, 
-DLYX_MERGE_FILES=OFF on fresh tree ?

Your patch is unconditional, (means, influences all platforms)
while it should only effect the creation of .vcxproj. 
####
if("${CMAKE_GENERATOR}" MATCHES "Visual Studio 8.*")
####

Maybe the error is in cmake generator itself.
You may want to try the ninja generator. This creates build.ninja files.
        cmake -G Ninja ...

Since I do not have windows at hand, could please some other developer test?

        Kornel

Attachment: signature.asc
Description: This is a digitally signed message part.

Reply via email to