Clear history
This commit is contained in:
commit
09ba9c534a
15421 changed files with 3275660 additions and 0 deletions
183
libevent/x86/lib/cmake/libevent/LibeventConfig.cmake
Normal file
183
libevent/x86/lib/cmake/libevent/LibeventConfig.cmake
Normal file
|
|
@ -0,0 +1,183 @@
|
|||
# - Config file for the Libevent package
|
||||
# It defines the following variables
|
||||
# LIBEVENT_FOUND - true if libevent and all required components found on the system
|
||||
# LIBEVENT_xxx_FOUND - true if component xxx(see available components) found on the system
|
||||
# LIBEVENT_VERSION - libevent version in format Major.Minor.Patch
|
||||
# LIBEVENT_INCLUDE_DIRS - directories where libevent header is located.
|
||||
# LIBEVENT_INCLUDE_DIR - same as DIRS
|
||||
# LIBEVENT_LIBRARIES - libevent library to link against.
|
||||
# LIBEVENT_LIBRARY - same as LIBRARIES
|
||||
#
|
||||
# These variables are deprecated, don't use them.
|
||||
# LIBEVENT_STATIC_LIBRARIES - libraries to link against (archive/static)
|
||||
# LIBEVENT_SHARED_LIBRARIES - libraries to link against (shared)
|
||||
#
|
||||
# When you try to locate the libevent libraries, you should specify which components you want to use.
|
||||
# The following table lists all available components. If none is given, all imported targets will used.
|
||||
# core - the core functons of libevent
|
||||
# extra - extra functions, contains http, dns and rpc
|
||||
# pthreads - multiple threads for libevent, not exists on Windows
|
||||
# openssl - openssl support for libevent
|
||||
#
|
||||
# By default, the shared libraries of libevent will be found. To find the static ones instead,
|
||||
# you must set the LIBEVENT_STATIC_LINK variable to TRUE before calling find_package(Libevent ...).
|
||||
# If no component provided, all components will be used.
|
||||
# example:
|
||||
# set(LIBEVENT_STATIC_LINK TRUE)
|
||||
# find_package(Libevent 2.2 REQUIRED COMPONENTS core)
|
||||
# include_directories(${LIBEVENT_INCLUDE_DIRS}) # Can be omitted
|
||||
# target_link_libraries(myapp ${LIBEVENT_LIBRARIES})
|
||||
# or target_link_libraries(myapp libevent::core)
|
||||
#
|
||||
# find_package() can handle dependencies automatically. For example, given the 'openssl' component,
|
||||
# all dependencies (libevent_core, libssl, libcrypto and openssl include directories) will be found.
|
||||
|
||||
set(CONFIG_FOR_INSTALL_TREE 1)
|
||||
|
||||
set(LIBEVENT_VERSION 2.1.12)
|
||||
|
||||
# IMPORTED targets from LibeventTargets.cmake
|
||||
set(LIBEVENT_STATIC_LIBRARIES "core;extra")
|
||||
set(LIBEVENT_SHARED_LIBRARIES "")
|
||||
|
||||
# Default to the same type as libevent was built:
|
||||
if(NOT DEFINED LIBEVENT_STATIC_LINK)
|
||||
set(LIBEVENT_STATIC_LINK NOT OFF)
|
||||
endif()
|
||||
|
||||
set(CMAKE_FIND_LIBRARY_SUFFIXES_SAVE "${CMAKE_FIND_LIBRARY_SUFFIXES}")
|
||||
if(${LIBEVENT_STATIC_LINK})
|
||||
set(_LIB_TYPE static)
|
||||
set(CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_STATIC_LIBRARY_SUFFIX})
|
||||
set(_AVAILABLE_LIBS "${LIBEVENT_STATIC_LIBRARIES}")
|
||||
else()
|
||||
set(_LIB_TYPE shared)
|
||||
set(CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_SHARED_LIBRARY_SUFFIX})
|
||||
set(_AVAILABLE_LIBS "${LIBEVENT_SHARED_LIBRARIES}")
|
||||
endif()
|
||||
|
||||
# Get the path of the current file.
|
||||
get_filename_component(LIBEVENT_CMAKE_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
|
||||
get_filename_component(_INSTALL_PREFIX "${LIBEVENT_CMAKE_DIR}/../../.." ABSOLUTE)
|
||||
|
||||
macro(message_if_needed _flag _msg)
|
||||
if (NOT ${CMAKE_FIND_PACKAGE_NAME}_FIND_QUIETLY)
|
||||
message(${_flag} "${_msg}")
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
macro(no_component_msg _comp)
|
||||
if(${CMAKE_FIND_PACKAGE_NAME}_FIND_REQUIRED_${_comp})
|
||||
set(pthreadlib)
|
||||
if(NOT WIN32)
|
||||
set(pthreadlib ", pthreads")
|
||||
endif()
|
||||
message(FATAL_ERROR "Your libevent library does not contain a ${_comp} component!\n"
|
||||
"The valid components are core, extra${pthreadlib} and openssl.")
|
||||
else()
|
||||
message_if_needed(WARNING "Your libevent library does not contain a ${_comp} component!")
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
set(_EVENT_COMPONENTS)
|
||||
if(${CMAKE_FIND_PACKAGE_NAME}_FIND_COMPONENTS)
|
||||
list(REMOVE_DUPLICATES ${CMAKE_FIND_PACKAGE_NAME}_FIND_COMPONENTS)
|
||||
foreach(_comp ${${CMAKE_FIND_PACKAGE_NAME}_FIND_COMPONENTS})
|
||||
list(FIND _AVAILABLE_LIBS ${_comp} _INDEX)
|
||||
if(_INDEX GREATER -1)
|
||||
list(APPEND _EVENT_COMPONENTS ${_comp})
|
||||
else()
|
||||
no_component_msg(${_comp})
|
||||
endif()
|
||||
endforeach()
|
||||
else()
|
||||
set(_EVENT_COMPONENTS ${_AVAILABLE_LIBS})
|
||||
endif()
|
||||
|
||||
set(_POSSIBLE_PKG_NAMES)
|
||||
list(APPEND _POSSIBLE_PKG_NAMES ${CMAKE_FIND_PACKAGE_NAME} LIBEVENT Libevent libevent)
|
||||
list(REMOVE_DUPLICATES _POSSIBLE_PKG_NAMES)
|
||||
|
||||
macro(set_case_insensitive_found _comp)
|
||||
foreach(name ${_POSSIBLE_PKG_NAMES})
|
||||
if("${_comp}" STREQUAL "")
|
||||
set(${name}_FOUND TRUE)
|
||||
set(${name}_NOTFOUND FALSE)
|
||||
else()
|
||||
set(${name}_${_comp}_FOUND TRUE)
|
||||
set(${name}_${_comp}_NOTFOUND FALSE)
|
||||
endif()
|
||||
endforeach()
|
||||
endmacro()
|
||||
|
||||
if(CONFIG_FOR_INSTALL_TREE)
|
||||
## Config for install tree ----------------------------------------
|
||||
# Find includes
|
||||
unset(_event_h CACHE)
|
||||
find_path(_event_h
|
||||
NAMES event2/event.h
|
||||
PATHS "${_INSTALL_PREFIX}/include"
|
||||
NO_DEFAULT_PATH)
|
||||
if(true)
|
||||
set(LIBEVENT_INCLUDE_DIRS "${_event_h}")
|
||||
message_if_needed(STATUS "Found libevent include directory: ${_event_h}")
|
||||
else()
|
||||
message_if_needed(WARNING "Your libevent library does not contain header files!")
|
||||
endif()
|
||||
|
||||
# Find libraries
|
||||
macro(find_event_lib _comp)
|
||||
unset(_event_lib CACHE)
|
||||
find_library(_event_lib
|
||||
NAMES "event_${_comp}"
|
||||
PATHS "${_INSTALL_PREFIX}/lib"
|
||||
NO_DEFAULT_PATH)
|
||||
if(true)
|
||||
list(APPEND LIBEVENT_LIBRARIES "libevent::${_comp}")
|
||||
set_case_insensitive_found(${_comp})
|
||||
message_if_needed(STATUS "Found libevent component: ${_event_lib}")
|
||||
else()
|
||||
no_component_msg(${_comp})
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
foreach(comp ${_EVENT_COMPONENTS})
|
||||
find_event_lib(${comp})
|
||||
endforeach()
|
||||
else()
|
||||
## Config for build tree ----------------------------------------
|
||||
set(LIBEVENT_INCLUDE_DIRS "/dev/shm/libevent/include;/dev/shm/libevent/build/include")
|
||||
foreach(_comp ${_EVENT_COMPONENTS})
|
||||
list(APPEND LIBEVENT_LIBRARIES "libevent::${_comp}")
|
||||
set_case_insensitive_found(${_comp})
|
||||
endforeach()
|
||||
endif()
|
||||
|
||||
set(LIBEVENT_INCLUDE_DIR ${LIBEVENT_INCLUDE_DIRS})
|
||||
if(LIBEVENT_LIBRARIES)
|
||||
set(LIBEVENT_LIBRARY ${LIBEVENT_LIBRARIES})
|
||||
if(CONFIG_FOR_INSTALL_TREE)
|
||||
message_if_needed(STATUS "Found libevent ${LIBEVENT_VERSION} in ${_INSTALL_PREFIX}")
|
||||
else()
|
||||
message_if_needed(STATUS "Found libevent ${LIBEVENT_VERSION} in ${LIBEVENT_CMAKE_DIR}")
|
||||
endif()
|
||||
|
||||
# Avoid including targets more than one times
|
||||
if(NOT TARGET event_core_${_LIB_TYPE})
|
||||
# Include the project Targets file, this contains definitions for IMPORTED targets.
|
||||
include(${LIBEVENT_CMAKE_DIR}/LibeventTargets-${_LIB_TYPE}.cmake)
|
||||
endif()
|
||||
else()
|
||||
if(${CMAKE_FIND_PACKAGE_NAME}_FIND_REQUIRED)
|
||||
message(FATAL_ERROR "Can not find any libraries for libevent.")
|
||||
else()
|
||||
message_if_needed(WARNING "Can not find any libraries for libevent.")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set(CMAKE_FIND_LIBRARY_SUFFIXES "${CMAKE_FIND_LIBRARY_SUFFIXES_SAVE}")
|
||||
unset(_LIB_TYPE)
|
||||
unset(_AVAILABLE_LIBS)
|
||||
unset(_EVENT_COMPONENTS)
|
||||
unset(_POSSIBLE_PKG_NAMES)
|
||||
unset(_INSTALL_PREFIX)
|
||||
11
libevent/x86/lib/cmake/libevent/LibeventConfigVersion.cmake
Normal file
11
libevent/x86/lib/cmake/libevent/LibeventConfigVersion.cmake
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
set(PACKAGE_VERSION "2.1.12")
|
||||
|
||||
# Check whether the requested PACKAGE_FIND_VERSION is compatible
|
||||
if("${PACKAGE_VERSION}" VERSION_LESS "${PACKAGE_FIND_VERSION}")
|
||||
set(PACKAGE_VERSION_COMPATIBLE FALSE)
|
||||
else()
|
||||
set(PACKAGE_VERSION_COMPATIBLE TRUE)
|
||||
if ("${PACKAGE_VERSION}" VERSION_EQUAL "${PACKAGE_FIND_VERSION}")
|
||||
set(PACKAGE_VERSION_EXACT TRUE)
|
||||
endif()
|
||||
endif()
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
#----------------------------------------------------------------
|
||||
# Generated CMake target import file for configuration "Release".
|
||||
#----------------------------------------------------------------
|
||||
|
||||
# Commands may need to know the format version.
|
||||
set(CMAKE_IMPORT_FILE_VERSION 1)
|
||||
|
||||
# Import target "libevent::core" for configuration "Release"
|
||||
set_property(TARGET libevent::core APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE)
|
||||
set_target_properties(libevent::core PROPERTIES
|
||||
IMPORTED_LINK_INTERFACE_LANGUAGES_RELEASE "C"
|
||||
IMPORTED_LOCATION_RELEASE "${_IMPORT_PREFIX}/lib/libevent_core.a"
|
||||
)
|
||||
|
||||
list(APPEND _IMPORT_CHECK_TARGETS libevent::core )
|
||||
list(APPEND _IMPORT_CHECK_FILES_FOR_libevent::core "${_IMPORT_PREFIX}/lib/libevent_core.a" )
|
||||
|
||||
# Import target "libevent::extra" for configuration "Release"
|
||||
set_property(TARGET libevent::extra APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE)
|
||||
set_target_properties(libevent::extra PROPERTIES
|
||||
IMPORTED_LINK_INTERFACE_LANGUAGES_RELEASE "C"
|
||||
IMPORTED_LOCATION_RELEASE "${_IMPORT_PREFIX}/lib/libevent_extra.a"
|
||||
)
|
||||
|
||||
list(APPEND _IMPORT_CHECK_TARGETS libevent::extra )
|
||||
list(APPEND _IMPORT_CHECK_FILES_FOR_libevent::extra "${_IMPORT_PREFIX}/lib/libevent_extra.a" )
|
||||
|
||||
# Commands beyond this point should not need to know the version.
|
||||
set(CMAKE_IMPORT_FILE_VERSION)
|
||||
101
libevent/x86/lib/cmake/libevent/LibeventTargets-static.cmake
Normal file
101
libevent/x86/lib/cmake/libevent/LibeventTargets-static.cmake
Normal file
|
|
@ -0,0 +1,101 @@
|
|||
# Generated by CMake
|
||||
|
||||
if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" LESS 2.5)
|
||||
message(FATAL_ERROR "CMake >= 2.6.0 required")
|
||||
endif()
|
||||
cmake_policy(PUSH)
|
||||
cmake_policy(VERSION 2.6...3.17)
|
||||
#----------------------------------------------------------------
|
||||
# Generated CMake target import file.
|
||||
#----------------------------------------------------------------
|
||||
|
||||
# Commands may need to know the format version.
|
||||
set(CMAKE_IMPORT_FILE_VERSION 1)
|
||||
|
||||
# Protect against multiple inclusion, which would fail when already imported targets are added once more.
|
||||
set(_targetsDefined)
|
||||
set(_targetsNotDefined)
|
||||
set(_expectedTargets)
|
||||
foreach(_expectedTarget libevent::core libevent::extra)
|
||||
list(APPEND _expectedTargets ${_expectedTarget})
|
||||
if(NOT TARGET ${_expectedTarget})
|
||||
list(APPEND _targetsNotDefined ${_expectedTarget})
|
||||
endif()
|
||||
if(TARGET ${_expectedTarget})
|
||||
list(APPEND _targetsDefined ${_expectedTarget})
|
||||
endif()
|
||||
endforeach()
|
||||
if("${_targetsDefined}" STREQUAL "${_expectedTargets}")
|
||||
unset(_targetsDefined)
|
||||
unset(_targetsNotDefined)
|
||||
unset(_expectedTargets)
|
||||
set(CMAKE_IMPORT_FILE_VERSION)
|
||||
cmake_policy(POP)
|
||||
return()
|
||||
endif()
|
||||
if(NOT "${_targetsDefined}" STREQUAL "")
|
||||
message(FATAL_ERROR "Some (but not all) targets in this export set were already defined.\nTargets Defined: ${_targetsDefined}\nTargets not yet defined: ${_targetsNotDefined}\n")
|
||||
endif()
|
||||
unset(_targetsDefined)
|
||||
unset(_targetsNotDefined)
|
||||
unset(_expectedTargets)
|
||||
|
||||
|
||||
# The installation prefix configured by this project.
|
||||
get_filename_component(LIBEVENT_CMAKE_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
|
||||
get_filename_component(_IMPORT_PREFIX "${LIBEVENT_CMAKE_DIR}/../../.." ABSOLUTE)
|
||||
|
||||
# Create imported target libevent::core
|
||||
add_library(libevent::core STATIC IMPORTED)
|
||||
|
||||
set_target_properties(libevent::core PROPERTIES
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/include"
|
||||
)
|
||||
|
||||
# Create imported target libevent::extra
|
||||
add_library(libevent::extra STATIC IMPORTED)
|
||||
|
||||
set_target_properties(libevent::extra PROPERTIES
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/include"
|
||||
INTERFACE_LINK_LIBRARIES "libevent::core"
|
||||
)
|
||||
|
||||
if(CMAKE_VERSION VERSION_LESS 2.8.12)
|
||||
message(FATAL_ERROR "This file relies on consumers using CMake 2.8.12 or greater.")
|
||||
endif()
|
||||
|
||||
# Load information for each installed configuration.
|
||||
get_filename_component(_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
|
||||
file(GLOB CONFIG_FILES "${_DIR}/LibeventTargets-static-*.cmake")
|
||||
foreach(f ${CONFIG_FILES})
|
||||
include(${f})
|
||||
endforeach()
|
||||
|
||||
# Cleanup temporary variables.
|
||||
set(_IMPORT_PREFIX)
|
||||
|
||||
# Loop over all imported files and verify that they actually exist
|
||||
foreach(target ${_IMPORT_CHECK_TARGETS} )
|
||||
foreach(file ${_IMPORT_CHECK_FILES_FOR_${target}} )
|
||||
if(NOT EXISTS "${file}" )
|
||||
message(FATAL_ERROR "The imported target \"${target}\" references the file
|
||||
\"${file}\"
|
||||
but this file does not exist. Possible reasons include:
|
||||
* The file was deleted, renamed, or moved to another location.
|
||||
* An install or uninstall procedure did not complete successfully.
|
||||
* The installation package was faulty and contained
|
||||
\"${CMAKE_CURRENT_LIST_FILE}\"
|
||||
but not all the files it references.
|
||||
")
|
||||
endif()
|
||||
endforeach()
|
||||
unset(_IMPORT_CHECK_FILES_FOR_${target})
|
||||
endforeach()
|
||||
unset(_IMPORT_CHECK_TARGETS)
|
||||
|
||||
# This file does not depend on other imported targets which have
|
||||
# been exported from the same project but in a separate export set.
|
||||
|
||||
# Commands beyond this point should not need to know the version.
|
||||
set(CMAKE_IMPORT_FILE_VERSION)
|
||||
cmake_policy(POP)
|
||||
Loading…
Add table
Add a link
Reference in a new issue