-
Notifications
You must be signed in to change notification settings - Fork 3
/
CMakeLists.txt
59 lines (52 loc) · 2.14 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
58
59
# Copyright 2017 anonymous
#
# This software is the result of a joint project between anonymous and anonymous
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
cmake_minimum_required(VERSION 3.5)
project(moonshine)
set(moonshine_VERSION_MAJOR 1)
set(moonshine_VERSION_MINOR 0)
set(moonshine_VERSION_PATCH 0)
set(moonshine_PACKAGE_VERSION
"${moonshine_VERSION_MAJOR}.${moonshine_VERSION_MINOR}.${moonshine_VERSION_PATCH}")
include(CMakePackageConfigHelpers)
set(CMAKE_VERSION_FILE "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}Version.cmake")
write_basic_package_version_file(${CMAKE_VERSION_FILE}
VERSION ${moonshine_PACKAGE_VERSION}
COMPATIBILITY AnyNewerVersion)
find_package(Boost COMPONENTS REQUIRED
system
filesystem
regex
serialization
program_options
thread
log
log_setup)
set(Boost_USE_STATIC_LIBS OFF)
set(Boost_USE_MULTITHREAD ON)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DBOOST_LOG_DYN_LINK -O2 -std=c++11 -Werror -Wall")
include_directories(${Boost_INCLUDE_DIR})
find_package(Doxygen)
if(DOXYGEN_FOUND)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in
${CMAKE_CURRENT_BINARY_DIR}/Doxyfile @ONLY)
add_custom_target(doc ${DOXYGEN_EXECUTABLE}
${CMAKE_CURRENT_BINARY_DIR}/Doxyfile
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
COMMENT "Generating API documentation with Doxygen" VERBATIM)
endif(DOXYGEN_FOUND)
add_subdirectory(data)
add_subdirectory(src)
add_subdirectory(python)