Fix: Link error in lite build without STL IO

This commit is contained in:
Hans Goudey
2024-06-10 22:23:03 -04:00
parent 7b1de7e9ba
commit 3a31fcebcf
2 changed files with 13 additions and 2 deletions

View File

@@ -240,10 +240,15 @@ set(LIB
bf_nodes
PRIVATE bf::intern::atomic
PRIVATE bf::extern::fmtlib
PRIVATE bf_io_common
PRIVATE bf_io_stl
)
if(WITH_IO_STL)
list(APPEND LIB
PRIVATE bf_io_common
PRIVATE bf_io_stl
)
endif()
if(WITH_BULLET)
list(APPEND INC_SYS
${BULLET_INCLUDE_DIRS}

View File

@@ -24,6 +24,7 @@ static void node_declare(NodeDeclarationBuilder &b)
static void node_geo_exec(GeoNodeExecParams params)
{
#ifdef WITH_IO_STL
const std::string path = params.extract_input<std::string>("Path");
if (path.empty()) {
@@ -71,6 +72,11 @@ static void node_geo_exec(GeoNodeExecParams params)
else {
params.set_default_remaining_outputs();
}
#else
params.error_message_add(NodeWarningType::Error,
TIP_("Disabled, Blender was compiled without OpenSubdiv"));
params.set_default_remaining_outputs();
#endif
}
static void node_register()