Re: [CMake] CMake 2.8.1 / Win: Neither if nor else?`

2010-05-22 Thread Philip Lowman
On Sat, May 22, 2010 at 4:50 AM, Droscy wrote: > The right construct is > IF(ZLIB_FOUND) >MESSAGE( WARNING "HAVE system zlib" ) > ELSE(ZLIB_FOUND) > MESSAGE( WARNING "NO system zlib" ) > ENDIF(ZLIB_FOUND) > And if compatibility with CMake < 2.4.4 isn't a concern, an even better way to do

Re: [CMake] CMake 2.8.1 / Win: Neither if nor else?`

2010-05-22 Thread Droscy
Hi Torsten Torsten Rohlfing ha scritto: > IF(ZLIB_FOUND) > MESSAGE( WARNING "HAVE system zlib" ) > ELSEIF(ZLIB_FOUND) > MESSAGE( WARNING "NO system zlib" ) > ENDIF(ZLIB_FOUND) > > [...] > > Can someone explain to me what I am missing? You are not missing anything, simply you are wrongly using

Re: [CMake] CMake 2.8.1 / Win: Neither if nor else?`

2010-05-21 Thread Tyler Roscoe
On Fri, May 21, 2010 at 02:04:38PM -0700, Torsten Rohlfing wrote: > FIND_PACKAGE(ZLIB) > IF(ZLIB_FOUND) > MESSAGE( WARNING "HAVE system zlib" ) > ELSEIF(ZLIB_FOUND) > MESSAGE( WARNING "NO system zlib" ) > ENDIF(ZLIB_FOUND) I don't see an else clause here, just two ifs (that check the same cond

[CMake] CMake 2.8.1 / Win: Neither if nor else?`

2010-05-21 Thread Torsten Rohlfing
Hi -- At the risk of asking a stupid question: I seem to have a situation where CMake (2.8.1 on Windows XP) completely ignore an IF .. ELSE .. ENDIF construct and basically does neither the IF nor the ELSE branch. My CMakeLists.txt is as follows: CMAKE_MINIMUM_REQUIRED(VERSION 2.6) FIND_PAC