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_PACKAGE(ZLIB)
IF(ZLIB_FOUND)
  MESSAGE( WARNING "HAVE system zlib" )
ELSEIF(ZLIB_FOUND)
  MESSAGE( WARNING "NO system zlib" )
ENDIF(ZLIB_FOUND)

Now I would think that I should see wither the "HAVE" or the "NO" message in the config stage output, on Windows more likely the "NO" message of course.

Instead, what I get is this:

Check for working C compiler using: Visual Studio 10
Check for working C compiler using: Visual Studio 10 -- works
Detecting C compiler ABI info
Detecting C compiler ABI info - done
Check for working CXX compiler using: Visual Studio 10
Check for working CXX compiler using: Visual Studio 10 -- works
Detecting CXX compiler ABI info
Detecting CXX compiler ABI info - done
Could NOT find ZLIB  (missing:  ZLIB_LIBRARIES ZLIB_INCLUDE_DIRS)
Configuring done

Can someone explain to me what I am missing?

Thanks!
  Torsten

--
Torsten Rohlfing, PhD          SRI International, Neuroscience Program
 Senior Research Scientist      333 Ravenswood Ave, Menlo Park, CA 94025
  Phone: ++1 (650) 859-3379      Fax: ++1 (650) 859-2743
   tors...@synapse.sri.com        http://www.stanford.edu/~rohlfing/

     "Though this be madness, yet there is a method in't"

_______________________________________________
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

Reply via email to