forked from realsenseai/librealsense
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtools_common.cmake
More file actions
27 lines (26 loc) · 1.27 KB
/
Copy pathtools_common.cmake
File metadata and controls
27 lines (26 loc) · 1.27 KB
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
# License: Apache 2.0. See LICENSE file in root directory.
# Copyright(c) 2026 RealSense, Inc. All Rights Reserved.
#
# Shared build configuration for graphical tool targets (realsense-viewer, rs-depth-quality, realsense-viewer-tests)
# Expects the caller to set RS_VIEWER_LIBS and (on Windows) LD_FLAGS_STR before calling this macro.
macro(tools_target_config _target)
# Link OpenGL (all platforms) and libdl (linux)
target_link_libraries(${_target} OpenGL::GL)
using_easyloggingpp(${_target} SHARED)
target_include_directories(${_target} PRIVATE ${CMAKE_SOURCE_DIR}/src)
if(WIN32)
target_sources(${_target} PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}/res/resource.h
${CMAKE_CURRENT_SOURCE_DIR}/res/realsense-app.rc)
set_target_properties(${_target} PROPERTIES LINK_FLAGS "/ignore:4199 ${LD_FLAGS_STR}")
else()
target_link_libraries(${_target} dl)
endif()
if(CHECK_FOR_UPDATES)
message( STATUS "Check for updates capability added to ${_target}" )
add_dependencies(${_target} libcurl)
set(RS_VIEWER_LIBS ${RS_VIEWER_LIBS} curl)
endif()
target_link_libraries(${_target} ${DEPENDENCIES} ${RS_VIEWER_LIBS} tclap)
set_target_properties(${_target} PROPERTIES CXX_STANDARD 11 FOLDER Tools)
endmacro()