Skip to content

Commit

Permalink
- ensure expat can be found when crosscompiling
Browse files Browse the repository at this point in the history
  • Loading branch information
fbergmann committed Apr 12, 2024
1 parent a3e2178 commit 034dc84
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions CMakeModules/FindEXPAT.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 034dc84

Please sign in to comment.