diff --git a/wrappers/openni2/CMakeLists.txt b/wrappers/openni2/CMakeLists.txt index b63f60db1a..0eee84c244 100755 --- a/wrappers/openni2/CMakeLists.txt +++ b/wrappers/openni2/CMakeLists.txt @@ -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) diff --git a/wrappers/openni2/README.md b/wrappers/openni2/README.md index cf1523bcac..a82a240eca 100755 --- a/wrappers/openni2/README.md +++ b/wrappers/openni2/README.md @@ -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/ @@ -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. \ No newline at end of file +This project is licensed under the [Apache](https://github.com/IntelRealSense/librealsense/blob/master/LICENSE) License, Version 2.0. diff --git a/wrappers/openni2/src/Rs2Base.h b/wrappers/openni2/src/Rs2Base.h index 16edd545a3..ab14fbb26a 100755 --- a/wrappers/openni2/src/Rs2Base.h +++ b/wrappers/openni2/src/Rs2Base.h @@ -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 {