<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="http://techbase.kde.org/skins/common/feed.css?0.2"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://techbase.kde.org/index.php?title=Development/Tutorials/CMake_(pt_BR)&amp;feed=atom&amp;action=history</id>
		<title>Development/Tutorials/CMake (pt BR) - Revision history</title>
		<link rel="self" type="application/atom+xml" href="http://techbase.kde.org/index.php?title=Development/Tutorials/CMake_(pt_BR)&amp;feed=atom&amp;action=history"/>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/index.php?title=Development/Tutorials/CMake_(pt_BR)&amp;action=history"/>
		<updated>2013-05-20T06:54:42Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.20.2</generator>

	<entry>
		<id>http://techbase.kde.org/index.php?title=Development/Tutorials/CMake_(pt_BR)&amp;diff=73504&amp;oldid=prev</id>
		<title>AnneW at 12:09, 18 July 2012</title>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/index.php?title=Development/Tutorials/CMake_(pt_BR)&amp;diff=73504&amp;oldid=prev"/>
				<updated>2012-07-18T12:09:20Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
			&lt;tr style='vertical-align: top;'&gt;
			&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;← Older revision&lt;/td&gt;
			&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 12:09, 18 July 2012&lt;/td&gt;
			&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;{{Template:I18n/Language Navigation Bar|Development/Tutorials/CMake}}&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;== Introdução ==&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;== Introdução ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>AnneW</name></author>	</entry>

	<entry>
		<id>http://techbase.kde.org/index.php?title=Development/Tutorials/CMake_(pt_BR)&amp;diff=60502&amp;oldid=prev</id>
		<title>Neverendingo: Text replace - &quot;&lt;/code&gt;&quot; to &quot;&lt;/syntaxhighlight&gt;&quot;</title>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/index.php?title=Development/Tutorials/CMake_(pt_BR)&amp;diff=60502&amp;oldid=prev"/>
				<updated>2011-06-29T20:50:37Z</updated>
		
		<summary type="html">&lt;p&gt;Text replace - &amp;quot;&amp;lt;/code&amp;gt;&amp;quot; to &amp;quot;&amp;lt;/syntaxhighlight&amp;gt;&amp;quot;&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
			&lt;tr style='vertical-align: top;'&gt;
			&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;← Older revision&lt;/td&gt;
			&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 20:50, 29 June 2011&lt;/td&gt;
			&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 27:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 27:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;$ make&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;$ make&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;$ make install&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;$ make install&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;/&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;code&lt;/del&gt;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;/&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;syntaxhighlight&lt;/ins&gt;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Por padrão, isso instalará o CMake em /usr/local, então tenha certeza de pôr /usr/local/bin no seu path de execução. Para mudar o prefixo de instalação (para /usr no Debian, por exemplo), adicione a opção '--prefix=PATH' à linha de comando.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Por padrão, isso instalará o CMake em /usr/local, então tenha certeza de pôr /usr/local/bin no seu path de execução. Para mudar o prefixo de instalação (para /usr no Debian, por exemplo), adicione a opção '--prefix=PATH' à linha de comando.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 54:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 54:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;$ cd kdelibs-build&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;$ cd kdelibs-build&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;$ cmake ../kdelibs&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;$ cmake ../kdelibs&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;/&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;code&lt;/del&gt;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;/&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;syntaxhighlight&lt;/ins&gt;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Isso gerará os Makefiles para compilar kdelibs/ em kdelibs-build/.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Isso gerará os Makefiles para compilar kdelibs/ em kdelibs-build/.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 70:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 70:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;c:\daten\kde4&amp;gt; cd kdelibs-build&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;c:\daten\kde4&amp;gt; cd kdelibs-build&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;c:\daten\kde4\kdelibs-build&amp;gt; cmake ..\kdelibs&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;c:\daten\kde4\kdelibs-build&amp;gt; cmake ..\kdelibs&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;/&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;code&lt;/del&gt;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;/&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;syntaxhighlight&lt;/ins&gt;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Isso gerará os Makefiles para compilar kdelibs\ em kdelibs-build\. Veja [[Projects/KDE_on_Windows|KDE no Windows]] para mais informações sobre como compilar o KDE no Windows.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Isso gerará os Makefiles para compilar kdelibs\ em kdelibs-build\. Veja [[Projects/KDE_on_Windows|KDE no Windows]] para mais informações sobre como compilar o KDE no Windows.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 78:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 78:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;$ cmake ../kdelibs -GKDevelop3&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;$ cmake ../kdelibs -GKDevelop3&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;/&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;code&lt;/del&gt;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;/&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;syntaxhighlight&lt;/ins&gt;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Use 'cmake -h' para descobrir que geradores o CMake suporta e outras opções.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Use 'cmake -h' para descobrir que geradores o CMake suporta e outras opções.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 128:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 128:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Please set the following variables:&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Please set the following variables:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;X11_XTest_LIB (ADVANCED)&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;X11_XTest_LIB (ADVANCED)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;/&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;code&lt;/del&gt;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;/&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;syntaxhighlight&lt;/ins&gt;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;então está faltando uma biblioteca (ou outra dependência). Para descobrir qual biblioteca é, procure no diretório pela variável que o CMake não pôde encontrar no diretório cmake/modules. No exemplo acima, ela é&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;então está faltando uma biblioteca (ou outra dependência). Para descobrir qual biblioteca é, procure no diretório pela variável que o CMake não pôde encontrar no diretório cmake/modules. No exemplo acima, ela é&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;find_library(X11_XTest_LIB Xtst ${X11_LIB_SEARCH_PATH})&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;find_library(X11_XTest_LIB Xtst ${X11_LIB_SEARCH_PATH})&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;/&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;code&lt;/del&gt;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;/&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;syntaxhighlight&lt;/ins&gt;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Logo, a biblioteca que está faltando é Xtst. Então você deve encontrá-la (provavelmente instalando libXtst-devel) e rodar cmake novamente.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Logo, a biblioteca que está faltando é Xtst. Então você deve encontrá-la (provavelmente instalando libXtst-devel) e rodar cmake novamente.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 140:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 140:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;add_executable(hello main.cpp)&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;add_executable(hello main.cpp)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;/&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;code&lt;/del&gt;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;/&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;syntaxhighlight&lt;/ins&gt;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Isso criará um executável chamado &amp;quot;hello&amp;quot; (ou &amp;quot;hello.exe&amp;quot; no Windows) do arquivo de código fonte main.cpp. Você pode misturar arquivos C e C++ se você quiser. Você pode ter múltiplos executáveis e bibliotecas num CMakeLists.txt.&amp;#160; O mesmo arquivo de código fonte pode ser usado em vários alvos: ele será compilado para cada um, independentemente dos outros. Provavelmente, a parte mais importante da linguagem CMake são as variáveis:&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Isso criará um executável chamado &amp;quot;hello&amp;quot; (ou &amp;quot;hello.exe&amp;quot; no Windows) do arquivo de código fonte main.cpp. Você pode misturar arquivos C e C++ se você quiser. Você pode ter múltiplos executáveis e bibliotecas num CMakeLists.txt.&amp;#160; O mesmo arquivo de código fonte pode ser usado em vários alvos: ele será compilado para cada um, independentemente dos outros. Provavelmente, a parte mais importante da linguagem CMake são as variáveis:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;set( MY_SOURCES main.cpp widget.cpp)&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;set( MY_SOURCES main.cpp widget.cpp)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;message(STATUS &amp;quot;my sources: ${MY_SOURCES}&amp;quot;)&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;message(STATUS &amp;quot;my sources: ${MY_SOURCES}&amp;quot;)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;/&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;code&lt;/del&gt;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;/&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;syntaxhighlight&lt;/ins&gt;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Então, use o comando SET() para definir o valor de uma variável. Se você listar mais de uma string, a variável será uma lista. Uma lista é uma lista de strings separada por pontos-e-vírgulas. Se você definí-la para apenas um item, ela terá apenas um valor. Para pegar o valor da variável, use ${VAR}.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Então, use o comando SET() para definir o valor de uma variável. Se você listar mais de uma string, a variável será uma lista. Uma lista é uma lista de strings separada por pontos-e-vírgulas. Se você definí-la para apenas um item, ela terá apenas um valor. Para pegar o valor da variável, use ${VAR}.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Você pode realizar iterações na lista usando FOREACH():&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Você pode realizar iterações na lista usando FOREACH():&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 152:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 152:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160;  message(STATUS &amp;quot;next item: ${next_ITEM}&amp;quot;)&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160;  message(STATUS &amp;quot;next item: ${next_ITEM}&amp;quot;)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;endforeach(next_ITEM ${MY_SOURCES})&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;endforeach(next_ITEM ${MY_SOURCES})&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;/&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;code&lt;/del&gt;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;/&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;syntaxhighlight&lt;/ins&gt;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Os comandos do CMake são sensíveis à caixa, assim como nomes de variáveis de de parâmetros.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Os comandos do CMake são sensíveis à caixa, assim como nomes de variáveis de de parâmetros.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 164:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 164:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160;  set(MY_SRCS ${MY_SRCS} winextra.cpp)&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160;  set(MY_SRCS ${MY_SRCS} winextra.cpp)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;endif (MSVC)&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;endif (MSVC)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;/&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;code&lt;/del&gt;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;/&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;syntaxhighlight&lt;/ins&gt;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Neste segundo exemplo você pode ver também como anexar ítens a uma lista.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Neste segundo exemplo você pode ver também como anexar ítens a uma lista.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 184:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 184:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;install( TARGETS kde4project&amp;#160; ${INSTALL_TARGETS_DEFAULT_ARGS} )&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;install( TARGETS kde4project&amp;#160; ${INSTALL_TARGETS_DEFAULT_ARGS} )&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;/&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;code&lt;/del&gt;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;/&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;syntaxhighlight&lt;/ins&gt;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;''target_link_libraries'' contém as bibliotecas de desenvolvimento que estão ligadas ao seu programa. Por exemplo, se você quiser ligar a libtidy-devel, o nome do arquivo da sua biblioteca deve ser /usr/local/lib/libtidy.a. Você deve, então, adicionar -ltidy numa chamada do gcc. Aqui, você adicona ''tidy'' ao seu target_link_libraries. Se possível, use variáveis pré-definidas ou macros como ${KDE4_KDEUI_LIBS}.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;''target_link_libraries'' contém as bibliotecas de desenvolvimento que estão ligadas ao seu programa. Por exemplo, se você quiser ligar a libtidy-devel, o nome do arquivo da sua biblioteca deve ser /usr/local/lib/libtidy.a. Você deve, então, adicionar -ltidy numa chamada do gcc. Aqui, você adicona ''tidy'' ao seu target_link_libraries. Se possível, use variáveis pré-definidas ou macros como ${KDE4_KDEUI_LIBS}.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 202:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 202:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;$ cd src/mykooltool/&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;$ cd src/mykooltool/&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;$ am2cmake --kde4&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;$ am2cmake --kde4&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;/&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;code&lt;/del&gt;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;/&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;syntaxhighlight&lt;/ins&gt;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Não esqueça de pôr &amp;quot;--kde4&amp;quot;, senão ele não gerará arquivos adequados para software KDE 4. Os arquivos convertidos devem funcionar como estão, mas projetos complexos podem precisar de edição adicionar.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Não esqueça de pôr &amp;quot;--kde4&amp;quot;, senão ele não gerará arquivos adequados para software KDE 4. Os arquivos convertidos devem funcionar como estão, mas projetos complexos podem precisar de edição adicionar.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key wwwdeveloper:diff:version:1.11a:oldid:60186:newid:60502 --&gt;
&lt;/table&gt;</summary>
		<author><name>Neverendingo</name></author>	</entry>

	<entry>
		<id>http://techbase.kde.org/index.php?title=Development/Tutorials/CMake_(pt_BR)&amp;diff=60186&amp;oldid=prev</id>
		<title>Neverendingo: Text replace - &quot;&lt;code&gt;&quot; to &quot;&lt;syntaxhighlight lang=&quot;text&quot;&gt;&quot;</title>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/index.php?title=Development/Tutorials/CMake_(pt_BR)&amp;diff=60186&amp;oldid=prev"/>
				<updated>2011-06-29T20:44:16Z</updated>
		
		<summary type="html">&lt;p&gt;Text replace - &amp;quot;&amp;lt;code&amp;gt;&amp;quot; to &amp;quot;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&amp;quot;&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
			&lt;tr style='vertical-align: top;'&gt;
			&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;← Older revision&lt;/td&gt;
			&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 20:44, 29 June 2011&lt;/td&gt;
			&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 21:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 21:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Depois de baixar, descompacte e compile:&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Depois de baixar, descompacte e compile:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;code&lt;/del&gt;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;syntaxhighlight lang=&amp;quot;text&amp;quot;&lt;/ins&gt;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;$ mkdir cmake-build&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;$ mkdir cmake-build&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;$ cd cmake-build&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;$ cd cmake-build&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 48:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 48:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Supondo que você tenha o diretório kdelibs/ em ~/src/kdelibs/, faça o seguinte:&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Supondo que você tenha o diretório kdelibs/ em ~/src/kdelibs/, faça o seguinte:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;code&lt;/del&gt;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;syntaxhighlight lang=&amp;quot;text&amp;quot;&lt;/ins&gt;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;$ ls&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;$ ls&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;kdelibs/&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;kdelibs/&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 61:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 61:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Supondo que você tenha o diretório kdelibs\ em c:\daten\kde4, faça o seguinte:&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Supondo que você tenha o diretório kdelibs\ em c:\daten\kde4, faça o seguinte:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;code&lt;/del&gt;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;syntaxhighlight lang=&amp;quot;text&amp;quot;&lt;/ins&gt;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;c:\daten\kde4&amp;gt; cd kdelibs\win&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;c:\daten\kde4&amp;gt; cd kdelibs\win&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;c:\daten\kde4&amp;gt; cmake&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;c:\daten\kde4&amp;gt; cmake&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 76:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 76:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;==== Arquivos de projeto do KDevelop 3 ====&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;==== Arquivos de projeto do KDevelop 3 ====&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Se você prefere arquivos de projeto para o KDevelop 3 (que serão basicamente Makefiles acompanhados de alguns arquivos extra para o KDevelop), rode-o desta forma:&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Se você prefere arquivos de projeto para o KDevelop 3 (que serão basicamente Makefiles acompanhados de alguns arquivos extra para o KDevelop), rode-o desta forma:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;code&lt;/del&gt;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;syntaxhighlight lang=&amp;quot;text&amp;quot;&lt;/ins&gt;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;$ cmake ../kdelibs -GKDevelop3&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;$ cmake ../kdelibs -GKDevelop3&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;/code&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;/code&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 123:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 123:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Se houve uma falha que diz algo como:&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Se houve uma falha que diz algo como:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;code&lt;/del&gt;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;syntaxhighlight lang=&amp;quot;text&amp;quot;&lt;/ins&gt;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;CMake Error: This project requires some variables to be set,&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;CMake Error: This project requires some variables to be set,&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;and cmake can not find them.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;and cmake can not find them.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 130:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 130:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;/code&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;/code&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;então está faltando uma biblioteca (ou outra dependência). Para descobrir qual biblioteca é, procure no diretório pela variável que o CMake não pôde encontrar no diretório cmake/modules. No exemplo acima, ela é&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;então está faltando uma biblioteca (ou outra dependência). Para descobrir qual biblioteca é, procure no diretório pela variável que o CMake não pôde encontrar no diretório cmake/modules. No exemplo acima, ela é&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;code&lt;/del&gt;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;syntaxhighlight lang=&amp;quot;text&amp;quot;&lt;/ins&gt;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;find_library(X11_XTest_LIB Xtst ${X11_LIB_SEARCH_PATH})&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;find_library(X11_XTest_LIB Xtst ${X11_LIB_SEARCH_PATH})&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;/code&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;/code&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 138:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 138:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Aqui está o CMakeLists.txt mais simples possível:&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Aqui está o CMakeLists.txt mais simples possível:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;code&lt;/del&gt;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;syntaxhighlight lang=&amp;quot;text&amp;quot;&lt;/ins&gt;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;add_executable(hello main.cpp)&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;add_executable(hello main.cpp)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;/code&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;/code&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Isso criará um executável chamado &amp;quot;hello&amp;quot; (ou &amp;quot;hello.exe&amp;quot; no Windows) do arquivo de código fonte main.cpp. Você pode misturar arquivos C e C++ se você quiser. Você pode ter múltiplos executáveis e bibliotecas num CMakeLists.txt.&amp;#160; O mesmo arquivo de código fonte pode ser usado em vários alvos: ele será compilado para cada um, independentemente dos outros. Provavelmente, a parte mais importante da linguagem CMake são as variáveis:&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Isso criará um executável chamado &amp;quot;hello&amp;quot; (ou &amp;quot;hello.exe&amp;quot; no Windows) do arquivo de código fonte main.cpp. Você pode misturar arquivos C e C++ se você quiser. Você pode ter múltiplos executáveis e bibliotecas num CMakeLists.txt.&amp;#160; O mesmo arquivo de código fonte pode ser usado em vários alvos: ele será compilado para cada um, independentemente dos outros. Provavelmente, a parte mais importante da linguagem CMake são as variáveis:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;code&lt;/del&gt;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;syntaxhighlight lang=&amp;quot;text&amp;quot;&lt;/ins&gt;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;set( MY_SOURCES main.cpp widget.cpp)&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;set( MY_SOURCES main.cpp widget.cpp)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;message(STATUS &amp;quot;my sources: ${MY_SOURCES}&amp;quot;)&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;message(STATUS &amp;quot;my sources: ${MY_SOURCES}&amp;quot;)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 148:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 148:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Então, use o comando SET() para definir o valor de uma variável. Se você listar mais de uma string, a variável será uma lista. Uma lista é uma lista de strings separada por pontos-e-vírgulas. Se você definí-la para apenas um item, ela terá apenas um valor. Para pegar o valor da variável, use ${VAR}.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Então, use o comando SET() para definir o valor de uma variável. Se você listar mais de uma string, a variável será uma lista. Uma lista é uma lista de strings separada por pontos-e-vírgulas. Se você definí-la para apenas um item, ela terá apenas um valor. Para pegar o valor da variável, use ${VAR}.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Você pode realizar iterações na lista usando FOREACH():&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Você pode realizar iterações na lista usando FOREACH():&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;code&lt;/del&gt;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;syntaxhighlight lang=&amp;quot;text&amp;quot;&lt;/ins&gt;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;foreach(next_ITEM ${MY_SOURCES})&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;foreach(next_ITEM ${MY_SOURCES})&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160;  message(STATUS &amp;quot;next item: ${next_ITEM}&amp;quot;)&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160;  message(STATUS &amp;quot;next item: ${next_ITEM}&amp;quot;)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 156:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 156:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Você também pode testar várias coisas:&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Você também pode testar várias coisas:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;code&lt;/del&gt;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;syntaxhighlight lang=&amp;quot;text&amp;quot;&lt;/ins&gt;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;if (UNIX)&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;if (UNIX)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160;  message(STATUS &amp;quot;Isto é UNIX (incluindo OS X e CygWin)&amp;quot;)&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160;  message(STATUS &amp;quot;Isto é UNIX (incluindo OS X e CygWin)&amp;quot;)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 172:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 172:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;A seguir, uma CMakeList básica que compila um projeto KDE 4 pequeno:&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;A seguir, uma CMakeList básica que compila um projeto KDE 4 pequeno:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;code&lt;/del&gt;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;syntaxhighlight lang=&amp;quot;text&amp;quot;&lt;/ins&gt;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;project( kde4project )&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;project( kde4project )&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;find_package( KDE4 REQUIRED )&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;find_package( KDE4 REQUIRED )&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 199:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 199:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;== Convertendo software do KDE baseado em autotools em CMake ==&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;== Convertendo software do KDE baseado em autotools em CMake ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Em kdesdk/cmake/ você pode encontrar um script chamado am2cmake. É um script em ruby, logo, você precisa do ruby instalado. Rode am2cmake no diretório de maior nível dos seus fontes:&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Em kdesdk/cmake/ você pode encontrar um script chamado am2cmake. É um script em ruby, logo, você precisa do ruby instalado. Rode am2cmake no diretório de maior nível dos seus fontes:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;code&lt;/del&gt;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;syntaxhighlight lang=&amp;quot;text&amp;quot;&lt;/ins&gt;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;$ cd src/mykooltool/&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;$ cd src/mykooltool/&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;$ am2cmake --kde4&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;$ am2cmake --kde4&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Neverendingo</name></author>	</entry>

	<entry>
		<id>http://techbase.kde.org/index.php?title=Development/Tutorials/CMake_(pt_BR)&amp;diff=39059&amp;oldid=prev</id>
		<title>R Rios at 07:20, 27 February 2009</title>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/index.php?title=Development/Tutorials/CMake_(pt_BR)&amp;diff=39059&amp;oldid=prev"/>
				<updated>2009-02-27T07:20:11Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
			&lt;tr style='vertical-align: top;'&gt;
			&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;← Older revision&lt;/td&gt;
			&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 07:20, 27 February 2009&lt;/td&gt;
			&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 194:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 194:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;== Estendendo o CMake ==&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;== Estendendo o CMake ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;O CMake pode ser estendido usando scripts cmake. O CMake vem com uma certa quantidade de scripts; no UNIX, eles são instalados por padrão em /usr/local/share/CMake/Modules/. As bibliotecas do KDE também instalam um conjunto de módulos cmake em share/apps/cmake/modules/. Os arquivos que estão ali serão preferidos em vez dos que estão no path global do sistema de módulos cmake. &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;O CMake pode ser estendido usando scripts cmake. O CMake vem com uma certa quantidade de scripts; no UNIX, eles são instalados por padrão em /usr/local/share/CMake/Modules/. As bibliotecas do KDE também instalam um conjunto de módulos cmake em share/apps/cmake/modules/. Os arquivos que estão ali serão preferidos em vez dos que estão no path global do sistema de módulos cmake. &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;For detecting &lt;/del&gt;software &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;packages there are &lt;/del&gt;FindFOO.cmake &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;files&lt;/del&gt;, &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;see &lt;/del&gt;[http://www.cmake.org/Wiki/CMake_HowToFindInstalledSoftware &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;here&lt;/del&gt;] &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;for more information&lt;/del&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Para detectar pacotes de &lt;/ins&gt;software &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;que são arquivos &lt;/ins&gt;FindFOO.cmake, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;veja &lt;/ins&gt;[http://www.cmake.org/Wiki/CMake_HowToFindInstalledSoftware &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;aqui&lt;/ins&gt;] &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;para mais informações&lt;/ins&gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;You can also write &lt;/del&gt;macros &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;in &lt;/del&gt;CMake. &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;They are powerful enough to do most things you will need to build &lt;/del&gt;software, &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;but they are not intended to be used as &lt;/del&gt;a &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;general purpose programming language&lt;/del&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Você também pode escrever &lt;/ins&gt;macros &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;em &lt;/ins&gt;CMake. &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Elas são poderosas o suficiente para fazer a maior parte das coisas que você precisará para compilar &lt;/ins&gt;software, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;mas elas não são destinadas &lt;/ins&gt;a &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;serem usadas como uma linguagem de programação de propósito geral&lt;/ins&gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;== &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Converting autotools-based KDE &lt;/del&gt;software &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;to &lt;/del&gt;CMake ==&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;== &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Convertendo &lt;/ins&gt;software &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;do KDE baseado em autotools em &lt;/ins&gt;CMake ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;In &lt;/del&gt;kdesdk/cmake/ &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;you can find a &lt;/del&gt;script am2cmake . &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;This is a ruby &lt;/del&gt;script, &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;so you need to have &lt;/del&gt;ruby &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;installed&lt;/del&gt;. &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Run &lt;/del&gt;am2cmake &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;in the toplevel directory of your sources&lt;/del&gt;:&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Em &lt;/ins&gt;kdesdk/cmake/ &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;você pode encontrar um &lt;/ins&gt;script &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;chamado &lt;/ins&gt;am2cmake. &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;É um &lt;/ins&gt;script &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;em ruby, logo&lt;/ins&gt;, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;você precisa do &lt;/ins&gt;ruby &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;instalado&lt;/ins&gt;. &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Rode &lt;/ins&gt;am2cmake &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;no diretório de maior nível dos seus fontes&lt;/ins&gt;:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;code&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;code&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;$ cd src/mykooltool/&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;$ cd src/mykooltool/&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;$ am2cmake --kde4&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;$ am2cmake --kde4&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;/code&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;/code&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Don't forget the switch &lt;/del&gt;&amp;quot;--kde4&amp;quot;, &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;otherwise it won't generate files suitable for &lt;/del&gt;KDE 4 &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;software&lt;/del&gt;. &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;The converted files 'may' work as they are&lt;/del&gt;, &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;but complicated projects will require some additional editing&lt;/del&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Não esqueça de pôr &lt;/ins&gt;&amp;quot;--kde4&amp;quot;, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;senão ele não gerará arquivos adequados para software &lt;/ins&gt;KDE 4. &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Os arquivos convertidos devem funcionar como estão&lt;/ins&gt;, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;mas projetos complexos podem precisar de edição adicionar&lt;/ins&gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;You may have to&lt;/del&gt;:&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Você pode precisar&lt;/ins&gt;:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;* &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;add more include direcories&lt;/del&gt;, &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;using &lt;/del&gt;INCLUDE_DIRECTORIES()&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;* &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;adicionar mais diretórios de includes&lt;/ins&gt;, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;usando &lt;/ins&gt;INCLUDE_DIRECTORIES()&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;* &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;add more link libraries&lt;/del&gt;, &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;using &lt;/del&gt;TARGET_LINK_LIBRARIES()&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;* &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;adicionar mais bibliotecas que serão ligadas&lt;/ins&gt;, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;usando &lt;/ins&gt;TARGET_LINK_LIBRARIES()&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;* &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;add some compile switches&lt;/del&gt;, &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;using &lt;/del&gt;ADD_DEFINITIONS()&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;* &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;adicionar algumas definições de compilação&lt;/ins&gt;, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;usando &lt;/ins&gt;ADD_DEFINITIONS()&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;* &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;add some &amp;quot;configure&amp;quot; checks, see &lt;/del&gt;[http://www.cmake.org/Wiki/CMake_HowToDoPlatformChecks &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;How To Do Platform Checks&lt;/del&gt;] &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;and &lt;/del&gt;[http://www.cmake.org/Wiki/CMake_HowToFindInstalledSoftware &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;How To Find Installed Software&lt;/del&gt;]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;* &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;adicionar algumas checagens de configuração (veja &lt;/ins&gt;[http://www.cmake.org/Wiki/CMake_HowToDoPlatformChecks &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;como fazer checagens de plataforma&lt;/ins&gt;] &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;e &lt;/ins&gt;[http://www.cmake.org/Wiki/CMake_HowToFindInstalledSoftware &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;como encontrar software instalado&lt;/ins&gt;]&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;)&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;* &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;take special care of former &lt;/del&gt;libtool &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;convenience libraries&lt;/del&gt;. &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;They are not supported by cmake&lt;/del&gt;, &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;instead there will be a file &lt;/del&gt;ConvenienceLibs.cmake &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;created&lt;/del&gt;. &lt;del class=&quot;diffchange diffchange-inline&quot;&gt; In this file you will find for every convenience lib a variable&lt;/del&gt;, &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;which contains all source files of this convenience lib&lt;/del&gt;. &lt;del class=&quot;diffchange diffchange-inline&quot;&gt; For the targets which linked to this convenience lib&lt;/del&gt;, &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;just add the variable to the sources&lt;/del&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;* &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;tomar cuidados especiais bibliotecas de conveniência antigas do &lt;/ins&gt;libtool. &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Elas não são suportadas pelo CMake. Em vez delas&lt;/ins&gt;, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;haverá um arquivo &lt;/ins&gt;ConvenienceLibs.cmake &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;criado&lt;/ins&gt;. &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Nesse arquivo você encontrará uma variável para cada biblioteca de conveniência&lt;/ins&gt;, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;que contém todos os fontes dessa biblioteca de conveniência&lt;/ins&gt;. &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Para os alvos que estão ligados a esta biblioteca de conveniência&lt;/ins&gt;, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;simplesmente adicione a variável aos fontes&lt;/ins&gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;* &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;a file &lt;/del&gt;AdditionalInfo.txt &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;will be created&lt;/del&gt;. &lt;del class=&quot;diffchange diffchange-inline&quot;&gt; There you will see all &lt;/del&gt;*.in &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;and &lt;/del&gt;*.in.in &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;files of your project&lt;/del&gt;. &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;The stuff done in these files will have to be converted manually to cmake&lt;/del&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;* &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Um arquivo &lt;/ins&gt;AdditionalInfo.txt &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;será criado&lt;/ins&gt;. &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Lá você verá todos os arquivos &lt;/ins&gt;*.in &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;e &lt;/ins&gt;*.in.in &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;do seu projeto&lt;/ins&gt;. &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;As coisas feitas nesses arquivos terão de ser manualmente convertidas para CMake&lt;/ins&gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>R Rios</name></author>	</entry>

	<entry>
		<id>http://techbase.kde.org/index.php?title=Development/Tutorials/CMake_(pt_BR)&amp;diff=39057&amp;oldid=prev</id>
		<title>R Rios at 06:43, 27 February 2009</title>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/index.php?title=Development/Tutorials/CMake_(pt_BR)&amp;diff=39057&amp;oldid=prev"/>
				<updated>2009-02-27T06:43:26Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
			&lt;tr style='vertical-align: top;'&gt;
			&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;← Older revision&lt;/td&gt;
			&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 06:43, 27 February 2009&lt;/td&gt;
			&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 143:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 143:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Isso criará um executável chamado &amp;quot;hello&amp;quot; (ou &amp;quot;hello.exe&amp;quot; no Windows) do arquivo de código fonte main.cpp. Você pode misturar arquivos C e C++ se você quiser. Você pode ter múltiplos executáveis e bibliotecas num CMakeLists.txt.&amp;#160; O mesmo arquivo de código fonte pode ser usado em vários alvos: ele será compilado para cada um, independentemente dos outros. Provavelmente, a parte mais importante da linguagem CMake são as variáveis:&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Isso criará um executável chamado &amp;quot;hello&amp;quot; (ou &amp;quot;hello.exe&amp;quot; no Windows) do arquivo de código fonte main.cpp. Você pode misturar arquivos C e C++ se você quiser. Você pode ter múltiplos executáveis e bibliotecas num CMakeLists.txt.&amp;#160; O mesmo arquivo de código fonte pode ser usado em vários alvos: ele será compilado para cada um, independentemente dos outros. Provavelmente, a parte mais importante da linguagem CMake são as variáveis:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;code&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;code&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;set( &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;MEUS_FONTES &lt;/del&gt;main.cpp widget.cpp)&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;set( &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;MY_SOURCES &lt;/ins&gt;main.cpp widget.cpp)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;message(STATUS &amp;quot;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;meus fontes&lt;/del&gt;: ${&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;MEUS_FONTES&lt;/del&gt;}&amp;quot;)&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;message(STATUS &amp;quot;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;my sources&lt;/ins&gt;: ${&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;MY_SOURCES&lt;/ins&gt;}&amp;quot;)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;/code&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;/code&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Então, use o comando SET() para definir o valor de uma variável. Se você listar mais de uma string, a variável será uma lista. &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;A list is a list of &lt;/del&gt;strings &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;separated by semicolons&lt;/del&gt;. &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;If you set it to only one &lt;/del&gt;item, &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;it will have just that value&lt;/del&gt;. &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;To get the value of a variable&lt;/del&gt;, use ${VAR}.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Então, use o comando SET() para definir o valor de uma variável. Se você listar mais de uma string, a variável será uma lista. &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Uma lista é uma lista de &lt;/ins&gt;strings &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;separada por pontos-e-vírgulas&lt;/ins&gt;. &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Se você definí-la para apenas um &lt;/ins&gt;item, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;ela terá apenas um valor&lt;/ins&gt;. &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Para pegar o valor da variável&lt;/ins&gt;, use ${VAR}.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;You can iterate over a list using &lt;/del&gt;FOREACH():&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Você pode realizar iterações na lista usando &lt;/ins&gt;FOREACH():&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;code&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;code&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;foreach(next_ITEM ${MY_SOURCES})&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;foreach(next_ITEM ${MY_SOURCES})&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 153:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 153:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;endforeach(next_ITEM ${MY_SOURCES})&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;endforeach(next_ITEM ${MY_SOURCES})&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;/code&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;/code&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;The commands in &lt;/del&gt;CMake &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;are case-insensitive.&amp;#160; Names of variables and names of parameter are case-sensitive&lt;/del&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Os comandos do &lt;/ins&gt;CMake &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;são sensíveis à caixa, assim como nomes de variáveis de de parâmetros&lt;/ins&gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;You can also test for various things&lt;/del&gt;:&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Você também pode testar várias coisas&lt;/ins&gt;:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;code&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;code&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;if (UNIX)&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;if (UNIX)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160;  message(STATUS &amp;quot;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;This is &lt;/del&gt;UNIX (&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;including &lt;/del&gt;OS X &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;and &lt;/del&gt;CygWin)&amp;quot;)&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160;  message(STATUS &amp;quot;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Isto é &lt;/ins&gt;UNIX (&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;incluindo &lt;/ins&gt;OS X &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;e &lt;/ins&gt;CygWin)&amp;quot;)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;endif (UNIX)&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;endif (UNIX)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 165:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 165:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;endif (MSVC)&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;endif (MSVC)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;/code&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;/code&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;In this second example&amp;#160; you can see also how to append items to &lt;/del&gt;a &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;list&lt;/del&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Neste segundo exemplo você pode ver também como anexar ítens &lt;/ins&gt;a &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;uma lista&lt;/ins&gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;In the cmake &lt;/del&gt;Wiki &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;there is also a &lt;/del&gt;[http://www.cmake.org/Wiki/HowToBuildKDE4Software&amp;#160; tutorial] &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;on using cmake to build &lt;/del&gt;KDE 4 &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;software&lt;/del&gt;. &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;It is recommended reading&lt;/del&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Na &lt;/ins&gt;Wiki &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;do CMake também há um &lt;/ins&gt;[http://www.cmake.org/Wiki/HowToBuildKDE4Software&amp;#160; tutorial] &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;(em inglês) sobre como usar o CMake para compilar software para o &lt;/ins&gt;KDE 4. &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;É uma leitura recomendada&lt;/ins&gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;== &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Using &lt;/del&gt;CMake &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;for a &lt;/del&gt;KDE &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Project &lt;/del&gt;==&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;== &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Usando o &lt;/ins&gt;CMake &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;para um projeto &lt;/ins&gt;KDE ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Here's a basic &lt;/del&gt;CMakeList &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;file that builds a small &lt;/del&gt;KDE 4 &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;project&lt;/del&gt;:&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;A seguir, uma &lt;/ins&gt;CMakeList &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;básica que compila um projeto &lt;/ins&gt;KDE 4 &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;pequeno&lt;/ins&gt;:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;code&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;code&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;project( kde4project )&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;project( kde4project )&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 186:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 186:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;/code&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;/code&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;''target_link_libraries'' &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;contains the development libraries that are linked to your program&lt;/del&gt;. &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;E.g. if you want to link to &lt;/del&gt;libtidy-devel, &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;your library file name may be called &lt;/del&gt;/usr/local/lib/libtidy.a. &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;You would then add &lt;/del&gt;-ltidy &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;to a &lt;/del&gt;gcc &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;call&lt;/del&gt;. &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Here&lt;/del&gt;, &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;you add &lt;/del&gt;''tidy'' &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;to your &lt;/del&gt;target_link_libraries. &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;If possible&lt;/del&gt;, use &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;pre&lt;/del&gt;-&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;defined variables or &lt;/del&gt;macros &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;like &lt;/del&gt;${KDE4_KDEUI_LIBS}.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;''target_link_libraries'' &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;contém as bibliotecas de desenvolvimento que estão ligadas ao seu programa&lt;/ins&gt;. &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Por exemplo, se você quiser ligar a &lt;/ins&gt;libtidy-devel, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;o nome do arquivo da sua biblioteca deve ser &lt;/ins&gt;/usr/local/lib/libtidy.a. &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Você deve, então, adicionar &lt;/ins&gt;-ltidy &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;numa chamada do &lt;/ins&gt;gcc. &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Aqui&lt;/ins&gt;, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;você adicona &lt;/ins&gt;''tidy'' &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;ao seu &lt;/ins&gt;target_link_libraries. &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Se possível&lt;/ins&gt;, use &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;variáveis pré&lt;/ins&gt;-&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;definidas ou &lt;/ins&gt;macros &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;como &lt;/ins&gt;${KDE4_KDEUI_LIBS}.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;''install (TARGETS'' &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;is where the target will finally be installed&lt;/del&gt;. &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;If you do not have this line&lt;/del&gt;, make install &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;will not be available&lt;/del&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;''install (TARGETS'' &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;é onde o alvo será instalado&lt;/ins&gt;. &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Se você não tiver essa linha&lt;/ins&gt;, make install &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;não funcionará&lt;/ins&gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Variables&lt;/del&gt;, macros &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;and other useful information specific to &lt;/del&gt;KDE &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;can be found at the &lt;/del&gt;[[Development/CMake/Addons for KDE|CMake &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;addons for &lt;/del&gt;KDE]] &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;page&lt;/del&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Variáveis&lt;/ins&gt;, macros &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;e outras informações úteis específicas do &lt;/ins&gt;KDE &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;podem ser encontradas na página &lt;/ins&gt;[[Development/CMake/Addons for KDE|&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;addons do &lt;/ins&gt;CMake &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;para o &lt;/ins&gt;KDE]].&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;== &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Extending &lt;/del&gt;CMake ==&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;== &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Estendendo o &lt;/ins&gt;CMake ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;CMake &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;can be extended using cmake &lt;/del&gt;scripts. CMake &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;comes with a number of &lt;/del&gt;scripts; &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;under &lt;/del&gt;UNIX &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;they are by default installed to &lt;/del&gt;/usr/local/share/CMake/Modules/. &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;The &lt;/del&gt;KDE &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;libraries install also a set of &lt;/del&gt;cmake &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;modules into &lt;/del&gt;share/apps/cmake/modules/. &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;The files located there will be preferred over the ones in the system &lt;/del&gt;global cmake &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;module path&lt;/del&gt;. &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;O &lt;/ins&gt;CMake &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;pode ser estendido usando &lt;/ins&gt;scripts &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;cmake&lt;/ins&gt;. &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;O &lt;/ins&gt;CMake &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;vem com uma certa quantidade de &lt;/ins&gt;scripts; &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;no &lt;/ins&gt;UNIX&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;, eles são instalados por padrão em &lt;/ins&gt;/usr/local/share/CMake/Modules/. &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;As bibliotecas do &lt;/ins&gt;KDE &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;também instalam um conjunto de módulos &lt;/ins&gt;cmake &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;em &lt;/ins&gt;share/apps/cmake/modules/. &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Os arquivos que estão ali serão preferidos em vez dos que estão no path &lt;/ins&gt;global &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;do sistema de módulos &lt;/ins&gt;cmake. &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;For detecting software packages there are FindFOO.cmake files, see [http://www.cmake.org/Wiki/CMake_HowToFindInstalledSoftware here] for more information.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;For detecting software packages there are FindFOO.cmake files, see [http://www.cmake.org/Wiki/CMake_HowToFindInstalledSoftware here] for more information.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;You can also write macros in CMake. They are powerful enough to do most things you will need to build software, but they are not intended to be used as a general purpose programming language.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;You can also write macros in CMake. They are powerful enough to do most things you will need to build software, but they are not intended to be used as a general purpose programming language.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>R Rios</name></author>	</entry>

	<entry>
		<id>http://techbase.kde.org/index.php?title=Development/Tutorials/CMake_(pt_BR)&amp;diff=39054&amp;oldid=prev</id>
		<title>R Rios: New page: {{Template:I18n/Language Navigation Bar|Development/Tutorials/CMake}}  == Introdução == O [http://www.cmake.org CMake] lê arquivos de script e produz arquivos de entrada para o sistema ...</title>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/index.php?title=Development/Tutorials/CMake_(pt_BR)&amp;diff=39054&amp;oldid=prev"/>
				<updated>2009-02-27T06:22:07Z</updated>
		
		<summary type="html">&lt;p&gt;New page: {{Template:I18n/Language Navigation Bar|Development/Tutorials/CMake}}  == Introdução == O [http://www.cmake.org CMake] lê arquivos de script e produz arquivos de entrada para o sistema ...&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{Template:I18n/Language Navigation Bar|Development/Tutorials/CMake}}&lt;br /&gt;
&lt;br /&gt;
== Introdução ==&lt;br /&gt;
O [http://www.cmake.org CMake] lê arquivos de script e produz arquivos de entrada para o sistema de compilação nativo da plataforma que ele roda. Ele pode criar GNU Makefiles, arquivos de projeto do KDevelop, arquivos de projeto do XCode e arquivos de projeto do Visual Studio.&lt;br /&gt;
&lt;br /&gt;
O [http://www.cmake.org CMake] é software livre e liberado sob a licença BSD.  É desenvolvido pela [http://www.kitware.com Kitware Inc.]&lt;br /&gt;
&lt;br /&gt;
Você pode encontrar mais informação relacionada ao CMake na [[Development/CMake | página principal do CMake]] aqui no TechBase.&lt;br /&gt;
&lt;br /&gt;
== Por que usar CMake? ==&lt;br /&gt;
CMake é a ferramenta oficial do KDE 4, decidida em Março de 2006, primeiramente graças aos seus méritos técnicos quando comparada com automake e unsermake, as antigas ferramentas do KDE:&lt;br /&gt;
* CMake é desenvolvido independentemente do KDE, e pode ser usado por outros projetos, portanto.&lt;br /&gt;
* O tempo de compilação é muito menor, principalmente por não usar mais o libtool&lt;br /&gt;
* É mais fácil escrever arquivos de compilação&lt;br /&gt;
&lt;br /&gt;
== Como compilar o KDE usando CMake==&lt;br /&gt;
&lt;br /&gt;
=== Baixe e instale o CMake ===&lt;br /&gt;
==== Linux, BSD e outros sistemas Unix-like ====&lt;br /&gt;
Baixe a última versão estável do CMake em [http://www.cmake.org/HTML/Download.html].&lt;br /&gt;
&lt;br /&gt;
Depois de baixar, descompacte e compile:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
$ mkdir cmake-build&lt;br /&gt;
$ cd cmake-build&lt;br /&gt;
$ ../bootstrap&lt;br /&gt;
$ make&lt;br /&gt;
$ make install&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Por padrão, isso instalará o CMake em /usr/local, então tenha certeza de pôr /usr/local/bin no seu path de execução. Para mudar o prefixo de instalação (para /usr no Debian, por exemplo), adicione a opção '--prefix=PATH' à linha de comando.&lt;br /&gt;
&lt;br /&gt;
Siga as instruções que se encontram [http://cmake.org/HTML/Download.html#cvs aqui] se quiser usar a versão de desenvolvimento.&lt;br /&gt;
&lt;br /&gt;
==== Windows ====&lt;br /&gt;
Baixe a última versão estável do CMake em [http://www.cmake.org/HTML/Download.html].&lt;br /&gt;
&lt;br /&gt;
Depois de baixar, execute o instalador do CMake.&lt;br /&gt;
&lt;br /&gt;
Por padrão, ele instalará o CMake em C:\Program Files\CMake 2.4, então tenha  certeza de ter &amp;lt;installpath&amp;gt;\bin no seu path de execução.   &lt;br /&gt;
&lt;br /&gt;
Siga as instruções que se encontram [http://cmake.org/HTML/Download.html#cvs aqui] se quiser usar a versão de desenvolvimento.&lt;br /&gt;
&lt;br /&gt;
=== Executar o CMake ===&lt;br /&gt;
&lt;br /&gt;
==== Linux, BSD e outros sistemas Unix-like ====&lt;br /&gt;
Você tem que rodar o CMake para que ele gere os arquivos para seu sistema. Tanto compilações dentro dos códigos fontes (in-source builds) quando fora deles (out-of-source builds) são suportadas pelo CMake, mas in-source builds são prevenidos pela implementação atual do KDE.&lt;br /&gt;
&lt;br /&gt;
Supondo que você tenha o diretório kdelibs/ em ~/src/kdelibs/, faça o seguinte:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
$ ls&lt;br /&gt;
kdelibs/&lt;br /&gt;
$ mkdir kdelibs-build&lt;br /&gt;
$ cd kdelibs-build&lt;br /&gt;
$ cmake ../kdelibs&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
Isso gerará os Makefiles para compilar kdelibs/ em kdelibs-build/.&lt;br /&gt;
&lt;br /&gt;
==== Windows ====&lt;br /&gt;
Você tem que rodar o CMake para que ele gere os arquivos para seu sistema. Tanto compilações dentro dos códigos fontes (in-source builds) quando fora deles (out-of-source builds) são suportadas pelo CMake, mas in-source builds são prevenidos pela implementação atual do KDE.&lt;br /&gt;
&lt;br /&gt;
Supondo que você tenha o diretório kdelibs\ em c:\daten\kde4, faça o seguinte:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
c:\daten\kde4&amp;gt; cd kdelibs\win&lt;br /&gt;
c:\daten\kde4&amp;gt; cmake&lt;br /&gt;
c:\daten\kde4&amp;gt; make &lt;br /&gt;
c:\daten\kde4&amp;gt; make install&lt;br /&gt;
c:\daten\kde4&amp;gt; cd ..&lt;br /&gt;
c:\daten\kde4&amp;gt; mkdir kdelibs-build&lt;br /&gt;
c:\daten\kde4&amp;gt; cd kdelibs-build&lt;br /&gt;
c:\daten\kde4\kdelibs-build&amp;gt; cmake ..\kdelibs&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Isso gerará os Makefiles para compilar kdelibs\ em kdelibs-build\. Veja [[Projects/KDE_on_Windows|KDE no Windows]] para mais informações sobre como compilar o KDE no Windows.&lt;br /&gt;
&lt;br /&gt;
==== Arquivos de projeto do KDevelop 3 ====&lt;br /&gt;
Se você prefere arquivos de projeto para o KDevelop 3 (que serão basicamente Makefiles acompanhados de alguns arquivos extra para o KDevelop), rode-o desta forma:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
$ cmake ../kdelibs -GKDevelop3&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
Use 'cmake -h' para descobrir que geradores o CMake suporta e outras opções.&lt;br /&gt;
&lt;br /&gt;
==== CMake e Qt4 ====&lt;br /&gt;
Para localizar o Qt 4, o CMake procura por qmake no seu path de execução. CMake ''não'' usa a variável de ambiente QTDIR. Então esteja certo que o primeiro qmake encontrado no path de execução é o que você deve usar.&lt;br /&gt;
&lt;br /&gt;
==== Mais detalhes ====&lt;br /&gt;
Quando CMake finalizar, ele terá criado um arquivo chamado &amp;quot;CMakeCache.txt&amp;quot;.  Esse arquivo contem todas as configurações que o CMake detectou em seu sistema. Se você quiser executar o CMake com outro gerador ou se você quer que o CMake detecte tudo novamente, exclua esse arquivo.&lt;br /&gt;
&lt;br /&gt;
Se o CMake não encontrar alguma coisa, mas você sabe que está em algum lugar, você pode dizer manualmente ao CMake onde encontrá-la. O CMake usa variáveis para guardar essas informações. Essas variáveis são armazenadas no já mencionado arquivo CMakeCache.txt. Você tem três opções para ajustá-las manualmente:&lt;br /&gt;
* informe ao CMake o valor correto pela linha de comando: cmake ../kdelibs -DNOME_DA_VARIAVEL=valor&lt;br /&gt;
* use ccmake, que provê uma GUI baseada em curses para ajustar as variáveis do CMake (rode: ccmake ../kdelibs)&lt;br /&gt;
* modifique CMakeCache.txt diretamente (não recomendado)&lt;br /&gt;
&lt;br /&gt;
Você deve rodar &amp;quot;ccmake ../kdelibs&amp;quot; ao menos uma vez para que você tenha uma ideia de que variáveis o CMake usa. Pressione &amp;quot;T&amp;quot; para ver também as variáveis &amp;quot;avançadas&amp;quot;. Então, se o CMake não encontrar alguma coisa, inicie ccmake e ajuste-o manualmente.&lt;br /&gt;
&lt;br /&gt;
==== Variáveis de linha de comando ====&lt;br /&gt;
&lt;br /&gt;
Algumas variáveis de linha de comando do CMake que você deve querer configurar:&lt;br /&gt;
* '''CMAKE_INSTALL_PREFIX''': cmake ../kdelibs -DCMAKE_INSTALL_PREFIX=/opt/kde4 é equivalente a ./configure --prefix=/opt/kde4&lt;br /&gt;
* '''[[Development/CMake/Build_Types|CMAKE_BUILD_TYPE]]''': decide que tipo de compilação você quer. Você pode escolher entre &amp;quot;debugfull&amp;quot;, &amp;quot;debug&amp;quot;, &amp;quot;profile&amp;quot;, &amp;quot;relwithdebinfo&amp;quot; e &amp;quot;release&amp;quot;. O padrão é &amp;quot;relwithdebinfo&amp;quot;. Vá à página [[Development/CMake/Build_Types|Tipos de compilação do CMake]] para uma explicação mais detalhada.&lt;br /&gt;
* '''KDE4_BUILD_TESTS=ON''': cria Makefiles com programas de teste de compilação e provê alvos 'test'.&lt;br /&gt;
* '''KDE4_TEST_OUTPUT=xml''': Testes unitários usando o framework QTestLib criará arquivos de log formatados em xml.&lt;br /&gt;
* '''KDE4_DISABLE_MULTIMEDIA=ON''': Compila o KDE sem nenhum suporte a multimídia (áudio e vídeo).&lt;br /&gt;
* '''BUILD_foo=OFF''': desativa a compilação para o prjeto no subdiretório 'foo'.&lt;br /&gt;
* '''WITH_foo''': há várias opções - por exemplo, WITH_CUPS ou WITH_Jasper. Se você desativá-las, o CMake não irá nem mesmo tentar procurar por esse pacote. Se estiver ativado, o CMake tentará encontrá-lo. Se falhar com isso, você pode ajustar manualmente, como descrito acima.&lt;br /&gt;
&lt;br /&gt;
=== Variáveis de ambiente ===&lt;br /&gt;
Se você tem cabeçalhos e bibliotecas instalados em localizações fora do padrão que o CMake não pode encontrar, então configure as seguintes variáveis de ambiente. Isso pode ser bastante útil se, por exemplo você instalar kdesupport em ~/install/kdesupport .&lt;br /&gt;
Apesar da nomeação similar, essas variáveis não funcionam se passadas por linha de comando:&lt;br /&gt;
* '''CMAKE_INCLUDE_PATH''', por exemplo, export CMAKE_INCLUDE_PATH=/sw/include&lt;br /&gt;
* '''CMAKE_LIBRARY_PATH''', por exemplo, export CMAKE_LIBRARY_PATH=/sw/lib&lt;br /&gt;
* '''CMAKE_PROGRAM_PATH''', por exemplo, export CMAKE_PROGRAM_PATH=/sw/bin&lt;br /&gt;
&lt;br /&gt;
A partir do CMake 2.6.0, o mesmo efeito das variáveis acima pode ser atingido com apenas um comando:&lt;br /&gt;
* '''CMAKE_PREFIX_PATH''', por exemplo, export CMAKE_PREFIX_PATH=/sw&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Para mais informações sobre variáveis, veja [http://www.cmake.org/Wiki/CMake_Useful_Variables esta página do wiki cmake.org]&lt;br /&gt;
&lt;br /&gt;
=== Indo além ===&lt;br /&gt;
Se o CMake finalizar com &amp;quot;Generating done&amp;quot;, não houve erros. Mas, se finalizar com &amp;quot;Configuring done&amp;quot;, então há erros para você consertar.  Se o CMake finalizar com sucesso, rode sua ferramenta de compilação (por exemplo: make, KDevelop, XCode ou MSVC), compile e espere que a compilação termine. Então rode &amp;quot;make install&amp;quot; como root.&lt;br /&gt;
&lt;br /&gt;
Se houve uma falha que diz algo como:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
CMake Error: This project requires some variables to be set,&lt;br /&gt;
and cmake can not find them.&lt;br /&gt;
Please set the following variables:&lt;br /&gt;
X11_XTest_LIB (ADVANCED)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
então está faltando uma biblioteca (ou outra dependência). Para descobrir qual biblioteca é, procure no diretório pela variável que o CMake não pôde encontrar no diretório cmake/modules. No exemplo acima, ela é&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
find_library(X11_XTest_LIB Xtst ${X11_LIB_SEARCH_PATH})&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
Logo, a biblioteca que está faltando é Xtst. Então você deve encontrá-la (provavelmente instalando libXtst-devel) e rodar cmake novamente.&lt;br /&gt;
&lt;br /&gt;
== Usando o CMake para uma aplicação simples ==&lt;br /&gt;
&lt;br /&gt;
Aqui está o CMakeLists.txt mais simples possível:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
add_executable(hello main.cpp)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
Isso criará um executável chamado &amp;quot;hello&amp;quot; (ou &amp;quot;hello.exe&amp;quot; no Windows) do arquivo de código fonte main.cpp. Você pode misturar arquivos C e C++ se você quiser. Você pode ter múltiplos executáveis e bibliotecas num CMakeLists.txt.  O mesmo arquivo de código fonte pode ser usado em vários alvos: ele será compilado para cada um, independentemente dos outros. Provavelmente, a parte mais importante da linguagem CMake são as variáveis:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
set( MEUS_FONTES main.cpp widget.cpp)&lt;br /&gt;
message(STATUS &amp;quot;meus fontes: ${MEUS_FONTES}&amp;quot;)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
Então, use o comando SET() para definir o valor de uma variável. Se você listar mais de uma string, a variável será uma lista. A list is a list of strings separated by semicolons. If you set it to only one item, it will have just that value. To get the value of a variable, use ${VAR}.&lt;br /&gt;
You can iterate over a list using FOREACH():&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
foreach(next_ITEM ${MY_SOURCES})&lt;br /&gt;
   message(STATUS &amp;quot;next item: ${next_ITEM}&amp;quot;)&lt;br /&gt;
endforeach(next_ITEM ${MY_SOURCES})&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
The commands in CMake are case-insensitive.  Names of variables and names of parameter are case-sensitive.&lt;br /&gt;
&lt;br /&gt;
You can also test for various things:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
if (UNIX)&lt;br /&gt;
   message(STATUS &amp;quot;This is UNIX (including OS X and CygWin)&amp;quot;)&lt;br /&gt;
endif (UNIX)&lt;br /&gt;
&lt;br /&gt;
if (MSVC)&lt;br /&gt;
   set(MY_SRCS ${MY_SRCS} winextra.cpp)&lt;br /&gt;
endif (MSVC)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
In this second example  you can see also how to append items to a list.&lt;br /&gt;
&lt;br /&gt;
In the cmake Wiki there is also a [http://www.cmake.org/Wiki/HowToBuildKDE4Software  tutorial] on using cmake to build KDE 4 software. It is recommended reading.&lt;br /&gt;
&lt;br /&gt;
== Using CMake for a KDE Project ==&lt;br /&gt;
&lt;br /&gt;
Here's a basic CMakeList file that builds a small KDE 4 project:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
project( kde4project )&lt;br /&gt;
find_package( KDE4 REQUIRED )&lt;br /&gt;
include_directories( ${KDE4_INCLUDES} )&lt;br /&gt;
&lt;br /&gt;
set( KDE4ProjectSources kde4mainapp.cpp someclass.cpp someotherclass.cpp )&lt;br /&gt;
&lt;br /&gt;
kde4_add_executable( kde4project ${KDE4ProjectSources} )&lt;br /&gt;
&lt;br /&gt;
target_link_libraries( kde4project ${KDE4_KDEUI_LIBS} ${KDE4_KPARTS_LIBS} )&lt;br /&gt;
&lt;br /&gt;
install( TARGETS kde4project  ${INSTALL_TARGETS_DEFAULT_ARGS} )&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''target_link_libraries'' contains the development libraries that are linked to your program. E.g. if you want to link to libtidy-devel, your library file name may be called /usr/local/lib/libtidy.a. You would then add -ltidy to a gcc call. Here, you add ''tidy'' to your target_link_libraries. If possible, use pre-defined variables or macros like ${KDE4_KDEUI_LIBS}.&lt;br /&gt;
&lt;br /&gt;
''install (TARGETS'' is where the target will finally be installed. If you do not have this line, make install will not be available.&lt;br /&gt;
&lt;br /&gt;
Variables, macros and other useful information specific to KDE can be found at the [[Development/CMake/Addons for KDE|CMake addons for KDE]] page.&lt;br /&gt;
&lt;br /&gt;
== Extending CMake ==&lt;br /&gt;
CMake can be extended using cmake scripts. CMake comes with a number of scripts; under UNIX they are by default installed to /usr/local/share/CMake/Modules/. The KDE libraries install also a set of cmake modules into share/apps/cmake/modules/. The files located there will be preferred over the ones in the system global cmake module path. &lt;br /&gt;
For detecting software packages there are FindFOO.cmake files, see [http://www.cmake.org/Wiki/CMake_HowToFindInstalledSoftware here] for more information.&lt;br /&gt;
You can also write macros in CMake. They are powerful enough to do most things you will need to build software, but they are not intended to be used as a general purpose programming language.&lt;br /&gt;
&lt;br /&gt;
== Converting autotools-based KDE software to CMake ==&lt;br /&gt;
In kdesdk/cmake/ you can find a script am2cmake . This is a ruby script, so you need to have ruby installed. Run am2cmake in the toplevel directory of your sources:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
$ cd src/mykooltool/&lt;br /&gt;
$ am2cmake --kde4&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
Don't forget the switch &amp;quot;--kde4&amp;quot;, otherwise it won't generate files suitable for KDE 4 software. The converted files 'may' work as they are, but complicated projects will require some additional editing.&lt;br /&gt;
&lt;br /&gt;
You may have to:&lt;br /&gt;
* add more include direcories, using INCLUDE_DIRECTORIES()&lt;br /&gt;
* add more link libraries, using TARGET_LINK_LIBRARIES()&lt;br /&gt;
* add some compile switches, using ADD_DEFINITIONS()&lt;br /&gt;
* add some &amp;quot;configure&amp;quot; checks, see [http://www.cmake.org/Wiki/CMake_HowToDoPlatformChecks How To Do Platform Checks] and [http://www.cmake.org/Wiki/CMake_HowToFindInstalledSoftware How To Find Installed Software]&lt;br /&gt;
* take special care of former libtool convenience libraries. They are not supported by cmake, instead there will be a file ConvenienceLibs.cmake created.  In this file you will find for every convenience lib a variable, which contains all source files of this convenience lib.  For the targets which linked to this convenience lib, just add the variable to the sources.&lt;br /&gt;
* a file AdditionalInfo.txt will be created.  There you will see all *.in and *.in.in files of your project. The stuff done in these files will have to be converted manually to cmake.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Programming]]&lt;br /&gt;
[[Category:Tutorial]]&lt;br /&gt;
[[Category:FAQs]]&lt;/div&gt;</summary>
		<author><name>R Rios</name></author>	</entry>

	</feed>