Skip to content

Commit

Permalink
change usage of tclap in CMakes
Browse files Browse the repository at this point in the history
  • Loading branch information
maloel committed Nov 5, 2023
1 parent c54dc93 commit 00828ab
Show file tree
Hide file tree
Showing 21 changed files with 40 additions and 49 deletions.
4 changes: 2 additions & 2 deletions examples/callback/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ project(rs-callback)
if(BUILD_GRAPHICAL_EXAMPLES)
add_executable(${PROJECT_NAME} ${PROJECT_NAME}.cpp)
set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD 11)
target_link_libraries(${PROJECT_NAME} ${DEPENDENCIES})
include_directories(${PROJECT_NAME} ../ ../../third-party/tclap/include)
target_link_libraries( ${PROJECT_NAME} ${DEPENDENCIES} tclap )
include_directories(${PROJECT_NAME} ../ )
set_target_properties (${PROJECT_NAME} PROPERTIES FOLDER "Examples")

install(TARGETS ${PROJECT_NAME} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
Expand Down
4 changes: 2 additions & 2 deletions examples/capture/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ project(RealsenseExamplesCapture)
if(BUILD_GRAPHICAL_EXAMPLES)
add_executable(rs-capture rs-capture.cpp ../example.hpp)
set_property(TARGET rs-capture PROPERTY CXX_STANDARD 11)
target_link_libraries(rs-capture ${DEPENDENCIES})
include_directories(../ ../../third-party/tclap/include ../../examples)
target_link_libraries( rs-capture ${DEPENDENCIES} tclap )
include_directories(../ ../../examples)
set_target_properties (rs-capture PROPERTIES FOLDER "Examples")

install(TARGETS rs-capture RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
Expand Down
4 changes: 2 additions & 2 deletions examples/hdr/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ project(RealsenseExamplesHdr)
if(BUILD_GRAPHICAL_EXAMPLES)
add_executable(rs-hdr rs-hdr.cpp ../example.hpp ../../third-party/imgui/imgui.cpp ../../third-party/imgui/imgui_draw.cpp ../../third-party/imgui/imgui_impl_glfw.cpp)
set_property(TARGET rs-hdr PROPERTY CXX_STANDARD 11)
target_link_libraries(rs-hdr ${DEPENDENCIES})
include_directories(../ ../../third-party/tclap/include ../../third-party/imgui ../../third-party/glfw/include)
target_link_libraries( rs-hdr ${DEPENDENCIES} tclap )
include_directories(../ ../../third-party/imgui ../../third-party/glfw/include)
set_target_properties (rs-hdr PROPERTIES FOLDER "Examples")

install(TARGETS rs-hdr RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
Expand Down
4 changes: 2 additions & 2 deletions examples/post-processing/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ project(RealsenseExamplesPost-Processing)
if(BUILD_GRAPHICAL_EXAMPLES)
add_executable(rs-post-processing rs-post-processing.cpp ../example.hpp ../../third-party/imgui/imgui.cpp ../../third-party/imgui/imgui_draw.cpp ../../third-party/imgui/imgui_impl_glfw.cpp)
set_property(TARGET rs-post-processing PROPERTY CXX_STANDARD 11)
target_link_libraries(rs-post-processing ${DEPENDENCIES})
include_directories(../ ../../third-party/tclap/include ../../third-party/imgui)
target_link_libraries( rs-post-processing ${DEPENDENCIES} tclap )
include_directories(../ ../../third-party/imgui)
set_target_properties (rs-post-processing PROPERTIES FOLDER "Examples")
install(TARGETS rs-post-processing RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
endif()
4 changes: 2 additions & 2 deletions examples/record-playback/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ project(RealsenseExamplesRecord-Playback)
if(BUILD_GRAPHICAL_EXAMPLES)
add_executable(rs-record-playback rs-record-playback.cpp ../example.hpp ../../third-party/imgui/imgui.cpp ../../third-party/imgui/imgui_draw.cpp ../../third-party/imgui/imgui_impl_glfw.cpp)
set_property(TARGET rs-record-playback PROPERTY CXX_STANDARD 11)
target_link_libraries(rs-record-playback ${DEPENDENCIES})
include_directories(../ ../../third-party/tclap/include ../../third-party/imgui)
target_link_libraries( rs-record-playback ${DEPENDENCIES} tclap )
include_directories(../ ../../third-party/imgui)
set_target_properties (rs-record-playback PROPERTIES FOLDER "Examples")
install(TARGETS rs-record-playback RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
endif()
4 changes: 2 additions & 2 deletions examples/save-to-disk/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ project(RealsenseExamplesSaveToDisk)

add_executable(rs-save-to-disk rs-save-to-disk.cpp)
set_property(TARGET rs-save-to-disk PROPERTY CXX_STANDARD 11)
target_link_libraries(rs-save-to-disk ${DEPENDENCIES})
include_directories(../../common ../../third-party ../../third-party/tclap/include)
target_link_libraries( rs-save-to-disk ${DEPENDENCIES} tclap )
include_directories(../../common ../../third-party)
set_target_properties (rs-save-to-disk PROPERTIES FOLDER "Examples")
install(TARGETS rs-save-to-disk RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
4 changes: 2 additions & 2 deletions examples/software-device/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ set(CMAKE_EXPORT_COMPILE_COMMANDS 1)
if(BUILD_GRAPHICAL_EXAMPLES)
add_executable(rs-software-device rs-software-device.cpp)
set_property(TARGET rs-software-device PROPERTY CXX_STANDARD 11)
target_link_libraries(rs-software-device ${DEPENDENCIES})
include_directories(../ ../../third-party/tclap/include ../../third-party/ ../../common/res)
target_link_libraries( rs-software-device ${DEPENDENCIES} tclap )
include_directories(../ ../../third-party/ ../../common/res)
set_target_properties (rs-software-device PROPERTIES FOLDER "Examples")
install(TARGETS rs-software-device RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
endif()
4 changes: 2 additions & 2 deletions tools/benchmark/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ set(CMAKE_EXPORT_COMPILE_COMMANDS 1)
if(BUILD_GRAPHICAL_EXAMPLES)
add_executable(rs-benchmark rs-benchmark.cpp ../../third-party/glad/glad.c)
set_property(TARGET rs-benchmark PROPERTY CXX_STANDARD 11)
target_link_libraries(rs-benchmark ${DEPENDENCIES} realsense2-gl)
include_directories(../../third-party/tclap/include ../../third-party/glad ../../examples)
target_link_libraries( rs-benchmark ${DEPENDENCIES} realsense2-gl tclap )
include_directories( ../../third-party/glad ../../examples )
set_target_properties (rs-benchmark PROPERTIES
FOLDER Tools
)
Expand Down
4 changes: 2 additions & 2 deletions tools/convert/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ add_executable(${RS_TARGET} rs-convert.cpp
converters/converter-raw.hpp
)
set_property(TARGET ${RS_TARGET} PROPERTY CXX_STANDARD 11)
target_link_libraries(${RS_TARGET} ${DEPENDENCIES} Threads::Threads)
include_directories(../../common ../../third-party ../../third-party/tclap/include)
target_link_libraries( ${RS_TARGET} ${DEPENDENCIES} Threads::Threads tclap )
include_directories(../../common ../../third-party)

set_target_properties (${RS_TARGET} PROPERTIES
FOLDER "Tools"
Expand Down
4 changes: 2 additions & 2 deletions tools/data-collect/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ project(RealsenseToolsDataCollect)

add_executable(rs-data-collect rs-data-collect.h rs-data-collect.cpp)
set_property(TARGET rs-data-collect PROPERTY CXX_STANDARD 11)
target_link_libraries(rs-data-collect ${DEPENDENCIES})
include_directories(../../common ../../third-party/tclap/include)
target_link_libraries( rs-data-collect ${DEPENDENCIES} tclap )
include_directories(../../common)
set_target_properties (rs-data-collect PROPERTIES
FOLDER "Tools"
)
Expand Down
5 changes: 1 addition & 4 deletions tools/dds/dds-adapter/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,7 @@ set(TOOL_FILES
)

add_executable( ${PROJECT_NAME} ${TOOL_FILES} )
target_include_directories( ${PROJECT_NAME} PRIVATE
${REPO_ROOT}/third-party/tclap/include
)
target_link_libraries( ${PROJECT_NAME} PRIVATE realdds realsense2 )
target_link_libraries( ${PROJECT_NAME} PRIVATE realdds realsense2 tclap )
set_target_properties (${PROJECT_NAME} PROPERTIES
FOLDER Tools/dds
CXX_STANDARD 14
Expand Down
5 changes: 1 addition & 4 deletions tools/dds/dds-sniffer/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,7 @@ set(SRC rs-dds-sniffer.cpp)
set(INC rs-dds-sniffer.h)

add_executable(${PROJECT_NAME} ${INC} ${SRC})
target_link_libraries(${PROJECT_NAME} PRIVATE realdds )
target_include_directories( ${PROJECT_NAME}
PRIVATE ${REPO_ROOT}/third-party/tclap/include
)
target_link_libraries(${PROJECT_NAME} PRIVATE realdds tclap )
set_target_properties (${PROJECT_NAME} PROPERTIES
FOLDER Tools/dds
CXX_STANDARD 11
Expand Down
7 changes: 3 additions & 4 deletions tools/depth-quality/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ if(BUILD_GRAPHICAL_EXAMPLES)
include_directories(../../common ../../third-party
../../third-party/imgui
../../third-party/glad
../../third-party/tclap/include
../../third-party/tinyfiledialogs
${CMAKE_CURRENT_SOURCE_DIR}/res/)

Expand All @@ -95,8 +94,7 @@ if(BUILD_GRAPHICAL_EXAMPLES)
include_directories(../../common ../../third-party
../../third-party/imgui
../../third-party/glad
../../third-party/tinyfiledialogs
../../third-party/tclap/include)
../../third-party/tinyfiledialogs )
endif()

source_group("SW-Update" FILES ${SW_UPDATE_FILES})
Expand All @@ -110,7 +108,8 @@ if(BUILD_GRAPHICAL_EXAMPLES)
target_link_libraries(${PROJECT_NAME} ${DEPENDENCIES}
${GTK3_LIBRARIES}
Threads::Threads
realsense2-gl)
realsense2-gl
tclap )

if (IMPORT_DEPTH_CAM_FW)
add_definitions(-DINTERNAL_FW)
Expand Down
3 changes: 2 additions & 1 deletion tools/embed/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ add_executable(rs-embed

set_property(TARGET rs-embed PROPERTY CXX_STANDARD 11)

include_directories(rs-embed ${LZ4_DIR} ../../third-party ../../third-party/tclap/include)
include_directories(rs-embed ${LZ4_DIR} ../../third-party)
target_link_libraries( rs-embed PRIVATE tclap )
set_target_properties (rs-embed PROPERTIES FOLDER Tools)


Expand Down
3 changes: 1 addition & 2 deletions tools/enumerate-devices/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ project(RealsenseExamplesEnumerateDevices)

add_executable(rs-enumerate-devices rs-enumerate-devices.cpp)
set_property(TARGET rs-enumerate-devices PROPERTY CXX_STANDARD 11)
target_link_libraries(rs-enumerate-devices ${DEPENDENCIES})
include_directories(../../third-party/tclap/include)
target_link_libraries( rs-enumerate-devices ${DEPENDENCIES} tclap )
set_target_properties (rs-enumerate-devices PROPERTIES
FOLDER Tools
)
Expand Down
6 changes: 3 additions & 3 deletions tools/fw-logger/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ project(RealsenseToolsFirmwareLogger)
add_executable(rs-fw-logger rs-fw-logger.cpp)
set_property(TARGET rs-fw-logger PROPERTY CXX_STANDARD 11)
if(WIN32 OR ANDROID)
target_link_libraries(rs-fw-logger ${DEPENDENCIES})
target_link_libraries(rs-fw-logger ${DEPENDENCIES} tclap )
else()
target_link_libraries(rs-fw-logger -lpthread ${DEPENDENCIES})
target_link_libraries(rs-fw-logger -lpthread ${DEPENDENCIES} tclap )
endif()
include_directories(../../common ../../third-party/tclap/include cpp-fw-logger-helpers)
include_directories(../../common cpp-fw-logger-helpers)
set_target_properties (rs-fw-logger PROPERTIES
FOLDER Tools
)
Expand Down
4 changes: 2 additions & 2 deletions tools/fw-update/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ project(rs-fw-update)

add_executable(${PROJECT_NAME} rs-fw-update.cpp)
set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD 11)
target_link_libraries(${PROJECT_NAME} ${DEPENDENCIES})
include_directories(../../third-party/tclap/include ${CMAKE_BINARY_DIR})
target_link_libraries(${PROJECT_NAME} ${DEPENDENCIES} tclap)
include_directories(${CMAKE_BINARY_DIR})
set_target_properties (${PROJECT_NAME} PROPERTIES FOLDER Tools)

install(TARGETS ${PROJECT_NAME} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
3 changes: 1 addition & 2 deletions tools/realsense-viewer/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,6 @@ include_directories(
../../common
../../third-party
../../third-party/tinyfiledialogs
../../third-party/tclap/include
${GLFW_SOURCE_DIR}/include
../../third-party/imgui
../../third-party/glad
Expand All @@ -241,7 +240,7 @@ if (IMPORT_DEPTH_CAM_FW)
target_link_libraries(${PROJECT_NAME} fw)
endif()

target_link_libraries(${PROJECT_NAME} ${DEPENDENCIES} ${RS_VIEWER_LIBS})
target_link_libraries( ${PROJECT_NAME} ${DEPENDENCIES} ${RS_VIEWER_LIBS} tclap )

set_target_properties (${PROJECT_NAME} PROPERTIES
FOLDER Tools
Expand Down
4 changes: 2 additions & 2 deletions tools/recorder/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ project(RealsenseToolsRecorder)

add_executable(rs-record rs-record.cpp)
set_property(TARGET rs-record PROPERTY CXX_STANDARD 11)
target_link_libraries(rs-record ${DEPENDENCIES})
include_directories(../../common ../../third-party/tclap/include)
target_link_libraries( rs-record ${DEPENDENCIES} tclap )
include_directories(../../common)
set_target_properties (rs-record PROPERTIES
FOLDER "Tools"
)
Expand Down
5 changes: 2 additions & 3 deletions tools/terminal/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ project(RealsenseToolsTerminal)
include_directories(
../../common
../../third-party
../../third-party/tclap/include
)
set(RS_TERMINAL_SOURCES
rs-terminal.cpp
Expand All @@ -18,9 +17,9 @@ set(RS_TERMINAL_SOURCES
add_executable(rs-terminal ${RS_TERMINAL_SOURCES})
set_property(TARGET rs-terminal PROPERTY CXX_STANDARD 11)
if(WIN32 OR ANDROID)
target_link_libraries(rs-terminal ${DEPENDENCIES})
target_link_libraries(rs-terminal ${DEPENDENCIES} tclap )
else()
target_link_libraries(rs-terminal -lpthread ${DEPENDENCIES})
target_link_libraries(rs-terminal -lpthread ${DEPENDENCIES} tclap )
endif()
set_target_properties (rs-terminal PROPERTIES
FOLDER Tools
Expand Down
4 changes: 2 additions & 2 deletions wrappers/pointcloud/pointcloud-stitching/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ list(APPEND DEPENDENCIES glfw)

add_executable(rs-pointcloud-stitching rs-pointcloud-stitching.cpp rs-pointcloud-stitching.h ../../../examples/example.hpp ../../../third-party/imgui/imgui.cpp ../../../third-party/imgui/imgui_draw.cpp ../../../third-party/imgui/imgui_impl_glfw.cpp)
set_property(TARGET rs-pointcloud-stitching PROPERTY CXX_STANDARD 11)
target_link_libraries(rs-pointcloud-stitching ${DEPENDENCIES} )
include_directories(./ ../../../examples ../../../third-party/tclap/include ../../../third-party/ ../../../third-party/imgui ../../../third-party/glfw/include ../../../common/res)
target_link_libraries( rs-pointcloud-stitching ${DEPENDENCIES} tclap )
include_directories(./ ../../../examples ../../../third-party/ ../../../third-party/imgui ../../../third-party/glfw/include ../../../common/res)
set_target_properties (rs-pointcloud-stitching PROPERTIES FOLDER "Examples")
install(TARGETS rs-pointcloud-stitching RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})

0 comments on commit 00828ab

Please sign in to comment.