[CMake] Fixed ProjectGUID

Dr. Sören Textor soeren.textor at ditec-gmbh.de
Tue Dec 8 06:06:20 EST 2015


Taking a look at the CMakeCache.txt offers the missing
      ${target_name}_GUID_CMAKE
variable.

Thus
   set_property(CACHE ${target_name}_GUID_CMAKE PROPERTY VALUE ${MY_GUID} )
seems to work.

But how do I get the actual GUID set by CMake? This one was stored in CMakeCache.txt before. But right know I cannot find the GUID from a generated project file in any ccmake chache file.
How do I gain the GUID created by CMake. In my project I just store the new GUIDs created by CMake in a file. Next time I build the project file I'm looking if a GUID  was already generated for that project an will use that one.

Best regards,
SirAnn



Am 08.12.2015 um 11:25 schrieb Dr. Sören Textor:
> Hello
> I just installed 3.4.1 and the usage of a hardcoded guid does not seem to work anymore:
>
> 	set_property(CACHE ${target_name}_GUID_CMAKE PROPERTY VALUE ${MY_GUID} )
>
> Is thre another way to set the project GUID?
>
> best regards
> SirAnn
>
>   -------- Original-Nachricht --------
> >/Datum: Fri, 7 Jan 2011 22:26:31 +0100 />/Von: Pau Garcia i Quiles <pgquiles at elpauer.org 
> <http://www.cmake.org/mailman/listinfo/cmake>> />/An: David Cole <david.cole at kitware.com 
> <http://www.cmake.org/mailman/listinfo/cmake>> />/CC: "Sören Freudiger" <muffmolch at gmx.de 
> <http://www.cmake.org/mailman/listinfo/cmake>>, cmake at cmake.org 
> <http://www.cmake.org/mailman/listinfo/cmake> />/Betreff: Re: [CMake] Fixed ProjectGUID /
> >/Hello, />//>/In Visual Studio 2010, ProjectGUID is a global. This bug provides a />/patch to add global definitions to CMake, but only up to Visual Studio />/2008. It shouldn't be difficult to update the patch to add support for />/Visual C++ 2010. Setting the ProjectGUID would then be as easy as: />//>/set_target_properties( thetarget PROPERTIES VS_GLOBAL_ProjectGUID />/"{384A545C-A6F2-4833-9260-F05C46557610}" ) />//>/I opened the bug and provided the code almost two years ago, so it's />/not like I expect CMake developers to suddenly implement it... />//>/2011/1/7 David Cole <david.cole at kitware.com 
> <http://www.cmake.org/mailman/listinfo/cmake>>: />/> The guids should remain constant in a given build tree for the life of />/the />/> CMakeCache.txt file. />/> />/> But after you delete that and start in a fresh build tree, you'll get />/fresh />/> guids. />/> />/> If you want constant guids in your vcproj files, they should be 
> built by />/> hand, not with CMake. />/> />/> />/> HTH, />/> David />/> />/> />/> 2011/1/7 "Sören Freudiger" <muffmolch at gmx.de 
> <http://www.cmake.org/mailman/listinfo/cmake>> />/>> />/>> Hello />/>> Is it possible to set the ProjectGUID by CMake? Every time I 
> generate a />/>> vcproj file with CMake the ProjectGUID changes. But we need to have a />/fixed />/>> one (because other projects are including the vcproj). />/>> />/>> Best regards />/>> SirAnn />/>> -- />/>> GMX DSL Doppel-Flat ab 19,99 Euro/mtl.! Jetzt mit />/>> gratis Handy-Flat! http://portal.gmx.net/de/go/dsl />/>> _______________________________________________ />/>> Powered by www.kitware.com />/>> />/>> Visit other Kitware open-source projects at />/>> http://www.kitware.com/opensource/opensource.html />/>> />/>> Please keep messages on-topic and check the CMake FAQ at: />/>> http://www.cmake.org/Wiki/CMake_FAQ />/>> />/>> Follow this link to subscribe/unsubscribe: />/>> http://www.cmake.org/mailman/listinfo/cmake />/> />/> />/> _______________________________________________ />/> Powered by www.kitware.com />/> />/> Visit other Kitware open-source projects at />/> http://www.kitware.com/opensource/opensource.html />/> />/> Please keep messages on-topic and check the CMake FAQ at: />/> http://www.cmake.org/Wiki/CMake_FAQ />/> />/> Follow this link to subscribe/unsubscribe: />/> http://www.cmake.org/mailman/listinfo/cmake />/> />//>//>//>/-- />/Pau Garcia i Quiles />/http://www.elpauer.org <http://www.elpauer.org/> />/(Due to my workload, I may need 10 days to answer) /
> -- 
> NEU: FreePhone - kostenlos mobil telefonieren und surfen!			
> Jetzt informieren:http://www.gmx.net/de/go/freephone
>
>
>

-- 
Dr.-Ing. Sören Textor
Softwareentwicklung

phone | +49 6221 31698 225

fax | +49 6221 31698 399

email | s.textor at ditec-gmbh.de <mailto:s.textor at ditec-gmbh.de>

web | http://www.ditec-gmbh.de

DiTEC Dr. Siegfried Kahlich & Dierk Langer GmbH

Im Breitspiel 19 | 69126 Heidelberg | Germany

Handelsregister | Mannheim | HRB 341229

Dieses Dokument ist vertraulich zu behandeln. Die Weitergabe, sowie 
Vervielfältigung, Verwertung und Mitteilung seines Inhalts ist nur mit 
unserer ausdrücklichen Genehmigung gestattet. Alle Rechte vorbehalten, 
insbesondere für den Fall der Schutzrechtsanmeldung.

This document has to be treated confidentially. Its contents are not to 
be passed on, duplicated, exploited or disclosed without our express 
permission. All rights reserved, especially the right to apply for 
protective rights.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20151208/70869165/attachment-0001.html>


More information about the CMake mailing list