-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathCMakeLists.txt
53 lines (38 loc) · 1.37 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
cmake_minimum_required(VERSION 3.9)
project(quickstart-desktop-cpp)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_OSX_DEPLOYMENT_TARGET "10.15")
set(BNB_RESOURCES_FOLDER ${CMAKE_CURRENT_LIST_DIR}/resources)
set(BNB_THIRD_FOLDER ${CMAKE_CURRENT_LIST_DIR}/third)
# Set to OFF to disable ffmpeg dependency (SDK should be built with disabled video_player also)
set(BNB_VIDEO_PLAYER ON)
# Careffuly tested on OSX. Better to stay with GL on other platfoems
if(APPLE)
set(BNB_GL_BACKEND OFF)
else()
set(BNB_GL_BACKEND ON)
endif()
#TODO: metal
set(BNB_GL_BACKEND ON)
add_definitions(
-DBNB_RESOURCES_FOLDER="${BNB_RESOURCES_FOLDER}"
-DBNB_VIDEO_PLAYER=$<BOOL:${BNB_VIDEO_PLAYER}>
-DBNB_GL_BACKEND=$<BOOL:${BNB_GL_BACKEND}>
)
include(${CMAKE_CURRENT_LIST_DIR}/cmake/utils.cmake)
include(${CMAKE_CURRENT_LIST_DIR}/cmake/copy_libs.cmake)
#
# Main
#
add_subdirectory(${CMAKE_CURRENT_LIST_DIR}/bnb_sdk)
add_subdirectory(${CMAKE_CURRENT_LIST_DIR}/helpers)
add_subdirectory(${CMAKE_CURRENT_LIST_DIR}/third/glfw)
add_subdirectory(${CMAKE_CURRENT_LIST_DIR}/third/stb)
option(DEPLOY_BUILD "Build for deployment" OFF)
###########
# Targets #
###########
add_subdirectory(${CMAKE_CURRENT_LIST_DIR}/realtime-camera-preview)
add_subdirectory(${CMAKE_CURRENT_LIST_DIR}/single-image-processing)
add_subdirectory(${CMAKE_CURRENT_LIST_DIR}/videostream-processing)