mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-10-02 13:04:49 +00:00
Cmake libxml compatibility
This commit is contained in:
+11
-8
@@ -448,16 +448,19 @@ if(NOT MINIMAL_BUILD)
|
|||||||
if(NOT LibXml2_FOUND)
|
if(NOT LibXml2_FOUND)
|
||||||
# Fallback to CMake's builtin FindLibXml2 module (works on Ubuntu)
|
# Fallback to CMake's builtin FindLibXml2 module (works on Ubuntu)
|
||||||
find_package(LibXml2 REQUIRED)
|
find_package(LibXml2 REQUIRED)
|
||||||
|
else()
|
||||||
|
message(STATUS "Found LibXml2 config: ${LibXml2_DIR}")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
message(STATUS "Found LibXml2 config: ${LibXml2_DIR}")
|
if(TARGET LibXml2::LibXml2)
|
||||||
get_target_property(LIBXML2_INCLUDE_DIR LibXml2::LibXml2 INTERFACE_INCLUDE_DIRECTORIES)
|
# Config mode already gives us the target
|
||||||
get_target_property(_libxml2_debug LibXml2::LibXml2 IMPORTED_LOCATION_DEBUG)
|
set(LIBXML2_LIBRARIES LibXml2::LibXml2)
|
||||||
get_target_property(_libxml2_release LibXml2::LibXml2 IMPORTED_LOCATION_RELEASE)
|
get_target_property(LIBXML2_INCLUDE_DIR LibXml2::LibXml2 INTERFACE_INCLUDE_DIRECTORIES)
|
||||||
set(LIBXML2_LIBRARIES
|
else()
|
||||||
optimized ${_libxml2_release}
|
# Module mode (Ubuntu)
|
||||||
debug ${_libxml2_debug}
|
set(LIBXML2_LIBRARIES ${LibXml2_LIBRARIES})
|
||||||
)
|
set(LIBXML2_INCLUDE_DIR ${LibXml2_INCLUDE_DIRS})
|
||||||
|
endif()
|
||||||
else()
|
else()
|
||||||
find_package(LibXml2 REQUIRED)
|
find_package(LibXml2 REQUIRED)
|
||||||
endif()
|
endif()
|
||||||
|
|||||||
Reference in New Issue
Block a user