From 8a78643eb06bf3df54a04905b4fe1d42c4714aef Mon Sep 17 00:00:00 2001 From: Andreas Michelis Date: Sat, 7 Dec 2024 19:53:58 +0200 Subject: [PATCH] Explained better the "implib" comment --- CMakeLists.txt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 88e00d72..9262859d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -277,12 +277,17 @@ else () target_link_libraries(${STLINK_LIB_SHARED} ${LIBUSB_LIBRARY} ${SSP_LIB}) endif() -# For windows, shared libraries go to `bin` and their implibs go to `lib` +# For MSVC: +# shared libraries (.dll) go to `bin` +# their Import Libraries (aka: ImpLibs; .lib files) go to `lib` if (MSVC) install(TARGETS ${STLINK_LIB_SHARED} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} LIBRARY DESTINATION ${CMAKE_INSTALL_BINDIR} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) +# For non-MSVC: +# shared libraries go to `lib` +# Archive destination is set to `lib` as failsafe else() install(TARGETS ${STLINK_LIB_SHARED} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}