From 1d4487f4f8fa95f2cf363e7330ea1505e4933ce1 Mon Sep 17 00:00:00 2001 From: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> Date: Tue, 7 Sep 2021 11:53:40 -0700 Subject: [PATCH] Improvement suggestion from another PR Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> --- cmake/3rdParty.cmake | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/cmake/3rdParty.cmake b/cmake/3rdParty.cmake index 310e341305..f70ed1aa02 100644 --- a/cmake/3rdParty.cmake +++ b/cmake/3rdParty.cmake @@ -123,10 +123,8 @@ function(ly_add_external_target) else() # only install external 3rdParty that are within the source tree - cmake_path(RELATIVE_PATH ly_add_external_target_3RDPARTY_ROOT_DIRECTORY - BASE_DIRECTORY ${LY_ROOT_FOLDER} - OUTPUT_VARIABLE relative_path) - if(relative_path AND NOT relative_path MATCHES "^../") + cmake_path(IS_PREFIX LY_ROOT_FOLDER ${ly_add_external_target_3RDPARTY_ROOT_DIRECTORY} NORMALIZE is_in_source_tree) + if(is_in_source_tree) ly_install_external_target(${ly_add_external_target_3RDPARTY_ROOT_DIRECTORY}) endif() set(BASE_PATH "${ly_add_external_target_3RDPARTY_ROOT_DIRECTORY}")