From c40b433acbe19764c4f67389ca5bfae34ef18189 Mon Sep 17 00:00:00 2001 From: ana Date: Wed, 10 Oct 2012 08:56:30 +0000 Subject: [PATCH] Porting SALOME GUI to CMake --- salome_adm/CMakeLists.txt | 8 +- salome_adm/cmake_files/SalomeMacros.cmake | 12 ++- salome_adm/unix/CMakeLists.txt | 35 +++++++++ salome_adm/unix/config_files/CMakeLists.txt | 84 +++++++++++++++++++++ 4 files changed, 129 insertions(+), 10 deletions(-) create mode 100755 salome_adm/unix/CMakeLists.txt create mode 100755 salome_adm/unix/config_files/CMakeLists.txt diff --git a/salome_adm/CMakeLists.txt b/salome_adm/CMakeLists.txt index 0bc8d03f1..6085559b6 100755 --- a/salome_adm/CMakeLists.txt +++ b/salome_adm/CMakeLists.txt @@ -20,9 +20,5 @@ ADD_SUBDIRECTORY(unix) ADD_SUBDIRECTORY(cmake_files) -SET(input ${CMAKE_CURRENT_SOURCE_DIR}/SALOMEconfig.ref.in) -SET(output ${CMAKE_CURRENT_BINARY_DIR}/SALOMEconfig.h) - -MESSAGE(STATUS "Creation of ${output}") -CONFIGURE_FILE(${input} ${output}) -INSTALL(FILES ${output} DESTINATION ${KERNEL_salomeinclude_HEADERS}) \ No newline at end of file +SALOME_CONFIGURE_FILE("${CMAKE_CURRENT_SOURCE_DIR}/SALOMEconfig.ref.in" "${CMAKE_CURRENT_BINARY_DIR}/SALOMEconfig.h" INSTALL ${KERNEL_salomeinclude_HEADERS}) +INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/SALOMEconfig.ref.in DESTINATION salome_adm/unix RENAME SALOMEconfig.h.in) \ No newline at end of file diff --git a/salome_adm/cmake_files/SalomeMacros.cmake b/salome_adm/cmake_files/SalomeMacros.cmake index b10f468db..b96926dff 100755 --- a/salome_adm/cmake_files/SalomeMacros.cmake +++ b/salome_adm/cmake_files/SalomeMacros.cmake @@ -91,7 +91,7 @@ ENDMACRO(PARSE_ARGUMENTS) #---------------------------------------------------------------------------- # SALOME_INSTALL_SCRIPTS is a macro useful for installing scripts. # -# USAGE: SALOME_INSTALL_SCRIPTS(file_list path [DEF_PERMS]) +# USAGE: SALOME_INSTALL_SCRIPTS(file_list path [WORKING_DIRECTORY dir] [DEF_PERMS]) # # ARGUMENTS: # file_list: IN : list of files to be installed. This list should be quoted. @@ -102,13 +102,17 @@ ENDMACRO(PARSE_ARGUMENTS) # only OWNER_WRITE, OWNER_READ, GROUP_READ, and WORLD_READ. #---------------------------------------------------------------------------- MACRO(SALOME_INSTALL_SCRIPTS file_list path) - PARSE_ARGUMENTS(SALOME_INSTALL_SCRIPTS "" "DEF_PERMS" ${ARGN}) - SET(PERMS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ) + PARSE_ARGUMENTS(SALOME_INSTALL_SCRIPTS "WORKING_DIRECTORY" "DEF_PERMS" ${ARGN}) + SET(PERMS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ) IF(NOT SALOME_INSTALL_SCRIPTS_DEF_PERMS) SET(PERMS ${PERMS} OWNER_EXECUTE GROUP_EXECUTE WORLD_EXECUTE) ENDIF(NOT SALOME_INSTALL_SCRIPTS_DEF_PERMS) FOREACH(file ${file_list}) - INSTALL(FILES ${file} DESTINATION ${path} PERMISSIONS ${PERMS}) + SET(PREFIX "") + IF(SALOME_INSTALL_SCRIPTS_WORKING_DIRECTORY) + SET(PREFIX "${SALOME_INSTALL_SCRIPTS_WORKING_DIRECTORY}/") + ENDIF(SALOME_INSTALL_SCRIPTS_WORKING_DIRECTORY) + INSTALL(FILES ${PREFIX}${file} DESTINATION ${path} PERMISSIONS ${PERMS}) GET_FILENAME_COMPONENT(ext ${file} EXT) IF(ext STREQUAL .py) INSTALL(CODE "MESSAGE(STATUS \"py compiling ${CMAKE_INSTALL_PREFIX}/${path}/${file}\")") diff --git a/salome_adm/unix/CMakeLists.txt b/salome_adm/unix/CMakeLists.txt new file mode 100755 index 000000000..a0b5ec4d1 --- /dev/null +++ b/salome_adm/unix/CMakeLists.txt @@ -0,0 +1,35 @@ +# Copyright (C) 2012 CEA/DEN, EDF R&D, OPEN CASCADE +# +# 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 +# + +ADD_SUBDIRECTORY(config_files) + +SET(DEPRECATED_FILES + DEPRECATED/F77config.h.in + DEPRECATED/sstream.in + DEPRECATED/envScript.in + DEPRECATED/depend.in + DEPRECATED/make_commence.in + DEPRECATED/make_conclude.in + DEPRECATED/make_module.in + DEPRECATED/make_omniorb.in +) + +# The deprecated files are deprecated for the KERNEL but not for the +# related modules (GUI, MED, ...), for now. Some files have to be installed. +INSTALL(FILES ${DEPRECATED_FILES} DESTINATION salome_adm/unix) diff --git a/salome_adm/unix/config_files/CMakeLists.txt b/salome_adm/unix/config_files/CMakeLists.txt new file mode 100755 index 000000000..e7add33e2 --- /dev/null +++ b/salome_adm/unix/config_files/CMakeLists.txt @@ -0,0 +1,84 @@ +# Copyright (C) 2012 CEA/DEN, EDF R&D, OPEN CASCADE +# +# 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 +# + +# The deprecated files are deprecated for the KERNEL but not for the +# related modules (GUI, MED, ...). Some files have to be installed. +SET(DEPRECATED_FILES + DEPRECATED/ac_cc_warnings.m4 + DEPRECATED/ac_cxx_bool.m4 + DEPRECATED/ac_cxx_mutable.m4 + DEPRECATED/ac_cxx_partial_specialization.m4 + DEPRECATED/ac_cxx_typename.m4 + DEPRECATED/check_mico.m4 + DEPRECATED/check_pthreads.m4 + DEPRECATED/config.sub + DEPRECATED/config.guess + DEPRECATED/install-sh + DEPRECATED/libtool.m4 + DEPRECATED/ltconfig + DEPRECATED/ltmain.sh + DEPRECATED/check_Salome.m4 + DEPRECATED/check_java.m4 + DEPRECATED/missing + DEPRECATED/mkinstalldirs +) + +SET(m4_DATA + ac_cxx_depend_flag.m4 + ac_cxx_have_sstream.m4 + ac_cxx_namespaces.m4 + ac_cxx_option.m4 + ac_cxx_template_options.m4 + ac_cxx_use_std_iostream.m4 + ac_cxx_warnings.m4 + ac_linker_options.m4 + ac_check_sizeof_fortran.m4 + acx_pthread.m4 + check_Kernel.m4 + check_boost.m4 + check_cas.m4 + check_corba.m4 + check_cppunit.m4 + check_f77.m4 + check_calcium.m4 + check_hdf5.m4 + check_htmlgen.m4 + check_sphinx.m4 + check_lam.m4 + check_libbatch.m4 + check_mpi.m4 + check_openmpi.m4 + check_mpich.m4 + check_omniorb.m4 + check_sockets.m4 + check_swig.m4 + check_vtk.m4 + check_withihm.m4 + enable_pthreads.m4 + production.m4 + pyembed.m4 + python.m4 + check_libxml.m4 + check_paco++.m4 + local_install.m4 + hack_libtool.m4 + check_tbb.m4 +) +INSTALL(FILES ${DEPRECATED_FILES} DESTINATION salome_adm/unix/config_files/DEPRECATED) +INSTALL(FILES ${m4_DATA} DESTINATION salome_adm/unix/config_files) -- 2.39.2