From 147af535655a6f60c89dce5815a3cd781428b699 Mon Sep 17 00:00:00 2001 From: Giovanni <561184+wargio@users.noreply.github.com> Date: Tue, 24 May 2022 20:47:59 +0200 Subject: [PATCH] Fix the lib name on windows (#2950) --- cmake/BundledRizin.cmake | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/cmake/BundledRizin.cmake b/cmake/BundledRizin.cmake index 4dcf4301..83e4c128 100644 --- a/cmake/BundledRizin.cmake +++ b/cmake/BundledRizin.cmake @@ -46,6 +46,10 @@ else() link_directories("${RIZIN_INSTALL_DIR}/lib") endif() +# TODO: This version number should be fetched automatically +# instead of being hardcoded. +set (Rizin_VERSION 0.4) + set (RZ_LIBS rz_core rz_config rz_cons rz_io rz_util rz_flag rz_asm rz_debug rz_hash rz_bin rz_lang rz_il rz_analysis rz_parse rz_bp rz_egg rz_reg rz_search rz_syscall rz_socket rz_magic rz_crypto rz_type rz_diff rz_sign @@ -62,11 +66,11 @@ target_include_directories(Rizin INTERFACE install(TARGETS Rizin EXPORT CutterTargets) if (WIN32) - foreach(_lib ${RZ_LIBS} ${RZ_EXTRA_LIBS}) - install(FILES "${RIZIN_INSTALL_DIR}/${RZ_INSTALL_BINPATH}/${_lib}.dll" DESTINATION "${CMAKE_INSTALL_BINDIR}") + foreach(_lib ${RZ_LIBS} ${RZ_EXTRA_LIBS}) + install(FILES "${RIZIN_INSTALL_DIR}/${_lib}-${Rizin_VERSION}.dll" DESTINATION "${CMAKE_INSTALL_BINDIR}") endforeach() foreach(_exe ${RZ_BIN}) - install(FILES "${RIZIN_INSTALL_DIR}/${RZ_INSTALL_BINPATH}/${_exe}.exe" DESTINATION "${CMAKE_INSTALL_BINDIR}") + install(FILES "${RIZIN_INSTALL_DIR}/${_exe}.exe" DESTINATION "${CMAKE_INSTALL_BINDIR}") endforeach() install(DIRECTORY "${RIZIN_INSTALL_DIR}/share" DESTINATION ".") install(DIRECTORY "${RIZIN_INSTALL_DIR}/include" DESTINATION "."