Commit 9eb9c749 authored by Johannes Zarl-Zierl's avatar Johannes Zarl-Zierl
Browse files

Create version files without the use of ECM

ECM is not acceptable to marble as a required dependeny, so creating the
*ConfigVersion.cmake and *_version.h files should be done using only standard CMake commands.
parent 549f1933
// This file was generated by a script: DO NOT EDIT!
#ifndef @HEADER_PREFIX@_VERSION_H
#define @HEADER_PREFIX@_VERSION_H
#define @HEADER_PREFIX@_VERSION_STRING "@PROJECT_VERSION@"
#define @HEADER_PREFIX@_VERSION_MAJOR @PROJECT_VERSION_MAJOR@
#define @HEADER_PREFIX@_VERSION_MINOR @PROJECT_VERSION_MINOR@
#define @HEADER_PREFIX@_VERSION_PATCH @PROJECT_VERSION_PATCH@
#define @HEADER_PREFIX@_VERSION ((@PROJECT_VERSION_MAJOR@<<16)|(@PROJECT_VERSION_MINOR@<<8)|(@PROJECT_VERSION_PATCH@))
#endif
......@@ -6,14 +6,15 @@ INCLUDE_DIRECTORIES(
)
set(ASTRO_CMAKECONFIGNAME Astro)
include(ECMSetupVersion)
ecm_setup_version(PROJECT
VARIABLE_PREFIX ASTRO_LIB
VERSION_HEADER "${CMAKE_CURRENT_BINARY_DIR}/astro_version.h"
PACKAGE_VERSION_FILE "${CMAKE_CURRENT_BINARY_DIR}/${ASTRO_CMAKECONFIGNAME}ConfigVersion.cmake"
COMPATIBILITY AnyNewerVersion
SOVERSION 1
)
set(ASTRO_LIB_VERSION ${PROJECT_VERSION})
set(ASTRO_LIB_VERSION_MAJOR ${PROJECT_VERSION_MAJOR})
set(ASTRO_LIB_VERSION_MINOR ${PROJECT_VERSION_MINOR})
set(ASTRO_LIB_VERSION_PATCH ${PROJECT_VERSION_PATCH})
set(ASTRO_LIB_VERSION_SOVERSION 1)
set(HEADER_PREFIX ASTRO_LIB)
configure_file("${marble_SOURCE_DIR}/cmake/templates/versionheader.h.in" "${CMAKE_CURRENT_BINARY_DIR}/astro_version.h")
include(CMakePackageConfigHelpers)
write_basic_package_version_file("${CMAKE_CURRENT_BINARY_DIR}/${ASTRO_CMAKECONFIGNAME}ConfigVersion.cmake" VERSION "${PROJECT_VERSION}" COMPATIBILITY AnyNewerVersion)
ADD_DEFINITIONS(-O3)
......
......@@ -44,14 +44,16 @@ INCLUDE(graphicsview/CMakeLists.txt)
INCLUDE(layers/CMakeLists.txt)
INCLUDE(osm/CMakeLists.txt)
include(ECMSetupVersion)
ecm_setup_version(PROJECT
VARIABLE_PREFIX MARBLE_LIB
VERSION_HEADER "${CMAKE_CURRENT_BINARY_DIR}/marble_version.h"
PACKAGE_VERSION_FILE "${CMAKE_CURRENT_BINARY_DIR}/${MARBLE_CMAKECONFIGNAME}ConfigVersion.cmake"
COMPATIBILITY AnyNewerVersion
SOVERSION 28
)
set(MARBLE_LIB_VERSION ${PROJECT_VERSION})
set(MARBLE_LIB_VERSION_MAJOR ${PROJECT_VERSION_MAJOR})
set(MARBLE_LIB_VERSION_MINOR ${PROJECT_VERSION_MINOR})
set(MARBLE_LIB_VERSION_PATCH ${PROJECT_VERSION_PATCH})
set(MARBLE_LIB_VERSION_SOVERSION 28)
set(HEADER_PREFIX MARBLE_LIB)
configure_file("${marble_SOURCE_DIR}/cmake/templates/versionheader.h.in" "${CMAKE_CURRENT_BINARY_DIR}/marble_version.h")
include(CMakePackageConfigHelpers)
write_basic_package_version_file("${CMAKE_CURRENT_BINARY_DIR}/${MARBLE_CMAKECONFIGNAME}ConfigVersion.cmake" VERSION "${PROJECT_VERSION}" COMPATIBILITY AnyNewerVersion)
########### next target ###############
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment