From c8fda2e595f2b913531008b5e9a2b273dc0c0bd3 Mon Sep 17 00:00:00 2001 From: d2weber <29163905+d2weber@users.noreply.github.com> Date: Tue, 16 Jun 2026 20:58:41 +0200 Subject: [PATCH] fix paths in CMakeLists.txt --- CMakeLists.txt | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 135031a51..51a1d4923 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -18,11 +18,13 @@ else() set(ARCH_DIR "./") endif() +set(CARGO_TARGET_DIR "${CMAKE_BINARY_DIR}/target/${ARCH_DIR}/release") + add_custom_command( OUTPUT - "${CMAKE_BINARY_DIR}/target/release/libdeltachat.a" - "${CMAKE_BINARY_DIR}/target/release/libdeltachat.${DYNAMIC_EXT}" - "${CMAKE_BINARY_DIR}/target/release/pkgconfig/deltachat.pc" + "${CARGO_TARGET_DIR}/libdeltachat.a" + "${CARGO_TARGET_DIR}/libdeltachat.${DYNAMIC_EXT}" + "${CARGO_TARGET_DIR}/pkgconfig/deltachat.pc" COMMAND PREFIX=${CMAKE_INSTALL_PREFIX} LIBDIR=${CMAKE_INSTALL_FULL_LIBDIR} @@ -35,9 +37,9 @@ add_custom_target( lib_deltachat ALL DEPENDS - "${CMAKE_BINARY_DIR}/target/release/libdeltachat.a" - "${CMAKE_BINARY_DIR}/target/release/libdeltachat.${DYNAMIC_EXT}" - "${CMAKE_BINARY_DIR}/target/release/pkgconfig/deltachat.pc" + "${CARGO_TARGET_DIR}/libdeltachat.a" + "${CARGO_TARGET_DIR}/libdeltachat.${DYNAMIC_EXT}" + "${CARGO_TARGET_DIR}/pkgconfig/deltachat.pc" ) add_custom_command( @@ -67,6 +69,6 @@ install(FILES ) install(FILES "deltachat-ffi/deltachat.h" DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) -install(FILES "${CMAKE_BINARY_DIR}/target/${ARCH_DIR}/release/libdeltachat.a" DESTINATION ${CMAKE_INSTALL_LIBDIR}) -install(FILES "${CMAKE_BINARY_DIR}/target/${ARCH_DIR}/release/libdeltachat.${DYNAMIC_EXT}" DESTINATION ${CMAKE_INSTALL_LIBDIR}) -install(FILES "${CMAKE_BINARY_DIR}/target/${ARCH_DIR}/release/pkgconfig/deltachat.pc" DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig) +install(FILES "${CARGO_TARGET_DIR}/libdeltachat.a" DESTINATION ${CMAKE_INSTALL_LIBDIR}) +install(FILES "${CARGO_TARGET_DIR}/libdeltachat.${DYNAMIC_EXT}" DESTINATION ${CMAKE_INSTALL_LIBDIR}) +install(FILES "${CARGO_TARGET_DIR}/pkgconfig/deltachat.pc" DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)