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 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79
|
#
# This module detects if dpm is installed and determines where the
# include files and libraries are.
#
# This code sets the following variables:
#
# DPM_LIBRARIES = full path to the dpm libraries
# DPM_INCLUDE_DIR = include dir to be used when using the dpm library
# DPM_FOUND = set to true if dpm was found successfully
#
# DPM_LOCATION
# setting this enables search for dpm libraries / headers in this location
# -----------------------------------------------------
# DPM Libraries
# -----------------------------------------------------
find_library(DPM_LIBRARIES
NAMES dpm
HINTS ${DPM_LOCATION}
${STAGE_DIR}
${CMAKE_INSTALL_PREFIX}/dcap/*/${PLATFORM}/
${CMAKE_INSTALL_PREFIX}/Grid/dcap/*/${PLATFORM}/
DOC "The main dpm library"
)
# -----------------------------------------------------
# LCGDM Libraries
# -----------------------------------------------------
find_library(LCGDM_LIBRARIES
NAMES lcgdm
HINTS ${DPM_LOCATION}
${STAGE_DIR}
${CMAKE_INSTALL_PREFIX}/dcap/*/${PLATFORM}/
${CMAKE_INSTALL_PREFIX}/Grid/dcap/*/${PLATFORM}/
DOC "The main lcgdm library"
)
# -----------------------------------------------------
# DPM Include Directories
# -----------------------------------------------------
find_path(DPM_INCLUDE_DIR
NAMES dpm/dpm_api.h
HINTS ${DPM_LOCATION}
${STAGE_DIR}
${CMAKE_INSTALL_PREFIX}/dcap/*/${PLATFORM}/
${CMAKE_INSTALL_PREFIX}/Grid/dcap/*/${PLATFORM}/
DOC "The dpm include directory"
)
if(DPM_INCLUDE_DIR)
message(STATUS "dpm includes found in ${DPM_INCLUDE_DIR}")
endif()
# -----------------------------------------------------
# LCGDM Include Directories
# -----------------------------------------------------
find_path(LCGDM_INCLUDE_DIR
NAMES Cinit.h
HINTS ${LCGDM_LOCATION}
${STAGE_DIR}
${CMAKE_INSTALL_PREFIX}/dcap/*/${PLATFORM}/
${CMAKE_INSTALL_PREFIX}/Grid/dcap/*/${PLATFORM}/
DOC "The LCGDM include directory"
)
if(LCGDM_INCLUDE_DIR)
message(STATUS "lcgdm includes found in ${LCGDM_INCLUDE_DIR}")
endif()
# -----------------------------------------------------
# handle the QUIETLY and REQUIRED arguments and set DPM_FOUND to TRUE if
# all listed variables are TRUE
# -----------------------------------------------------
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(dpm DEFAULT_MSG DPM_LIBRARIES DPM_INCLUDE_DIR)
find_package_handle_standard_args(lcgdm DEFAULT_MSG LCGDM_LIBRARIES LCGDM_INCLUDE_DIR)
mark_as_advanced(DPM_INCLUDE_DIR DPM_LIBRARIES)
mark_as_advanced(LCGDM_INCLUDE_DIR LCGDM_LIBRARIES)
|