Skip to content

Commit

Permalink
Update CMakeLists.txt
Browse files Browse the repository at this point in the history
  • Loading branch information
rvmn authored Aug 31, 2023
1 parent 06dc245 commit 920cf6c
Showing 1 changed file with 7 additions and 10 deletions.
17 changes: 7 additions & 10 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -459,17 +459,14 @@ include_directories(BEFORE SYSTEM ${EIGEN3_INCLUDE_DIR})
# Find expat or use bundled version
# Always use the system libexpat on Linux.

find_package(EXPAT)
find_package(EXPAT REQUIRED)

if (NOT EXPAT_FOUND)
add_library(expat STATIC
${LIBDIR}/expat/xmlparse.c
${LIBDIR}/expat/xmlrole.c
${LIBDIR}/expat/xmltok.c
)
set(EXPAT_FOUND 1)
set(EXPAT_INCLUDE_DIRS ${LIBDIR}/expat/)
set(EXPAT_LIBRARIES expat)
add_library(libexpat INTERFACE)

if(TARGET EXPAT::EXPAT)
target_link_libraries(libexpat INTERFACE EXPAT::EXPAT)
elseif(TARGET expat::expat)
target_link_libraries(libexpat INTERFACE expat::expat)
endif ()

find_package(PNG REQUIRED)
Expand Down

0 comments on commit 920cf6c

Please sign in to comment.