mirror of
https://github.com/SFML/CSFML.git
synced 2026-10-27 13:36:12 +01:00
Use built-in project version variables
This commit is contained in:
1 parent
356eeb3ae6
commit
fbf4b000ef
3 files changed
+5
-10
No files matched your search
+1
-6
@@ -13,16 +13,11 @@ endmacro()
|
|||||||
csfml_set_option(CMAKE_BUILD_TYPE Release STRING "Choose the type of build (Debug or Release)")
|
csfml_set_option(CMAKE_BUILD_TYPE Release STRING "Choose the type of build (Debug or Release)")
|
||||||
|
|
||||||
# project name
|
# project name
|
||||||
project(CSFML)
|
project(CSFML VERSION 2.5.1)
|
||||||
|
|
||||||
# include the configuration file
|
# include the configuration file
|
||||||
include(${PROJECT_SOURCE_DIR}/cmake/Config.cmake)
|
include(${PROJECT_SOURCE_DIR}/cmake/Config.cmake)
|
||||||
|
|
||||||
# setup version numbers
|
|
||||||
set(VERSION_MAJOR 2)
|
|
||||||
set(VERSION_MINOR 5)
|
|
||||||
set(VERSION_PATCH 1)
|
|
||||||
|
|
||||||
# add the CSFML header path
|
# add the CSFML header path
|
||||||
include_directories(${PROJECT_SOURCE_DIR}/include)
|
include_directories(${PROJECT_SOURCE_DIR}/include)
|
||||||
|
|
||||||
|
|||||||
+3
-3
@@ -20,7 +20,7 @@ macro(csfml_add_library target)
|
|||||||
if(SFML_OS_WINDOWS)
|
if(SFML_OS_WINDOWS)
|
||||||
# include the major version number in Windows shared library names (but not import library names)
|
# include the major version number in Windows shared library names (but not import library names)
|
||||||
set_target_properties(${target} PROPERTIES DEBUG_POSTFIX -d)
|
set_target_properties(${target} PROPERTIES DEBUG_POSTFIX -d)
|
||||||
set_target_properties(${target} PROPERTIES SUFFIX "-${VERSION_MAJOR}${CMAKE_SHARED_LIBRARY_SUFFIX}")
|
set_target_properties(${target} PROPERTIES SUFFIX "-${PROJECT_VERSION_MAJOR}${CMAKE_SHARED_LIBRARY_SUFFIX}")
|
||||||
else()
|
else()
|
||||||
set_target_properties(${target} PROPERTIES DEBUG_POSTFIX -d)
|
set_target_properties(${target} PROPERTIES DEBUG_POSTFIX -d)
|
||||||
endif()
|
endif()
|
||||||
@@ -32,8 +32,8 @@ macro(csfml_add_library target)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
# set the version and soversion of the target (for compatible systems -- mostly Linuxes)
|
# 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 SOVERSION ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR})
|
||||||
set_target_properties(${target} PROPERTIES VERSION ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH})
|
set_target_properties(${target} PROPERTIES VERSION ${PROJECT_VERSION})
|
||||||
|
|
||||||
# set the target's folder (for IDEs that support it, e.g. Visual Studio)
|
# set the target's folder (for IDEs that support it, e.g. Visual Studio)
|
||||||
set_target_properties(${target} PROPERTIES FOLDER "CSFML")
|
set_target_properties(${target} PROPERTIES FOLDER "CSFML")
|
||||||
|
|||||||
+1
-1
@@ -38,7 +38,7 @@ PROJECT_NAME = CSFML
|
|||||||
# could be handy for archiving the generated documentation or if some version
|
# could be handy for archiving the generated documentation or if some version
|
||||||
# control system is used.
|
# control system is used.
|
||||||
|
|
||||||
PROJECT_NUMBER = @VERSION_MAJOR@.@VERSION_MINOR@.@VERSION_PATCH@
|
PROJECT_NUMBER = @PROJECT_VERSION@
|
||||||
|
|
||||||
# Using the PROJECT_BRIEF tag one can provide an optional one line description
|
# Using the PROJECT_BRIEF tag one can provide an optional one line description
|
||||||
# for a project that appears at the top of each page and should give viewer a
|
# for a project that appears at the top of each page and should give viewer a
|
||||||
|
|||||||
Reference in new issue
Block a user