diff --git a/cmake/FindPugiXML.cmake b/cmake/FindPugiXML.cmake index cbbb297..d799fab 100644 --- a/cmake/FindPugiXML.cmake +++ b/cmake/FindPugiXML.cmake @@ -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) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 4ea4546..3eb5dd7 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -101,11 +101,12 @@ target_include_directories(fmi4cpp $ PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} + ${PUGIXML_INCLUDE_DIRS} ) target_link_libraries(fmi4cpp PRIVATE - pugixml + ${PUGIXML_LIBRARIES} libzip::libzip )