diff --git a/examples/depth_camera/CMakeLists.txt b/examples/depth_camera/CMakeLists.txt index a29651028..79d9a471c 100644 --- a/examples/depth_camera/CMakeLists.txt +++ b/examples/depth_camera/CMakeLists.txt @@ -20,7 +20,9 @@ if (NOT APPLE) link_directories(${GLEW_LIBRARY_DIRS}) endif() -set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-deprecated-declarations") +if(NOT WIN32) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-deprecated-declarations") +endif() configure_file (example_config.hh.in ${PROJECT_BINARY_DIR}/example_config.hh) diff --git a/examples/depth_camera/Main.cc b/examples/depth_camera/Main.cc index ac715ce5c..c461b5408 100644 --- a/examples/depth_camera/Main.cc +++ b/examples/depth_camera/Main.cc @@ -38,8 +38,13 @@ using namespace gz; using namespace rendering; +#if not defined(_WIN32) const std::string RESOURCE_PATH = common::joinPaths(std::string(PROJECT_BINARY_PATH), "media"); +#else +const std::string RESOURCE_PATH = + common::joinPaths(std::string(PROJECT_BINARY_PATH), "..", "media"); +#endif void buildScene(ScenePtr _scene) { diff --git a/tutorials/23_depth_camera_tutorial.md b/tutorials/23_depth_camera_tutorial.md index 40712202c..f4c7cb379 100644 --- a/tutorials/23_depth_camera_tutorial.md +++ b/tutorials/23_depth_camera_tutorial.md @@ -7,7 +7,11 @@ This example shows how to use the depth camera. In order to compile this tutorial, you need to install some prerequisites : ```bash +# Linux sudo apt-get install build-essential freeglut3-dev libglew-dev + +# Windows (via conda) +conda install glew --channel conda-forge ``` ## Compile and run the example @@ -20,13 +24,20 @@ cd gz-rendering/examples/depth_camera mkdir build cd build cmake .. -make +# On Linux +cmake --build . +# On Windows +cmake --build . --config Release ``` Execute the example: ```{.sh} +# Linux ./depth_camera ogre + +# Windows +.\Release\depth_camera.exe ogre ``` You'll see: