forked from InsightSoftwareConsortium/ITK-Wasm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
45 lines (40 loc) · 1.6 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
include_directories(${WebAssemblyInterface_INCLUDE_DIRS})
set(WebAssemblyInterface_SRCS
itkPipeline.cxx
itkWASMExports.cxx
itkWASMDataObject.cxx
itkWASMImageIOBase.cxx
itkWASMImageIOFactory.cxx
itkWASMImageIO.cxx
itkWASMMeshIOBase.cxx
itkWASMMeshIOFactory.cxx
itkWASMMeshIO.cxx
itkWASMStringStream.cxx
itkInputTextStream.cxx
itkOutputTextStream.cxx
itkInputBinaryStream.cxx
itkOutputBinaryStream.cxx
itkIOComponentEnumFromWASMComponentType.cxx
itkIOPixelEnumFromWASMPixelType.cxx
itkWASMComponentTypeFromIOComponentEnum.cxx
itkWASMPixelTypeFromIOPixelEnum.cxx
itkSupportInputImageTypes.cxx
itkSupportInputMeshTypes.cxx
itkSupportInputPolyDataTypes.cxx
)
itk_module_add_library(WebAssemblyInterface ${WebAssemblyInterface_SRCS})
if(BUILD_ITK_WASM_IO_MODULES)
if(EMSCRIPTEN)
# -s WASM_ASYNC_COMPILATION=0
# -flto
set(common_link_flags " -s ALLOW_MEMORY_GROWTH=1 -s FORCE_FILESYSTEM=1 -s MODULARIZE=1 -s WASM=1 -lnodefs.js -s EXIT_RUNTIME=0 -s INVOKE_RUN=1 --post-js ${CMAKE_CURRENT_SOURCE_DIR}/emscripten-module/itkJSPost.js")
set(esm_link_flags " -s EXPORT_ES6=1 -s USE_ES6_IMPORT_META=0")
endif()
include(${CMAKE_CURRENT_SOURCE_DIR}/io/internal/pipelines/common/compress-stringify/BuildZstd.cmake)
add_subdirectory(io/internal/pipelines/common/compress-stringify)
add_subdirectory(io/internal/pipelines/image/convert-image)
add_subdirectory(io/internal/pipelines/image/read-dicom)
add_subdirectory(io/internal/pipelines/mesh/convert-mesh)
add_subdirectory(io/internal/pipelines/mesh/mesh-to-polydata)
add_subdirectory(io/internal/pipelines/dicom)
endif() # BUILD_ITK_WASM_IO_MODULES