CMakeLists.txt 501 B

123456789101112131415161718192021
  1. # Copyright (C) 2019 Intel Corporation. All rights reserved.
  2. # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  3. cmake_minimum_required(VERSION 3.14)
  4. project(wasm-apps)
  5. add_executable(app.wasm app.c)
  6. target_compile_options(app.wasm PUBLIC -g -nostdlib)
  7. target_link_options(app.wasm PRIVATE
  8. -nostdlib
  9. LINKER:--allow-undefined
  10. LINKER:--export-all
  11. LINKER:--no-entry
  12. )
  13. # install .wasm
  14. set(
  15. WASM_FILES
  16. ${CMAKE_CURRENT_BINARY_DIR}/app.wasm
  17. )
  18. install(FILES ${WASM_FILES} DESTINATION .)