summaryrefslogtreecommitdiff
path: root/cmake/helpers/EflMacros.cmake
diff options
context:
space:
mode:
authorMarcel Hollerbach <marcel-hollerbach@t-online.de>2017-01-21 13:27:17 +0100
committerMarcel Hollerbach <marcel-hollerbach@t-online.de>2017-01-23 18:23:40 +0100
commit2a5c2a0c3cc245567b6b0854648732099dc878b9 (patch)
tree3e3bba7d98ce8e905a89e1df597ded8e14b5a6e5 /cmake/helpers/EflMacros.cmake
parent9f2a2f7968c0b7e036093945cdc035427b681809 (diff)
cmake: improve versioning
The version defines are now done all the time. and the version pattern does mach the one from autotools. And supports release mode now.
Diffstat (limited to 'cmake/helpers/EflMacros.cmake')
-rw-r--r--cmake/helpers/EflMacros.cmake15
1 files changed, 15 insertions, 0 deletions
diff --git a/cmake/helpers/EflMacros.cmake b/cmake/helpers/EflMacros.cmake
index 12577d8128..bbb0dc17d1 100644
--- a/cmake/helpers/EflMacros.cmake
+++ b/cmake/helpers/EflMacros.cmake
@@ -854,3 +854,18 @@ function(EFL_MODULE _modname)
854 endif() 854 endif()
855 endif() 855 endif()
856endfunction() 856endfunction()
857
858macro(EFL_PROJECT version)
859 if ("${CMAKE_BUILD_TYPE}" STREQUAL "Release")
860 project(efl VERSION ${version})
861 else ("${CMAKE_BUILD_TYPE}" STREQUAL "Release")
862 execute_process(
863 COMMAND git rev-list --count HEAD
864 WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
865 OUTPUT_VARIABLE GIT_VERSION
866 OUTPUT_STRIP_TRAILING_WHITESPACE
867 )
868 project(efl VERSION ${version}.${GIT_VERSION})
869 endif ("${CMAKE_BUILD_TYPE}" STREQUAL "Release")
870 message("VERSION ${PROJECT_VERSION}")
871endmacro() \ No newline at end of file