Skip to content

Commit

Permalink
Fixed CMakeLists.txt in examples (#686)
Browse files Browse the repository at this point in the history
Signed-off-by: ahcorde <[email protected]>
  • Loading branch information
ahcorde authored Jul 26, 2022
1 parent 626b100 commit d3a8e8c
Show file tree
Hide file tree
Showing 23 changed files with 75 additions and 16 deletions.
3 changes: 3 additions & 0 deletions examples/actor_animation/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
cmake_minimum_required(VERSION 3.10.2 FATAL_ERROR)
project(ignition-rendering-actor-animation)

find_package(ignition-rendering6 REQUIRED)
find_package(ignition-common4 REQUIRED)

include_directories(SYSTEM
${PROJECT_BINARY_DIR}
Expand Down Expand Up @@ -30,6 +32,7 @@ target_link_libraries(actor_animation
${GLUT_LIBRARIES}
${OPENGL_LIBRARIES}
${GLEW_LIBRARIES}
${IGNITION-COMMON_LIBRARIES}
${IGNITION-RENDERING_LIBRARIES}
)

Expand Down
3 changes: 3 additions & 0 deletions examples/boundingbox_camera/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
cmake_minimum_required(VERSION 3.10.2 FATAL_ERROR)
project(ignition-rendering-boundingbox-camera)

find_package(ignition-rendering6 REQUIRED)
find_package(ignition-common4 REQUIRED)

include_directories(SYSTEM
${PROJECT_BINARY_DIR}
Expand Down Expand Up @@ -30,6 +32,7 @@ target_link_libraries(boundingbox_camera
${GLUT_LIBRARIES}
${OPENGL_LIBRARIES}
${GLEW_LIBRARIES}
${IGNITION-COMMON_LIBRARIES}
${IGNITION-RENDERING_LIBRARIES}
)

Expand Down
3 changes: 3 additions & 0 deletions examples/camera_tracking/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
cmake_minimum_required(VERSION 3.10.2 FATAL_ERROR)
project(ignition-rendering-camera-tracking)

find_package(ignition-rendering6 REQUIRED)
find_package(ignition-common4 REQUIRED)

find_package(GLUT REQUIRED)
include_directories(SYSTEM ${GLUT_INCLUDE_DIRS})
Expand All @@ -24,5 +26,6 @@ target_link_libraries(camera_tracking
${GLUT_LIBRARIES}
${OPENGL_LIBRARIES}
${GLEW_LIBRARIES}
${IGNITION-COMMON_LIBRARIES}
${IGNITION-RENDERING_LIBRARIES}
)
3 changes: 3 additions & 0 deletions examples/custom_scene_viewer/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
cmake_minimum_required(VERSION 3.10.2 FATAL_ERROR)
project(ignition-rendering-custom-scene-viewer)

find_package(ignition-rendering6 REQUIRED)
find_package(ignition-common4 REQUIRED)

include_directories(SYSTEM
${PROJECT_BINARY_DIR}
Expand Down Expand Up @@ -39,6 +41,7 @@ target_link_libraries(custom_scene_viewer
${OPENGL_LIBRARIES}
${GLEW_LIBRARIES}
${IGNITION-RENDERING_LIBRARIES}
${IGNITION-COMMON_LIBRARIES}
)

add_custom_command(TARGET custom_scene_viewer POST_BUILD
Expand Down
4 changes: 3 additions & 1 deletion examples/custom_shaders_uniforms/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ include_directories(SYSTEM
${PROJECT_BINARY_DIR}
)

find_package(ignition-rendering6)
find_package(ignition-rendering6 REQUIRED)
find_package(ignition-common4 REQUIRED)

set(TARGET_THIRD_PARTY_DEPENDS "")

Expand Down Expand Up @@ -50,6 +51,7 @@ endif()
add_executable(custom_shaders_uniforms Main.cc GlutWindow.cc)

target_link_libraries(custom_shaders_uniforms
${IGNITION-COMMON_LIBRARIES}
${IGNITION-RENDERING_LIBRARIES}
${TARGET_THIRD_PARTY_DEPENDS}
)
Expand Down
3 changes: 3 additions & 0 deletions examples/depth_camera/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
cmake_minimum_required(VERSION 3.10.2 FATAL_ERROR)
project(ignition-rendering-depth-camera)

find_package(ignition-rendering6 REQUIRED)
find_package(ignition-common4 REQUIRED)

include_directories(SYSTEM
${PROJECT_BINARY_DIR}
Expand Down Expand Up @@ -30,6 +32,7 @@ target_link_libraries(depth_camera
${GLUT_LIBRARIES}
${OPENGL_LIBRARIES}
${GLEW_LIBRARIES}
${IGNITION-COMMON_LIBRARIES}
${IGNITION-RENDERING_LIBRARIES}
)

Expand Down
3 changes: 3 additions & 0 deletions examples/gazebo_scene_viewer/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
cmake_minimum_required(VERSION 3.10.2 FATAL_ERROR)
project(ignition-rendering-gazebo-scene-viewer)

find_package(ignition-rendering6 REQUIRED)
find_package(ignition-common4 REQUIRED)
find_package(gazebo REQUIRED)

include_directories(SYSTEM ${GAZEBO_INCLUDE_DIRS})
Expand Down Expand Up @@ -33,6 +35,7 @@ target_link_libraries(gazebo_scene_viewer
${OPENGL_LIBRARIES}
${GLEW_LIBRARIES}
${GAZEBO_LIBRARIES}
${IGNITION-COMMON_LIBRARIES}
${IGNITION-RENDERING_LIBRARIES}
${STD_CXX_FS_LIBRARIES}
)
Expand Down
3 changes: 3 additions & 0 deletions examples/heightmap/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
cmake_minimum_required(VERSION 3.10.2 FATAL_ERROR)
project(ignition-rendering-heightmap)

find_package(ignition-rendering6 REQUIRED)
find_package(ignition-common4 REQUIRED)

include_directories(SYSTEM
${PROJECT_BINARY_DIR}
Expand Down Expand Up @@ -30,6 +32,7 @@ target_link_libraries(heightmap
${GLUT_LIBRARIES}
${OPENGL_LIBRARIES}
${GLEW_LIBRARIES}
${IGNITION-COMMON_LIBRARIES}
${IGNITION-RENDERING_LIBRARIES}
)

Expand Down
5 changes: 4 additions & 1 deletion examples/lidar_visual/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
cmake_minimum_required(VERSION 3.10.2 FATAL_ERROR)
project(ignition-rendering-lidar_visual)

find_package(ignition-rendering6 REQUIRED)
find_package(ignition-common4 REQUIRED)

include_directories(SYSTEM
${PROJECT_BINARY_DIR}
Expand Down Expand Up @@ -30,5 +32,6 @@ target_link_libraries(lidar_visual
${GLUT_LIBRARIES}
${OPENGL_LIBRARIES}
${GLEW_LIBRARIES}
${IGNITION-COMMON_LIBRARIES}
${IGNITION-RENDERING_LIBRARIES}
)
)
3 changes: 3 additions & 0 deletions examples/mesh_viewer/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
cmake_minimum_required(VERSION 3.10.2 FATAL_ERROR)
project(ignition-rendering-mesh-viewer)

find_package(ignition-rendering6 REQUIRED)
find_package(ignition-common4 REQUIRED)

include_directories(SYSTEM
${PROJECT_BINARY_DIR}
Expand Down Expand Up @@ -30,6 +32,7 @@ target_link_libraries(mesh_viewer
${GLUT_LIBRARIES}
${OPENGL_LIBRARIES}
${GLEW_LIBRARIES}
${IGNITION-COMMON_LIBRARIES}
${IGNITION-RENDERING_LIBRARIES}
)

Expand Down
5 changes: 4 additions & 1 deletion examples/mouse_picking/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
cmake_minimum_required(VERSION 3.10.2 FATAL_ERROR)
project(ignition-rendering-mouse-picking)

find_package(ignition-rendering6 REQUIRED)
find_package(ignition-common4 REQUIRED)

include_directories(SYSTEM
${PROJECT_BINARY_DIR}
Expand Down Expand Up @@ -28,5 +30,6 @@ target_link_libraries(mouse_picking
${GLUT_LIBRARIES}
${OPENGL_LIBRARIES}
${GLEW_LIBRARIES}
${IGNITION-COMMON_LIBRARIES}
${IGNITION-RENDERING_LIBRARIES}
)
)
6 changes: 4 additions & 2 deletions examples/ogre2_demo/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
cmake_minimum_required(VERSION 3.5 FATAL_ERROR)
project(ignition-rendering-ogre2-demo)

find_package(ignition-rendering6)
find_package(ignition-rendering6 REQUIRED)
find_package(ignition-common4 REQUIRED)

include_directories(SYSTEM
${PROJECT_BINARY_DIR}
Expand Down Expand Up @@ -36,8 +37,9 @@ target_link_libraries(ogre2_demo
${GLUT_LIBRARIES}
${OPENGL_LIBRARIES}
${GLEW_LIBRARIES}
${IGNITION-COMMON_LIBRARIES}
${IGNITION-RENDERING_LIBRARIES}
)
)

add_custom_command(TARGET ogre2_demo POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_directory
Expand Down
3 changes: 3 additions & 0 deletions examples/particles_demo/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
cmake_minimum_required(VERSION 3.10.2 FATAL_ERROR)
project(ignition-rendering-particles-demo)

find_package(ignition-rendering6 REQUIRED)
find_package(ignition-common4 REQUIRED)

include_directories(SYSTEM
${PROJECT_BINARY_DIR}
Expand Down Expand Up @@ -30,6 +32,7 @@ target_link_libraries(particles_demo
${GLUT_LIBRARIES}
${OPENGL_LIBRARIES}
${GLEW_LIBRARIES}
${IGNITION-COMMON_LIBRARIES}
${IGNITION-RENDERING_LIBRARIES}
)

Expand Down
6 changes: 4 additions & 2 deletions examples/render_pass/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
cmake_minimum_required(VERSION 3.10.2 FATAL_ERROR)
project(ignition-rendering-render-pass)

find_package(ignition-rendering6)
find_package(ignition-rendering6 REQUIRED)
find_package(ignition-common4 REQUIRED)

find_package(GLUT REQUIRED)
include_directories(SYSTEM ${GLUT_INCLUDE_DIRS})
Expand All @@ -25,5 +26,6 @@ target_link_libraries(render_pass
${GLUT_LIBRARIES}
${OPENGL_LIBRARIES}
${GLEW_LIBRARIES}
${IGNITION-COMMON_LIBRARIES}
${IGNITION-RENDERING_LIBRARIES}
)
)
3 changes: 3 additions & 0 deletions examples/segmentation_camera/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
cmake_minimum_required(VERSION 3.10.2 FATAL_ERROR)
project(ignition-rendering-segmentation-camera)

find_package(ignition-rendering6 REQUIRED)
find_package(ignition-common4 REQUIRED)

include_directories(SYSTEM
${PROJECT_BINARY_DIR}
Expand Down Expand Up @@ -30,6 +32,7 @@ target_link_libraries(segmentation_camera
${GLUT_LIBRARIES}
${OPENGL_LIBRARIES}
${GLEW_LIBRARIES}
${IGNITION-COMMON_LIBRARIES}
${IGNITION-RENDERING_LIBRARIES}
)

Expand Down
6 changes: 4 additions & 2 deletions examples/simple_demo/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
cmake_minimum_required(VERSION 3.10.2 FATAL_ERROR)
project(ignition-rendering-simple-demo)

find_package(ignition-rendering6)
find_package(ignition-rendering6 REQUIRED)
find_package(ignition-common4 REQUIRED)

find_package(GLUT REQUIRED)
include_directories(SYSTEM ${GLUT_INCLUDE_DIRS})
Expand All @@ -25,5 +26,6 @@ target_link_libraries(simple_demo
${GLUT_LIBRARIES}
${OPENGL_LIBRARIES}
${GLEW_LIBRARIES}
${IGNITION-COMMON_LIBRARIES}
${IGNITION-RENDERING_LIBRARIES}
)
)
5 changes: 4 additions & 1 deletion examples/simple_demo_qml/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ set(IGN_CMAKE_VER ${ignition-cmake2_VERSION_MAJOR})

#------------------------------------------------------------------------
# Find ign-rendering
find_package(ignition-rendering6)
find_package(ignition-rendering6 REQUIRED)
find_package(ignition-common4 REQUIRED)

#======================================
# Find Qt
Expand Down Expand Up @@ -68,11 +69,13 @@ add_executable(simple_demo_qml

target_include_directories(simple_demo_qml PUBLIC
${IGNITION-RENDERING_INCLUDE_DIRS}
${IGNITION-COMMON_INCLUDE_DIRS}
${OGRE2_INCLUDE_DIRS}
${OpenGL_INCLUDE_DIRS}
)

target_link_libraries(simple_demo_qml PUBLIC
${IGNITION-COMMON_LIBRARIES}
${IGNITION-RENDERING_LIBRARIES}
${OGRE2_LIBRARIES}
${OPENGL_LIBRARIES}
Expand Down
7 changes: 4 additions & 3 deletions examples/text_geom/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
cmake_minimum_required(VERSION 3.10.2 FATAL_ERROR)
project(ignition-rendering-text-geom)

find_package(ignition-rendering6)
find_package(ignition-rendering6 REQUIRED)
find_package(ignition-common4 REQUIRED)

find_package(GLUT REQUIRED)
include_directories(SYSTEM ${GLUT_INCLUDE_DIRS})
Expand All @@ -25,6 +26,6 @@ target_link_libraries(text_geom
${GLUT_LIBRARIES}
${OPENGL_LIBRARIES}
${GLEW_LIBRARIES}
${IGNITION-COMMON_LIBRARIES}
${IGNITION-RENDERING_LIBRARIES}
)

)
3 changes: 3 additions & 0 deletions examples/thermal_camera/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
cmake_minimum_required(VERSION 3.10.2 FATAL_ERROR)
project(ignition-rendering-thermal-camera)

find_package(ignition-rendering6 REQUIRED)
find_package(ignition-common4 REQUIRED)

include_directories(SYSTEM
${PROJECT_BINARY_DIR}
Expand Down Expand Up @@ -30,6 +32,7 @@ target_link_libraries(thermal_camera
${GLUT_LIBRARIES}
${OPENGL_LIBRARIES}
${GLEW_LIBRARIES}
${IGNITION-COMMON_LIBRARIES}
${IGNITION-RENDERING_LIBRARIES}
)

Expand Down
3 changes: 3 additions & 0 deletions examples/transform_control/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
cmake_minimum_required(VERSION 3.10.2 FATAL_ERROR)
project(ignition-rendering-transform-control)

find_package(ignition-rendering6 REQUIRED)
find_package(ignition-common4 REQUIRED)

include_directories(SYSTEM
${PROJECT_BINARY_DIR}
Expand Down Expand Up @@ -28,5 +30,6 @@ target_link_libraries(transform_control
${GLUT_LIBRARIES}
${OPENGL_LIBRARIES}
${GLEW_LIBRARIES}
${IGNITION-COMMON_LIBRARIES}
${IGNITION-RENDERING_LIBRARIES}
)
3 changes: 3 additions & 0 deletions examples/view_control/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
cmake_minimum_required(VERSION 3.10.2 FATAL_ERROR)
project(ignition-rendering-view-control)

find_package(ignition-rendering6 REQUIRED)
find_package(ignition-common4 REQUIRED)

find_package(GLUT REQUIRED)
include_directories(SYSTEM ${GLUT_INCLUDE_DIRS})
Expand All @@ -24,5 +26,6 @@ target_link_libraries(view_control
${GLUT_LIBRARIES}
${OPENGL_LIBRARIES}
${GLEW_LIBRARIES}
${IGNITION-COMMON_LIBRARIES}
${IGNITION-RENDERING_LIBRARIES}
)
4 changes: 3 additions & 1 deletion examples/visualization_demo/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
cmake_minimum_required(VERSION 3.10.2 FATAL_ERROR)
project(ignition-rendering-visualization-demo)

find_package(ignition-rendering6)
find_package(ignition-rendering6 REQUIRED)
find_package(ignition-common4 REQUIRED)

if (APPLE OR UNIX)
find_package(GLUT REQUIRED)
Expand Down Expand Up @@ -43,6 +44,7 @@ endif()
add_executable(visualization_demo Main.cc GlutWindow.cc)

target_link_libraries(visualization_demo
${IGNITION-COMMON_LIBRARIES}
${IGNITION-RENDERING_LIBRARIES}
${TARGET_THIRD_PARTY_DEPENDS}
)
4 changes: 2 additions & 2 deletions examples/waves/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ include_directories(SYSTEM
${PROJECT_BINARY_DIR}
)

find_package(ignition-rendering6)
find_package(ignition-common4)
find_package(ignition-rendering6 REQUIRED)
find_package(ignition-common4 REQUIRED)

set(TARGET_THIRD_PARTY_DEPENDS "")

Expand Down

0 comments on commit d3a8e8c

Please sign in to comment.