-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
libs: install libraries and headers in the right location
- Loading branch information
1 parent
53f6567
commit 4c65d67
Showing
6 changed files
with
115 additions
and
112 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,32 @@ | ||
cmake_minimum_required(VERSION 3.0) | ||
cmake_minimum_required(VERSION 3.8) | ||
project(libemscripten) | ||
|
||
# ------ Support for certain emscripten functions ------ # | ||
|
||
set(CMAKE_CXX_STANDARD 17) | ||
|
||
set(PUBLIC_HEADERS | ||
faasm/emscripten.h | ||
) | ||
faasm/emscripten.h | ||
) | ||
|
||
set(LIB_FILES | ||
emscripten.c | ||
) | ||
emscripten.c | ||
) | ||
|
||
add_library(emscripten STATIC ${LIB_FILES}) | ||
set_target_properties(emscripten PROPERTIES PUBLIC_HEADER "${PUBLIC_HEADERS}") | ||
|
||
install(TARGETS emscripten | ||
ARCHIVE DESTINATION ${CMAKE_SYSROOT}/lib/wasm32-wasi | ||
LIBRARY DESTINATION ${CMAKE_SYSROOT}/lib/wasm32-wasi | ||
PUBLIC_HEADER DESTINATION ${CMAKE_SYSROOT}/include/faasm | ||
) | ||
install( | ||
TARGETS emscripten | ||
ARCHIVE DESTINATION $ENV{FAASM_WASM_LIB_INSTALL_DIR} | ||
LIBRARY DESTINATION $ENV{FAASM_WASM_LIB_INSTALL_DIR} | ||
PUBLIC_HEADER DESTINATION $ENV{FAASM_WASM_HEADER_INSTALL_DIR}/faasm | ||
) | ||
|
||
install( | ||
FILES emscripten.imports | ||
DESTINATION ${CMAKE_SYSROOT}/lib/wasm32-wasi | ||
RENAME libemscripten.imports | ||
FILES libemscripten.imports | ||
DESTINATION $ENV{FAASM_WASM_LIB_INSTALL_DIR} | ||
RENAME libemscripten.imports | ||
) | ||
|
||
target_include_directories(emscripten PUBLIC ${CMAKE_CURRENT_LIST_DIR}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters