-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
82 lines (64 loc) · 2.32 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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
cmake_minimum_required(VERSION 3.1.0 FATAL_ERROR)
##################################################
project(Diffingo CXX)
##################################################
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(MY_CMAKE_DIR "${CMAKE_SOURCE_DIR}/cmake/")
set(MY_CMAKE_INPUT "${MY_CMAKE_DIR}/input/")
set(CMAKE_MODULE_PATH "${MY_CMAKE_DIR}/modules/")
include(FindRequiredPackage)
FindRequiredPackage(FLEX)
FindRequiredPackage(BISON)
find_package(Boost 1.40 COMPONENTS program_options filesystem system REQUIRED)
include("${MY_CMAKE_DIR}/options.cmake")
include("${MY_CMAKE_DIR}/settings.cmake")
include("${MY_CMAKE_DIR}/cpp.cmake")
include("${MY_CMAKE_DIR}/cpack.cmake")
#include("${MY_CMAKE_DIR}/doxygen.cmake")
##################################################
# Build external libs
include(ExternalProject)
set(StlsoftAndVersion stlsoft-1.9.118)
set(StlsoftDirectory ${PROJECT_SOURCE_DIR}/${ExternalLibsDir}/${StlsoftAndVersion})
set(PantheiosAndVersion pantheios-1.0.1-beta214)
set(PantheiosDirectory ${ExternalLibsDir}/${PantheiosAndVersion})
ExternalProject_add(pantheios
PREFIX ${PantheiosDirectory}
DOWNLOAD_COMMAND ""
UPDATE_COMMAND ""
SOURCE_DIR ${PantheiosDirectory}
BINARY_DIR ${PantheiosDirectory}
CONFIGURE_COMMAND ""
BUILD_COMMAND ./build.sh ${StlsoftDirectory}
INSTALL_COMMAND ""
)
set(LibkodeDirectory ${ExternalLibsDir}/libkode)
ExternalProject_add(libkode
PREFIX ${LibkodeDirectory}
DOWNLOAD_COMMAND ""
UPDATE_COMMAND ""
SOURCE_DIR ${LibkodeDirectory}
BINARY_DIR ${LibkodeDirectory}
CMAKE_ARGS -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
BUILD_COMMAND make
BUILD_ALWAYS 1
INSTALL_COMMAND make install
)
set(TinyformatDirectory ${ExternalLibsDir}/tinyformat)
set(Utf8ProcDirectory ${ExternalLibsDir}/utf8proc)
include_directories(SYSTEM
${StlsoftDirectory}/include
${PantheiosDirectory}/include
${LibkodeDirectory}/include
${TinyformatDirectory}
${Utf8ProcDirectory}
${Boost_INCLUDE_DIRS})
##################################################
include_directories(BEFORE ${CMAKE_SOURCE_DIR}/src ${CMAKE_BINARY_DIR}/src)
link_directories(${PantheiosDirectory}/lib ${Boost_LIBRARY_DIR} ${LibkodeDirectory}/lib)
add_subdirectory(src/)
if(MY_TESTS_ENABLED)
add_subdirectory(test/)
add_subdirectory(perfeval/)
endif()