GnuTLS optionally compiled - defaults to yes
* Allow optionally disabling GnuTLS via config var (USE_GNUTLS)
This commit is contained in:
@@ -12,6 +12,8 @@ set (HAVE_CMAKE true)
|
|||||||
project (task)
|
project (task)
|
||||||
set (PROJECT_VERSION "2.4.1")
|
set (PROJECT_VERSION "2.4.1")
|
||||||
|
|
||||||
|
OPTION(USE_GNUTLS "Build gnutls support." ON)
|
||||||
|
|
||||||
message ("CMAKE_SYSTEM_NAME ${CMAKE_SYSTEM_NAME}")
|
message ("CMAKE_SYSTEM_NAME ${CMAKE_SYSTEM_NAME}")
|
||||||
set (CMAKE_CXX_FLAGS "-std=c++11")
|
set (CMAKE_CXX_FLAGS "-std=c++11")
|
||||||
if (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
if (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
||||||
@@ -74,13 +76,15 @@ set (PACKAGE_TARNAME "${PACKAGE}")
|
|||||||
set (PACKAGE_VERSION "${VERSION}")
|
set (PACKAGE_VERSION "${VERSION}")
|
||||||
set (PACKAGE_STRING "${PACKAGE} ${VERSION}")
|
set (PACKAGE_STRING "${PACKAGE} ${VERSION}")
|
||||||
|
|
||||||
message ("-- Looking for GnuTLS")
|
if (USE_GNUTLS)
|
||||||
find_package (GnuTLS)
|
message ("-- Looking for GnuTLS")
|
||||||
if (GNUTLS_FOUND)
|
find_package (GnuTLS)
|
||||||
set (HAVE_LIBGNUTLS true)
|
if (GNUTLS_FOUND)
|
||||||
set (TASK_INCLUDE_DIRS ${TASK_INCLUDE_DIRS} ${GNUTLS_INCLUDE_DIR})
|
set (HAVE_LIBGNUTLS true)
|
||||||
set (TASK_LIBRARIES ${TASK_LIBRARIES} ${GNUTLS_LIBRARIES})
|
set (TASK_INCLUDE_DIRS ${TASK_INCLUDE_DIRS} ${GNUTLS_INCLUDE_DIR})
|
||||||
endif (GNUTLS_FOUND)
|
set (TASK_LIBRARIES ${TASK_LIBRARIES} ${GNUTLS_LIBRARIES})
|
||||||
|
endif (GNUTLS_FOUND)
|
||||||
|
endif (USE_GNUTLS)
|
||||||
|
|
||||||
#message ("-- Looking for pthread")
|
#message ("-- Looking for pthread")
|
||||||
#find_path (PTHREAD_INCLUDE_DIR pthread.h)
|
#find_path (PTHREAD_INCLUDE_DIR pthread.h)
|
||||||
|
|||||||
Reference in New Issue
Block a user