Skip to content

Commit

Permalink
Explained better the "implib" comment
Browse files Browse the repository at this point in the history
  • Loading branch information
a-michelis committed Dec 7, 2024
1 parent 04b8d0b commit 8a78643
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down

0 comments on commit 8a78643

Please sign in to comment.