From 034dc845e62950ea905ccd13b8a99ddf67a5e52b Mon Sep 17 00:00:00 2001 From: "Frank T. Bergmann" Date: Fri, 12 Apr 2024 14:23:58 +0200 Subject: [PATCH] - ensure expat can be found when crosscompiling --- CMakeModules/FindEXPAT.cmake | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/CMakeModules/FindEXPAT.cmake b/CMakeModules/FindEXPAT.cmake index 4edad006cd..e3be96f28e 100644 --- a/CMakeModules/FindEXPAT.cmake +++ b/CMakeModules/FindEXPAT.cmake @@ -48,11 +48,13 @@ find_path(EXPAT_INCLUDE_DIR expat.h /opt/csw/include # Blastwave /opt/include /usr/freeware/include - NO_DEFAULT_PATH) + NO_DEFAULT_PATH + CMAKE_FIND_ROOT_PATH_BOTH) endif () if (NOT EXPAT_INCLUDE_DIR) - find_path(EXPAT_INCLUDE_DIR expat.h) + find_path(EXPAT_INCLUDE_DIR expat.h + CMAKE_FIND_ROOT_PATH_BOTH) endif () find_library(EXPAT_LIBRARY @@ -81,11 +83,13 @@ find_library(EXPAT_LIBRARY /opt/csw/lib # Blastwave /opt/lib /usr/freeware/lib64 - NO_DEFAULT_PATH) + NO_DEFAULT_PATH + CMAKE_FIND_ROOT_PATH_BOTH) endif() if (NOT EXPAT_LIBRARY) - find_library(EXPAT_LIBRARY NAMES libexpat expat) + find_library(EXPAT_LIBRARY NAMES libexpat expat + CMAKE_FIND_ROOT_PATH_BOTH ) endif () mark_as_advanced(EXPAT_INCLUDE_DIR EXPAT_LIBRARY)