forked from stereolabs/zed-gstreamer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
62 lines (47 loc) · 1.14 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
################################################
## Generate symbols for IDE indexer (VSCode)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
# Default to C99
if(NOT CMAKE_C_STANDARD)
set(CMAKE_C_STANDARD 99)
endif()
# Default to C++14
if(NOT CMAKE_CXX_STANDARD)
set(CMAKE_CXX_STANDARD 14)
endif()
add_definitions(-Werror=return-type)
set(libname gstzedxonesrc)
add_subdirectory(lib)
set(SOURCES
gstzedxonesrc.cpp
)
set(HEADERS
gstzedxonesrc.h
)
link_directories(
${LIBRARY_INSTALL_DIR}
)
message( " * ${libname} plugin added")
add_library(${libname} MODULE
${SOURCES}
${HEADERS}
)
message(" ${libname}: OS Unix - L4T")
if (CMAKE_BUILD_TYPE EQUAL "DEBUG")
message(" ${libname}: Debug mode")
add_definitions(-g)
else()
message(" ${libname}: Release mode")
add_definitions(-O2)
endif()
add_dependencies (${libname} zedarguscapture)
target_link_libraries (
${libname} LINK_PUBLIC
${GLIB2_LIBRARIES}
${GOBJECT_LIBRARIES}
${GSTREAMER_LIBRARY}
${GSTREAMER_BASE_LIBRARY}
${GSTREAMER_VIDEO_LIBRARY}
${CMAKE_CURRENT_BINARY_DIR}/lib/libzedarguscapture.so
)
install(TARGETS ${libname} LIBRARY DESTINATION ${PLUGIN_INSTALL_DIR})