blob: 9673dabad399247a9c72ac93ceb4aa3722013f1f (
about) (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
|
# sodium cmake module
# This module sets the following variables in your project:
#
# sodium_FOUND - true if sodium found on the system
# sodium_INCLUDE_DIR - the directory containing sodium headers
# sodium_LIBRARY_DEBUG
# sodium_LIBRARY_RELEASE
# sodium_LIBRARIES
# sodium_VERSION
#
include(FindPackageHandleStandardArgs)
include(SelectLibraryConfigurations)
@PACKAGE_INIT@
if (NOT TARGET @TARGET_NAME@)
include("${CMAKE_CURRENT_LIST_DIR}/unofficial-@PROJECT_NAME@Targets.cmake")
set(@PROJECT_NAME@_VERSION @VERSION@)
get_target_property(@PROJECT_NAME@_INCLUDE_DIR @TARGET_NAME@ INTERFACE_INCLUDE_DIRECTORIES)
get_target_property(@PROJECT_NAME@_LIBRARY_DEBUG @TARGET_NAME@ IMPORTED_IMPLIB_DEBUG)
if (@PROJECT_NAME@_LIBRARY_DEBUG MATCHES ".*-NOTFOUND")
get_target_property(@PROJECT_NAME@_LIBRARY_DEBUG @TARGET_NAME@ IMPORTED_LOCATION_DEBUG)
else ()
get_target_property(@PROJECT_NAME@_DLL_DEBUG @TARGET_NAME@ IMPORTED_LOCATION_DEBUG)
endif ()
get_target_property(@PROJECT_NAME@_LIBRARY_RELEASE @TARGET_NAME@ IMPORTED_IMPLIB_RELEASE)
if (@PROJECT_NAME@_LIBRARY_RELEASE MATCHES ".*-NOTFOUND")
get_target_property(@PROJECT_NAME@_LIBRARY_RELEASE @TARGET_NAME@ IMPORTED_LOCATION_RELEASE)
else ()
get_target_property(@PROJECT_NAME@_DLL_RELEASE @TARGET_NAME@ IMPORTED_LOCATION_RELEASE)
endif ()
select_library_configurations(@PROJECT_NAME@)
endif ()
find_package_handle_standard_args(
@PROJECT_NAME@
REQUIRED_VARS
@PROJECT_NAME@_INCLUDE_DIR
@PROJECT_NAME@_LIBRARIES
VERSION_VAR
@PROJECT_NAME@_VERSION
)
mark_as_advanced(@PROJECT_NAME@_INCLUDE_DIR)
if (WIN32)
mark_as_advanced(@PROJECT_NAME@_DLL_DEBUG)
mark_as_advanced(@PROJECT_NAME@_DLL_RELEASE)
endif()
# References:
# https://github.com/jedisct1/libsodium/blob/master/contrib/Findsodium.cmake
# https://github.com/QuantStack/xeus/blob/master/xeusConfig.cmake.in
# https://github.com/zeromq/libzmq/blob/master/builds/cmake/ZeroMQConfig.cmake.in
|