forked from Kitware/kwant
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
64 lines (51 loc) · 1.61 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
cmake_minimum_required(VERSION 3.0)
project( KWANT )
include(CMakeDependentOption)
###
# KWANT version
set(KWANT_VERSION_MAJOR 0)
set(KWANT_VERSION_MINOR 1)
set(KWANT_VERSION_PATCH 0)
set(KWANT_VERSION "${KWANT_VERSION_MAJOR}.${KWANT_VERSION_MINOR}.${KWANT_VERSION_PATCH}")
###
# Ask for kwiver build directory
#
set( kwiver_DIR "" CACHE PATH "Path to KWIVER packages" )
###
# project specific directories
#
set(kwant_CMAKE_DIR "${CMAKE_SOURCE_DIR}/CMake")
# root directories
set(kwant_SOURCE_DIR "${CMAKE_SOURCE_DIR}")
set(kwant_BINARY_DIR "${CMAKE_BINARY_DIR}")
#Set CMP0022 to NEW so we error if someone writes older style cmake code
#See http://www.cmake.org/cmake/help/v2.8.12/cmake.html#policy:CMP0022
#for details on CMP0022
if(POLICY CMP0022)
cmake_policy(SET CMP0022 NEW)
endif()
if(POLICY CMP0054)
cmake_policy(SET CMP0054 NEW)
endif()
if( NOT CMAKE_ARCHIVE_OUTPUT_DIRECTORY )
set( CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${kwant_BINARY_DIR}/lib )
endif()
if( NOT CMAKE_LIBRARY_OUTPUT_DIRECTORY )
set( CMAKE_LIBRARY_OUTPUT_DIRECTORY ${kwant_BINARY_DIR}/lib )
endif()
if( NOT CMAKE_RUNTIME_OUTPUT_DIRECTORY )
set( CMAKE_RUNTIME_OUTPUT_DIRECTORY ${kwant_BINARY_DIR}/bin )
endif()
###
# Add the CMake directory for CMake modules
#
list(INSERT CMAKE_MODULE_PATH 0 "${kwant_SOURCE_DIR}/CMake" )
###
# Options and setup
#
OPTION(KWANT_BUILD_SHARED "Build KWANT components shared or not" TRUE )
set(BUILD_SHARED_LIBS ${KWANT_BUILD_SHARED})
include_directories( ${kwant_SOURCE_DIR} )
include_directories( ${kwant_BINARY_DIR} )
include( kwant-depends )
add_subdirectory( scoring_framework )