From: vsr Date: Sun, 3 Oct 2021 08:18:28 +0000 (+0300) Subject: bos #26458 Versioning of sources via git commit id (sha1) X-Git-Tag: V9_8_0a1^2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=b921ed7592b900dfe7b5c695f21c5ff2bbf5a608;p=modules%2Fgui.git bos #26458 Versioning of sources via git commit id (sha1) --- diff --git a/CMakeLists.txt b/CMakeLists.txt index f2f7a3c39..d7baa8e87 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -19,20 +19,13 @@ CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8 FATAL_ERROR) INCLUDE(CMakeDependentOption) +# Project name +# ============ +# original PROJECT(SalomeGUI C CXX) - -# Versioning -# =========== -# Project name, upper case +# upper case STRING(TOUPPER ${PROJECT_NAME} PROJECT_NAME_UC) -SET(${PROJECT_NAME_UC}_MAJOR_VERSION 9) -SET(${PROJECT_NAME_UC}_MINOR_VERSION 7) -SET(${PROJECT_NAME_UC}_PATCH_VERSION 0) -SET(${PROJECT_NAME_UC}_VERSION - ${${PROJECT_NAME_UC}_MAJOR_VERSION}.${${PROJECT_NAME_UC}_MINOR_VERSION}.${${PROJECT_NAME_UC}_PATCH_VERSION}) -SET(${PROJECT_NAME_UC}_VERSION_DEV 1) - # Common CMake macros # =================== SET(CONFIGURATION_ROOT_DIR $ENV{CONFIGURATION_ROOT_DIR} CACHE PATH "Path to the Salome CMake configuration files") @@ -43,6 +36,11 @@ ELSE() MESSAGE(FATAL_ERROR "We absolutely need the Salome CMake configuration files, please define CONFIGURATION_ROOT_DIR !") ENDIF() +# Versioning +# =========== +SALOME_SETUP_VERSION(9.7.0 DEVELOPMENT) +MESSAGE(STATUS "Building ${PROJECT_NAME_UC} ${${PROJECT_NAME_UC}_VERSION} from \"${${PROJECT_NAME_UC}_GIT_SHA1}\"") + # Find KERNEL # =========== SET(KERNEL_ROOT_DIR $ENV{KERNEL_ROOT_DIR} CACHE PATH "Path to the Salome KERNEL") @@ -306,7 +304,6 @@ ADD_SUBDIRECTORY(tools) # Header configuration # ==================== -SALOME_XVERSION(${PROJECT_NAME}) SALOME_CONFIGURE_FILE(GUI_version.h.in GUI_version.h INSTALL ${SALOME_INSTALL_HEADERS}) # Configuration export diff --git a/bin/VERSION.in b/bin/VERSION.in index 98c751107..8c8009b09 100644 --- a/bin/VERSION.in +++ b/bin/VERSION.in @@ -1,3 +1,4 @@ [SALOME GUI] : @SALOMEGUI_VERSION@ [DEVELOPMENT] : @SALOMEGUI_VERSION_DEV@ [DESCRIPTION] : SALOME GUI module (SUIT) +[SHA1] : @SALOMEGUI_GIT_SHA1@ diff --git a/src/GUI_PY/CMakeLists.txt b/src/GUI_PY/CMakeLists.txt index 665c23033..934729369 100644 --- a/src/GUI_PY/CMakeLists.txt +++ b/src/GUI_PY/CMakeLists.txt @@ -35,7 +35,6 @@ PYQT_WRAP_UIC(_pyuic_SCRIPTS ${_pyuic_FILES} TARGET_NAME _target_name_pyuic) # scripts / static SET(_other_SCRIPTS - __init__.py genericdialog.py helper.py mytestdialog.py @@ -48,6 +47,7 @@ SET(_bin_SCRIPTS ) SALOME_CONFIGURE_FILE(qtsalome.py.in qtsalome.py) +SALOME_CONFIGURE_FILE(__init__.py __init__.py INSTALL ${SALOME_INSTALL_PYTHON}/salome/gui) SET(_gen_SCRIPTS ${CMAKE_CURRENT_BINARY_DIR}/qtsalome.py diff --git a/src/GUI_PY/__init__.py b/src/GUI_PY/__init__.py index 9c9f18a29..f834ed225 100644 --- a/src/GUI_PY/__init__.py +++ b/src/GUI_PY/__init__.py @@ -19,3 +19,5 @@ # # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # + +__version__ = "@SALOMEGUI_GIT_SHA1@"