mirror of
https://github.com/minetest/irrlicht.git
synced 2024-12-24 17:50:31 +01:00
Include revision in SOVERSION for (in)compatibility checks
This commit is contained in:
parent
51f0acb7c1
commit
f6ec00e1c4
@ -7,8 +7,10 @@ else()
|
||||
cmake_policy(VERSION 3.9)
|
||||
endif()
|
||||
|
||||
set(IRRLICHTMT_REVISION 6)
|
||||
|
||||
project(Irrlicht
|
||||
VERSION 1.9.0
|
||||
VERSION 1.9.0.${IRRLICHTMT_REVISION}
|
||||
LANGUAGES CXX
|
||||
)
|
||||
|
||||
|
@ -42,6 +42,20 @@ elseif(MSVC)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Sanity-check version
|
||||
|
||||
include(CheckCXXSourceCompiles)
|
||||
set(CMAKE_REQUIRED_INCLUDES ${PROJECT_SOURCE_DIR}/include)
|
||||
unset(REVISION_SANITY_CHECK CACHE)
|
||||
check_cxx_source_compiles("#include <IrrCompileConfig.h>\n\
|
||||
#if IRRLICHT_VERSION_MT_REVISION != ${IRRLICHTMT_REVISION}\n\
|
||||
#error\n\
|
||||
#endif\n\
|
||||
int main() {}" REVISION_SANITY_CHECK)
|
||||
if(NOT REVISION_SANITY_CHECK)
|
||||
message(FATAL_ERROR "IrrlichtMt revision number mismatches between CMake and headers.")
|
||||
endif()
|
||||
|
||||
# Required libs
|
||||
|
||||
find_package(ZLIB REQUIRED)
|
||||
@ -298,7 +312,6 @@ endif()
|
||||
|
||||
set_target_properties(IrrlichtMt PROPERTIES
|
||||
VERSION ${PROJECT_VERSION}
|
||||
SOVERSION ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}
|
||||
)
|
||||
|
||||
if(WIN32)
|
||||
|
Loading…
Reference in New Issue
Block a user