From d721c151b0c1dcab2b53f58d331090dffed73c86 Mon Sep 17 00:00:00 2001 From: Jean-Philippe ARGAUD Date: Fri, 27 Oct 2023 15:18:05 +0200 Subject: [PATCH] Adding automatic sha1 storage during installation update --- src/daSalome/CMakeLists.txt | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/daSalome/CMakeLists.txt b/src/daSalome/CMakeLists.txt index 76012f9..cbe0fbd 100644 --- a/src/daSalome/CMakeLists.txt +++ b/src/daSalome/CMakeLists.txt @@ -27,9 +27,16 @@ if( NOT ADAO_SALOME_MODULE) else(NOT ADAO_SALOME_MODULE) + if (WIN32) + SET(ENV{PYTHONPATH} "${CMAKE_INSTALL_PREFIX}/${ADAO_SCRIPT_PYTHON};$ENV{PYTHONPATH}") + else(WIN32) + SET(ENV{PYTHONPATH} "${CMAKE_INSTALL_PREFIX}/${ADAO_SCRIPT_PYTHON}:$ENV{PYTHONPATH}") + endif(WIN32) + 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 - \"import adao\n__version__ = adao.__version__\n__sha1__ = \'\'\" + \"__version__ = \'${ADAO_VERSION}\'\n__sha1__ = \'${ADAO_GIT_SHA1}\'\" ) ") -- 2.39.2