forked from dazeus/dazeus-core
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
57 lines (47 loc) · 2.31 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
cmake_minimum_required(VERSION 2.8)
project(dazeus)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/" "${CMAKE_SOURCE_DIR}/contrib/libdazeus-irc/cmake/")
set(DAZEUS_VERSION_MAJOR "2")
set(DAZEUS_VERSION_MINOR "0")
set(DAZEUS_VERSION "${DAZEUS_VERSION_MAJOR}.${DAZEUS_VERSION_MINOR}")
IF(NOT EXISTS "${CMAKE_SOURCE_DIR}/contrib/libdazeus-irc/CMakeLists.txt")
message("It seems you do not have a checkout of libdazeus-irc.")
message("It is required to compile dazeus, and can be automatically")
message("created by Git by running:")
message(" git submodule update --init")
message(FATAL_ERROR "libdazeus-irc is not checked out")
ENDIF()
IF(NOT EXISTS "${CMAKE_SOURCE_DIR}/contrib/jansson/README.rst")
message("It seems you do not have a checkout of jansson.")
message("It is required to compile dazeus, and can be automatically")
message("created by Git by running:")
message(" git submodule update --init")
message(FATAL_ERROR "jansson is not checked out")
ENDIF()
find_package(LibMongoClient REQUIRED)
find_package(Boost REQUIRED)
include_directories(SYSTEM ${LibMongoClient_INCLUDE_DIRS})
include_directories(SYSTEM ${Boost_INCLUDE_DIRS})
include_directories(SYSTEM "${CMAKE_SOURCE_DIR}/contrib/jansson/src")
include_directories("${CMAKE_SOURCE_DIR}/contrib/libdazeus-irc/src")
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/jansson_config.h"
"${CMAKE_CURRENT_SOURCE_DIR}/contrib/jansson/src/jansson_config.h")
file(GLOB jansson_sources "${CMAKE_CURRENT_SOURCE_DIR}/contrib/jansson/src/*.c")
file(GLOB jansson_headers "${CMAKE_CURRENT_SOURCE_DIR}/contrib/jansson/src/*.h")
add_library(jansson ${jansson_sources} ${jansson_headers})
target_link_libraries(jansson)
set(LIBS ${LIBS} jansson ssl crypto dazeus-irc ${LibIRCClient_LIBRARIES} ${LibJson_LIBRARIES} ${LibMongoClient_LIBRARIES} ${Boost_LIBRARIES})
find_package(Doxygen)
if(DOXYGEN_FOUND)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in
${CMAKE_CURRENT_BINARY_DIR}/Doxyfile)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/misc/mainpage.dox.in
${CMAKE_CURRENT_SOURCE_DIR}/misc/mainpage.dox)
add_custom_target(doc ${DOXYGEN_EXECUTABLE}
${CMAKE_CURRENT_BINARY_DIR}/Doxyfile
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
COMMENT "Generating documentation with Doxygen" VERBATIM
)
endif()
add_subdirectory(contrib/libdazeus-irc)
add_subdirectory(src)