FindAPR.cmake
上传用户:king477883
上传日期:2021-03-01
资源大小:9553k
文件大小:2k
源码类别:

游戏引擎

开发平台:

C++ Builder

  1. # -*- cmake -*-
  2. # - Find Apache Portable Runtime
  3. # Find the APR includes and libraries
  4. # This module defines
  5. #  APR_INCLUDE_DIR and APRUTIL_INCLUDE_DIR, where to find apr.h, etc.
  6. #  APR_LIBRARIES and APRUTIL_LIBRARIES, the libraries needed to use APR.
  7. #  APR_FOUND and APRUTIL_FOUND, If false, do not try to use APR.
  8. # also defined, but not for general use are
  9. #  APR_LIBRARY and APRUTIL_LIBRARY, where to find the APR library.
  10. # APR first.
  11. FIND_PATH(APR_INCLUDE_DIR apr.h
  12. /usr/local/include/apr-1
  13. /usr/local/include/apr-1.0
  14. /usr/include/apr-1
  15. /usr/include/apr-1.0
  16. )
  17. SET(APR_NAMES ${APR_NAMES} apr-1)
  18. FIND_LIBRARY(APR_LIBRARY
  19.   NAMES ${APR_NAMES}
  20.   PATHS /usr/lib /usr/local/lib
  21.   )
  22. IF (APR_LIBRARY AND APR_INCLUDE_DIR)
  23.     SET(APR_LIBRARIES ${APR_LIBRARY})
  24.     SET(APR_FOUND "YES")
  25. ELSE (APR_LIBRARY AND APR_INCLUDE_DIR)
  26.   SET(APR_FOUND "NO")
  27. ENDIF (APR_LIBRARY AND APR_INCLUDE_DIR)
  28. IF (APR_FOUND)
  29.    IF (NOT APR_FIND_QUIETLY)
  30.       MESSAGE(STATUS "Found APR: ${APR_LIBRARIES}")
  31.    ENDIF (NOT APR_FIND_QUIETLY)
  32. ELSE (APR_FOUND)
  33.    IF (APR_FIND_REQUIRED)
  34.       MESSAGE(FATAL_ERROR "Could not find APR library")
  35.    ENDIF (APR_FIND_REQUIRED)
  36. ENDIF (APR_FOUND)
  37. # Deprecated declarations.
  38. SET (NATIVE_APR_INCLUDE_PATH ${APR_INCLUDE_DIR} )
  39. GET_FILENAME_COMPONENT (NATIVE_APR_LIB_PATH ${APR_LIBRARY} PATH)
  40. MARK_AS_ADVANCED(
  41.   APR_LIBRARY
  42.   APR_INCLUDE_DIR
  43.   )
  44. # Next, APRUTIL.
  45. FIND_PATH(APRUTIL_INCLUDE_DIR apu.h
  46. /usr/local/include/apr-1
  47. /usr/local/include/apr-1.0
  48. /usr/include/apr-1
  49. /usr/include/apr-1.0
  50. )
  51. SET(APRUTIL_NAMES ${APRUTIL_NAMES} aprutil-1)
  52. FIND_LIBRARY(APRUTIL_LIBRARY
  53.   NAMES ${APRUTIL_NAMES}
  54.   PATHS /usr/lib /usr/local/lib
  55.   )
  56. IF (APRUTIL_LIBRARY AND APRUTIL_INCLUDE_DIR)
  57.     SET(APRUTIL_LIBRARIES ${APRUTIL_LIBRARY})
  58.     SET(APRUTIL_FOUND "YES")
  59. ELSE (APRUTIL_LIBRARY AND APRUTIL_INCLUDE_DIR)
  60.   SET(APRUTIL_FOUND "NO")
  61. ENDIF (APRUTIL_LIBRARY AND APRUTIL_INCLUDE_DIR)
  62. IF (APRUTIL_FOUND)
  63.    IF (NOT APRUTIL_FIND_QUIETLY)
  64.       MESSAGE(STATUS "Found APRUTIL: ${APRUTIL_LIBRARIES}")
  65.    ENDIF (NOT APRUTIL_FIND_QUIETLY)
  66. ELSE (APRUTIL_FOUND)
  67.    IF (APRUTIL_FIND_REQUIRED)
  68.       MESSAGE(FATAL_ERROR "Could not find APRUTIL library")
  69.    ENDIF (APRUTIL_FIND_REQUIRED)
  70. ENDIF (APRUTIL_FOUND)
  71. # Deprecated declarations.
  72. SET (NATIVE_APRUTIL_INCLUDE_PATH ${APRUTIL_INCLUDE_DIR} )
  73. GET_FILENAME_COMPONENT (NATIVE_APRUTIL_LIB_PATH ${APRUTIL_LIBRARY} PATH)
  74. MARK_AS_ADVANCED(
  75.   APRUTIL_LIBRARY
  76.   APRUTIL_INCLUDE_DIR
  77.   )