Files
ports/www/wabt/files/patch-CMakeLists.txt
2026-10-04 04:07:15 +00:00

43 lines
1.5 KiB
Plaintext

--- CMakeLists.txt.orig 2026-05-06 18:39:06 UTC
+++ CMakeLists.txt
@@ -396,7 +396,7 @@ set(WABT_LIBRARY_SRC ${WABT_LIBRARY_CC} ${WABT_LIBRARY
set(WABT_LIBRARY_SRC ${WABT_LIBRARY_CC} ${WABT_LIBRARY_H})
-add_library(wabt STATIC ${WABT_LIBRARY_SRC})
+add_library(wabt ${WABT_LIBRARY_SRC})
add_dependencies(wabt gen-wasm2c-prebuilt-target)
add_library(wabt::wabt ALIAS wabt)
@@ -430,7 +430,7 @@ if (HAVE_SETJMP_H)
if (HAVE_SETJMP_H)
set(WASM_RT_FILES "wasm2c/wasm-rt-impl.h" "wasm2c/wasm-rt-impl.c" "wasm2c/wasm-rt-exceptions-impl.c" "wasm2c/wasm-rt-mem-impl.c" "wasm2c/wasm-rt-impl-tableops.inc" "wasm2c/wasm-rt-mem-impl-helper.inc")
- add_library(wasm-rt-impl STATIC ${WASM_RT_FILES})
+ add_library(wasm-rt-impl ${WASM_RT_FILES})
target_link_libraries(wasm-rt-impl ${CMAKE_THREAD_LIBS_INIT})
add_library(wabt::wasm-rt-impl ALIAS wasm-rt-impl)
if (WABT_BIG_ENDIAN)
@@ -459,12 +459,20 @@ if (BUILD_FUZZ_TOOLS)
if (BUILD_FUZZ_TOOLS)
set(FUZZ_FLAGS "-fsanitize=fuzzer,address")
- add_library(wabt-fuzz STATIC ${WABT_LIBRARY_SRC})
+ add_library(wabt-fuzz ${WABT_LIBRARY_SRC})
target_link_libraries(wabt-fuzz PUBLIC wabt)
set_target_properties(wabt-fuzz
PROPERTIES
COMPILE_FLAGS "${FUZZ_FLAGS}"
)
+ if (WABT_INSTALL_RULES)
+ install(
+ TARGETS wabt-fuzz
+ EXPORT wabt-targets
+ COMPONENT wabt-development
+ INCLUDES DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}"
+ )
+ endif ()
endif ()
# libwasm, which implenents the wasm C API