summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndy Cedilnik <andy.cedilnik@kitware.com>2005-03-16 18:26:36 (GMT)
committerAndy Cedilnik <andy.cedilnik@kitware.com>2005-03-16 18:26:36 (GMT)
commit3768961a667634c6f5d5dec22157241bb317f760 (patch)
tree728d3ea09cf9b6b6c876e86a84a4a1ac8c999ef7
parentd224858e1f19ccd1c5d250aee0e8c7e7ec2ece47 (diff)
downloadCMake-3768961a667634c6f5d5dec22157241bb317f760.zip
CMake-3768961a667634c6f5d5dec22157241bb317f760.tar.gz
CMake-3768961a667634c6f5d5dec22157241bb317f760.tar.bz2
COMP: More cleanups
-rw-r--r--CMakeLists.txt19
-rw-r--r--Source/CTest/Curl/CMakeLists.txt15
-rw-r--r--Source/CTest/Curl/urldata.h1
-rw-r--r--Utilities/cmexpat/CMakeLists.txt4
-rw-r--r--Utilities/cmxmlrpc/CMakeLists.txt10
-rw-r--r--Utilities/cmzlib/CMakeLists.txt6
6 files changed, 39 insertions, 16 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 08c1b0d..b06b2b6 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -62,6 +62,17 @@ SET(KWSYS_HEADER_ROOT ${CMake_BINARY_DIR}/Source)
SUBDIRS(Source/kwsys)
#-----------------------------------------------------------------------------
+# Build zlib library for Curl, CMake, and CTest.
+SUBDIRS(Utilities/cmzlib)
+SET(CMAKE_ZLIB_INCLUDES
+ "${CMAKE_CURRENT_BINARY_DIR}/Utilities"
+ )
+SET(CMAKE_ZLIB_LIBRARIES "cmzlib")
+SET(CURL_SPECIAL_LIBZ ${CMAKE_ZLIB_LIBRARIES})
+SET(CURL_SPECIAL_LIBZ_INCLUDES ${CMAKE_ZLIB_INCLUDES})
+SET(CURL_SPECIAL_ZLIB_H "cmzlib/zlib.h")
+
+#-----------------------------------------------------------------------------
# Build Curl library for CTest.
SUBDIRS(Source/CTest/Curl)
SET(CMAKE_CURL_INCLUDES "${CMAKE_CURRENT_SOURCE_DIR}/Source/CTest/Curl")
@@ -69,9 +80,11 @@ SET(CMAKE_CURL_LIBRARIES "Curl")
#-----------------------------------------------------------------------------
# Build expat library for CMake and CTest.
-INCLUDE_DIRECTORIES(${CMake_BINARY_DIR}/Utilities)
-SUBDIRS(Utilities/cmexpat Utilities/cmzlib)
-SET(CMAKE_EXPAT_INCLUDES "${CMAKE_CURRENT_BINARY_DIR}/Utilities/cmexpat")
+SUBDIRS(Utilities/cmexpat)
+SET(CMAKE_EXPAT_INCLUDES
+ "${CMAKE_CURRENT_BINARY_DIR}/Utilities"
+ "${CMAKE_CURRENT_BINARY_DIR}/Utilities/cmexpat"
+ )
SET(CMAKE_EXPAT_LIBRARIES "cmexpat")
SUBDIRS(Utilities/cmxmlrpc)
diff --git a/Source/CTest/Curl/CMakeLists.txt b/Source/CTest/Curl/CMakeLists.txt
index b169a6c..b8491c2 100644
--- a/Source/CTest/Curl/CMakeLists.txt
+++ b/Source/CTest/Curl/CMakeLists.txt
@@ -124,13 +124,6 @@ MACRO(CHECK_LIBRARY_EXISTS_CONCAT LIBRARY SYMBOL VARIABLE)
ENDIF(${VARIABLE})
ENDMACRO(CHECK_LIBRARY_EXISTS_CONCAT)
-IF(CURL_SPECIAL_LIBZ)
- SET(CURL_LIBS ${CURL_LIBS} "${CURL_SPECIAL_LIBZ}")
- INCLUDE_DIRECTORIES(${CURL_SPECIAL_LIBZ_INCLUDES})
- SET(HAVE_LIBZ 0)
- SET(HAVE_ZLIB_H 0)
-ENDIF(CURL_SPECIAL_LIBZ)
-
# Check for all needed libraries
CHECK_LIBRARY_EXISTS_CONCAT("dl" dlopen HAVE_LIBDL)
CHECK_LIBRARY_EXISTS_CONCAT("ucb" gethostname HAVE_LIBUCB)
@@ -160,6 +153,14 @@ CHECK_LIBRARY_EXISTS("${CURL_LIBS}" dlopen "" HAVE_DLOPEN)
# For other tests to use the same libraries
SET(CMAKE_REQUIRED_LIBRARIES ${CURL_LIBS})
+IF(CURL_SPECIAL_LIBZ)
+ SET(CURL_LIBS ${CURL_LIBS} "${CURL_SPECIAL_LIBZ}")
+ INCLUDE_DIRECTORIES(${CURL_SPECIAL_LIBZ_INCLUDES})
+ SET(HAVE_LIBZ 0)
+ SET(HAVE_ZLIB_H 0)
+ENDIF(CURL_SPECIAL_LIBZ)
+
+
# If we have features.h, then do the _BSD_SOURCE magic
CHECK_INCLUDE_FILE("features.h" HAVE_FEATURES_H)
IF(HAVE_FEATURES_H)
diff --git a/Source/CTest/Curl/urldata.h b/Source/CTest/Curl/urldata.h
index 144cba3..07aff9b 100644
--- a/Source/CTest/Curl/urldata.h
+++ b/Source/CTest/Curl/urldata.h
@@ -78,7 +78,6 @@
#include "timeval.h"
#ifdef HAVE_ZLIB_H
-#error goo
#include <zlib.h> /* for content-encoding */
#endif
diff --git a/Utilities/cmexpat/CMakeLists.txt b/Utilities/cmexpat/CMakeLists.txt
index e3a1581..0cff343 100644
--- a/Utilities/cmexpat/CMakeLists.txt
+++ b/Utilities/cmexpat/CMakeLists.txt
@@ -10,6 +10,10 @@ SET(expat_SRCS
INCLUDE(${CMAKE_ROOT}/Modules/TestBigEndian.cmake)
TEST_BIG_ENDIAN(CMEXPAT_BIGENDIAN)
+INCLUDE_DIRECTORIES(
+ "${CMEXPAT_BINARY_DIR}/.."
+ )
+
IF(WIN32)
IF(NOT BUILD_SHARED_LIBS)
SET (CM_EXPAT_STATIC 1)
diff --git a/Utilities/cmxmlrpc/CMakeLists.txt b/Utilities/cmxmlrpc/CMakeLists.txt
index fd2784a..893fff6 100644
--- a/Utilities/cmxmlrpc/CMakeLists.txt
+++ b/Utilities/cmxmlrpc/CMakeLists.txt
@@ -49,11 +49,13 @@ ENDIF(ATTR_UNUSED_VAR)
SET(HAVE_LIBWWW_SSL)
SET(DIRECTORY_SEPARATOR "/")
-FIND_PACKAGE(Threads)
SET(HAVE_PTHREADS)
-IF(WIN32 OR CMAKE_USE_PTHREADS_INIT)
- SET(HAVE_PTHREADS 1)
-ENDIF(WIN32 OR CMAKE_USE_PTHREADS_INIT)
+IF(CMAKE_BUILD_XMLRPC_WITH_THREADS)
+ FIND_PACKAGE(Threads)
+ IF(WIN32 OR CMAKE_USE_PTHREADS_INIT)
+ SET(HAVE_PTHREADS 1)
+ ENDIF(WIN32 OR CMAKE_USE_PTHREADS_INIT)
+ENDIF(CMAKE_BUILD_XMLRPC_WITH_THREADS)
INCLUDE_DIRECTORIES(
"${CMAKE_CURRENT_SOURCE_DIR}"
diff --git a/Utilities/cmzlib/CMakeLists.txt b/Utilities/cmzlib/CMakeLists.txt
index a7a4b16..793e6f4 100644
--- a/Utilities/cmzlib/CMakeLists.txt
+++ b/Utilities/cmzlib/CMakeLists.txt
@@ -1,7 +1,11 @@
PROJECT(CMZLIB)
INCLUDE_REGULAR_EXPRESSION("^(deflate|inf|trees|zconf|zlib|zutil).*$")
-INCLUDE_DIRECTORIES(${CMZLIB_SOURCE_DIR})
+INCLUDE_DIRECTORIES(
+ "${CMZLIB_SOURCE_DIR}"
+ "${CMZLIB_SOURCE_DIR}/.."
+ "${CMZLIB_BINARY_DIR}/.."
+ )
# Tell the header files included from the .c files that they are being
# built. Used to disable warnings since we do not want to change the