Skip to content

Commit

Permalink
CMakeLists.txt: Fix .so version naming
Browse files Browse the repository at this point in the history
Signed-off-by: Andrew Andrianov <andrew@ncrmnt.org>
  • Loading branch information
nekromant committed Aug 15, 2016
1 parent 5e2d110 commit 10bf12e
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,17 @@ add_library(${PROJECT_NAME} SHARED
${STLINK_HEADERS} # header files for ide projects generated by cmake
${STLINK_SOURCE})
target_link_libraries(${PROJECT_NAME} ${LIBUSB_LIBRARY})
SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES SOVERSION ${STLINK_PACKAGE_VERSION}
VERSION ${STLINK_PACKAGE_VERSION_MAJOR})

if (WIN32 OR MSYS OR MINGW)
set(STLINK_SHARED_VERSION
${STLINK_PACKAGE_VERSION_MAJOR}.${STLINK_PACKAGE_VERSION_MINOR}
else()
set(STLINK_SHARED_VERSION
${STLINK_PACKAGE_VERSION_MAJOR}.${STLINK_PACKAGE_VERSION_MINOR}.${STLINK_PACKAGE_VERSION_PATCH})
endif()

SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES SOVERSION ${STLINK_PACKAGE_VERSION_MAJOR}
VERSION ${STLINK_SHARED_VERSION})

add_library(${PROJECT_NAME}static STATIC
${STLINK_HEADERS} # header files for ide projects generated by cmake
Expand Down

0 comments on commit 10bf12e

Please sign in to comment.