mirror of
https://github.com/OpenVPN/openvpn3.git
synced 2024-09-20 04:02:15 +02:00
d7b3419f8e
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
430 B
CMake
16 lines
430 B
CMake
find_path(XXHASH_INCLUDE_DIR NAMES xxhash.h)
|
|
|
|
include(FindPackageHandleStandardArgs)
|
|
FIND_PACKAGE_HANDLE_STANDARD_ARGS(
|
|
xxHash DEFAULT_MSG
|
|
XXHASH_INCLUDE_DIR
|
|
)
|
|
|
|
if(XXHASH_INCLUDE_DIR AND NOT TARGET xxHash::xxhash)
|
|
add_library(xxHash::xxhash INTERFACE IMPORTED)
|
|
set_target_properties(xxHash::xxhash PROPERTIES
|
|
INTERFACE_INCLUDE_DIRECTORIES "${XXHASH_INCLUDE_DIR}")
|
|
endif()
|
|
|
|
mark_as_advanced(XXHASH_INCLUDE_DIR)
|