vehicle_managerConfig.cmake 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223
  1. # generated from catkin/cmake/template/pkgConfig.cmake.in
  2. # append elements to a list and remove existing duplicates from the list
  3. # copied from catkin/cmake/list_append_deduplicate.cmake to keep pkgConfig
  4. # self contained
  5. macro(_list_append_deduplicate listname)
  6. if(NOT "${ARGN}" STREQUAL "")
  7. if(${listname})
  8. list(REMOVE_ITEM ${listname} ${ARGN})
  9. endif()
  10. list(APPEND ${listname} ${ARGN})
  11. endif()
  12. endmacro()
  13. # append elements to a list if they are not already in the list
  14. # copied from catkin/cmake/list_append_unique.cmake to keep pkgConfig
  15. # self contained
  16. macro(_list_append_unique listname)
  17. foreach(_item ${ARGN})
  18. list(FIND ${listname} ${_item} _index)
  19. if(_index EQUAL -1)
  20. list(APPEND ${listname} ${_item})
  21. endif()
  22. endforeach()
  23. endmacro()
  24. # pack a list of libraries with optional build configuration keywords
  25. # copied from catkin/cmake/catkin_libraries.cmake to keep pkgConfig
  26. # self contained
  27. macro(_pack_libraries_with_build_configuration VAR)
  28. set(${VAR} "")
  29. set(_argn ${ARGN})
  30. list(LENGTH _argn _count)
  31. set(_index 0)
  32. while(${_index} LESS ${_count})
  33. list(GET _argn ${_index} lib)
  34. if("${lib}" MATCHES "^(debug|optimized|general)$")
  35. math(EXPR _index "${_index} + 1")
  36. if(${_index} EQUAL ${_count})
  37. message(FATAL_ERROR "_pack_libraries_with_build_configuration() the list of libraries '${ARGN}' ends with '${lib}' which is a build configuration keyword and must be followed by a library")
  38. endif()
  39. list(GET _argn ${_index} library)
  40. list(APPEND ${VAR} "${lib}${CATKIN_BUILD_CONFIGURATION_KEYWORD_SEPARATOR}${library}")
  41. else()
  42. list(APPEND ${VAR} "${lib}")
  43. endif()
  44. math(EXPR _index "${_index} + 1")
  45. endwhile()
  46. endmacro()
  47. # unpack a list of libraries with optional build configuration keyword prefixes
  48. # copied from catkin/cmake/catkin_libraries.cmake to keep pkgConfig
  49. # self contained
  50. macro(_unpack_libraries_with_build_configuration VAR)
  51. set(${VAR} "")
  52. foreach(lib ${ARGN})
  53. string(REGEX REPLACE "^(debug|optimized|general)${CATKIN_BUILD_CONFIGURATION_KEYWORD_SEPARATOR}(.+)$" "\\1;\\2" lib "${lib}")
  54. list(APPEND ${VAR} "${lib}")
  55. endforeach()
  56. endmacro()
  57. if(vehicle_manager_CONFIG_INCLUDED)
  58. return()
  59. endif()
  60. set(vehicle_manager_CONFIG_INCLUDED TRUE)
  61. # set variables for source/devel/install prefixes
  62. if("FALSE" STREQUAL "TRUE")
  63. set(vehicle_manager_SOURCE_PREFIX /home/neousys/Desktop/vehicle_manager/src)
  64. set(vehicle_manager_DEVEL_PREFIX /home/neousys/Desktop/vehicle_manager/devel)
  65. set(vehicle_manager_INSTALL_PREFIX "")
  66. set(vehicle_manager_PREFIX ${vehicle_manager_DEVEL_PREFIX})
  67. else()
  68. set(vehicle_manager_SOURCE_PREFIX "")
  69. set(vehicle_manager_DEVEL_PREFIX "")
  70. set(vehicle_manager_INSTALL_PREFIX /home/neousys/Desktop/vehicle_manager/install)
  71. set(vehicle_manager_PREFIX ${vehicle_manager_INSTALL_PREFIX})
  72. endif()
  73. # warn when using a deprecated package
  74. if(NOT "" STREQUAL "")
  75. set(_msg "WARNING: package 'vehicle_manager' is deprecated")
  76. # append custom deprecation text if available
  77. if(NOT "" STREQUAL "TRUE")
  78. set(_msg "${_msg} ()")
  79. endif()
  80. message("${_msg}")
  81. endif()
  82. # flag project as catkin-based to distinguish if a find_package()-ed project is a catkin project
  83. set(vehicle_manager_FOUND_CATKIN_PROJECT TRUE)
  84. if(NOT "include " STREQUAL " ")
  85. set(vehicle_manager_INCLUDE_DIRS "")
  86. set(_include_dirs "include")
  87. if(NOT " " STREQUAL " ")
  88. set(_report "Check the issue tracker '' and consider creating a ticket if the problem has not been reported yet.")
  89. elseif(NOT " " STREQUAL " ")
  90. set(_report "Check the website '' for information and consider reporting the problem.")
  91. else()
  92. set(_report "Report the problem to the maintainer 'neousys <neousys@todo.todo>' and request to fix the problem.")
  93. endif()
  94. foreach(idir ${_include_dirs})
  95. if(IS_ABSOLUTE ${idir} AND IS_DIRECTORY ${idir})
  96. set(include ${idir})
  97. elseif("${idir} " STREQUAL "include ")
  98. get_filename_component(include "${vehicle_manager_DIR}/../../../include" ABSOLUTE)
  99. if(NOT IS_DIRECTORY ${include})
  100. message(FATAL_ERROR "Project 'vehicle_manager' specifies '${idir}' as an include dir, which is not found. It does not exist in '${include}'. ${_report}")
  101. endif()
  102. else()
  103. message(FATAL_ERROR "Project 'vehicle_manager' specifies '${idir}' as an include dir, which is not found. It does neither exist as an absolute directory nor in '\${prefix}/${idir}'. ${_report}")
  104. endif()
  105. _list_append_unique(vehicle_manager_INCLUDE_DIRS ${include})
  106. endforeach()
  107. endif()
  108. set(libraries "vehicle_manager")
  109. foreach(library ${libraries})
  110. # keep build configuration keywords, target names and absolute libraries as-is
  111. if("${library}" MATCHES "^(debug|optimized|general)$")
  112. list(APPEND vehicle_manager_LIBRARIES ${library})
  113. elseif(${library} MATCHES "^-l")
  114. list(APPEND vehicle_manager_LIBRARIES ${library})
  115. elseif(${library} MATCHES "^-")
  116. # This is a linker flag/option (like -pthread)
  117. # There's no standard variable for these, so create an interface library to hold it
  118. if(NOT vehicle_manager_NUM_DUMMY_TARGETS)
  119. set(vehicle_manager_NUM_DUMMY_TARGETS 0)
  120. endif()
  121. # Make sure the target name is unique
  122. set(interface_target_name "catkin::vehicle_manager::wrapped-linker-option${vehicle_manager_NUM_DUMMY_TARGETS}")
  123. while(TARGET "${interface_target_name}")
  124. math(EXPR vehicle_manager_NUM_DUMMY_TARGETS "${vehicle_manager_NUM_DUMMY_TARGETS}+1")
  125. set(interface_target_name "catkin::vehicle_manager::wrapped-linker-option${vehicle_manager_NUM_DUMMY_TARGETS}")
  126. endwhile()
  127. add_library("${interface_target_name}" INTERFACE IMPORTED)
  128. if("${CMAKE_VERSION}" VERSION_LESS "3.13.0")
  129. set_property(
  130. TARGET
  131. "${interface_target_name}"
  132. APPEND PROPERTY
  133. INTERFACE_LINK_LIBRARIES "${library}")
  134. else()
  135. target_link_options("${interface_target_name}" INTERFACE "${library}")
  136. endif()
  137. list(APPEND vehicle_manager_LIBRARIES "${interface_target_name}")
  138. elseif(TARGET ${library})
  139. list(APPEND vehicle_manager_LIBRARIES ${library})
  140. elseif(IS_ABSOLUTE ${library})
  141. list(APPEND vehicle_manager_LIBRARIES ${library})
  142. else()
  143. set(lib_path "")
  144. set(lib "${library}-NOTFOUND")
  145. # since the path where the library is found is returned we have to iterate over the paths manually
  146. foreach(path /home/neousys/Desktop/vehicle_manager/install/lib;/home/neousys/Desktop/vehicle_manager/devel/lib;/home/neousys/Desktop/tf_trans_map_base_link/devel/lib;/home/neousys/ros_vehicle/vehicle_manager/devel/lib;/home/neousys/ros_vehicle/vehicle_driver/devel/lib;/home/neousys/ros_vehicle/vehicle_control/devel/lib;/home/neousys/ros_vehicle/vehicle_msg/devel/lib;/home/neousys/ros_drive/catkin_ws_sensor/devel/lib;/home/neousys/ros_drive/catkin_ws_control/devel/lib;/home/neousys/ros_drive/catkin_ws_msg/devel/lib;/home/neousys/autoware.ai/install/ymc/lib;/home/neousys/autoware.ai/install/xsens_driver/lib;/home/neousys/autoware.ai/install/wf_simulator/lib;/home/neousys/autoware.ai/install/lattice_planner/lib;/home/neousys/autoware.ai/install/waypoint_planner/lib;/home/neousys/autoware.ai/install/waypoint_maker/lib;/home/neousys/autoware.ai/install/way_planner/lib;/home/neousys/autoware.ai/install/vlg22c_cam/lib;/home/neousys/autoware.ai/install/vision_ssd_detect/lib;/home/neousys/autoware.ai/install/vision_segment_enet_detect/lib;/home/neousys/autoware.ai/install/vision_lane_detect/lib;/home/neousys/autoware.ai/install/vision_darknet_detect/lib;/home/neousys/autoware.ai/install/vision_beyond_track/lib;/home/neousys/autoware.ai/install/vel_pose_diff_checker/lib;/home/neousys/autoware.ai/install/vehicle_socket/lib;/home/neousys/autoware.ai/install/vehicle_sim_model/lib;/home/neousys/autoware.ai/install/vehicle_model/lib;/home/neousys/autoware.ai/install/vehicle_gazebo_simulation_launcher/lib;/home/neousys/autoware.ai/install/vehicle_gazebo_simulation_interface/lib;/home/neousys/autoware.ai/install/vehicle_engage_panel/lib;/home/neousys/autoware.ai/install/vehicle_description/lib;/home/neousys/autoware.ai/install/trafficlight_recognizer/lib;/home/neousys/autoware.ai/install/op_utilities/lib;/home/neousys/autoware.ai/install/op_simulation_package/lib;/home/neousys/autoware.ai/install/op_local_planner/lib;/home/neousys/autoware.ai/install/op_global_planner/lib;/home/neousys/autoware.ai/install/lidar_kf_contour_track/lib;/home/neousys/autoware.ai/install/op_ros_helpers/lib;/home/neousys/autoware.ai/install/ff_waypoint_follower/lib;/home/neousys/autoware.ai/install/dp_planner/lib;/home/neousys/autoware.ai/install/op_simu/lib;/home/neousys/autoware.ai/install/op_planner/lib;/home/neousys/autoware.ai/install/op_utility/lib;/home/neousys/autoware.ai/install/lidar_euclidean_cluster_detect/lib;/home/neousys/autoware.ai/install/vector_map_server/lib;/home/neousys/autoware.ai/install/road_occupancy_processor/lib;/home/neousys/autoware.ai/install/costmap_generator/lib;/home/neousys/autoware.ai/install/object_map/lib;/home/neousys/autoware.ai/install/naive_motion_predict/lib;/home/neousys/autoware.ai/install/lanelet_aisan_converter/lib;/home/neousys/autoware.ai/install/map_file/lib;/home/neousys/autoware.ai/install/libvectormap/lib;/home/neousys/autoware.ai/install/lane_planner/lib;/home/neousys/autoware.ai/install/imm_ukf_pda_track/lib;/home/neousys/autoware.ai/install/decision_maker/lib;/home/neousys/autoware.ai/install/vector_map/lib;/home/neousys/autoware.ai/install/vector_map_msgs/lib;/home/neousys/autoware.ai/install/vectacam/lib;/home/neousys/autoware.ai/install/udon_socket/lib;/home/neousys/autoware.ai/install/twist_generator/lib;/home/neousys/autoware.ai/install/twist_gate/lib;/home/neousys/autoware.ai/install/twist_filter/lib;/home/neousys/autoware.ai/install/twist2odom/lib;/home/neousys/autoware.ai/install/tablet_socket/lib;/home/neousys/autoware.ai/install/runtime_manager/lib;/home/neousys/autoware.ai/install/mqtt_socket/lib;/home/neousys/autoware.ai/install/tablet_socket_msgs/lib;/home/neousys/autoware.ai/install/state_machine_lib/lib;/home/neousys/autoware.ai/install/sound_player/lib;/home/neousys/autoware.ai/install/sick_lms5xx/lib;/home/neousys/autoware.ai/install/sick_ldmrs_tools/lib;/home/neousys/autoware.ai/install/sick_ldmrs_driver/lib;/home/neousys/autoware.ai/install/sick_ldmrs_msgs/lib;/home/neousys/autoware.ai/install/sick_ldmrs_description/lib;/home/neousys/autoware.ai/install/points2image/lib;/home/neousys/autoware.ai/install/rosinterface/lib;/home/neousys/autoware.ai/install/rosbag_controller/lib;/home/neousys/autoware.ai/install/pure_pursuit/lib;/home/neousys/autoware.ai/install/points_preprocessor/lib;/home/neousys/autoware.ai/install/mpc_follower/lib;/home/neousys/autoware.ai/install/lidar_localizer/lib;/home/neousys/autoware.ai/install/emergency_handler/lib;/home/neousys/autoware.ai/install/autoware_health_checker/lib;/home/neousys/autoware.ai/install/as/lib;/home/neousys/autoware.ai/install/ros_observer/lib;/home/neousys/autoware.ai/install/roi_object_filter/lib;/home/neousys/autoware.ai/install/range_vision_fusion/lib;/home/neousys/autoware.ai/install/pos_db/lib;/home/neousys/autoware.ai/install/points_downsampler/lib;/home/neousys/autoware.ai/install/pixel_cloud_fusion/lib;/home/neousys/autoware.ai/install/pcl_omp_registration/lib;/home/neousys/autoware.ai/install/pc2_downsampler/lib;/home/neousys/autoware.ai/install/oculus_socket/lib;/home/neousys/autoware.ai/install/obj_db/lib;/home/neousys/autoware.ai/install/nmea_navsat/lib;/home/neousys/autoware.ai/install/ndt_tku/lib;/home/neousys/autoware.ai/install/ndt_gpu/lib;/home/neousys/autoware.ai/install/ndt_cpu/lib;/home/neousys/autoware.ai/install/multi_lidar_calibrator/lib;/home/neousys/autoware.ai/install/microstrain_driver/lib;/home/neousys/autoware.ai/install/memsic_imu/lib;/home/neousys/autoware.ai/install/marker_downsampler/lib;/home/neousys/autoware.ai/install/map_tools/lib;/home/neousys/autoware.ai/install/map_tf_generator/lib;/home/neousys/autoware.ai/install/log_tools/lib;/home/neousys/autoware.ai/install/lidar_shape_estimation/lib;/home/neousys/autoware.ai/install/lidar_point_pillars/lib;/home/neousys/autoware.ai/install/lidar_naive_l_shape_detect/lib;/home/neousys/autoware.ai/install/lidar_fake_perception/lib;/home/neousys/autoware.ai/install/lidar_apollo_cnn_seg_detect/lib;/home/neousys/autoware.ai/install/libwaypoint_follower/lib;/home/neousys/autoware.ai/install/lgsvl_simulator_bridge/lib;/home/neousys/autoware.ai/install/lanelet2_extension/lib;/home/neousys/autoware.ai/install/kvaser/lib;/home/neousys/autoware.ai/install/kitti_launch/lib;/home/neousys/autoware.ai/install/kitti_player/lib;/home/neousys/autoware.ai/install/kitti_box_publisher/lib;/home/neousys/autoware.ai/install/javad_navsat_driver/lib;/home/neousys/autoware.ai/install/integrated_viewer/lib;/home/neousys/autoware.ai/install/image_processor/lib;/home/neousys/autoware.ai/install/hokuyo/lib;/home/neousys/autoware.ai/install/graph_tools/lib;/home/neousys/autoware.ai/install/gnss_localizer/lib;/home/neousys/autoware.ai/install/gnss/lib;/home/neousys/autoware.ai/install/glviewer/lib;/home/neousys/autoware.ai/install/gazebo_world_description/lib;/home/neousys/autoware.ai/install/gazebo_imu_description/lib;/home/neousys/autoware.ai/install/gazebo_camera_description/lib;/home/neousys/autoware.ai/install/garmin/lib;/home/neousys/autoware.ai/install/freespace_planner/lib;/home/neousys/autoware.ai/install/fastvirtualscan/lib;/home/neousys/autoware.ai/install/ekf_localizer/lib;/home/neousys/autoware.ai/install/ds4_msgs/lib;/home/neousys/autoware.ai/install/ds4_driver/lib;/home/neousys/autoware.ai/install/detected_objects_visualizer/lib;/home/neousys/autoware.ai/install/decision_maker_panel/lib;/home/neousys/autoware.ai/install/data_preprocessor/lib;/home/neousys/autoware.ai/install/custom_msgs/lib;/home/neousys/autoware.ai/install/carla_autoware_bridge/lib;/home/neousys/autoware.ai/install/calibration_publisher/lib;/home/neousys/autoware.ai/install/autoware_system_msgs/lib;/home/neousys/autoware.ai/install/autoware_rviz_plugins/lib;/home/neousys/autoware.ai/install/autoware_quickstart_examples/lib;/home/neousys/autoware.ai/install/autoware_pointgrey_drivers/lib;/home/neousys/autoware.ai/install/autoware_driveworks_interface/lib;/home/neousys/autoware.ai/install/autoware_connector/lib;/home/neousys/autoware.ai/install/autoware_camera_lidar_calibrator/lib;/home/neousys/autoware.ai/install/astar_search/lib;/home/neousys/autoware.ai/install/amathutils_lib/lib;/home/neousys/autoware.ai/install/autoware_msgs/lib;/home/neousys/autoware.ai/install/autoware_map_msgs/lib;/home/neousys/autoware.ai/install/autoware_launcher_rviz/lib;/home/neousys/autoware.ai/install/autoware_launcher/lib;/home/neousys/autoware.ai/install/autoware_lanelet2_msgs/lib;/home/neousys/autoware.ai/install/autoware_external_msgs/lib;/home/neousys/autoware.ai/install/autoware_driveworks_gmsl_interface/lib;/home/neousys/autoware.ai/install/autoware_config_msgs/lib;/home/neousys/autoware.ai/install/autoware_can_msgs/lib;/home/neousys/autoware.ai/install/autoware_build_flags/lib;/home/neousys/autoware.ai/install/autoware_bag_tools/lib;/home/neousys/autoware.ai/install/adi_driver/lib;/opt/ros/melodic/lib)
  147. find_library(lib ${library}
  148. PATHS ${path}
  149. NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH)
  150. if(lib)
  151. set(lib_path ${path})
  152. break()
  153. endif()
  154. endforeach()
  155. if(lib)
  156. _list_append_unique(vehicle_manager_LIBRARY_DIRS ${lib_path})
  157. list(APPEND vehicle_manager_LIBRARIES ${lib})
  158. else()
  159. # as a fall back for non-catkin libraries try to search globally
  160. find_library(lib ${library})
  161. if(NOT lib)
  162. message(FATAL_ERROR "Project '${PROJECT_NAME}' tried to find library '${library}'. The library is neither a target nor built/installed properly. Did you compile project 'vehicle_manager'? Did you find_package() it before the subdirectory containing its code is included?")
  163. endif()
  164. list(APPEND vehicle_manager_LIBRARIES ${lib})
  165. endif()
  166. endif()
  167. endforeach()
  168. set(vehicle_manager_EXPORTED_TARGETS "")
  169. # create dummy targets for exported code generation targets to make life of users easier
  170. foreach(t ${vehicle_manager_EXPORTED_TARGETS})
  171. if(NOT TARGET ${t})
  172. add_custom_target(${t})
  173. endif()
  174. endforeach()
  175. set(depends "roscpp;std_msgs")
  176. foreach(depend ${depends})
  177. string(REPLACE " " ";" depend_list ${depend})
  178. # the package name of the dependency must be kept in a unique variable so that it is not overwritten in recursive calls
  179. list(GET depend_list 0 vehicle_manager_dep)
  180. list(LENGTH depend_list count)
  181. if(${count} EQUAL 1)
  182. # simple dependencies must only be find_package()-ed once
  183. if(NOT ${vehicle_manager_dep}_FOUND)
  184. find_package(${vehicle_manager_dep} REQUIRED NO_MODULE)
  185. endif()
  186. else()
  187. # dependencies with components must be find_package()-ed again
  188. list(REMOVE_AT depend_list 0)
  189. find_package(${vehicle_manager_dep} REQUIRED NO_MODULE ${depend_list})
  190. endif()
  191. _list_append_unique(vehicle_manager_INCLUDE_DIRS ${${vehicle_manager_dep}_INCLUDE_DIRS})
  192. # merge build configuration keywords with library names to correctly deduplicate
  193. _pack_libraries_with_build_configuration(vehicle_manager_LIBRARIES ${vehicle_manager_LIBRARIES})
  194. _pack_libraries_with_build_configuration(_libraries ${${vehicle_manager_dep}_LIBRARIES})
  195. _list_append_deduplicate(vehicle_manager_LIBRARIES ${_libraries})
  196. # undo build configuration keyword merging after deduplication
  197. _unpack_libraries_with_build_configuration(vehicle_manager_LIBRARIES ${vehicle_manager_LIBRARIES})
  198. _list_append_unique(vehicle_manager_LIBRARY_DIRS ${${vehicle_manager_dep}_LIBRARY_DIRS})
  199. list(APPEND vehicle_manager_EXPORTED_TARGETS ${${vehicle_manager_dep}_EXPORTED_TARGETS})
  200. endforeach()
  201. set(pkg_cfg_extras "")
  202. foreach(extra ${pkg_cfg_extras})
  203. if(NOT IS_ABSOLUTE ${extra})
  204. set(extra ${vehicle_manager_DIR}/${extra})
  205. endif()
  206. include(${extra})
  207. endforeach()