| 1 |
# gau2gridConfig.cmake |
| 2 |
# -------------------- |
| 3 |
# |
| 4 |
# GAU2GRID cmake module. |
| 5 |
# This module sets the following variables in your project:: |
| 6 |
# |
| 7 |
# gau2grid_FOUND - true if gau2grid and all required components found on the system |
| 8 |
# gau2grid_VERSION - gau2grid version in format Major.Minor.Release |
| 9 |
# gau2grid_INCLUDE_DIRS - Directory where gau2grid header is located. |
| 10 |
# gau2grid_INCLUDE_DIR - same as DIRS |
| 11 |
# gau2grid_LIBRARIES - gau2grid library to link against. |
| 12 |
# gau2grid_LIBRARY - same as LIBRARIES |
| 13 |
# |
| 14 |
# |
| 15 |
# Available components: |
| 16 |
# |
| 17 |
# shared - search for only shared library |
| 18 |
# static - search for only static library |
| 19 |
# |
| 20 |
# |
| 21 |
# Exported targets:: |
| 22 |
# |
| 23 |
# If gau2grid is found, this module defines the following :prop_tgt:`IMPORTED` |
| 24 |
# target. Target is shared _or_ static, so, for both, use separate, not |
| 25 |
# overlapping, installations. :: |
| 26 |
# |
| 27 |
# gau2grid::gg - the main gau2grid library with header attached. |
| 28 |
# |
| 29 |
# |
| 30 |
# Suggested usage:: |
| 31 |
# |
| 32 |
# find_package(gau2grid) |
| 33 |
# find_package(gau2grid 1.0.1 EXACT CONFIG REQUIRED) |
| 34 |
# |
| 35 |
# |
| 36 |
# The following variables can be set to guide the search for this package:: |
| 37 |
# |
| 38 |
# gau2grid_DIR - CMake variable, set to directory containing this Config file |
| 39 |
# CMAKE_PREFIX_PATH - CMake variable, set to root directory of this package |
| 40 |
## PATH - environment variable, set to bin directory of this package |
| 41 |
# CMAKE_DISABLE_FIND_PACKAGE_gau2grid - CMake variable, disables |
| 42 |
# find_package(gau2grid) when not REQUIRED, perhaps to force internal build |
| 43 |
|
| 44 |
@PACKAGE_INIT@ |
| 45 |
|
| 46 |
set(PN gau2grid) |
| 47 |
|
| 48 |
if(@BUILD_SHARED_LIBS@) |
| 49 |
set(${PN}_shared_FOUND 1) |
| 50 |
else() |
| 51 |
set(${PN}_static_FOUND 1) |
| 52 |
endif() |
| 53 |
|
| 54 |
check_required_components(${PN}) |
| 55 |
|
| 56 |
#----------------------------------------------------------------------------- |
| 57 |
# Don't include targets if this file is being picked up by another |
| 58 |
# project which has already built this as a subproject |
| 59 |
#----------------------------------------------------------------------------- |
| 60 |
if(NOT TARGET ${PN}::gg) |
| 61 |
include("${CMAKE_CURRENT_LIST_DIR}/${PN}Targets.cmake") |
| 62 |
|
| 63 |
get_property(_loc TARGET ${PN}::gg PROPERTY LOCATION) |
| 64 |
set(${PN}_LIBRARY ${_loc}) |
| 65 |
get_property(_ill TARGET ${PN}::gg PROPERTY INTERFACE_LINK_LIBRARIES) |
| 66 |
set(${PN}_LIBRARIES ${_ill}) |
| 67 |
|
| 68 |
get_property(_id TARGET ${PN}::gg PROPERTY INCLUDE_DIRECTORIES) |
| 69 |
set(${PN}_INCLUDE_DIR ${_id}) |
| 70 |
get_property(_iid TARGET ${PN}::gg PROPERTY INTERFACE_INCLUDE_DIRECTORIES) |
| 71 |
set(${PN}_INCLUDE_DIRS ${_iid}) |
| 72 |
endif() |
| 73 |
|