From 96657e3edd1e660be43eaa71e89e5a518c9b9c30 Mon Sep 17 00:00:00 2001 From: Mikael Arguedas Date: Fri, 22 Jun 2018 18:06:54 +0200 Subject: [PATCH] add thirdparty directory to CMAKE_REFIX_PATH only if THIRDPARTY option is specified --- cmake/common/eprosima_libraries.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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()