-
Notifications
You must be signed in to change notification settings - Fork 2
/
ClairConfig.cmake.in
46 lines (37 loc) · 1.99 KB
/
ClairConfig.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
40
41
42
43
44
45
46
# Multiple inclusion guard
if(NOT CLAIR_FOUND)
MESSAGE(STATUS "Found ClairConfig.cmake with version ${CLAIR_VERSION}, hash = ${CLAIR_GIT_HASH}, root = ${CLAIR_ROOT}")
set(CLAIR_FOUND True)
set_property(GLOBAL PROPERTY Clair_FOUND TRUE)
# Version
set(CLAIR_VERSION @CLAIR_VERSION@ CACHE STRING "Clair Version")
set(CLAIR_GIT_HASH @CLAIR_GIT_HASH@ CACHE STRING "Clair Git Hash")
# The compiler used for cpp2py
#set(CLAIR_CXX_COMPILER @CMAKE_CXX_COMPILER@ CACHE FILEPATH "C++ compiler used by Clair")
# Python Interpreter
#set(CLAIR_PYTHON_EXECUTABLE @PYTHON_EXECUTABLE@ CACHE FILEPATH "Python Executable")
#set(CLAIR_PYTHON_INTERPRETER @PYTHON_EXECUTABLE@ CACHE FILEPATH "Python Executable") # Backward Compat
#set(CLAIR_PYTHON_LIB_DEST_ROOT @PYTHON_LIB_DEST_ROOT@ CACHE PATH "Python module directory relative to install directory")
#set(CLAIR_PYTHON_MODULE_EXT @PYTHON_MODULE_EXT@ CACHE FILEPATH "Extension of compiled Python modules")
#set(CLAIR_MODULE_DIR @CMAKE_INSTALL_PREFIX@/@PYTHON_LIB_DEST_ROOT@ CACHE PATH "The Clair Python module directory")
#set(CLAIR_PYTHON_NUMPY_VERSION_LT_17 @PYTHON_NUMPY_VERSION_LT_17@ CACHE BOOL "True if the Numpy version older than 1.17")
# Root of the Clair installation
set(CLAIR_ROOT @CMAKE_INSTALL_PREFIX@ CACHE PATH "Root of Clair")
# Mac specific
if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
set(CMAKE_INSTALL_NAME_DIR "@CMAKE_INSTALL_PREFIX@/lib")
set(CMAKE_MACOSX_RPATH 1) # new for cmake 3.x
endif()
# include the exported targets of this project
include(@CMAKE_INSTALL_PREFIX@/lib/cmake/Clair/ClairTargets.cmake)
# Depending on a macro, make a target
# ClairC2PyPlugin
if (CLAIR_C2PY_NO_GENERATION)
SET(CLAIR_C2PY_MODULE_EXTENSION "wrap.cxx")
#SET(PLUGIN_OPTION "")
else()
SET(CLAIR_C2PY_MODULE_EXTENSION "cpp")
#SET(PLUGIN_OPTION "-fplugin=${CMAKE_BINARY_DIR}/src/plugins/c2py/libclplug_c2py${CMAKE_SHARED_LIBRARY_SUFFIX}")
target_compile_options(clair::c2py INTERFACE -fplugin=${CMAKE_BINARY_DIR}/src/plugins/c2py/libclplug_c2py${CMAKE_SHARED_LIBRARY_SUFFIX})
endif()
endif()