-
Notifications
You must be signed in to change notification settings - Fork 12
/
loki-post-import.cmake.in
39 lines (33 loc) · 1.39 KB
/
loki-post-import.cmake.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# (C) Copyright 2018- ECMWF.
# This software is licensed under the terms of the Apache Licence Version 2.0
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
# In applying this licence, ECMWF does not waive the privileges and immunities
# granted to it by virtue of its status as an intergovernmental organisation
# nor does it submit to any jurisdiction.
# Basic path setup
if( @PROJECT_NAME@_IS_BUILD_DIR_EXPORT )
set( loki_MACROS_DIR @CMAKE_CURRENT_SOURCE_DIR@/cmake )
set( loki_VENV_PATH @loki_VENV_PATH@ )
else()
set( loki_MACROS_DIR ${loki_BASE_DIR}/share/loki/cmake )
set( loki_VENV_PATH ${loki_BASE_DIR}/loki_env )
endif()
# Make Loki CMake macro scripts available on the search path
if( NOT ${loki_MACROS_DIR} IN_LIST CMAKE_MODULE_PATH )
list( INSERT CMAKE_MODULE_PATH 0 ${loki_MACROS_DIR} )
endif()
# Carry over variables from the build
set( loki_HAVE_NO_INSTALL @loki_HAVE_NO_INSTALL@ )
set( loki_HAVE_CLAW @loki_HAVE_CLAW@ )
set( LOKI_EXECUTABLES @LOKI_EXECUTABLES@ )
# Find Python environment
if( NOT ${loki_HAVE_NO_INSTALL} )
# Detect the installed virtual environment
include( python_venv )
find_python_venv( ${loki_VENV_PATH} @PYTHON_VERSION@ )
endif()
# Discover Loki executables and make available as CMake targets
include( loki_find_executables )
loki_find_executables()
# Make the Loki transformation functions available
include( loki_transform )