We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8806df7 commit d258567Copy full SHA for d258567
CMakeLists.txt
@@ -427,9 +427,17 @@ target_compile_definitions(nanogui
427
428
PRIVATE
429
-DNANOGUI_BUILD
430
- -DNVG_STB_IMAGE_IMPLEMENTATION
431
)
432
+if (NOT NANOGUI_SKIP_STB_IMAGE_IMPLEMENTATION)
433
+ # Frameworks that statically link to nanobind and which already include the
434
+ # stb_image implementation bits can set this flag to avoid duplicate symbol
435
+ # errors.
436
+
437
+ target_compile_definitions(nanogui
438
+ PRIVATE -DNVG_STB_IMAGE_IMPLEMENTATION)
439
+endif()
440
441
target_include_directories(nanogui
442
PUBLIC
443
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
0 commit comments