Added the version and soversion of SFML libraries in CMake files

git-svn-id: https://sfml.svn.sourceforge.net/svnroot/sfml/branches/sfml2@1601 4e206d99-4929-0410-ac5d-dfc041789085
This commit is contained in:
laurentgom 2010-11-03 17:39:17 +00:00
parent f2176a98b4
commit 01edb04ad5

View File

@ -112,6 +112,10 @@ macro(sfml_add_library target)
set_target_properties(${target} PROPERTIES DEBUG_POSTFIX -s-d) set_target_properties(${target} PROPERTIES DEBUG_POSTFIX -s-d)
set_target_properties(${target} PROPERTIES RELEASE_POSTFIX -s) set_target_properties(${target} PROPERTIES RELEASE_POSTFIX -s)
endif() endif()
# set the version and soversion of the target (for compatible systems -- mostly Linuxes)
set_target_properties(${target} PROPERTIES SOVERSION ${VERSION_MAJOR}.${VERSION_MINOR})
set_target_properties(${target} PROPERTIES VERSION ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH})
# insert the major version number in the output filename # insert the major version number in the output filename
string(REGEX REPLACE "sfml(-.*)" "sfml${VERSION_MAJOR}\\1" OUTPUT_NAME ${target}) string(REGEX REPLACE "sfml(-.*)" "sfml${VERSION_MAJOR}\\1" OUTPUT_NAME ${target})