mirror of
https://github.com/coturn/coturn.git
synced 2025-10-22 19:41:27 +02:00
The following changes have been made: 1. Replace deprecated functions with new standard functions 2. Add corresponding MSVC functions for non-standard functions 3. Remove warnings about unsafe functions 4. CMAKE: modify find pack Libevent and openssl 5. Modify include files 6. Use pthread4W 7. Modify socket in windows 8. Add CI - github action 8.1. msvc 8.2. mingw 10. The database: 9.1. sqlite, pgsql, hiredis, mongo is test compiled. 9.2. mysql, isnot test compiled. 11. The applications、server can be compiled and run successfully! 12. Add vcpkg manifest mode in cmake.
52 lines
1.4 KiB
CMake
52 lines
1.4 KiB
CMake
# - Try to find coturn
|
|
#
|
|
# Usage from an external project:
|
|
# In your CMakeLists.txt, add these lines:
|
|
#
|
|
# find_package(coturn)
|
|
# target_link_libraries(MY_TARGET_NAME ${coturn_LIBRARIES})
|
|
#
|
|
# This file will define the following variables:
|
|
# coturn_FOUND: True if find coturn, other false
|
|
# coturn_LIBRARIES: The list of all imported targets for coturn components
|
|
#
|
|
# Author: Kang Lin <kl222@126.com>
|
|
|
|
include(FindPackageHandleStandardArgs)
|
|
|
|
if (NOT coturn_FIND_COMPONENTS)
|
|
set(coturn_FIND_COMPONENTS
|
|
turncommon
|
|
turnclient
|
|
turn_server
|
|
)
|
|
endif()
|
|
|
|
get_filename_component(_coturn_module_paths "${CMAKE_CURRENT_LIST_DIR}" ABSOLUTE)
|
|
|
|
set(_coturn_FIND_PARTS_REQUIRED)
|
|
if (coturn_FIND_REQUIRED)
|
|
set(_coturn_FIND_PARTS_REQUIRED REQUIRED)
|
|
endif()
|
|
set(_coturn_FIND_PARTS_QUIET)
|
|
if (coturn_FIND_QUIETLY)
|
|
set(_coturn_FIND_PARTS_QUIET QUIET)
|
|
endif()
|
|
|
|
foreach(module ${coturn_FIND_COMPONENTS})
|
|
find_package(${module}
|
|
${_coturn_FIND_PARTS_QUIET}
|
|
${_coturn_FIND_PARTS_REQUIRED}
|
|
PATHS ${_coturn_module_paths} NO_DEFAULT_PATH
|
|
)
|
|
if(${module}_FOUND)
|
|
list(APPEND coturn_LIBRARIES coturn::${module})
|
|
endif()
|
|
list(APPEND required "${module}_FOUND")
|
|
endforeach()
|
|
|
|
# Run checks via find_package_handle_standard_args
|
|
find_package_handle_standard_args(coturn
|
|
FOUND_VAR coturn_FOUND
|
|
REQUIRED_VARS ${required})
|