Files
GameNetworkingSockets/cmake/GameNetworkingSocketsConfig.cmake.in
2024-09-30 09:34:18 -07:00

65 lines
1.9 KiB
CMake
Raw Permalink Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
@PACKAGE_INIT@
include(CMakeFindDependencyMacro)
find_dependency(Threads)
find_dependency(Protobuf)
if(@USE_CRYPTO@ STREQUAL "OpenSSL")
find_dependency(OpenSSL)
endif()
if(@USE_CRYPTO@ STREQUAL "libsodium")
find_dependency(sodium)
endif()
if(@STEAMWEBRTC_ABSL_SOURCE@ STREQUAL "package")
find_dependency(absl REQUIRED)
endif()
if(@USE_STEAMWEBRTC@)
include(${CMAKE_CURRENT_LIST_DIR}/steamwebrtc.cmake)
endif()
include(${CMAKE_CURRENT_LIST_DIR}/GameNetworkingSockets.cmake)
if(${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.11.0")
# Need to set IMPORTED_GLOBAL in order to create the aliases
# However, IMPORTED_GLOBAL only exists in 3.11 and up
# Also, setting IMPORTED_GLOBAL from another directory from where it was first set blows up
# so we can only set it once.
if(@BUILD_SHARED_LIB@)
get_target_property(GNS_IMPORTED_GLOBAL_SET GameNetworkingSockets::GameNetworkingSockets IMPORTED_GLOBAL)
if(NOT ${GNS_IMPORTED_GLOBAL_SET})
set_target_properties(
GameNetworkingSockets::GameNetworkingSockets
PROPERTIES IMPORTED_GLOBAL True
)
endif()
unset(GNS_IMPORTED_GLOBAL_SET)
add_library(GameNetworkingSockets::shared ALIAS GameNetworkingSockets::GameNetworkingSockets)
endif()
if(@BUILD_STATIC_LIB@)
get_target_property(GNS_IMPORTED_GLOBAL_SET GameNetworkingSockets::GameNetworkingSockets_s IMPORTED_GLOBAL)
if(NOT ${GNS_IMPORTED_GLOBAL_SET})
set_target_properties(
GameNetworkingSockets::GameNetworkingSockets_s
PROPERTIES IMPORTED_GLOBAL True
)
endif()
unset(GNS_IMPORTED_GLOBAL_SET)
add_library(GameNetworkingSockets::static ALIAS GameNetworkingSockets::GameNetworkingSockets_s)
endif()
endif()
check_required_components(GameNetworkingSockets)
set(GameNetworkingSockets_FOUND 1)