mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-18 06:21:40 +00:00
Fix find_package libxml compilation for more recent versions
Noticed compiling against libxml2 2.13.8 package that it's trying to use dynamic libs by default if `LIBXML_STATIC` is not defined. Adding `LIBXML2_DEFINITIONS` helps.
This commit is contained in:
@@ -1028,6 +1028,9 @@ set(IFCPARSE_FILES ${IFCPARSE_CPP_FILES} ${IFCPARSE_H_FILES})
|
|||||||
add_library(IfcParse ${IFCPARSE_FILES})
|
add_library(IfcParse ${IFCPARSE_FILES})
|
||||||
set_target_properties(IfcParse PROPERTIES COMPILE_FLAGS -DIFC_PARSE_EXPORTS VERSION "${PROJECT_VERSION}" SOVERSION "${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}")
|
set_target_properties(IfcParse PROPERTIES COMPILE_FLAGS -DIFC_PARSE_EXPORTS VERSION "${PROJECT_VERSION}" SOVERSION "${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}")
|
||||||
|
|
||||||
|
if(LibXml2_DIR)
|
||||||
|
target_compile_definitions(IfcParse PRIVATE ${LIBXML2_DEFINITIONS})
|
||||||
|
endif()
|
||||||
if(WASM_BUILD)
|
if(WASM_BUILD)
|
||||||
target_link_libraries(IfcParse ${BCRYPT_LIBRARIES} ${LIBXML2_LIBRARIES})
|
target_link_libraries(IfcParse ${BCRYPT_LIBRARIES} ${LIBXML2_LIBRARIES})
|
||||||
else()
|
else()
|
||||||
|
|||||||
Reference in New Issue
Block a user