Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Openni2 build failed on linux (update to C99 standard) #2651

Merged
merged 4 commits into from
Nov 7, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion wrappers/openni2/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,12 @@ set(OPENNI2_DIR "c:/Program Files/OpenNI2" CACHE FILEPATH "OpenNI2 SDK directory
set(REALSENSE2_DIR "c:/Program Files (x86)/Intel RealSense SDK 2.0" CACHE FILEPATH "RealSense2 SDK directory")

# INCLUDE DIR
include_directories (${OPENNI2_DIR}/Include)
if (UNIX)
include_directories (${OPENNI2_DIR})
else ()
include_directories (${OPENNI2_DIR}/Include)
endif ()

include_directories (${REALSENSE2_DIR}/include)
include_directories (src)

Expand Down
7 changes: 4 additions & 3 deletions wrappers/openni2/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,13 @@ Download [OpenNI2 SDK](https://structure.io/openni)
Download [RealSense2 SDK](https://github.com/IntelRealSense/librealsense/releases)

Run CMake on driver and configure SDK's:
* OPENNI2_DIR
* OPENNI2_DIR (For linux, the path may be "/usr/include/openni2")
* REALSENSE2_DIR

Generate project files and compile driver

Copy rs2driver.dll and realsense2.dll to OPENNI2_DIR/Samples/Bin/OpenNI2/Drivers/
For Windows, copy rs2driver.dll and realsense2.dll to OPENNI2_DIR/Samples/Bin/OpenNI2/Drivers/
For Linux, copy librs2driver.so and librealsense2.so to OPENNI2_DIR/Samples/Bin/OpenNI2/Drivers/

Launch any OpenNI2 example (SimpleRead SimpleViewer NiViewer) located at OPENNI2_DIR/Samples/Bin/

Expand All @@ -42,4 +43,4 @@ _Picture:_ _Configuring_ _capture_

## License

This project is licensed under the [Apache](https://github.com/IntelRealSense/librealsense/blob/master/LICENSE) License, Version 2.0.
This project is licensed under the [Apache](https://github.com/IntelRealSense/librealsense/blob/master/LICENSE) License, Version 2.0.
6 changes: 3 additions & 3 deletions wrappers/openni2/src/Rs2Base.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@
#define RS2_ASSERT assert
#endif

#define rsTraceError(format, ...) printf("[RS2] ERROR at FILE %s LINE %d FUNC %s\n\t" format "\n", __FILE__, __LINE__, __FUNCTION__, __VA_ARGS__)
#define rsTraceFunc(format, ...) printf("[RS2] " __FUNCTION__ " " format "\n", __VA_ARGS__)
#define rsLogDebug(format, ...) printf("[RS2] " format "\n", __VA_ARGS__)
#define rsTraceError(format, ...) printf("[RS2] ERROR at FILE %s LINE %d FUNC %s\n\t" format "\n", __FILE__, __LINE__, __FUNCTION__, ## __VA_ARGS__)
#define rsTraceFunc(format, ...) printf("[RS2] %s " format "\n", __FUNCTION__, ## __VA_ARGS__)
#define rsLogDebug(format, ...) printf("[RS2] " format "\n", ## __VA_ARGS__)

namespace oni { namespace driver {

Expand Down