summaryrefslogtreecommitdiff
path: root/ldmicro/CMakeLists.txt
diff options
context:
space:
mode:
authorakshay-c2019-05-13 09:38:33 +0530
committerakshay-c2019-05-13 09:38:33 +0530
commit8aeb1edb1da821e47f3d497dcce1c25dbbb3c6ed (patch)
tree57b309dfc70d93aa1d08f280ff7a113ca4b17cb9 /ldmicro/CMakeLists.txt
parent3a860d665bf30156d88151998da71e6aebf3f11c (diff)
downloadLDMicroGtk-8aeb1edb1da821e47f3d497dcce1c25dbbb3c6ed.tar.gz
LDMicroGtk-8aeb1edb1da821e47f3d497dcce1c25dbbb3c6ed.tar.bz2
LDMicroGtk-8aeb1edb1da821e47f3d497dcce1c25dbbb3c6ed.zip
Better functionality to differentiate between flavours of UbuntuHEADmaster
Diffstat (limited to 'ldmicro/CMakeLists.txt')
-rw-r--r--ldmicro/CMakeLists.txt16
1 files changed, 15 insertions, 1 deletions
diff --git a/ldmicro/CMakeLists.txt b/ldmicro/CMakeLists.txt
index 023d17a..b1772a8 100644
--- a/ldmicro/CMakeLists.txt
+++ b/ldmicro/CMakeLists.txt
@@ -30,6 +30,20 @@ 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)
+ STRING(TOLOWER ${RELEASE_CODENAME} RELEASE_LOWER)
+ message("-- os_version_suffix:${RELEASE_CODENAME}")
+ if(${RELEASE_LOWER} MATCHES "trusty")
+ MESSAGE("Add flag to compile for Ubuntu 14")
+ add_definitions(-D__UBUNTU_14_)
+ SET(CMAKE_BUILD_TYPE Debug)
+ MESSAGE("Build type is " ${CMAKE_BUILD_TYPE})
+ else()
+ MESSAGE("Add flag to compile for Ubuntu 16")
+ add_definitions(-D__UBUNTU_16_)
+ endif()
use_cxx11()
# set_property(DIRECTORY PROPERTY ADDITIONAL_MAKE_CLEAN_FILES "${CMAKE_CURRENT_SOURCE_DIR}/build/")
@@ -158,7 +172,7 @@ IF(UNIX)
set(CPACK_GENERATOR "DEB")
set(CPACK_PACKAGE_VERSION_MAJOR "2")
set(CPACK_PACKAGE_VERSION_MINOR "2")
- set(CPACK_PACKAGE_VERSION_PATCH "4")
+ set(CPACK_PACKAGE_VERSION_PATCH "5")
set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON)
set(CPACK_PACKAGE_DESCRIPTION "Ladder Logic editor, simulator and compiler for 8 bit microcontrollers")