mariadb/cmake/mariadb_connector_c.cmake

28 lines
709 B
CMake
Raw Normal View History

#
# Configuration options for Connector/C
#
IF(WIN32)
# todo: libcurl for windows
ELSE()
SET(CC_LIBS ${LIBDL} ${LIBM} ${LIBPTHREAD})
FIND_PACKAGE(OpenSSL)
#FIND_PACKAGE(GnuTLS)
IF(OPENSSL_FOUND)
SET(CC_LIBS ${CC_LIBS} ${OPENSSL_LIBRARIES} ${OPENSSL_CRYPTO_LIBRARIES})
SET(CC_CMAKE_OPTS "-DWITH_SSL=OPENSSL")
ELSEIF (GNUTLS_FOUND)
SET(CC_LIBS ${CC_LIBS} ${GNUTLS_LIBRARY})
SET(CC_CMAKE_OPTS "-DWITH_SSL=GNUTLS")
ELSE()
SET(CC_CMAKE_OPTS "-DWITH_SSL=OFF")
ENDIF()
INCLUDE(${CMAKE_SOURCE_DIR}/cmake/iconv.cmake)
IF(ICONV_FOUND)
IF(ICONV_EXTERNAL)
SET(CC_LIBS ${CC_LIBS} ${ICONV_LIBRARIES})
ENDIF()
ENDIF()
ENDIF()
MARK_AS_ADVANCED(CC_LIBS CC_CMAKE_OPTS)