mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-06-28 01:49:33 -06:00
CMake: Use system-wide pugixml if available
Makes it possible to use a system-wide pugixml instead of always using Externals. This is nicer for distro packagers.
This commit is contained in:
14
CMake/FindPugixml.cmake
Normal file
14
CMake/FindPugixml.cmake
Normal file
@ -0,0 +1,14 @@
|
||||
find_path(pugixml_INCLUDE_DIRS pugixml.hpp)
|
||||
find_library(pugixml_LIBRARIES NAMES pugixml)
|
||||
mark_as_advanced(pugixml_INCLUDE_DIRS pugixml_LIBRARIES)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(pugixml REQUIRED_VARS pugixml_LIBRARIES pugixml_INCLUDE_DIRS)
|
||||
|
||||
if(Pugixml_FOUND AND NOT TARGET pugixml)
|
||||
add_library(pugixml UNKNOWN IMPORTED)
|
||||
set_target_properties(pugixml PROPERTIES
|
||||
IMPORTED_LOCATION "${pugixml_LIBRARIES}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${pugixml_INCLUDE_DIRS}"
|
||||
)
|
||||
endif()
|
Reference in New Issue
Block a user