[sword-svn] r2763 - trunk
greg.hellings at crosswire.org
greg.hellings at crosswire.org
Sun Jan 6 12:55:59 MST 2013
Author: greg.hellings
Date: 2013-01-06 12:55:58 -0700 (Sun, 06 Jan 2013)
New Revision: 2763
Modified:
trunk/CMakeLists.txt
Log:
Resoving merge conflict and pulling in update to CMakeLists.txt
to fully support SFTP detection.
Modified: trunk/CMakeLists.txt
===================================================================
--- trunk/CMakeLists.txt 2013-01-06 19:32:03 UTC (rev 2762)
+++ trunk/CMakeLists.txt 2013-01-06 19:55:58 UTC (rev 2763)
@@ -165,6 +165,25 @@
SET(SWORD_LINK_LIBRARIES ${SWORD_LINK_LIBRARIES} ${ZLIB_LIBRARY})
ENDIF(WITH_ZLIB)
IF(WITH_CURL)
+ FIND_PROGRAM(CURL_CONFIG curl-config
+ DOC "The curl-config executable path, used to determine SFTP support.")
+ # If we can find the config script, we will run it and attempt to parse out the
+ # availability of SFTP support. Otherwise, we will assume the library was built
+ # without it.
+ IF(CURL_CONFIG)
+ EXECUTE_PROCESS(
+ COMMAND ${CURL_CONFIG} --protocols
+ COMMAND grep SFTP
+ COMMAND wc -l
+ OUTPUT_VARIABLE CURL_CONFIG_OUTPUT
+ OUTPUT_STRIP_TRAILING_WHITESPACE)
+ IF(CURL_CONFIG_OUTPUT STREQUAL "1")
+ ADD_DEFINITIONS(-DCURLSFTPAVAILABLE)
+ MESSAGE(STATUS "cURL SFTP Support: Yes")
+ ELSE(CURL_CONFIG_OUTPUT STREQUAL "1")
+ MESSAGE(STATUS "cURL SFTP Support: No")
+ ENDIF(CURL_CONFIG_OUTPUT STREQUAL "1")
+ ENDIF(CURL_CONFIG)
INCLUDE_DIRECTORIES(${CURL_INCLUDE_DIRS})
SET(SWORD_LINK_LIBRARIES ${SWORD_LINK_LIBRARIES} ${CURL_LIBRARY})
ENDIF(WITH_CURL)
More information about the sword-cvs
mailing list