mirror of
https://github.com/moveit/moveit_task_constructor.git
synced 2025-11-04 14:49:57 +08:00
include OGRE headers via SYSTEM
This commit is contained in:
parent
0e40b464ec
commit
f95fcf17b4
@ -10,6 +10,17 @@ find_package(catkin REQUIRED COMPONENTS
|
||||
rviz
|
||||
)
|
||||
|
||||
# rviz transitively includes OGRE headers which break with `-Wall -Werror`
|
||||
# so isolate these include dirs and add them as SYSTEM include where needed.
|
||||
set(rviz_OGRE_INCLUDE_DIRS)
|
||||
foreach(header IN ITEMS OgreRoot.h OgreOverlay.h)
|
||||
find_path(include_dir ${header}
|
||||
HINTS ${catkin_INCLUDE_DIRS}
|
||||
NO_DEFAULT_PATH)
|
||||
list(REMOVE_ITEM catkin_INCLUDE_DIRS "${include_dir}")
|
||||
list(APPEND rviz_OGRE_INCLUDE_DIRS "${include_dir}")
|
||||
endforeach()
|
||||
|
||||
# definition needed for boost/math/constants/constants.hpp included by Ogre to compile
|
||||
add_definitions(-DBOOST_MATH_DISABLE_FLOAT128)
|
||||
|
||||
|
||||
@ -39,6 +39,9 @@ target_include_directories(${MOVEIT_LIB_NAME}
|
||||
PUBLIC $<TARGET_PROPERTY:moveit_task_visualization_tools,INTERFACE_INCLUDE_DIRECTORIES>
|
||||
PUBLIC ${catkin_INCLUDE_DIRS}
|
||||
)
|
||||
target_include_directories(${MOVEIT_LIB_NAME} SYSTEM
|
||||
PUBLIC ${rviz_OGRE_INCLUDE_DIRS}
|
||||
)
|
||||
|
||||
install(TARGETS ${MOVEIT_LIB_NAME}
|
||||
ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
|
||||
|
||||
@ -35,6 +35,9 @@ target_include_directories(${MOVEIT_LIB_NAME}
|
||||
PUBLIC include
|
||||
PRIVATE ${catkin_INCLUDE_DIRS}
|
||||
)
|
||||
target_include_directories(${MOVEIT_LIB_NAME} SYSTEM
|
||||
PUBLIC ${rviz_OGRE_INCLUDE_DIRS}
|
||||
)
|
||||
add_dependencies(${MOVEIT_LIB_NAME} ${catkin_EXPORTED_TARGETS})
|
||||
|
||||
install(DIRECTORY include/ DESTINATION ${CATKIN_GLOBAL_INCLUDE_DESTINATION})
|
||||
|
||||
Loading…
Reference in New Issue
Block a user