Added find_package calls for libcurl and linked the maxscale executable against it.

This commit is contained in:
Markus Makela
2015-02-26 11:16:50 +02:00
parent c93a7bede5
commit 63e6826906
2 changed files with 9 additions and 1 deletions

View File

@ -23,6 +23,13 @@ find_package(MySQLClient)
find_package(MySQL) find_package(MySQL)
find_package(Pandoc) find_package(Pandoc)
# You can find the variables set by this in the FindCURL.cmake file
# which is a default module in CMake.
find_package(CURL)
if(NOT CURL_FOUND)
message(FATAL_ERROR "Failed to locate dependency: libcurl")
endif()
set(CMAKE_INSTALL_RPATH ${CMAKE_INSTALL_RPATH}:${CMAKE_INSTALL_PREFIX}/lib:${CMAKE_INSTALL_PREFIX}/modules) set(CMAKE_INSTALL_RPATH ${CMAKE_INSTALL_RPATH}:${CMAKE_INSTALL_PREFIX}/lib:${CMAKE_INSTALL_PREFIX}/modules)
# Make sure the release notes for this release are present if it is a stable one # Make sure the release notes for this release are present if it is a stable one
@ -109,6 +116,7 @@ include_directories(server/include)
include_directories(server/inih) include_directories(server/inih)
include_directories(server/modules/include) include_directories(server/modules/include)
include_directories(${CMAKE_BINARY_DIR}/server/include) include_directories(${CMAKE_BINARY_DIR}/server/include)
include_directories(${CURL_INCLUDE_DIRS})
add_subdirectory(utils) add_subdirectory(utils)
add_subdirectory(log_manager) add_subdirectory(log_manager)

View File

@ -8,7 +8,7 @@ add_executable(maxscale atomic.c buffer.c spinlock.c gateway.c
poll.c config.c users.c hashtable.c dbusers.c thread.c gwbitmask.c poll.c config.c users.c hashtable.c dbusers.c thread.c gwbitmask.c
monitor.c adminusers.c secrets.c filter.c modutil.c hint.c monitor.c adminusers.c secrets.c filter.c modutil.c hint.c
housekeeper.c memlog.c) housekeeper.c memlog.c)
target_link_libraries(maxscale ${EMBEDDED_LIB} log_manager utils ssl aio pthread crypt dl crypto inih z rt m stdc++) target_link_libraries(maxscale ${EMBEDDED_LIB} ${CURL_LIBRARIES} log_manager utils ssl aio pthread crypt dl crypto inih z rt m stdc++ )
install(TARGETS maxscale DESTINATION bin) install(TARGETS maxscale DESTINATION bin)
add_executable(maxkeys maxkeys.c secrets.c utils.c) add_executable(maxkeys maxkeys.c secrets.c utils.c)