[CMake] Concern with 2.6.3

Pau Garcia i Quiles pgquiles at elpauer.org
Mon Mar 9 14:16:25 EDT 2009


>> What does not work is what I am doing: I'm listing the .h files as
>> source files so that they show in the VC++ project. Now, given that
>> header files are marked as "excluded from build", VC++ disables
>> right-click-and-compile for those header files.
>
> The .h file is not compiled, so that would not work anyway in a CMake
> generated project. If the .h file where the input to a custom command then
> it would work.  That is how the VTK wrappers work.  Each .h file is
> "compiled" by a custom command into a .cxx file.

Is it possible to mark each .h file as the entry point to the
corresponding (already-generated) CMake rule, so that "compile" is
available and runs moc on that .h?

>> By the way, is there any way to set an internal global variable in a
>> VC++ project? Currently, CMake-generated Qt projects may show a wrong
>> version in the property browser if the default (in the registry) Qt
>> version is not the same as the Qt version you told in CMake (i. e. the
>> qmake). What's required is adding something like this in the .vcproj :
>>
>> <Globals>
>> ...
>> <Global
>> Name="QtVersion"
>> Value="4.4.3"
>> />
>>
>> (where the Qt version would be what FindQt4.cmake has found)
>>
>> Would something like SET_TARGET_PROPERTIES ( thetarget PROPERTIES
>> VS_GLOBAL "property" "value" ) be accepted if I provide a patch?
>>
> Sure, there are already some examples of this:
>  ("VS_KEYWORD", cmProperty::TARGET,
>     "Visual Studio project keyword.",
>     "Can be set to change the visual studio keyword, for example "
>     "QT integration works better if this is set to Qt4VSv1.0. ");
>  cm->DefineProperty
>    ("VS_SCC_PROVIDER", cmProperty::TARGET,
>     "Visual Studio Source Code Control Provider.",
>     "Can be set to change the visual studio source code control "
>     "provider property.");
>  cm->DefineProperty
>    ("VS_SCC_LOCALPATH", cmProperty::TARGET,
>     "Visual Studio Source Code Control Provider.",
>     "Can be set to change the visual studio source code control "
>     "local path property.");
>  cm->DefineProperty
>    ("VS_SCC_PROJECTNAME", cmProperty::TARGET,
>     "Visual Studio Source Code Control Project.",
>     "Can be set to change the visual studio source code control "
>     "project name property.");

Perfect!

-- 
Pau Garcia i Quiles
http://www.elpauer.org
(Due to my workload, I may need 10 days to answer)


More information about the CMake mailing list