Tighten scope of cmake vars and dirs

This commit is contained in:
Thomas Krijnen
2026-04-19 12:32:18 +02:00
parent 9e19735275
commit 046ceb452a
6 changed files with 46 additions and 58 deletions
+14
View File
@@ -36,6 +36,13 @@ set(IFCPARSE_FILES ${IFCPARSE_CPP_FILES} ${IFCPARSE_H_FILES})
add_library(IfcParse ${IFCPARSE_FILES})
add_library(parse ALIAS IfcParse)
target_compile_definitions(IfcParse PUBLIC ${SCHEMA_DEFINITIONS})
if(USE_MMAP)
target_compile_definitions(IfcParse PUBLIC USE_MMAP)
endif()
if(WITH_ROCKSDB)
target_compile_definitions(IfcParse PUBLIC IFOPSH_WITH_ROCKSDB)
set(SWIG_DEFINES ${SWIG_DEFINES} -DIFOPSH_WITH_ROCKSDB PARENT_SCOPE)
endif()
set_target_properties(IfcParse PROPERTIES COMPILE_FLAGS -DIFC_PARSE_EXPORTS VERSION "${PROJECT_VERSION}" SOVERSION "${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}")
if(WASM_BUILD)
@@ -44,6 +51,13 @@ else()
target_link_libraries(IfcParse plugin ${Boost_LIBRARIES} ${BCRYPT_LIBRARIES})
endif()
if(WITH_ROCKSDB)
target_link_libraries(IfcParse RocksDB::rocksdb)
if(WITH_ZSTD)
target_link_libraries(IfcParse zstd::libzstd_static)
endif()
endif()
# CMake installation targets
install(FILES ${IFCPARSE_H_FILES}
DESTINATION ${INCLUDEDIR}/ifcparse