File tree Expand file tree Collapse file tree 2 files changed +36
-0
lines changed Expand file tree Collapse file tree 2 files changed +36
-0
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ project(GFDLGTracers
10
10
)
11
11
12
12
include (GNUInstallDirs)
13
+ include (CMakePackageConfigHelpers)
13
14
14
15
if (NOT CMAKE_BUILD_TYPE MATCHES "^(Debug|Release|RelWithDebInfo|MinSizeRel)$" )
15
16
message (STATUS "Setting build type to 'Relwithdebinfo' as none was specified." )
@@ -115,6 +116,16 @@ install(EXPORT GFDLGTracersTargets
115
116
DESTINATION ${CMAKE_INSTALL_LIBDIR} /cmake/GFDLGTracers
116
117
)
117
118
119
+ configure_package_config_file(
120
+ cmake/GFDLGTracersConfig.cmake.in
121
+ "${CMAKE_CURRENT_BINARY_DIR} /GFDLGTracersConfig.cmake"
122
+ INSTALL_DESTINATION ${CMAKE_INSTALL_LIBDIR} /cmake/GFDLGTracers
123
+ )
124
+
125
+ install (FILES ${CMAKE_CURRENT_BINARY_DIR} /GFDLGTracersConfig.cmake
126
+ DESTINATION ${CMAKE_INSTALL_LIBDIR} /cmake/GFDLGTracers
127
+ )
128
+
118
129
configure_file (${CMAKE_CURRENT_SOURCE_DIR} /GFDLGTracers.pc.in
119
130
${CMAKE_CURRENT_BINARY_DIR} /GFDLGTracers.pc @ONLY)
120
131
Original file line number Diff line number Diff line change
1
+ # Copyright ACCESS-NRI and contributors. See the top-level LICENSE file for details.
2
+
3
+ @PACKAGE_INIT@
4
+
5
+ if (NOT GFDLGTracers_FIND_QUIETLY)
6
+ message (STATUS "Found GFDLGTracers: ${PACKAGE_PREFIX_DIR} " )
7
+ endif ()
8
+
9
+ include (CMakeFindDependencyMacro)
10
+
11
+ # Request components
12
+ set (_required_components ${GFDLGTracers_FIND_COMPONENTS} )
13
+
14
+ find_dependency(MPI REQUIRED COMPONENTS Fortran)
15
+ find_dependency(fms COMPONENTS R8 REQUIRED)
16
+ find_dependency(PkgConfig REQUIRED)
17
+ pkg_check_modules(MOCSY REQUIRED IMPORTED_TARGET "mocsy" )
18
+
19
+ # Run the normal Targets.cmake
20
+ list (APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR} )
21
+ include ("${CMAKE_CURRENT_LIST_DIR} /GFDLGTracersTargets.cmake" )
22
+ list (REMOVE_ITEM CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR} )
23
+
24
+ # Check the requested components are valid
25
+ check_required_components(_required_components)
You can’t perform that action at this time.
0 commit comments