forked from brainflow-dev/brainflow
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.cmake
52 lines (46 loc) · 1.7 KB
/
build.cmake
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
if (CMAKE_SIZEOF_VOID_P EQUAL 8)
SET (BRAINFLOW_CPP_BINDING_NAME "Brainflow")
else (CMAKE_SIZEOF_VOID_P EQUAL 8)
if (APPLE)
SET (BRAINFLOW_CPP_BINDING_NAME "Brainflow")
elseif (UNIX)
SET (BRAINFLOW_CPP_BINDING_NAME "Brainflow")
else ()
SET (BRAINFLOW_CPP_BINDING_NAME "Brainflow32")
endif (APPLE)
endif (CMAKE_SIZEOF_VOID_P EQUAL 8)
SET (CPP_BINDING_SRC
${CMAKE_CURRENT_SOURCE_DIR}/cpp_package/src/board_shim.cpp
${CMAKE_CURRENT_SOURCE_DIR}/cpp_package/src/ml_model.cpp
${CMAKE_CURRENT_SOURCE_DIR}/cpp_package/src/data_filter.cpp
)
add_library (
${BRAINFLOW_CPP_BINDING_NAME} STATIC ${CPP_BINDING_SRC}
)
target_include_directories (
${BRAINFLOW_CPP_BINDING_NAME} PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}/src/board_controller/inc
${CMAKE_CURRENT_SOURCE_DIR}/src/utils/inc
${CMAKE_CURRENT_SOURCE_DIR}/src/data_handler/inc
${CMAKE_CURRENT_SOURCE_DIR}/cpp_package/src/inc
${CMAKE_CURRENT_SOURCE_DIR}/third_party/json
${CMAKE_CURRENT_SOURCE_DIR}/src/ml/inc
)
target_link_libraries (${BRAINFLOW_CPP_BINDING_NAME} PRIVATE ${BOARD_CONTROLLER_NAME} ${DATA_HANDLER_NAME} ${ML_MODULE_NAME})
install (
FILES
${CMAKE_CURRENT_SOURCE_DIR}/cpp_package/src/inc/data_filter.h
${CMAKE_CURRENT_SOURCE_DIR}/cpp_package/src/inc/board_shim.h
${CMAKE_CURRENT_SOURCE_DIR}/cpp_package/src/inc/ml_model.h
${CMAKE_CURRENT_SOURCE_DIR}/src/utils/inc/brainflow_array.h
${CMAKE_CURRENT_SOURCE_DIR}/src/utils/inc/brainflow_exception.h
DESTINATION inc
)
install (
TARGETS ${BRAINFLOW_CPP_BINDING_NAME}
EXPORT ${TARGETS_EXPORT_NAME}
RUNTIME DESTINATION lib
LIBRARY DESTINATION lib
INCLUDES DESTINATION inc
ARCHIVE DESTINATION lib
)