Fix the lib name on windows (#2950)

This commit is contained in:
Giovanni 2022-05-24 20:47:59 +02:00 committed by GitHub
parent c9e8686ecb
commit 147af53565
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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 "."