Follow this wiki: <a href="http://www.itk.org/Wiki/CMake/Examples#Check_operating_system">http://www.itk.org/Wiki/CMake/Examples#Check_operating_system</a><br>There say:<br><blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" class="gmail_quote">

<div dir="ltr" class="mw-geshi" style="text-align:left"><div class="cmake source-cmake"><pre class="de1"> <span class="kw1">IF</span><span class="sy0">(</span>WIN32<span class="sy0">)</span>
   ...do something...
 <span class="kw1">ELSE</span><span class="sy0">(</span>WIN32<span class="sy0">)</span>
   ...do something else...
 <span class="kw1">ENDIF</span><span class="sy0">(</span>WIN32<span class="sy0">)</span></pre></div></div></blockquote>
<h3> <span class="mw-headline" id="Check_operating_system_2">or:</span></h3>
<blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" class="gmail_quote"><div dir="ltr" class="mw-geshi" style="text-align:left"><div class="cmake source-cmake"><pre class="de1">

<span class="kw1">IF</span><span class="sy0">(</span>CMAKE_SYSTEM_NAME <span class="kw3">STREQUAL</span> Linux<span class="sy0">)</span></pre></div></div></blockquote><br>As I know:<br>if (APPLE)<br>...<br>endif()<br>is not enough.<br>

<br>For now I have to using:<br><br clear="all"><blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" class="gmail_quote">if (${CMAKE_SYSTEM_NAME} MATCHES &quot;Windows&quot;)<br>

    set(WINDOWS TRUE)<br>elseif (${CMAKE_SYSTEM_NAME} MATCHES &quot;Linux&quot;)<br>    set(LINUX TRUE)<br>elseif (${CMAKE_SYSTEM_NAME} MATCHES &quot;Darwin&quot;)<br>    set(MACOSX TRUE)<br>endif()<br></blockquote><br>My question:<br>

How to check the operating system is MacOSX?<br><br clear="all">-- <br><div>Best Regards</div>
<div>Yuchen</div><br>