]> SALOME platform Git repositories - modules/parametric.git/commitdiff
Salome HOME
Compile Python files on installation
authorRenaud Barate <renaud.barate@edf.fr>
Fri, 1 Mar 2013 15:55:03 +0000 (16:55 +0100)
committerRenaud Barate <renaud.barate@edf.fr>
Fri, 1 Mar 2013 15:55:03 +0000 (16:55 +0100)
CMakeLists.txt
src/CMakeLists.txt
src/PARAMETRIC/CMakeLists.txt
src/PARAMETRICGUI/CMakeLists.txt
src/salome/CMakeLists.txt
src/salome/parametric/CMakeLists.txt
src/salome/parametric/gui/CMakeLists.txt

index b1f8b2aff4abd97e9deec5c76861a708c911f987..05179c0d24bbae50e0c06a29598939d8319145fe 100644 (file)
@@ -39,6 +39,8 @@ FIND_PACKAGE(SalomeSPHINX)
 FIND_PACKAGE(SalomeSIP)
 FIND_PACKAGE(SalomePYQT4)
 
+INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/SalomeMacros.cmake)
+
 SET(BINDIR bin/salome)
 SET(RESDIR share/salome/resources/parametric)
 SET(LIBDIR lib/salome)
index 765f780b1ca3dcc6817d4cab8c3129d3552b74cb..1be7161f12a75c7a12b3daad153a113eb157441b 100644 (file)
@@ -18,5 +18,3 @@
 ADD_SUBDIRECTORY(PARAMETRIC)
 ADD_SUBDIRECTORY(PARAMETRICGUI)
 ADD_SUBDIRECTORY(salome)
-
-INSTALL(DIRECTORY salome DESTINATION ${PYTHONDIR} FILES_MATCHING PATTERN "*.py")
index 1eef9a6a1c115ab35ad9e6a870ae8090e4325588..19db10ec879da59a970357c92e0d6e9f8a9b5472 100644 (file)
@@ -15,4 +15,4 @@
 # You should have received a copy of the GNU Lesser General Public License
 # along with SALOME PARAMETRIC module.  If not, see <http://www.gnu.org/licenses/>.
 
-INSTALL(FILES PARAMETRIC.py DESTINATION ${BINDIR})
+INSTALL_AND_COMPILE_PYTHON_FILE(PARAMETRIC.py ${BINDIR})
index 3334038c24f8581520988b74205582cbce20b9e5..6b115c78f82c9f425c7ab841611feb16499f8f53 100644 (file)
@@ -15,4 +15,4 @@
 # You should have received a copy of the GNU Lesser General Public License
 # along with SALOME PARAMETRIC module.  If not, see <http://www.gnu.org/licenses/>.
 
-INSTALL(FILES PARAMETRICGUI.py DESTINATION ${BINDIR})
+INSTALL_AND_COMPILE_PYTHON_FILE(PARAMETRICGUI.py ${BINDIR})
index 7735ed8e2fc9d51ab5c99db74c5e6ef84c1375a4..73e16b56285cf593d9157003538019fad5fee7e0 100644 (file)
@@ -16,3 +16,9 @@
 # along with SALOME PARAMETRIC module.  If not, see <http://www.gnu.org/licenses/>.
 
 ADD_SUBDIRECTORY(parametric)
+
+SET(PYTHON_FILES
+  __init__.py
+)
+
+INSTALL_AND_COMPILE_PYTHON_FILE("${PYTHON_FILES}" ${PYTHONDIR}/salome)
index d3de5043660a9f820baf1158dd67272300e8d3b7..de5501ec8f2c040c350bb31afea2a10302095e66 100644 (file)
 # along with SALOME PARAMETRIC module.  If not, see <http://www.gnu.org/licenses/>.
 
 ADD_SUBDIRECTORY(gui)
+
+SET(PYTHON_FILES
+  __init__.py
+  genjob.py
+  persistence.py
+  study.py
+)
+
+INSTALL_AND_COMPILE_PYTHON_FILE("${PYTHON_FILES}" ${PYTHONDIR}/salome/parametric)
index 1766c66b3a46ccbc250fde2c0e134387ba9a137f..6220f9749a0225087bbfd8c4d3e7094aec94ce0f 100644 (file)
 # You should have received a copy of the GNU Lesser General Public License
 # along with SALOME PARAMETRIC module.  If not, see <http://www.gnu.org/licenses/>.
 
+SET(PYTHON_FILES
+  __init__.py
+  definevalues.py
+  execparams.py
+  genjob.py
+  mainpanel.py
+  selectvars.py
+  wizard.py
+)
 SET(PYUIC_FILES wizard_ui.py varrange_ui.py execparams_ui.py genjob_ui.py definevalues_ui.py)
 SET(INSTALL_DIR ${PYTHONDIR}/salome/parametric/gui)
 
@@ -26,7 +35,9 @@ FOREACH(OUTPUT ${PYUIC_FILES})
                      COMMAND ${PYQT_PYUIC_EXECUTABLE} -o ${OUTPUT} ${INPUT}
                      MAIN_DEPENDENCY ${INPUT}
                     )
-  INSTALL(FILES ${OUTPUT} DESTINATION ${INSTALL_DIR})
+  SET(PYTHON_FILES ${PYTHON_FILES} ${OUTPUT})
 ENDFOREACH(OUTPUT ${PYUIC_FILES})
 
 ADD_CUSTOM_TARGET(BUILD_PY_UI_FILES ALL DEPENDS ${PYUIC_FILES})
+
+INSTALL_AND_COMPILE_PYTHON_FILE("${PYTHON_FILES}" ${INSTALL_DIR})