diff options
Diffstat (limited to 'ldmicro/CMakeLists.txt')
-rw-r--r-- | ldmicro/CMakeLists.txt | 16 |
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") |