]> SALOME platform Git repositories - modules/paravis.git/commitdiff
Salome HOME
A small package export
authorAnthony Geay <anthony.geay@edf.fr>
Tue, 5 Dec 2017 13:31:34 +0000 (14:31 +0100)
committerAnthony Geay <anthony.geay@edf.fr>
Tue, 5 Dec 2017 13:31:34 +0000 (14:31 +0100)
src/Plugins/MEDWriter/CMakeLists.txt
src/Plugins/MEDWriter/MEDWriterConfig.cmake.in [new file with mode: 0644]

index 2c132b00b14ab6f747b33750ec8d81f7ce9c686e..b3697307b169f0641f78b81219e28b6ce2469baa 100644 (file)
@@ -56,4 +56,12 @@ PV_PROCESS_MODULES()
 
 ADD_SUBDIRECTORY(ParaViewPlugin)
 
+INCLUDE(CMakePackageConfigHelpers)
+
+CONFIGURE_PACKAGE_CONFIG_FILE(${PROJECT_NAME}Config.cmake.in 
+  ${PROJECT_BINARY_DIR}/${PROJECT_NAME}Config.cmake
+  INSTALL_DESTINATION "${MEDWRITER_INSTALL_CMAKE_LOCAL}"
+  PATH_VARS CMAKE_INSTALL_PREFIX MEDWRITER_INSTALL_HEADERS)
+
+INSTALL(FILES "${PROJECT_BINARY_DIR}/${PROJECT_NAME}Config.cmake" DESTINATION "${MEDWRITER_INSTALL_CMAKE_LOCAL}")
 INSTALL(EXPORT ${PROJECT_NAME}TargetGroup DESTINATION "${MEDWRITER_INSTALL_CMAKE_LOCAL}" FILE ${PROJECT_NAME}Targets.cmake)
diff --git a/src/Plugins/MEDWriter/MEDWriterConfig.cmake.in b/src/Plugins/MEDWriter/MEDWriterConfig.cmake.in
new file mode 100644 (file)
index 0000000..468a9d8
--- /dev/null
@@ -0,0 +1,32 @@
+###############################################################
+# Copyright (C) 2017  CEA/DEN, EDF R&D
+#
+# 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, or (at your option) any later version.
+#
+# 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
+#
+
+@PACKAGE_INIT@
+
+# Load the dependencies for the libraries of @PROJECT_NAME@ 
+# (contains definitions for IMPORTED targets). This is only 
+# imported if we are not built as a subproject (in this case targets are already there)
+INCLUDE("@PROJECT_NAME@Targets")
+
+# Package root dir:
+SET_AND_CHECK(MEDWRITER_ROOT_DIR_EXP "@PACKAGE_CMAKE_INSTALL_PREFIX@")
+
+# Include directories and definitions
+SET_AND_CHECK(MEDWRITER_INCLUDE_DIRS "${MEDWRITER_ROOT_DIR_EXP}/@MEDWRITER_INSTALL_HEADERS@")
\ No newline at end of file