mamba/mambaConfig.cmake.in

45 lines
2.0 KiB
CMake

############################################################################
# Copyright (c) 2016, Johan Mabille, Sylvain Corlay, Martin Renou #
# Copyright (c) 2016, QuantStack #
# #
# Distributed under the terms of the BSD 3-Clause License. #
# #
# The full license is in the file LICENSE, distributed with this software. #
############################################################################
# mamba cmake module
# This module sets the following variables in your project::
#
# mamba_FOUND - true if mamba found on the system
# mamba_INCLUDE_DIRS - the directory containing mamba headers
# mamba_LIBRARY - the library for dynamic linking
# mamba_STATIC_LIBRARY - the library for static linking
@PACKAGE_INIT@
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR};${CMAKE_MODULE_PATH}")
@MAMBA_CONFIG_CODE@
include(CMakeFindDependencyMacro)
find_dependency(nlohmann_json)
find_dependency(pybind11)
find_dependency(Threads)
if(NOT TARGET mamba AND NOT TARGET mamba_lib)
include("${CMAKE_CURRENT_LIST_DIR}/@PROJECT_NAME@Targets.cmake")
if (TARGET mamba AND TARGET mamba_lib)
get_target_property(@PROJECT_NAME@_INCLUDE_DIR mamba INTERFACE_INCLUDE_DIRECTORIES)
get_target_property(@PROJECT_NAME@_LIBRARY mamba LOCATION)
get_target_property(@PROJECT_NAME@_STATIC_LIBRARY mamba_lib LOCATION)
elseif (TARGET mamba)
get_target_property(@PROJECT_NAME@_INCLUDE_DIR mamba INTERFACE_INCLUDE_DIRECTORIES)
get_target_property(@PROJECT_NAME@_LIBRARY mamba LOCATION)
elseif (TARGET mamba_lib)
get_target_property(@PROJECT_NAME@_INCLUDE_DIR mamba_lib INTERFACE_INCLUDE_DIRECTORIES)
get_target_property(@PROJECT_NAME@_STATIC_LIBRARY mamba_lib LOCATION)
set(@PROJECT_NAME@_LIBRARY ${@PROJECT_NAME@_STATIC_LIBRARY})
endif ()
endif()