diff --git a/ament_cmake_vendor_package/cmake/ament_vendor.cmake b/ament_cmake_vendor_package/cmake/ament_vendor.cmake index 50d0323b..c9b963cd 100644 --- a/ament_cmake_vendor_package/cmake/ament_vendor.cmake +++ b/ament_cmake_vendor_package/cmake/ament_vendor.cmake @@ -233,10 +233,18 @@ function(_ament_vendor TARGET_NAME VCS_TYPE VCS_URL VCS_VERSION PATCHES CMAKE_AR set(CMAKE_ARGS_CONTENT "${CMAKE_ARGS_CONTENT}\nset(CMAKE_VERBOSE_MAKEFILE [=[${CMAKE_VERBOSE_MAKEFILE}]=] CACHE INTERNAL \"\")") endif() + if(DEFINED CMAKE_FIND_DEBUG_MODE) + set(CMAKE_ARGS_CONTENT "${CMAKE_ARGS_CONTENT}\nset(CMAKE_FIND_DEBUG_MODE [=[${CMAKE_FIND_DEBUG_MODE}]=] CACHE INTERNAL \"\")") + endif() + if(DEFINED CMAKE_BUILD_TYPE) set(CMAKE_ARGS_CONTENT "${CMAKE_ARGS_CONTENT}\nset(CMAKE_BUILD_TYPE [=[${CMAKE_BUILD_TYPE}]=] CACHE INTERNAL \"\")") endif() + if(DEFINED CMAKE_MODULE_PATH) + set(CMAKE_ARGS_CONTENT "${CMAKE_ARGS_CONTENT}\nset(CMAKE_MODULE_PATH [=[${CMAKE_MODULE_PATH}]=] CACHE INTERNAL \"\")") + endif() + list(PREPEND CMAKE_PREFIX_PATH ${_AMENT_CMAKE_VENDOR_PACKAGE_PREFIX_PATH}) set(CMAKE_ARGS_CONTENT "${CMAKE_ARGS_CONTENT}\nset(CMAKE_PREFIX_PATH [=[${CMAKE_PREFIX_PATH}]=] CACHE INTERNAL \"\")")