From: Jean-Philippe ARGAUD Date: Thu, 26 Oct 2023 13:25:09 +0000 (+0200) Subject: Adding automatic sha1 storage during installation X-Git-Tag: V9_12_0b1~9 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=cb65d08dfb9df6c7640cee7d895c218f8ee51a30;p=modules%2Fadao.git Adding automatic sha1 storage during installation --- diff --git a/src/daSalome/CMakeLists.txt b/src/daSalome/CMakeLists.txt index ee70839..2e53eea 100644 --- a/src/daSalome/CMakeLists.txt +++ b/src/daSalome/CMakeLists.txt @@ -25,4 +25,15 @@ if( NOT ADAO_SALOME_MODULE) install(DIRECTORY daYacsSchemaCreator daYacsIntegration DESTINATION "${ADAO_SCRIPT_PYTHON}/adao") install(FILES __init__.py adaoBuilder.py DESTINATION "${ADAO_SCRIPT_PYTHON}/adao") +else(NOT ADAO_SALOME_MODULE) + + SET(ENV{PYTHONPATH} "${CMAKE_INSTALL_PREFIX}/${ADAO_SCRIPT_PYTHON}:$ENV{PYTHONPATH}") + EXECUTE_PROCESS(COMMAND python3 -c "import adao; print(adao.__version__)" OUTPUT_VARIABLE ADAO_VERSION OUTPUT_STRIP_TRAILING_WHITESPACE) + SALOME_SETUP_VERSION(${ADAO_VERSION}) + INSTALL(CODE " + FILE(WRITE ${CMAKE_INSTALL_PREFIX}/${ADAO_SCRIPT_PYTHON_SALOME}/salome/adao/__init__.py + \"__version__ = \'${ADAO_VERSION}\'\n__sha1__ = \'${ADAO_GIT_SHA1}\'\" + ) + ") + endif(NOT ADAO_SALOME_MODULE)