mirror of
https://github.com/amnezia-vpn/openvpn3.git
synced 2026-05-17 00:16:12 +03:00
Always use find_package for all libraries. Add missing Find*.cmake modules. Always define an IMPORTED library in Find* Signed-off-by: Frank Lichtenheld <frank@lichtenheld.com>
16 lines
406 B
CMake
16 lines
406 B
CMake
find_path(ASIO_INCLUDE_DIR NAMES asio.hpp)
|
|
|
|
include(FindPackageHandleStandardArgs)
|
|
FIND_PACKAGE_HANDLE_STANDARD_ARGS(
|
|
asio DEFAULT_MSG
|
|
ASIO_INCLUDE_DIR
|
|
)
|
|
|
|
if(ASIO_INCLUDE_DIR AND NOT TARGET asio::asio)
|
|
add_library(asio::asio INTERFACE IMPORTED)
|
|
set_target_properties(asio::asio PROPERTIES
|
|
INTERFACE_INCLUDE_DIRECTORIES "${ASIO_INCLUDE_DIR}")
|
|
endif()
|
|
|
|
mark_as_advanced(ASIO_INCLUDE_DIR)
|