From 1473d5ec5637641da5da7750512d9da45b5186cb Mon Sep 17 00:00:00 2001 From: Derek G Foster Date: Fri, 6 Oct 2023 16:01:37 -0700 Subject: [PATCH] Have es2k package add itself to search path - Modify FindEs2kDriver to add the SDE_INSTALL_DIR to CMAKE_PREFIX_PATH or CMAKE_FIND_ROOT_PATH. Signed-off-by: Derek G Foster --- cmake/FindEs2kDriver.cmake | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/cmake/FindEs2kDriver.cmake b/cmake/FindEs2kDriver.cmake index d33d5c95..6306b8f1 100644 --- a/cmake/FindEs2kDriver.cmake +++ b/cmake/FindEs2kDriver.cmake @@ -19,6 +19,12 @@ if(NOT SDE_INCLUDE_DIR) endif() mark_as_advanced(SDE_INCLUDE_DIR) +if(CMAKE_CROSSCOMPILING) + list(APPEND CMAKE_FIND_ROOT_PATH ${SDE_INSTALL_DIR}) +else() + list(APPEND CMAKE_PREFIX_PATH ${SDE_INSTALL_DIR}) +endif() + #----------------------------------------------------------------------- # Find libraries #-----------------------------------------------------------------------