Loading editor/CMakeLists.txt +9 −8 Original line number Diff line number Diff line Loading @@ -50,17 +50,18 @@ add_executable(blogi-editor find_path(LIBNODE_INCLUDE_DIR NAMES node.h PATH_SUFFIXES node include/node) find_library(LIBNODE_LIBRARY NAMES node libnode) # Export to widget subdirectories that include the shared node bridge header. set(BLOGI_LIBNODE_INCLUDE_DIR "${LIBNODE_INCLUDE_DIR}" CACHE INTERNAL "blogi libnode include dir") set(BLOGI_LIBNODE_LIBRARY "${LIBNODE_LIBRARY}" CACHE INTERNAL "blogi libnode library") if(NOT LIBNODE_INCLUDE_DIR OR NOT LIBNODE_LIBRARY) message(FATAL_ERROR "libnode is required but was not found. Install libnode headers/library and reconfigure.") endif() if(LIBNODE_INCLUDE_DIR AND LIBNODE_LIBRARY) message(STATUS "libnode enabled: ${LIBNODE_LIBRARY} (${LIBNODE_INCLUDE_DIR})") target_include_directories(blogi-editor PRIVATE ${LIBNODE_INCLUDE_DIR}) target_link_libraries(blogi-editor ${LIBNODE_LIBRARY}) else() message(STATUS "libnode not found; building editor with external Node.js runner only") endif() target_compile_definitions(blogi-editor PRIVATE BLOGI_HAVE_LIBNODE=1) # Export to widget subdirectories that include the shared node bridge header. set(BLOGI_LIBNODE_INCLUDE_DIR "${LIBNODE_INCLUDE_DIR}" CACHE INTERNAL "blogi libnode include dir") set(BLOGI_LIBNODE_LIBRARY "${LIBNODE_LIBRARY}" CACHE INTERNAL "blogi libnode library") if(TARGET blogidev) target_link_libraries(blogi-editor Loading editor/src/node_bridge.h +6 −0 Original line number Diff line number Diff line Loading @@ -4,6 +4,12 @@ #include <string> #include <vector> #ifndef BLOGI_HAVE_LIBNODE #error "BLOGI_HAVE_LIBNODE must be defined: this build supports only embedded libnode" #endif #include <node.h> namespace blogi::webedit::nodebridge { inline std::string getEnvOrDefault(const char *key, const char *fallback) { Loading editor/widgets/nodewidget/CMakeLists.txt +2 −4 Original line number Diff line number Diff line add_library(nodewidget SHARED nodewidget.cpp) if(BLOGI_LIBNODE_INCLUDE_DIR) target_include_directories(nodewidget PRIVATE ${BLOGI_LIBNODE_INCLUDE_DIR}) endif() target_compile_definitions(nodewidget PRIVATE BLOGI_HAVE_LIBNODE=1) if(TARGET blogidev) add_dependencies(nodewidget blogidev) Loading packaging/build-nspawn.sh +2 −2 Original line number Diff line number Diff line Loading @@ -552,7 +552,7 @@ build_libraries() { sed -i 's/-latomic//g' node.gyp tools/v8_gypfiles/v8.gyp # Avoid running node_mksnapshot in this musl-targeted build. export GYP_DEFINES=\"\${GYP_DEFINES:-} v8_use_snapshot=false node_use_node_snapshot=false\" ./configure --prefix=\$PREFIX --shared-musl --without-node-snapshot ./configure --prefix=\$PREFIX --shared --shared-musl --without-node-snapshot mkdir -p out/Release rm -f out/Release/icupkg install -m 0755 "\$ICUPKG_BIN" out/Release/icupkg Loading Loading @@ -827,7 +827,7 @@ update_libraries() { sed -i 's/-latomic//g' node.gyp tools/v8_gypfiles/v8.gyp # Avoid running node_mksnapshot in this musl-targeted build. export GYP_DEFINES=\"\${GYP_DEFINES:-} v8_use_snapshot=false node_use_node_snapshot=false\" ./configure --prefix=\$PREFIX --without-npm --without-node-snapshot ./configure --prefix=\$PREFIX --shared --without-npm --without-node-snapshot mkdir -p out/Release rm -f out/Release/icupkg install -m 0755 \"\$ICUPKG_BIN\" out/Release/icupkg Loading Loading
editor/CMakeLists.txt +9 −8 Original line number Diff line number Diff line Loading @@ -50,17 +50,18 @@ add_executable(blogi-editor find_path(LIBNODE_INCLUDE_DIR NAMES node.h PATH_SUFFIXES node include/node) find_library(LIBNODE_LIBRARY NAMES node libnode) # Export to widget subdirectories that include the shared node bridge header. set(BLOGI_LIBNODE_INCLUDE_DIR "${LIBNODE_INCLUDE_DIR}" CACHE INTERNAL "blogi libnode include dir") set(BLOGI_LIBNODE_LIBRARY "${LIBNODE_LIBRARY}" CACHE INTERNAL "blogi libnode library") if(NOT LIBNODE_INCLUDE_DIR OR NOT LIBNODE_LIBRARY) message(FATAL_ERROR "libnode is required but was not found. Install libnode headers/library and reconfigure.") endif() if(LIBNODE_INCLUDE_DIR AND LIBNODE_LIBRARY) message(STATUS "libnode enabled: ${LIBNODE_LIBRARY} (${LIBNODE_INCLUDE_DIR})") target_include_directories(blogi-editor PRIVATE ${LIBNODE_INCLUDE_DIR}) target_link_libraries(blogi-editor ${LIBNODE_LIBRARY}) else() message(STATUS "libnode not found; building editor with external Node.js runner only") endif() target_compile_definitions(blogi-editor PRIVATE BLOGI_HAVE_LIBNODE=1) # Export to widget subdirectories that include the shared node bridge header. set(BLOGI_LIBNODE_INCLUDE_DIR "${LIBNODE_INCLUDE_DIR}" CACHE INTERNAL "blogi libnode include dir") set(BLOGI_LIBNODE_LIBRARY "${LIBNODE_LIBRARY}" CACHE INTERNAL "blogi libnode library") if(TARGET blogidev) target_link_libraries(blogi-editor Loading
editor/src/node_bridge.h +6 −0 Original line number Diff line number Diff line Loading @@ -4,6 +4,12 @@ #include <string> #include <vector> #ifndef BLOGI_HAVE_LIBNODE #error "BLOGI_HAVE_LIBNODE must be defined: this build supports only embedded libnode" #endif #include <node.h> namespace blogi::webedit::nodebridge { inline std::string getEnvOrDefault(const char *key, const char *fallback) { Loading
editor/widgets/nodewidget/CMakeLists.txt +2 −4 Original line number Diff line number Diff line add_library(nodewidget SHARED nodewidget.cpp) if(BLOGI_LIBNODE_INCLUDE_DIR) target_include_directories(nodewidget PRIVATE ${BLOGI_LIBNODE_INCLUDE_DIR}) endif() target_compile_definitions(nodewidget PRIVATE BLOGI_HAVE_LIBNODE=1) if(TARGET blogidev) add_dependencies(nodewidget blogidev) Loading
packaging/build-nspawn.sh +2 −2 Original line number Diff line number Diff line Loading @@ -552,7 +552,7 @@ build_libraries() { sed -i 's/-latomic//g' node.gyp tools/v8_gypfiles/v8.gyp # Avoid running node_mksnapshot in this musl-targeted build. export GYP_DEFINES=\"\${GYP_DEFINES:-} v8_use_snapshot=false node_use_node_snapshot=false\" ./configure --prefix=\$PREFIX --shared-musl --without-node-snapshot ./configure --prefix=\$PREFIX --shared --shared-musl --without-node-snapshot mkdir -p out/Release rm -f out/Release/icupkg install -m 0755 "\$ICUPKG_BIN" out/Release/icupkg Loading Loading @@ -827,7 +827,7 @@ update_libraries() { sed -i 's/-latomic//g' node.gyp tools/v8_gypfiles/v8.gyp # Avoid running node_mksnapshot in this musl-targeted build. export GYP_DEFINES=\"\${GYP_DEFINES:-} v8_use_snapshot=false node_use_node_snapshot=false\" ./configure --prefix=\$PREFIX --without-npm --without-node-snapshot ./configure --prefix=\$PREFIX --shared --without-npm --without-node-snapshot mkdir -p out/Release rm -f out/Release/icupkg install -m 0755 \"\$ICUPKG_BIN\" out/Release/icupkg Loading