On Thursday 06 August 2009, Tyler Roscoe wrote: > On Thu, Aug 06, 2009 at 12:42:44PM -0700, ML wrote: > > Thanks Tyler, is this avail in 2.6 (WINDOWS rather than using WIN32) > > or in a future release? > > It's available if you are working with CMake at my company :). Otherwise > you can do it yourself easily: > > # We want to use WINDOWS instead of the CMake-provided variable > # WIN32 to prevent confusion about whether WIN32 applies to 64-bit > # Windows (it does, but that's not obvious). > if (WIN32) > set (WINDOWS ${WIN32}) > endif () > > I mentioned it because I was sort of passively hoping that one of the > CMake devs would see it and say, "hey, that's a good idea," and > eventually include it in CMake proper. Until then, I have my > CommonIncludes.cmake :).
You can also test CMAKE_SYSTEM_NAME: if(${CMAKE_SYSTEM_NAME MATCHES} Windows) ... etc. Alex _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake