forked from a-n-t-h-o-n-y/Twitter-API-C-Library
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
48 lines (40 loc) · 1.59 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
cmake_minimum_required(VERSION 3.2)
project (TwitterLib LANGUAGES CXX)
# BUILD OPTIONS
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
set(CMAKE_BUILD_TYPE Debug)
# set(CMAKE_BUILD_TYPE Release)
add_compile_options(-Wall)
enable_testing()
include(GNUInstallDirs)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
# EXTERNAL LIBRARIES
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
find_package(Boost 1.58.0 REQUIRED COMPONENTS system iostreams)
add_library(boost INTERFACE IMPORTED)
set_property(TARGET boost PROPERTY
INTERFACE_INCLUDE_DIRECTORIES ${Boost_INCLUDE_DIR})
set_property(TARGET boost PROPERTY
INTERFACE_LINK_LIBRARIES ${Boost_LIBRARIES})
# SUBDIRECTORIES
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
add_subdirectory(networklib)
add_subdirectory(twitterlib)
add_subdirectory(demos)
add_subdirectory(tests)
# CLANG TIDY
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
add_custom_target(compile_commands ALL
COMMAND [ -f ${CMAKE_SOURCE_DIR}/build/compile_commands.json ] &&
mv ${CMAKE_SOURCE_DIR}/build/compile_commands.json
${CMAKE_SOURCE_DIR}/compile_commands.json || :)
# DOXYGEN
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Doxyfile in project/doc : make doc
find_package(Doxygen)
if(DOXYGEN_FOUND)
add_custom_target(doc
${DOXYGEN_EXECUTABLE} ${CMAKE_SOURCE_DIR}/doc/Doxyfile
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/doc
COMMENT "Generating API documentation with Doxygen" VERBATIM)
endif(DOXYGEN_FOUND)