-
Notifications
You must be signed in to change notification settings - Fork 83
/
Copy pathCMakeLists.txt
70 lines (50 loc) · 1.81 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
project(sprokit)
set(CMAKE_FOLDER "Sprokit")
set(sprokit_source_dir "${CMAKE_CURRENT_SOURCE_DIR}")
set(sprokit_binary_dir "${CMAKE_CURRENT_BINARY_DIR}")
set(SPROKIT_CMAKE_DIR "${sprokit_source_dir}/conf")
##?++ temp needed until new macros are used
check_cxx_compiler_flag(-fvisibility=hidden SPROKIT_HAVE_GCC_VISIBILITY)
## Copy options from KWIVER
set(SPROKIT_ENABLE_PYTHON ${KWIVER_ENABLE_PYTHON})
include(CMakeDependentOption)
## set(sprokit_output_dir "${sprokit_binary_dir}")
set(sprokit_output_dir "${KWIVER_BINARY_DIR}")
# we need to know if python is enabled
if (SPROKIT_ENABLE_PYTHON)
add_definitions("-DSPROKIT_ENABLE_PYTHON")
endif ()
## TODO replace sprokit macros with kwiver macros if possible
# Sprokit macros
include("${sprokit_source_dir}/conf/sprokit-macro-configure.cmake")
include("${sprokit_source_dir}/conf/sprokit-macro-targets.cmake")
include("${sprokit_source_dir}/conf/sprokit-macro-python.cmake")
# Support functions.
include("${sprokit_source_dir}/cmake/support/pkgconfig.cmake")
### TODO This will not work without going to root directory
find_package(Git)
if (GIT_FOUND)
if (IS_DIRECTORY "${sprokit_source_dir}/.git")
set(sprokit_is_in_git ON)
endif ()
endif ()
# Project setup.
include(${sprokit_source_dir}/cmake/snippets/configuration.cmake)
include(${sprokit_source_dir}/cmake/snippets/groups.cmake)
if (sprokit_is_in_git)
include(${sprokit_source_dir}/cmake/snippets/dist.cmake)
endif ()
add_subdirectory(src)
option(SPROKIT_ENABLE_EXTRAS "Enable extra files to help with tooling" OFF)
if (SPROKIT_ENABLE_EXTRAS)
add_subdirectory(extra)
endif ()
if (KWIVER_ENABLE_TESTS)
include(CTest)
add_subdirectory(tests)
endif ()
add_subdirectory(conf)
if (KWIVER_ENABLE_PROCESSES)
include_directories( ${CMAKE_CURRENT_BINARY_DIR} )
add_subdirectory(processes)
endif()