Skip to content

Commit ee3adcb

Browse files
committed
build(mesh-filters): address wasi build
1 parent e081756 commit ee3adcb

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

packages/mesh-filters/CMakeLists.txt

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -63,16 +63,20 @@ set(GEOGRAM_LIB_ONLY ON CACHE BOOL "Only build the geogram library")
6363
if (EMSCRIPTEN)
6464
set(VORPALINE_PLATFORM "Emscripten-clang" CACHE STRING "Vorpaline platform")
6565
set(EMSCRIPTEN_DIR "/emsdk/upstream/emscripten" CACHE PATH "Emscripten directory")
66-
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unsafe-buffer-usage -Wno-switch-default -Wno-undefined-reinterpret-cast")
6766
endif()
6867
if (WASI)
6968
set(VORPALINE_PLATFORM "Wasi-clang" CACHE STRING "Vorpaline platform")
69+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_WASI_EMULATED_SIGNAL")
70+
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -lwasi-emulated-signal")
71+
endif()
72+
if(EMSCRIPTEN OR WASI)
73+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-missing-include-dirs -Wno-unsafe-buffer-usage -Wno-switch-default -Wno-undefined-reinterpret-cast -Wno-deprecated-declarations -Wno-documentation")
7074
endif()
7175

7276
# set(GEOGRAM_GIT_REPOSITORY "https://github.com/BrunoLevy/geogram.git")
7377
set(GEOGRAM_GIT_REPOSITORY "https://github.com/thewtex/geogram.git")
74-
# v1.9.1
75-
set(GEOGRAM_GIT_TAG "4fec5761e60009baf35ba0412dde5b9b60437388")
78+
# wasi-2025-01-28
79+
set(GEOGRAM_GIT_TAG "e47b29fb83cb5d5df6031ab1e8a2a9130f8722ed")
7680
set(BUILD_SHARED_LIBS OFF)
7781
FetchContent_Declare(
7882
geogram
@@ -98,10 +102,6 @@ FetchContent_MakeAvailable(geogram mesh_plane_intersection)
98102
include_directories(${geogram_SOURCE_DIR}/src/lib)
99103
include_directories(${mesh_plane_intersection_SOURCE_DIR}/src)
100104

101-
if (EMSCRIPTEN)
102-
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unsafe-buffer-usage")
103-
endif()
104-
105105
foreach(pipeline geogram-conversion repair smooth-remesh keep-largest-component)
106106
add_executable(${pipeline} ${pipeline}.cxx)
107107
target_link_libraries(${pipeline} PUBLIC ${ITK_LIBRARIES} geogram)

0 commit comments

Comments
 (0)