]> SALOME platform Git repositories - modules/adao.git/commitdiff
Salome HOME
redispatch ADAO files between tool and module
authorPaul RASCLE <paul.rascle@edf.fr>
Wed, 20 Mar 2019 14:43:09 +0000 (15:43 +0100)
committerJean-Philippe ARGAUD <jean-philippe.argaud@edf.fr>
Wed, 27 Mar 2019 09:33:52 +0000 (10:33 +0100)
CMakeLists.txt
bin/CMakeLists.txt
resources/CMakeLists.txt
resources/SalomeApp.xml
src/CMakeLists.txt
src/daComposant/CMakeLists.txt
src/daEficas/CMakeLists.txt
src/daSalome/CMakeLists.txt
src/daSalome/daGUI/CMakeLists.txt

index a791c1214a90a8a401bb6c63149c9945a8a21d15..68ff208118a09f34d55303b731fe64ac738f85dc 100644 (file)
@@ -44,28 +44,33 @@ set(ADAO_RES "share/salome/resources/adao")
 set(ADAO_BIN "bin/salome")
 set(ADAO_BIN_TEST "bin/salome/test")
 
+set(CONFIGURATION_ROOT_DIR $ENV{CONFIGURATION_ROOT_DIR} CACHE PATH "Path to the Salome CMake configuration files")
+if(EXISTS ${CONFIGURATION_ROOT_DIR})
+  list(APPEND CMAKE_MODULE_PATH "${CONFIGURATION_ROOT_DIR}/cmake")
+  include(SalomeMacros)
+else()
+  message(FATAL_ERROR "We absolutely need the Salome CMake configuration files, please define CONFIGURATION_ROOT_DIR !")
+endif()
+
 if(ADAO_PYTHON_MODULE)
+
+  if(ADAO_BUILD_DOC)
+    find_package(SalomeSphinx)
+    if(NOT SPHINX_FOUND)
+      message(FATAL_ERROR "Sphinx has not been found !")
+    endif(NOT SPHINX_FOUND)
+  endif(ADAO_BUILD_DOC)
   
   add_subdirectory(src)
+  add_subdirectory(resources)
+  add_subdirectory(bin)
+  add_subdirectory(test)
+  add_subdirectory(i18n)
+  add_subdirectory(doc)
   
 else(ADAO_PYTHON_MODULE)
 
   # ADAO_SALOME_MODULE
-  set(CONFIGURATION_ROOT_DIR $ENV{CONFIGURATION_ROOT_DIR} CACHE PATH "Path to the Salome CMake configuration files")
-  if(EXISTS ${CONFIGURATION_ROOT_DIR})
-    list(APPEND CMAKE_MODULE_PATH "${CONFIGURATION_ROOT_DIR}/cmake")
-    include(SalomeMacros)
-
-    if(ADAO_BUILD_DOC)
-      find_package(SalomeSphinx)
-      if(NOT SPHINX_FOUND)
-       message(FATAL_ERROR "Sphinx has not been found !")
-      endif(NOT SPHINX_FOUND)
-    endif(ADAO_BUILD_DOC)
-    
-  else()
-    message(FATAL_ERROR "We absolutely need the Salome CMake configuration files, please define CONFIGURATION_ROOT_DIR !")
-  endif()
 
   find_package(SalomeOmniORB REQUIRED)
   find_package(SalomeOmniORBPy REQUIRED)
@@ -75,7 +80,7 @@ else(ADAO_PYTHON_MODULE)
   if(NOT ADAO_PYTHON_ROOT_DIR)
     message(FATAL_ERROR "ADAO_PYTHON_ROOT_DIR cmake variable has to be set if ADAO_SALOME_MODULE option is ON.")
   endif(NOT ADAO_PYTHON_ROOT_DIR)
-  find_file(FILE_OF_ADAO_PYTHON_MODULE "daCore/__init__.py" PATHS "${ADAO_PYTHON_ROOT_DIR}/${ADAO_SCRIPT_PYTHON_SALOME}/adao")
+  find_file(FILE_OF_ADAO_PYTHON_MODULE "daCore/__init__.py" PATHS "${ADAO_PYTHON_ROOT_DIR}/${ADAO_SCRIPT_PYTHON}/adao")
   if(NOT FILE_OF_ADAO_PYTHON_MODULE)
     message(FATAL_ERROR "Could not locate daCore/__init__.py into specified ADAO_PYTHON_ROOT_DIR directory ! Sounds bad !")
   endif(NOT FILE_OF_ADAO_PYTHON_MODULE)
@@ -93,10 +98,5 @@ else(ADAO_PYTHON_MODULE)
   add_subdirectory(src)
   add_subdirectory(idl)
   add_subdirectory(resources)
-  add_subdirectory(bin)
-  add_subdirectory(examples)
-  add_subdirectory(test)
-  add_subdirectory(i18n)
-  add_subdirectory(doc)
   
 endif(ADAO_PYTHON_MODULE)
index 7e2fcc6cd733a540502e4a8a0815a3362cd72995..54cce6a1579f9ca4ef48196f108276e880e61091 100644 (file)
@@ -29,4 +29,4 @@ set(ENV{PYTHONPATH} \${CATA_ADD_PYTHONPATH}:\$ENV{PYTHONPATH})
 EXECUTE_PROCESS(COMMAND \${PY_EXE_CATA} \${ADAO_CATA_GEN_FILE} \${OUTPUT_DIR} ADAO_Cata_V0.py)
 ENDMACRO(GENERATE_EFICAS_CATA_FOR_ADAO)" )
 
-INSTALL(CODE "GENERATE_EFICAS_CATA_FOR_ADAO( \"${PYTHON_EXECUTABLE}\" \"${CMAKE_CURRENT_SOURCE_DIR}/AdaoCatalogGenerator.py\" \"${CMAKE_INSTALL_PREFIX}/${ADAO_SCRIPT_PYTHON_SALOME}/adao/daEficas\" \"${CMAKE_INSTALL_PREFIX}/${ADAO_SCRIPT_PYTHON_SALOME}:${ADAO_PYTHON_ROOT_DIR}/${ADAO_SCRIPT_PYTHON}\" )")
+INSTALL(CODE "GENERATE_EFICAS_CATA_FOR_ADAO( \"${PYTHON_EXECUTABLE}\" \"${CMAKE_CURRENT_SOURCE_DIR}/AdaoCatalogGenerator.py\" \"${CMAKE_INSTALL_PREFIX}/${ADAO_SCRIPT_PYTHON}/adao/daEficas\" \"${CMAKE_INSTALL_PREFIX}/${ADAO_SCRIPT_PYTHON}\" )")
index c815e77c70a669563ffec1270d87d87d7c543c4a..b5845b2fec3c2979db32ef7ff39aa2179fac44ae 100644 (file)
@@ -18,4 +18,8 @@
 #
 # Author: Anthony Geay, anthony.geay@edf.fr, EDF R&D
 
-install(FILES ADAOCatalog.xml ADAOSchemaCatalog.xml SalomeApp.xml DESTINATION ${ADAO_RES})
+if(ADAO_SALOME_MODULE)
+  install(FILES SalomeApp.xml DESTINATION ${ADAO_RES})
+else(ADAO_SALOME_MODULE)
+  install(FILES ADAOCatalog.xml ADAOSchemaCatalog.xml DESTINATION ${ADAO_RES})
+endif(ADAO_SALOME_MODULE)
index 06f101354d5aac2688a2148d3dbbb8d3a9a11889..9ec56107a2424e09ecb1f9bbc879077114482679 100644 (file)
   </section>
   <section name="resources">
     <!-- Module resources -->
-    <parameter name="ADAO" value="${ADAO_ROOT_DIR}/share/salome/resources/adao"/>
+    <parameter name="ADAO" value="${ADAO_ENGINE_ROOT_DIR}/share/salome/resources/adao"/>
   </section>
   <section name="adao_help">
-    <parameter name="User's Guide/%1 module/(EN) User's Guide"           value="${ADAO_ROOT_DIR}/share/doc/salome/gui/ADAO/en/index.html"/>
-    <parameter name="User's Guide/%1 module/(FR) Guide de l'utilisateur" value="${ADAO_ROOT_DIR}/share/doc/salome/gui/ADAO/fr/index.html"/>
+    <parameter name="User's Guide/%1 module/(EN) User's Guide"           value="${ADAO_ENGINE_ROOT_DIR}/share/doc/salome/gui/ADAO/en/index.html"/>
+    <parameter name="User's Guide/%1 module/(FR) Guide de l'utilisateur" value="${ADAO_ENGINE_ROOT_DIR}/share/doc/salome/gui/ADAO/fr/index.html"/>
   </section>
 </document>
index 0d7714c36b5199ba0bc8fb270dc0a6fcf7382c4f..0d7263acf86c922f2514dabcdf369b3f0c4f6f24 100644 (file)
 
 if(ADAO_SALOME_MODULE)
   
-  install(FILES daSalome/adaoBuilder.py daSalome/__init__.py DESTINATION "${ADAO_SCRIPT_PYTHON_SALOME}/adao")
-  add_subdirectory(daComposant)
+  #install(FILES daSalome/adaoBuilder.py daSalome/__init__.py DESTINATION "${ADAO_SCRIPT_PYTHON_SALOME}/adao")
   add_subdirectory(daSalome)
-  add_subdirectory(daEficas)
   
 else(ADAO_SALOME_MODULE)
   
-  install(FILES daSalome/adaoBuilder.py daSalome/__init__.py DESTINATION "${ADAO_SCRIPT_PYTHON_SALOME}/adao")
+  #install(FILES daSalome/adaoBuilder.py daSalome/__init__.py DESTINATION "${ADAO_SCRIPT_PYTHON_SALOME}/adao")
+  add_subdirectory(daSalome)
   add_subdirectory(daComposant)
+  add_subdirectory(daEficas)
 
 endif(ADAO_SALOME_MODULE)
index 9e076b4d06e41a2bef0c19fd90298544aa74176e..8d41f376a74f24657ee53d90807604f124a02a01 100644 (file)
@@ -18,4 +18,4 @@
 #
 # Author: Anthony Geay, anthony.geay@edf.fr, EDF R&D
 
-install(DIRECTORY daCore daAlgorithms daNumerics DESTINATION ${ADAO_SCRIPT_PYTHON_SALOME}/adao)
+install(DIRECTORY daCore daAlgorithms daNumerics DESTINATION ${ADAO_SCRIPT_PYTHON}/adao)
index d38a2a5fa14e4696568ee1a36d26c5694f3bea1d..c5cb5aa520ba2ed8b1f7036a90ab04821922878a 100644 (file)
@@ -45,4 +45,4 @@ set(DAEFICAS_FILES
   traduitADAOV9_2_0ToV9_3_0.py
   )
 
-install(FILES ${DAEFICAS_FILES} DESTINATION "${ADAO_SCRIPT_PYTHON_SALOME}/adao/daEficas")
+install(FILES ${DAEFICAS_FILES} DESTINATION "${ADAO_SCRIPT_PYTHON}/adao/daEficas")
index 96080abf1cbcfea31724d983a312b512c27c8985..c7e8dbd6cc327024af075457cb2f8c4eb5e1c2e1 100644 (file)
@@ -20,4 +20,8 @@
 
 add_subdirectory(daGUI)
 
-install(DIRECTORY daYacsSchemaCreator daYacsIntegration DESTINATION "${ADAO_SCRIPT_PYTHON_SALOME}/adao")
+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")
+
+endif(ADAO_SALOME_MODULE)
index 23373b138dee17ff10f47ad788842e509e55769c..fccd5087b95a842d91a358f163894c4c027ed783 100644 (file)
 #
 # Author: Anthony Geay, anthony.geay@edf.fr, EDF R&D
 
-install(FILES ADAOGUI.py ADAO.py DESTINATION ${ADAO_SCRIPT_PYTHON_SALOME})
+if(ADAO_SALOME_MODULE)
 
-install(FILES daUtils/__init__.py daUtils/adaoEficasEvent.py daUtils/adaoLogger.py daUtils/enumerate.py DESTINATION "${ADAO_SCRIPT_PYTHON_SALOME}/adao/daUtils")
+  install(FILES ADAOGUI.py ADAO.py DESTINATION ${ADAO_SCRIPT_PYTHON_SALOME})
+  
+else(ADAO_SALOME_MODULE)
 
-install(FILES daGuiImpl/__init__.py daGuiImpl/ADAOGUI_impl.py daGuiImpl/adaoGuiManager.py daGuiImpl/adaoGuiHelper.py daGuiImpl/adaoModuleHelper.py daGuiImpl/adaoStudyEditor.py daGuiImpl/adaoCase.py DESTINATION "${ADAO_SCRIPT_PYTHON_SALOME}/adao/daGuiImpl")
+  install(FILES daUtils/__init__.py daUtils/adaoEficasEvent.py daUtils/adaoLogger.py daUtils/enumerate.py DESTINATION "${ADAO_SCRIPT_PYTHON}/adao/daUtils")
+
+  install(FILES daGuiImpl/__init__.py daGuiImpl/ADAOGUI_impl.py daGuiImpl/adaoGuiManager.py daGuiImpl/adaoGuiHelper.py daGuiImpl/adaoModuleHelper.py daGuiImpl/adaoStudyEditor.py daGuiImpl/adaoCase.py DESTINATION "${ADAO_SCRIPT_PYTHON}/adao/daGuiImpl")
+
+  install(FILES daEficasWrapper/__init__.py daEficasWrapper/adaoEficasWrapper.py DESTINATION "${ADAO_SCRIPT_PYTHON}/adao/daEficasWrapper")
+
+endif(ADAO_SALOME_MODULE)
 
-install(FILES daEficasWrapper/__init__.py daEficasWrapper/adaoEficasWrapper.py DESTINATION "${ADAO_SCRIPT_PYTHON_SALOME}/adao/daEficasWrapper")