From 1121a7f5633b30a77737eedfaf5bf843b0ef597d Mon Sep 17 00:00:00 2001 From: rnv Date: Mon, 14 Oct 2013 07:48:18 +0000 Subject: [PATCH] Porting PYCALCULATOR SALOME module build procedure to the CMake build system: some corrections: 1) Move module configuration file to the root directory. 2) Remove deprecated files. --- CMakeLists.txt | 2 +- ...ke.in => SalomePYCALCULATORConfig.cmake.in | 2 +- adm_local/cmake_files/CMakeLists.txt | 1 - adm_local/cmake_files/FindPYCALCULATOR.cmake | 24 ------------------- 4 files changed, 2 insertions(+), 27 deletions(-) rename adm_local/cmake_files/SalomePYCALCULATORConfig.cmake.in => SalomePYCALCULATORConfig.cmake.in (98%) delete mode 100644 adm_local/cmake_files/FindPYCALCULATOR.cmake diff --git a/CMakeLists.txt b/CMakeLists.txt index 498b787..de3c7fe 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -160,7 +160,7 @@ EXPORT(TARGETS ${_${PROJECT_NAME}_exposed_targets} SET(MED_ROOT_DIR "${MED_ROOT_DIR}") SET(CONF_INCLUDE_DIRS "${PROJECT_SOURCE_DIR}/include" "${PROJECT_BINARY_DIR}/include") -CONFIGURE_PACKAGE_CONFIG_FILE(adm_local/cmake_files/${PROJECT_NAME}Config.cmake.in +CONFIGURE_PACKAGE_CONFIG_FILE(${PROJECT_NAME}Config.cmake.in ${PROJECT_BINARY_DIR}/${PROJECT_NAME}Config.cmake INSTALL_DESTINATION "${SALOME_INSTALL_CMAKE_LOCAL}" PATH_VARS CONF_INCLUDE_DIRS SALOME_INSTALL_CMAKE_LOCAL CMAKE_INSTALL_PREFIX diff --git a/adm_local/cmake_files/SalomePYCALCULATORConfig.cmake.in b/SalomePYCALCULATORConfig.cmake.in similarity index 98% rename from adm_local/cmake_files/SalomePYCALCULATORConfig.cmake.in rename to SalomePYCALCULATORConfig.cmake.in index 9bd5731..404a8aa 100644 --- a/adm_local/cmake_files/SalomePYCALCULATORConfig.cmake.in +++ b/SalomePYCALCULATORConfig.cmake.in @@ -43,7 +43,7 @@ SET_AND_CHECK(PYCALCULATOR_INCLUDE_DIRS "${PYCALCULATOR_ROOT_DIR_EXP}/@SALOME_IN # imported if we are not built as a subproject (in this case targets are already there) IF(NOT TARGET SalomeIDLPYCALCULATOR AND NOT @PROJECT_NAME@_BINARY_DIR) INCLUDE("${PYCALCULATOR_ROOT_DIR_EXP}/${SALOME_INSTALL_CMAKE_LOCAL}/SalomePYCALCULATORTargets.cmake") -ENDIF() +ENDIF() #### Now the specificities diff --git a/adm_local/cmake_files/CMakeLists.txt b/adm_local/cmake_files/CMakeLists.txt index 9be6d69..4aad6e3 100755 --- a/adm_local/cmake_files/CMakeLists.txt +++ b/adm_local/cmake_files/CMakeLists.txt @@ -23,7 +23,6 @@ # These files are data, module or lib files SET(_adm_data - FindPYCALCULATOR.cmake FindSalomePYCALCULATOR.cmake ) INSTALL(FILES ${_adm_data} DESTINATION ${SALOME_INSTALL_CMAKE_LOCAL}) diff --git a/adm_local/cmake_files/FindPYCALCULATOR.cmake b/adm_local/cmake_files/FindPYCALCULATOR.cmake deleted file mode 100644 index 2b540d7..0000000 --- a/adm_local/cmake_files/FindPYCALCULATOR.cmake +++ /dev/null @@ -1,24 +0,0 @@ -# Copyright (C) 2007-2013 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 -# -# - -SET(PYCALCULATOR_CXXFLAGS -I${PYCALCULATOR_ROOT_DIR}/include/salome) # to be removed -SET(PYCALCULATOR_INCLUDE_DIRS ${PYCALCULATOR_ROOT_DIR}/include/salome) - -FIND_LIBRARY(PYCALCULATOR_SalomeIDLPYCALCULATOR SalomeIDLPYCALCULATOR ${PYCALCULATOR_ROOT_DIR}/lib/salome) \ No newline at end of file -- 2.39.2