Revision: 42058
          http://brlcad.svn.sourceforge.net/brlcad/?rev=42058&view=rev
Author:   d_rossberg
Date:     2011-01-10 16:11:44 +0000 (Mon, 10 Jan 2011)

Log Message:
-----------
the zconf.h has to lie in the same directory as zlib.h no matter where the 
binaries are build to be visible by the other libraries
the original CMakeLists.txt makes sense for a standalone project but causes 
problems as a sub-project configuration in larger programs
(nevertheless it's a good starting point)

Modified Paths:
--------------
    brlcad/trunk/src/other/libz/CMakeLists.txt

Modified: brlcad/trunk/src/other/libz/CMakeLists.txt
===================================================================
--- brlcad/trunk/src/other/libz/CMakeLists.txt  2011-01-10 15:48:41 UTC (rev 
42057)
+++ brlcad/trunk/src/other/libz/CMakeLists.txt  2011-01-10 16:11:44 UTC (rev 
42058)
@@ -58,29 +58,16 @@
     add_definitions(-D_CRT_NONSTDC_NO_DEPRECATE)
 endif()
 
-if(NOT CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_CURRENT_BINARY_DIR)
-    # If we're doing an out of source build and the user has a zconf.h
-    # in their source tree...
-    if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/zconf.h)
-        message(FATAL_ERROR
-            "You must remove ${CMAKE_CURRENT_SOURCE_DIR}/zconf.h "
-            "from the source tree.  This file is included with zlib "
-            "but CMake generates this file for you automatically "
-            "in the build directory.")
-  endif()
-endif()
+configure_file(zconf.h.cmakein
+               zconf.h @ONLY)
 
-configure_file(${CMAKE_CURRENT_SOURCE_DIR}/zconf.h.cmakein
-               ${CMAKE_CURRENT_BINARY_DIR}/zconf.h @ONLY)
-include_directories(${CMAKE_CURRENT_BINARY_DIR})
 
-
 #============================================================================
 # zlib
 #============================================================================
 
 set(ZLIB_PUBLIC_HDRS
-    ${CMAKE_CURRENT_BINARY_DIR}/zconf.h
+    zconf.h
     zlib.h
 )
 set(ZLIB_PRIVATE_HDRS


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

------------------------------------------------------------------------------
Gaining the trust of online customers is vital for the success of any company
that requires sensitive data to be transmitted over the Web.   Learn how to 
best implement a security strategy that keeps consumers' information secure 
and instills the confidence they need to proceed with transactions.
http://p.sf.net/sfu/oracle-sfdevnl 
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits

Reply via email to