diff --git a/cmake/common/eprosima_libraries.cmake b/cmake/common/eprosima_libraries.cmake index 184955802c5..7204552ce73 100644 --- a/cmake/common/eprosima_libraries.cmake +++ b/cmake/common/eprosima_libraries.cmake @@ -85,10 +85,10 @@ macro(eprosima_find_thirdparty package thirdparty_name) else() message(FATAL_ERROR "Cannot configure Git submodule ${package}") endif() + set(CMAKE_PREFIX_PATH ${CMAKE_PREFIX_PATH} ${PROJECT_SOURCE_DIR}/thirdparty/${thirdparty_name}) + set(CMAKE_PREFIX_PATH ${CMAKE_PREFIX_PATH} ${PROJECT_SOURCE_DIR}/thirdparty/${thirdparty_name}/${thirdparty_name}) endif() - set(CMAKE_PREFIX_PATH ${CMAKE_PREFIX_PATH} ${PROJECT_SOURCE_DIR}/thirdparty/${thirdparty_name}) - set(CMAKE_PREFIX_PATH ${CMAKE_PREFIX_PATH} ${PROJECT_SOURCE_DIR}/thirdparty/${thirdparty_name}/${thirdparty_name}) find_package(${package} REQUIRED QUIET) endif()