From: barate Date: Mon, 3 Oct 2011 09:04:44 +0000 (+0000) Subject: Fix Salome application generation when compiling with CMake X-Git-Tag: Before_0020136~27 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=d7f173c70f8bd9a8d1fcb5c8b6450d45e8b108f8;p=modules%2Fkernel.git Fix Salome application generation when compiling with CMake Fix Python UI generation when compiling with CMake --- diff --git a/bin/Makefile.am b/bin/Makefile.am index a60f26531..f41645d9d 100644 --- a/bin/Makefile.am +++ b/bin/Makefile.am @@ -27,6 +27,8 @@ # include $(top_srcdir)/salome_adm/unix/make_common_starter.am +SUBDIRS = appliskel + # # =============================================================== # Files to be installed @@ -79,27 +81,6 @@ dist_salomescript_PYTHON = \ waitContainers.py \ waitNS.py -EXTRA_DIST = appliskel - -dist-hook: - rm -rf `find $(distdir)/appliskel -name CVS` - -DISTCLEANFILES = $(top_builddir)/bin/salome/Makefile.am - -# This is an ugly target to avoid exploring the appliskel subdirectory. -install-exec-local: - $(INSTALL) -d $(DESTDIR)$(salomescriptdir) - $(RM) -rf $(DESTDIR)$(salomescriptdir)/appliskel 1> /dev/null 2>&1 - cp -r $(srcdir)/appliskel $(DESTDIR)$(salomescriptdir) - chmod a+x -R $(DESTDIR)$(salomescriptdir)/appliskel - find $(DESTDIR)$(salomescriptdir) -name CVS -prune -exec rm -rf {} \; - -uninstall-local: - if test -d $(DESTDIR)$(salomescriptdir)/appliskel; then \ - find $(DESTDIR)$(salomescriptdir)/appliskel -exec chmod +w {} ';' ; \ - rm -rf $(DESTDIR)$(salomescriptdir)/appliskel; \ - fi; - install-data-hook: @for f in $(dist_salomescript_PYTHON) ; do \ chmod -f a+x $(DESTDIR)$(salomescriptdir)/$$f ; \ diff --git a/bin/appliskel/Makefile.am b/bin/appliskel/Makefile.am new file mode 100644 index 000000000..babc2c523 --- /dev/null +++ b/bin/appliskel/Makefile.am @@ -0,0 +1,58 @@ +# Copyright (C) 2007-2011 CEA/DEN, EDF R&D, OPEN CASCADE +# +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +# + +# -* Makefile *- +# Author : Renaud Barate (EDF R&D) +# Module : KERNEL +# $Header$ + +include $(top_srcdir)/salome_adm/unix/make_common_starter.am +appliskeldir = $(salomescriptdir)/appliskel + +# +# =============================================================== +# Files to be installed +# =============================================================== +# + +# These files are executable scripts +dist_appliskel_SCRIPTS = \ + envd \ + searchFreePort.sh \ + runRemote.sh \ + runAppli \ + runConsole \ + runSession \ + runSalomeScript \ + runTests \ + .bashrc + +# These files are python files +dist_appliskel_PYTHON = \ + getAppliPath.py \ + update_catalogs.py \ + kill_remote_containers.py + +install-data-hook: + @for f in $(dist_appliskel_PYTHON) ; do \ + chmod -f a+x $(DESTDIR)$(appliskeldir)/$$f ; \ + done diff --git a/configure.ac b/configure.ac index 8c6cd8996..d59d02a60 100644 --- a/configure.ac +++ b/configure.ac @@ -537,6 +537,7 @@ AC_OUTPUT([ \ salome_adm/unix/config_files/Makefile \ Makefile \ bin/Makefile \ + bin/appliskel/Makefile \ bin/VERSION \ doc/Makefile \ doc/docutils/conf.py \ diff --git a/salome_adm/cmake_files/am2cmake.py b/salome_adm/cmake_files/am2cmake.py index 50db174da..398fa333f 100644 --- a/salome_adm/cmake_files/am2cmake.py +++ b/salome_adm/cmake_files/am2cmake.py @@ -1444,6 +1444,25 @@ class CMakeFile(object): ''') pass + # -- + # -- + key = "PYUIC_FILES" + if self.__thedict__.has_key(key): + newlines.append(''' + FOREACH(output ${PYUIC_FILES}) + STRING(REPLACE ".py" ".ui" input ${output}) + SET(input ${CMAKE_CURRENT_SOURCE_DIR}/${input}) + SET(output ${CMAKE_CURRENT_BINARY_DIR}/${output}) + ADD_CUSTOM_COMMAND( + OUTPUT ${output} + COMMAND ${PYUIC_EXECUTABLE} -o ${output} ${input} + MAIN_DEPENDENCY ${input} + ) + ENDFOREACH(output ${PYUIC_FILES}) + ADD_CUSTOM_TARGET(BUILD_PY_UI_FILES ALL DEPENDS ${PYUIC_FILES}) + ''') + pass + # -- # -- key = "QRC_FILES" @@ -1545,6 +1564,8 @@ class CMakeFile(object): "dist_salomescript_SCRIPTS" : "bin/salome", "dist_salomescript_DATA" : "bin/salome", "dist_salomescript_PYTHON" : "bin/salome", + "dist_appliskel_SCRIPTS" : "bin/salome/appliskel", + "dist_appliskel_PYTHON" : "bin/salome/appliskel", "nodist_salomescript_DATA" : "bin/salome", "salomepython_PYTHON" : "${salomepythondir}", "nodist_salomepython_PYTHON" : "${salomepythondir}", @@ -1552,6 +1573,7 @@ class CMakeFile(object): "sharedpkgpython_PYTHON" : "${salomepythondir}/shared_modules", "salomepypkg_PYTHON" : "${salomepypkgdir}", "mypkgpython_PYTHON" : "${mypkgpythondir}", + "nodist_mypkgpython_PYTHON" : "${mypkgpythondir}", } if self.module == "jobmanager": d["bin_SCRIPTS"] = "bin" @@ -2134,7 +2156,9 @@ class CMakeFile(object): FIND_FILE(dummy ${f} PATHS ${CMAKE_CURRENT_SOURCE_DIR} NO_DEFAULT_PATH) IF(dummy) ''') - if key in ['dist_salomescript_SCRIPTS']: + if key in ['dist_salomescript_SCRIPTS', + 'dist_appliskel_SCRIPTS', + 'dist_appliskel_PYTHON']: newlines.append(r''' SET(PERMS) SET(PERMS ${PERMS} OWNER_READ OWNER_WRITE OWNER_EXECUTE)