Use underscore plugin artifact names

Generated with the assistance of an AI coding tool.
This commit is contained in:
Thomas Krijnen
2026-08-09 09:52:17 +02:00
parent c818f48a47
commit a441757080
26 changed files with 46 additions and 35 deletions
+4 -2
View File
@@ -12,12 +12,13 @@ endif()
function(add_document_serializer_plugin target output_name)
cmake_parse_arguments(PLUGIN "" "" "SOURCES;LIBRARIES;DEFINITIONS" ${ARGN})
string(REPLACE "." "_" plugin_output_name "${output_name}")
add_library(${target} SHARED ${PLUGIN_SOURCES})
target_compile_definitions(${target} PRIVATE SERIALIZERS_EXPORTS BOOST_DLL_USE_STD_FS ${PLUGIN_DEFINITIONS})
target_link_libraries(${target} PRIVATE ${plugin_when_not_wasm} IfcGeom IfcParse ${PLUGIN_LIBRARIES})
set_target_properties(${target} PROPERTIES
OUTPUT_NAME "ifcopenshell.${output_name}"
OUTPUT_NAME "ifcopenshell_${plugin_output_name}"
RUNTIME_OUTPUT_DIRECTORY "${document_serializer_plugin_runtime_dir}"
LIBRARY_OUTPUT_DIRECTORY "${document_serializer_plugin_runtime_dir}"
)
@@ -30,6 +31,7 @@ endfunction()
function(add_geometry_serializer_plugin target output_name)
cmake_parse_arguments(PLUGIN "" "" "SOURCES;LIBRARIES;DEFINITIONS" ${ARGN})
string(REPLACE "." "_" plugin_output_name "${output_name}")
add_library(${target} SHARED ${PLUGIN_SOURCES})
target_compile_definitions(${target} PRIVATE SERIALIZERS_EXPORTS BOOST_DLL_USE_STD_FS ${PLUGIN_DEFINITIONS})
@@ -43,7 +45,7 @@ function(add_geometry_serializer_plugin target output_name)
target_link_libraries(${target} PRIVATE proj::proj)
endif()
set_target_properties(${target} PROPERTIES
OUTPUT_NAME "ifcopenshell.${output_name}"
OUTPUT_NAME "ifcopenshell_${plugin_output_name}"
RUNTIME_OUTPUT_DIRECTORY "${geometry_serializer_plugin_runtime_dir}"
LIBRARY_OUTPUT_DIRECTORY "${geometry_serializer_plugin_runtime_dir}"
)
@@ -52,7 +52,7 @@ std::string document_serializer_schema_key(const std::string& schema_name) {
std::string document_serializer_plugin_prefix(const std::string& format = std::string()) {
const auto format_key = document_serializer_key(format);
return format_key.empty() ? "document." : "document." + format_key;
return format_key.empty() ? "document_" : "document_" + format_key;
}
void add_document_serializer_search_paths(ifcopenshell::plugin::manager& manager) {
@@ -194,7 +194,7 @@ ifcopenshell::plugin::metadata ifcopenshell::serializers::document_serializer_pl
metadata.kind_ = plugin::kind::document_serializer;
metadata.id = document_serializer_plugin_prefix(format);
if (!schema_name.empty()) {
metadata.id += "." + boost::to_lower_copy(schema_name);
metadata.id += "_" + boost::to_lower_copy(schema_name);
}
metadata.schema = document_serializer_schema_key(schema_name);
metadata.format = document_serializer_key(format);
@@ -235,7 +235,7 @@ bool ifcopenshell::serializers::load_document_serializer_plugin(document_seriali
const auto schema_key = document_serializer_schema_key(schema_name);
auto basename = document_serializer_plugin_prefix(format_key);
if (!schema_key.empty()) {
basename += "." + boost::to_lower_copy(schema_key);
basename += "_" + boost::to_lower_copy(schema_key);
}
ifcopenshell::plugin::manager manager;
+1 -1
View File
@@ -73,9 +73,9 @@ public:
private:
struct entry {
ifcopenshell::plugin::module module_;
document_serializer_info info_;
create_fn create_;
ifcopenshell::plugin::module module_;
};
const entry* find_entry_(const std::string& format, const std::string& schema_name) const;
@@ -34,7 +34,7 @@ namespace {
std::string geometry_serializer_plugin_prefix(const std::string& format = std::string()) {
const auto format_lower = boost::to_lower_copy(format);
return format_lower.empty() ? "geometry." : "geometry." + format_lower;
return format_lower.empty() ? "geometry_" : "geometry_" + format_lower;
}
std::string geometry_serializer_key(const std::string& extension) {
+1 -1
View File
@@ -73,10 +73,10 @@ public:
private:
struct entry {
ifcopenshell::plugin::module module_;
geometry_serializer_info info_;
create_fn create_;
configure_fn configure_;
ifcopenshell::plugin::module module_;
};
friend SERIALIZERS_API bool load_geometry_serializer_plugin(geometry_serializer_registry& registry, const std::string& extension);