annotate CSP2/CSP2_env/env-d9b9114564458d9d-741b3de822f2aaca6c6caa4325c4afce/lib/cmake/libssh2/Libssh2Config.cmake @ 68:5028fdace37b

planemo upload commit 2e9511a184a1ca667c7be0c6321a36dc4e3d116d
author jpayne
date Tue, 18 Mar 2025 16:23:26 -0400
parents
children
rev   line source
jpayne@68 1 # Generated by CMake
jpayne@68 2
jpayne@68 3 if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" LESS 2.5)
jpayne@68 4 message(FATAL_ERROR "CMake >= 2.6.0 required")
jpayne@68 5 endif()
jpayne@68 6 cmake_policy(PUSH)
jpayne@68 7 cmake_policy(VERSION 2.6)
jpayne@68 8 #----------------------------------------------------------------
jpayne@68 9 # Generated CMake target import file.
jpayne@68 10 #----------------------------------------------------------------
jpayne@68 11
jpayne@68 12 # Commands may need to know the format version.
jpayne@68 13 set(CMAKE_IMPORT_FILE_VERSION 1)
jpayne@68 14
jpayne@68 15 # Protect against multiple inclusion, which would fail when already imported targets are added once more.
jpayne@68 16 set(_targetsDefined)
jpayne@68 17 set(_targetsNotDefined)
jpayne@68 18 set(_expectedTargets)
jpayne@68 19 foreach(_expectedTarget Libssh2::libssh2)
jpayne@68 20 list(APPEND _expectedTargets ${_expectedTarget})
jpayne@68 21 if(NOT TARGET ${_expectedTarget})
jpayne@68 22 list(APPEND _targetsNotDefined ${_expectedTarget})
jpayne@68 23 endif()
jpayne@68 24 if(TARGET ${_expectedTarget})
jpayne@68 25 list(APPEND _targetsDefined ${_expectedTarget})
jpayne@68 26 endif()
jpayne@68 27 endforeach()
jpayne@68 28 if("${_targetsDefined}" STREQUAL "${_expectedTargets}")
jpayne@68 29 unset(_targetsDefined)
jpayne@68 30 unset(_targetsNotDefined)
jpayne@68 31 unset(_expectedTargets)
jpayne@68 32 set(CMAKE_IMPORT_FILE_VERSION)
jpayne@68 33 cmake_policy(POP)
jpayne@68 34 return()
jpayne@68 35 endif()
jpayne@68 36 if(NOT "${_targetsDefined}" STREQUAL "")
jpayne@68 37 message(FATAL_ERROR "Some (but not all) targets in this export set were already defined.\nTargets Defined: ${_targetsDefined}\nTargets not yet defined: ${_targetsNotDefined}\n")
jpayne@68 38 endif()
jpayne@68 39 unset(_targetsDefined)
jpayne@68 40 unset(_targetsNotDefined)
jpayne@68 41 unset(_expectedTargets)
jpayne@68 42
jpayne@68 43
jpayne@68 44 # Compute the installation prefix relative to this file.
jpayne@68 45 get_filename_component(_IMPORT_PREFIX "${CMAKE_CURRENT_LIST_FILE}" PATH)
jpayne@68 46 get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH)
jpayne@68 47 get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH)
jpayne@68 48 get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH)
jpayne@68 49 if(_IMPORT_PREFIX STREQUAL "/")
jpayne@68 50 set(_IMPORT_PREFIX "")
jpayne@68 51 endif()
jpayne@68 52
jpayne@68 53 # Create imported target Libssh2::libssh2
jpayne@68 54 add_library(Libssh2::libssh2 SHARED IMPORTED)
jpayne@68 55
jpayne@68 56 set_target_properties(Libssh2::libssh2 PROPERTIES
jpayne@68 57 INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/include"
jpayne@68 58 )
jpayne@68 59
jpayne@68 60 # Load information for each installed configuration.
jpayne@68 61 get_filename_component(_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
jpayne@68 62 file(GLOB CONFIG_FILES "${_DIR}/Libssh2Config-*.cmake")
jpayne@68 63 foreach(f ${CONFIG_FILES})
jpayne@68 64 include(${f})
jpayne@68 65 endforeach()
jpayne@68 66
jpayne@68 67 # Cleanup temporary variables.
jpayne@68 68 set(_IMPORT_PREFIX)
jpayne@68 69
jpayne@68 70 # Loop over all imported files and verify that they actually exist
jpayne@68 71 foreach(target ${_IMPORT_CHECK_TARGETS} )
jpayne@68 72 foreach(file ${_IMPORT_CHECK_FILES_FOR_${target}} )
jpayne@68 73 if(NOT EXISTS "${file}" )
jpayne@68 74 message(FATAL_ERROR "The imported target \"${target}\" references the file
jpayne@68 75 \"${file}\"
jpayne@68 76 but this file does not exist. Possible reasons include:
jpayne@68 77 * The file was deleted, renamed, or moved to another location.
jpayne@68 78 * An install or uninstall procedure did not complete successfully.
jpayne@68 79 * The installation package was faulty and contained
jpayne@68 80 \"${CMAKE_CURRENT_LIST_FILE}\"
jpayne@68 81 but not all the files it references.
jpayne@68 82 ")
jpayne@68 83 endif()
jpayne@68 84 endforeach()
jpayne@68 85 unset(_IMPORT_CHECK_FILES_FOR_${target})
jpayne@68 86 endforeach()
jpayne@68 87 unset(_IMPORT_CHECK_TARGETS)
jpayne@68 88
jpayne@68 89 # This file does not depend on other imported targets which have
jpayne@68 90 # been exported from the same project but in a separate export set.
jpayne@68 91
jpayne@68 92 # Commands beyond this point should not need to know the version.
jpayne@68 93 set(CMAKE_IMPORT_FILE_VERSION)
jpayne@68 94 cmake_policy(POP)