Skip to content

Commit

Permalink
fix find pugixml via spack install
Browse files Browse the repository at this point in the history
  • Loading branch information
prudhomm committed Jan 8, 2024
1 parent b98098a commit 7426004
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions cmake/FindPugiXML.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
# PUGIXML_INCLUDE_DIR - header location
# PUGIXML_LIBRARIES - library to link against
# PUGIXML_FOUND - true if pugixml was found.
find_package(PkgConfig REQUIRED)
pkg_search_module(PUGIXML REQUIRED pugixml)
find_path (PUGIXML_INCLUDE_DIR NAMES pugixml.hpp PATHS ${PUGIXML_HOME}/include)
find_library (PUGIXML_LIBRARY NAMES pugixml PATHS ${PUGIXML_HOME}/lib)

Expand Down
3 changes: 2 additions & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -101,11 +101,12 @@ target_include_directories(fmi4cpp
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../include>
PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}
${PUGIXML_INCLUDE_DIRS}
)

target_link_libraries(fmi4cpp
PRIVATE
pugixml
${PUGIXML_LIBRARIES}
libzip::libzip
)

Expand Down

0 comments on commit 7426004

Please sign in to comment.