File: FindLFC.cmake

package info (click to toggle)
gfal2 2.23.2-1
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 3,452 kB
  • sloc: ansic: 15,858; cpp: 15,198; python: 257; sh: 228; makefile: 120
file content (59 lines) | stat: -rw-r--r-- 2,086 bytes parent folder | download | duplicates (2)
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
47
48
49
50
51
52
53
54
55
56
57
58
59
#
# This module detects if LFC is installed and determines where the
# include files and libraries are.
#
# This code sets the following variables:
#
# LFC_LIBRARIES   = full path to the LFC libraries
# LFC_INCLUDE_DIR = include dir to be used when using the LFC library
# LFC_FOUND       = set to true if LFC was found successfully
#
# LFC_LOCATION
#   setting this enables search for LFC libraries / headers in this location


# -----------------------------------------------------
# LFC Libraries
# -----------------------------------------------------
find_library(LFC_LIBRARIES
    NAMES lfc lcgdm
    HINTS ${LFC_LOCATION}
          ${STAGE_DIR}
          ${CMAKE_INSTALL_PREFIX}/lfc/*/${PLATFORM}/
          ${CMAKE_INSTALL_PREFIX}/Grid/lfc/*/${PLATFORM}/
    DOC "The main LFC library"
)

# -----------------------------------------------------
# LFC Include Directories
# -----------------------------------------------------
find_path(LFC_INCLUDE_DIR
    NAMES lfc/lfc_api.h
    HINTS ${LFC_LOCATION}
          ${STAGE_DIR}
          ${CMAKE_INSTALL_PREFIX}/lfc/*/${PLATFORM}/
          ${CMAKE_INSTALL_PREFIX}/Grid/lfc/*/${PLATFORM}/
    DOC "The LFC include directory"
)
if(LFC_INCLUDE_DIR)
    message(STATUS "LFC includes found in ${LFC_INCLUDE_DIR}")
endif()

# -----------------------------------------------------
# LCGDM  Include Directories
# -----------------------------------------------------
find_path(LCGDM_INCLUDE_DIR
    NAMES Cinit.h
    HINTS ${LCGDM_LOCATION} ${LCGDM_LOCATION}/include
              ${LCGDM_LOCATION}/include/lcgdm /usr/include/lcgdm
              ${LCGDM_LOCATION}/include/dpm /usr/include/dpm /usr/include/lfc
    DOC "The LCGDM include directory"
)

# -----------------------------------------------------
# handle the QUIETLY and REQUIRED arguments and set LFC_FOUND to TRUE if
# all listed variables are TRUE
# -----------------------------------------------------
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(LFC DEFAULT_MSG LFC_LIBRARIES LFC_INCLUDE_DIR)
mark_as_advanced(LFC_INCLUDE_DIR LFC_LIBRARIES)