Skip to content

Commit

Permalink
Merge pull request #368 from sbmlteam/cmake-script-update
Browse files Browse the repository at this point in the history
 - ensure expat can be found when crosscompiling
  • Loading branch information
skeating authored Apr 14, 2024
2 parents a3e2178 + 034dc84 commit 6f35dde
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 6f35dde

Please sign in to comment.