-
Notifications
You must be signed in to change notification settings - Fork 4
/
CMakeLists.txt
37 lines (28 loc) · 995 Bytes
/
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
cmake_minimum_required(VERSION 3.8.2 FATAL_ERROR)
project(openem LANGUAGES CXX)
option(BUILD_DOCS "Whether to enable documentation target." ON)
option(BUILD_DEPLOY "Whether to build the deployment library." ON)
option(BUILD_PYTHON "Whether to build python bindings." ON)
option(BUILD_CSHARP "Whether to build C# bindings." ON)
option(BUILD_EXAMPLES "Whether to build example executables." ON)
if(MSVC)
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /MT /MP")
else()
set(BUILD_CSHARP OFF)
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
endif()
set(CXX_STANDARD 11)
# Should consider target-level includes
include_directories(BEFORE /opt/include)
link_directories(/opt/lib)
if(BUILD_DOCS)
add_subdirectory(doc)
endif()
if(BUILD_DEPLOY)
add_subdirectory(deploy)
endif()
if(BUILD_EXAMPLES)
add_subdirectory(examples)
endif()
install(FILES LICENSE.md DESTINATION .)
install(DIRECTORY train DESTINATION .)