Add library versioning to Make/CMake build systems

See #401 for the discussion.
Also bumps version number to 1.9.2 without the -dev,
because neither ELF nor MachO like such a suffix.
The -dev suffix will have to be restricted to the git tags.
This commit is contained in:
Ahmad Fatoum
2017-12-10 21:57:25 +01:00
parent de78fa69bc
commit d24b89bb0e
2 changed files with 34 additions and 14 deletions

View File

@ -2,7 +2,8 @@
project(raylib)
include("../utils.cmake")
set(PROJECT_VERSION 1.9.1-dev)
set(PROJECT_VERSION 1.9.2)
set(API_VERSION 1)
set(RAYLIB raylib) # Name of the generated library
### Config options ###
@ -123,7 +124,11 @@ if(${PLATFORM} MATCHES "PLATFORM_DESKTOP")
set(CMAKE_MACOSX_RPATH ON)
target_link_libraries(${RAYLIB}_shared ${LIBS_PRIVATE})
set_target_properties(${RAYLIB}_shared PROPERTIES PUBLIC_HEADER "raylib.h")
set_target_properties(${RAYLIB}_shared PROPERTIES
VERSION ${PROJECT_VERSION}
SOVERSION ${API_VERSION}
PUBLIC_HEADER "raylib.h"
)
if(WIN32)
install(
TARGETS ${RAYLIB}_shared