ENH: check in ability to build with new curl -f -DCMAKE_USE_NEW_CURL is set
This commit is contained in:
parent
5824aa6143
commit
6cf99d7bea
|
@ -227,8 +227,8 @@ MACRO (CMAKE_BUILD_UTILITIES)
|
|||
# Everything in the tree should be able to include files from the
|
||||
# Utilities directory.
|
||||
INCLUDE_DIRECTORIES(
|
||||
${CMake_SOURCE_DIR}/Utilities
|
||||
${CMake_BINARY_DIR}/Utilities
|
||||
${CMake_SOURCE_DIR}/Utilities
|
||||
)
|
||||
|
||||
# check for the use of system libraries versus builtin ones
|
||||
|
@ -269,7 +269,13 @@ MACRO (CMAKE_BUILD_UTILITIES)
|
|||
ADD_DEFINITIONS(-DCURL_STATICLIB)
|
||||
SET(CMAKE_CURL_INCLUDES)
|
||||
SET(CMAKE_CURL_LIBRARIES cmcurl)
|
||||
SUBDIRS(Utilities/cmcurl)
|
||||
IF(CMAKE_USE_NEW_CURL)
|
||||
# for cmake never build examples
|
||||
SET(CURL_SKIP_EXAMPLES TRUE)
|
||||
ADD_SUBDIRECTORY(Utilities/cmcurl-7.19.0)
|
||||
ELSE(CMAKE_USE_NEW_CURL)
|
||||
SUBDIRS(Utilities/cmcurl)
|
||||
ENDIF(CMAKE_USE_NEW_CURL)
|
||||
ENDIF(CMAKE_USE_SYSTEM_CURL)
|
||||
|
||||
#---------------------------------------------------------------------
|
||||
|
|
|
@ -22,5 +22,6 @@
|
|||
#cmakedefine CMAKE_USE_SYSTEM_EXPAT
|
||||
#cmakedefine CMAKE_USE_SYSTEM_XMLRPC
|
||||
#cmakedefine CMAKE_USE_SYSTEM_ZLIB
|
||||
#cmakedefine CMAKE_USE_NEW_CURL
|
||||
|
||||
#endif
|
||||
|
|
|
@ -22,7 +22,11 @@
|
|||
#ifdef CMAKE_USE_SYSTEM_CURL
|
||||
# include <curl/curl.h>
|
||||
#else
|
||||
# include <cmcurl/curl/curl.h>
|
||||
# ifdef CMAKE_USE_NEW_CURL
|
||||
# include <cmcurl-7.19.0/include/curl/curl.h>
|
||||
# else CMAKE_USE_NEW_CURL
|
||||
# include <cmcurl/curl/curl.h>
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
|
@ -42,7 +42,7 @@ if(CMAKE_COMPILER_2005)
|
|||
endif(CMAKE_COMPILER_2005)
|
||||
add_definitions(-DHAVE_CONFIG_H
|
||||
-DCURL_STATICLIB)
|
||||
|
||||
option(CURL_SKIP_EXAMPLES "Skip building the curl examples" FALSE)
|
||||
add_subdirectory(lib)
|
||||
add_subdirectory(src)
|
||||
add_subdirectory(docs)
|
||||
|
|
|
@ -1 +1,4 @@
|
|||
add_subdirectory(examples)
|
||||
if(NOT CURL_SKIP_EXAMPLES)
|
||||
add_subdirectory(examples)
|
||||
endif(NOT CURL_SKIP_EXAMPLES)
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
*/
|
||||
|
||||
#include "curlver.h" /* libcurl version defines */
|
||||
#include "curl/curlbuild.h" /* libcurl build definitions */
|
||||
#include "cmcurl-7.19.0/include/curl/curlbuild.h" /* libcurl build definitions */
|
||||
#include "curlrules.h" /* libcurl rules enforcement */
|
||||
|
||||
/*
|
||||
|
|
|
@ -564,7 +564,6 @@ configure_file(${CURL_SOURCE_DIR}/lib/config.cmake.h.in
|
|||
set(CURL_SIZEOF_LONG ${SIZEOF_LONG})
|
||||
configure_file(${CURL_SOURCE_DIR}/include/curl/curlbuild.cmake.h.in
|
||||
${CURL_BINARY_DIR}/include/curl/curlbuild.h)
|
||||
|
||||
add_library(cmcurl ${libCurl_SRCS})
|
||||
target_link_libraries(cmcurl ${CURL_LIBS})
|
||||
|
||||
|
|
Loading…
Reference in New Issue