File tree Expand file tree Collapse file tree 2 files changed +12
-8
lines changed
Expand file tree Collapse file tree 2 files changed +12
-8
lines changed Original file line number Diff line number Diff line change @@ -720,14 +720,16 @@ function (yup_add_module module_path modules_definitions module_group)
720720 endif ()
721721
722722 foreach (searchpath IN LISTS module_searchpaths)
723- if (EXISTS "${searchpath} " )
724- list (APPEND module_include_paths "${searchpath} " )
725- elseif (EXISTS "${module_path} /${searchpath} " )
726- list (APPEND module_include_paths "${module_path} /${searchpath} " )
727- elseif (module_upstream_path AND EXISTS "${module_upstream_path} /${searchpath} " )
723+ if (module_upstream_path AND EXISTS "${module_upstream_path} /${searchpath} " )
728724 list (APPEND module_include_paths "${module_upstream_path} /${searchpath} " )
729725 elseif (module_upstream OR module_repository)
730- list (APPEND module_include_paths "${CMAKE_BINARY_DIR} /externals/${module_name} /${searchpath} " )
726+ if (EXISTS "${CMAKE_BINARY_DIR} /externals/${module_name} /${searchpath} " )
727+ list (APPEND module_include_paths "${CMAKE_BINARY_DIR} /externals/${module_name} /${searchpath} " )
728+ endif ()
729+ elseif (EXISTS "${module_path} /${searchpath} " )
730+ list (APPEND module_include_paths "${module_path} /${searchpath} " )
731+ elseif (EXISTS "${searchpath} " )
732+ list (APPEND module_include_paths "${searchpath} " )
731733 endif ()
732734 endforeach ()
733735
Original file line number Diff line number Diff line change @@ -208,8 +208,10 @@ endfunction()
208208function (_yup_collect_upstream_candidate_paths module_name module_path output_variable )
209209 set (candidate_paths
210210 "${module_path} /upstream"
211- "${CMAKE_SOURCE_DIR} /build/externals/${module_name} "
212- "${CMAKE_SOURCE_DIR} /../build/externals/${module_name} " )
211+ "${CMAKE_SOURCE_DIR} /build/externals/${module_name} " )
212+
213+ get_filename_component (parent_candidate_path "${CMAKE_SOURCE_DIR} /../build/externals/${module_name} " REALPATH)
214+ list (APPEND candidate_paths "${parent_candidate_path} " )
213215
214216 set (candidate_root "${CMAKE_BINARY_DIR} " )
215217 set (max_depth 10)
You can’t perform that action at this time.
0 commit comments