forked from Dovyski/cvui
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
52 lines (46 loc) · 2.46 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
cmake_minimum_required(VERSION 3.1)
project(cvui LANGUAGES CXX)
# Option to control if python things should be included or not.
option(ADD_PYTHON_EXAMPLES "Add cvui.py (Python version of cvui) and Python examples to the build." ON)
set(CMAKE_CXX_STANDARD 11) # C++11
set(CMAKE_CXX_STANDARD_REQUIRED OFF)
set(CMAKE_CXX_EXTENSIONS OFF) # without compiler extensions like gnu++11
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
add_subdirectory(example/src/button-shortcut)
add_subdirectory(example/src/canny)
add_subdirectory(example/src/complext-layout)
add_subdirectory(example/src/hello-world)
add_subdirectory(example/src/image-button)
add_subdirectory(example/src/interaction-area)
add_subdirectory(example/src/main-app)
add_subdirectory(example/src/mouse)
add_subdirectory(example/src/mouse-complex)
add_subdirectory(example/src/mouse-complex-buttons)
add_subdirectory(example/src/multiple-files)
add_subdirectory(example/src/multiple-windows)
add_subdirectory(example/src/multiple-windows-complex)
add_subdirectory(example/src/multiple-windows-complex-dynamic)
add_subdirectory(example/src/multiple-windows-complex-mouse)
add_subdirectory(example/src/nested-rows-columns)
add_subdirectory(example/src/on-image)
add_subdirectory(example/src/row-column)
add_subdirectory(example/src/sparkline)
add_subdirectory(example/src/trackbar)
add_subdirectory(example/src/trackbar-complex)
add_subdirectory(example/src/trackbar-sparkline)
add_subdirectory(example/src/ui-enhanced-canny)
add_subdirectory(example/src/ui-enhanced-window-component)
# Copy all data files
message(STATUS "Copying data files")
file(COPY ${CMAKE_SOURCE_DIR}/example/data/lena.jpg DESTINATION ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
file(COPY ${CMAKE_SOURCE_DIR}/example/data/lena-face.jpg DESTINATION ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
file(COPY ${CMAKE_SOURCE_DIR}/example/data/lena-face-gray.jpg DESTINATION ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
file(COPY ${CMAKE_SOURCE_DIR}/example/data/lena-face-red.jpg DESTINATION ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
file(COPY ${CMAKE_SOURCE_DIR}/example/data/fruits.jpg DESTINATION ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
file(COPY ${CMAKE_SOURCE_DIR}/example/data/sparkline.csv DESTINATION ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
message(STATUS "Copying data files - done")
# Copy python stuff if that was requested
if(ADD_PYTHON_EXAMPLES)
message(STATUS "Python examples will be added, e.g. cvui.py")
file(COPY ${CMAKE_SOURCE_DIR}/cvui.py DESTINATION ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
endif()