diff options
author | akshay-c | 2019-06-27 11:31:42 +0530 |
---|---|---|
committer | akshay-c | 2019-06-27 11:31:42 +0530 |
commit | 89e378f9c03698babcf1b6b3465fee24d411125d (patch) | |
tree | 80b246744151b259edd4c675badad24c502af23b /ldmicro | |
parent | d173a9be97cab476f2dd1aa9a43fef06e215ee57 (diff) | |
download | LDmicroQt-89e378f9c03698babcf1b6b3465fee24d411125d.tar.gz LDmicroQt-89e378f9c03698babcf1b6b3465fee24d411125d.tar.bz2 LDmicroQt-89e378f9c03698babcf1b6b3465fee24d411125d.zip |
Combined version detection
Diffstat (limited to 'ldmicro')
-rw-r--r-- | ldmicro/CMakeLists.txt | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/ldmicro/CMakeLists.txt b/ldmicro/CMakeLists.txt index 12fb4e5..35ffc05 100644 --- a/ldmicro/CMakeLists.txt +++ b/ldmicro/CMakeLists.txt @@ -2,6 +2,11 @@ cmake_minimum_required(VERSION 2.6) project(LDMicro) +## Version control + set (LDMicro_VERSION_MAJOR 2) + set (LDMicro_VERSION_MINOR 2) + set (LDMicro_VERSION_PATCH 0) + macro(use_cxx14) if (CMAKE_VERSION VERSION_LESS "3.1") @@ -30,6 +35,7 @@ IF(UNIX) add_definitions ("-g") add_definitions(-D__UNIX__) add_definitions(-DLDLANG_EN) + execute_process(COMMAND lsb_release -cs OUTPUT_VARIABLE RELEASE_CODENAME OUTPUT_STRIP_TRAILING_WHITESPACE) @@ -80,10 +86,6 @@ IF(UNIX) add_custom_target(LDMicro_SCRIPT_GENERATED_FILES DEPENDS ${SCRIPT_GENERATED_FILES}) - ## Version control - set (LDMicro_VERSION_MAJOR 2) - set (LDMicro_VERSION_MINOR 2) - ## configure a header file to pass some of the CMake settings ## to the source code include_directories("${CMAKE_CURRENT_SOURCE_DIR}/lib/linuxUI") @@ -178,9 +180,9 @@ endif() ##Debian package creation set(CPACK_GENERATOR "DEB") - set(CPACK_PACKAGE_VERSION_MAJOR "2") - set(CPACK_PACKAGE_VERSION_MINOR "2") - set(CPACK_PACKAGE_VERSION_PATCH "0") + set(CPACK_PACKAGE_VERSION_MAJOR ${LDMicro_VERSION_MAJOR}) + set(CPACK_PACKAGE_VERSION_MINOR ${LDMicro_VERSION_MINOR}) + set(CPACK_PACKAGE_VERSION_PATCH ${LDMicro_VERSION_PATCH}) set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON) set(CPACK_PACKAGE_DESCRIPTION "Ladder Logic editor, simulator and compiler for 8 bit microcontrollers") |