Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bundle wabt objects into libHalide #5283

Merged
merged 1 commit into from
Sep 23, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion dependencies/wasm/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,9 @@ if (WITH_WABT)
# TODO: we want to require unique prefixes to include these files, to avoid ambiguity;
# this means we have to prefix with "wabt-src/...", which is less bad than other alternatives,
# but perhaps we could do better (esp. if wabt was smarter about what it exposed?)
target_include_directories(wabt INTERFACE
add_library(wabt-obj INTERFACE)
target_sources(wabt-obj INTERFACE $<BUILD_INTERFACE:$<TARGET_OBJECTS:wabt>>)
target_include_directories(wabt-obj INTERFACE
$<BUILD_INTERFACE:${wabt_SOURCE_DIR}>
$<BUILD_INTERFACE:${wabt_BINARY_DIR}>
$<BUILD_INTERFACE:${CMAKE_BINARY_DIR}/_deps>)
Expand Down
2 changes: 1 addition & 1 deletion packaging/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ set(HALIDE_INSTALL_CMAKEDIR
##

set(optional_dependencies "")
foreach (target IN ITEMS wabt)
foreach (target IN ITEMS wabt-obj)
if (TARGET ${target})
list(APPEND optional_dependencies ${target})
endif ()
Expand Down
4 changes: 2 additions & 2 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -385,8 +385,8 @@ set_target_properties(Halide PROPERTIES

add_dependencies(Halide HalideIncludes)

if (TARGET wabt)
target_link_libraries(Halide PRIVATE wabt)
if (TARGET wabt-obj)
target_link_libraries(Halide PRIVATE wabt-obj)
target_compile_definitions(Halide PRIVATE WITH_WABT)
endif ()

Expand Down