Navigation Menu

Skip to content

Commit

Permalink
cmake: load version from file
Browse files Browse the repository at this point in the history
  • Loading branch information
kou committed Apr 17, 2012
1 parent 61c8685 commit bb30ab9
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions CMakeLists.txt
Expand Up @@ -17,13 +17,13 @@
cmake_minimum_required(VERSION 2.6)
project(mroonga)

set(MRN_VERSION_MAJOR 2)
set(MRN_VERSION_MINOR 0)
set(MRN_VERSION_MICRO 2)
set(MRN_VERSION "${MRN_VERSION_MAJOR}.${MRN_VERSION_MINOR}${MRN_VERSION_MICRO}")
# TODO: FIXME
set(MRN_VERSION_IN_HEX
"0x0${MRN_VERSION_MAJOR}${MRN_VERSION_MINOR}${MRN_VERSION_MICRO}")
file(READ ${CMAKE_SOURCE_DIR}/version MRN_VERSION)
file(READ ${CMAKE_SOURCE_DIR}/version_major MRN_VERSION_MAJOR)
file(READ ${CMAKE_SOURCE_DIR}/version_minor MRN_VERSION_MINOR)
file(READ ${CMAKE_SOURCE_DIR}/version_micro MRN_VERSION_MICRO)
file(READ ${CMAKE_SOURCE_DIR}/version_in_hex MRN_VERSION_IN_HEX)
file(READ ${CMAKE_SOURCE_DIR}/plugin_version MRN_PLUGIN_VERSION)

set(MRN_PACKAGE_STRING "${PROJECT_NAME} ${MRN_VERSION}")

include(${CMAKE_SOURCE_DIR}/build/cmake_modules/ReadFileList.cmake)
Expand Down

0 comments on commit bb30ab9

Please sign in to comment.