From 4bff48c5335f3757cb68fef7386a6fc62599ac6d Mon Sep 17 00:00:00 2001 From: nkaskov Date: Tue, 9 Jan 2024 15:13:34 +0000 Subject: [PATCH] CMAKE_INSTALL_PREFIX processing added. --- CMakeLists.txt | 6 +++++- cmake/create-symlinks.cmake | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index a11acadf..12351ffc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -108,7 +108,11 @@ if(PROOF_PRODUCER_VERSION_INCREMENT) string(APPEND CPACK_PACKAGE_VERSION "-${PROOF_PRODUCER_VERSION_INCREMENT}") endif() -set(CPACK_PACKAGING_INSTALL_PREFIX "/usr/lib/proof-producer") +if (NOT CMAKE_INSTALL_PREFIX) + set(CMAKE_INSTALL_PREFIX "/usr/lib/proof-producer") +endif() + +set(CPACK_PACKAGING_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX}) install(SCRIPT cmake/create-symlinks.cmake) diff --git a/cmake/create-symlinks.cmake b/cmake/create-symlinks.cmake index 01d75319..551c3e68 100644 --- a/cmake/create-symlinks.cmake +++ b/cmake/create-symlinks.cmake @@ -6,7 +6,7 @@ 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}") + set(LINK_TARGET "${CMAKE_INSTALL_PREFIX}/bin/${BINARY}") message("${LINK_NAME} -> ${LINK_TARGET}") file(CREATE_LINK ${LINK_TARGET} ${LINK_NAME} SYMBOLIC) endforeach() \ No newline at end of file