Skip to content

Commit

Permalink
Include and link librealsense.
Browse files Browse the repository at this point in the history
  • Loading branch information
Filip Srajer committed Oct 12, 2016
1 parent 6fa4334 commit 4b0bbb6
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
11 changes: 11 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,18 @@ cmake_minimum_required(VERSION 2.6)

project(LoggerRealSense)

include(FindPackageHandleStandardArgs)
set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake)

find_package(RealSense REQUIRED)

include_directories(${REALSENSE_INCLUDE_DIR})

add_executable(LoggerRealSense main.cpp)

target_link_libraries(LoggerRealSense
${REALSENSE_LIBRARY}
)

install(TARGETS LoggerRealSense
DESTINATION bin)
9 changes: 9 additions & 0 deletions cmake/FindRealSense.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
set(REALSENSE_ROOT "/usr/local" CACHE PATH "Root directory of libREALSENSE")

find_path(REALSENSE_INCLUDE_DIR libREALSENSE HINTS "${REALSENSE_ROOT}/include")
find_library(REALSENSE_LIBRARY REALSENSE HINTS "${REALSENSE_ROOT}/bin/x64" "${REALSENSE_ROOT}/lib")

find_package_handle_standard_args(REALSENSE DEFAULT_MSG REALSENSE_LIBRARY REALSENSE_INCLUDE_DIR)

mark_as_advanced(REALSENSE_LIBRARY REALSENSE_INCLUDE_DIR)

0 comments on commit 4b0bbb6

Please sign in to comment.