cmake - install headers using PUBLIC_HEADER, deprecate INCLUDEDIR

This commit is contained in:
Andrej730
2025-12-12 14:28:07 +05:00
parent 99835fcab3
commit 5a0f8d30cf
7 changed files with 40 additions and 43 deletions
+8 -5
View File
@@ -31,7 +31,13 @@ endforeach()
set(IFCPARSE_FILES ${IFCPARSE_CPP_FILES} ${IFCPARSE_H_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}"
PUBLIC_HEADER "${IFCPARSE_H_FILES}"
)
if(IFCXML_SUPPORT)
find_package(LibXml2 REQUIRED)
@@ -47,11 +53,8 @@ else()
target_link_libraries(IfcParse ${Boost_LIBRARIES} ${BCRYPT_LIBRARIES})
endif()
# CMake installation targets
install(FILES ${IFCPARSE_H_FILES}
DESTINATION ${INCLUDEDIR}/ifcparse
)
install(TARGETS IfcParse
EXPORT ${IFCOPENSHELL_EXPORT_TARGETS}
PUBLIC_HEADER DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/ifcparse"
)