Skip to content

Commit

Permalink
CPack added for single-threaded proof-generator.
Browse files Browse the repository at this point in the history
  • Loading branch information
nkaskov committed Dec 30, 2023
1 parent 65a8fb3 commit 3b5d661
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 1 deletion.
14 changes: 13 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,20 @@ option(BUILD_SHARED_LIBS "Build shared library" TRUE)
add_subdirectories("${CMAKE_CURRENT_LIST_DIR}/bin")

add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/libs/crypto3")
add_subdirectories("${CMAKE_CURRENT_LIST_DIR}/libs/actor")

add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/libs/module")
add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/libs/plugin")
add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/libs/application")
add_subdirectories("${CMAKE_CURRENT_LIST_DIR}/libs/actor")

set(CPACK_GENERATOR DEB)
set(CPACK_DEBIAN_FILE_NAME DEB-DEFAULT)
set(CPACK_DEBIAN_PACKAGE_MAINTAINER "=nil; Foundation")

set(CPACK_PACKAGE_VERSION "0.1.1")

set(CPACK_PACKAGING_INSTALL_PREFIX "/usr/lib/zkllvm")

install(SCRIPT cmake/create-symlinks.cmake)

include(CPack)
2 changes: 2 additions & 0 deletions bin/proof-generator/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -121,3 +121,5 @@ elseif (CMAKE_CROSSCOMPILING AND CMAKE_SYSTEM_NAME STREQUAL "Emscripten")

add_dependencies(${CURRENT_PROJECT_NAME} boost)
endif ()

install(TARGETS ${CURRENT_PROJECT_NAME} RUNTIME DESTINATION bin)
12 changes: 12 additions & 0 deletions cmake/create-symlinks.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
message("Creating symlinks")

list(APPEND BINARIES proof-generator)

file(MAKE_DIRECTORY $ENV{DESTDIR}/usr/bin)

foreach(BINARY IN LISTS BINARIES)
set(LINK_NAME $ENV{DESTDIR}/usr/bin/${BINARY})
set(LINK_TARGET "../lib/zkllvm/bin/${BINARY}")
message("${LINK_NAME} -> ${LINK_TARGET}")
file(CREATE_LINK ${LINK_TARGET} ${LINK_NAME} SYMBOLIC)
endforeach()

0 comments on commit 3b5d661

Please sign in to comment.