Skip to content

Commit

Permalink
[Misc] Add the header and shared library of SSVM C API into the outpu…
Browse files Browse the repository at this point in the history
…t package
  • Loading branch information
hydai authored and q82419 committed May 13, 2021
1 parent 01d6c8c commit 63a4865
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ set(CPACK_ARCHIVE_COMPONENT_INSTALL ON)
set(CPACK_ARCHIVE_${CMAKE_INSTALL_DEFAULT_COMPONENT_NAME_UPCASE}_FILE_NAME "${CPACK_PACKAGE_FILE_NAME}")
set(CPACK_RPM_COMPONENT_INSTALL ON)
set(CPACK_RPM_MAIN_COMPONENT ${CMAKE_INSTALL_DEFAULT_COMPONENT_NAME})
set(CPACK_RPM_PACKAGE_LICENSE "Apache 2.0")
set(CPACK_DEB_COMPONENT_INSTALL ON)
set(CPACK_DEBIAN_${CMAKE_INSTALL_DEFAULT_COMPONENT_NAME_UPCASE}_PACKAGE_NAME wasmedge)
set(CPACK_DEBIAN_FILE_NAME DEB-DEFAULT)
Expand Down
10 changes: 10 additions & 0 deletions lib/api/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ endif()

add_library(wasmedge_c SHARED
wasmedge.cpp
${CMAKE_CURRENT_BINARY_DIR}/../../include/api/wasmedge.h
)

set_target_properties(wasmedge_c PROPERTIES
PUBLIC_HEADER ${CMAKE_CURRENT_BINARY_DIR}/../../include/api/wasmedge.h
)

target_link_libraries(wasmedge_c
Expand All @@ -24,3 +29,8 @@ target_include_directories(wasmedge_c
PUBLIC
${PROJECT_BINARY_DIR}/include
)

install(TARGETS wasmedge_c
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
)

0 comments on commit 63a4865

Please sign in to comment.