forked from Wiladams/svg2b2d
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathFindBlend2D.cmake
55 lines (48 loc) · 1.3 KB
/
FindBlend2D.cmake
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
# - Try to find Blend2D
# Once done, this will define
#
# Blend2D_FOUND - system has Blend2D
# Blend2D_INCLUDE_DIRS - the Blend2D include directories
# Blend2D_LIBRARIES - link these to use Blend2D
include(FindPackageHandleStandardArgs)
# Search for the Blend2D include directory
find_path(
Blend2D_INCLUDE_DIR
NAMES blend2d.h
PATHS
$ENV{Blend2D_DIR}
$ENV{Blend2D_ROOT}
${Blend2D_DIR}
${Blend2D_ROOT}
PATH_SUFFIXES
include
DOC "Blend2D include directory"
)
# Search for the Blend2D library
find_library(
Blend2D_LIBRARY
NAMES blend2d
PATHS
$ENV{Blend2D_DIR}
$ENV{Blend2D_ROOT}
${Blend2D_DIR}
${Blend2D_ROOT}
PATH_SUFFIXES
lib/Release
lib
DOC "Blend2D library"
)
# Handle the QUIETLY and REQUIRED arguments and set Blend2D_FOUND to TRUE if all listed variables are TRUE.
find_package_handle_standard_args(
Blend2D
DEFAULT_MSG
Blend2D_INCLUDE_DIR
Blend2D_LIBRARY
)
# Set the Blend2D include directories and libraries variables
if(Blend2D_FOUND)
set(Blend2D_INCLUDE_DIRS ${Blend2D_INCLUDE_DIR})
set(Blend2D_LIBRARIES ${Blend2D_LIBRARY})
endif()
# Mark the Blend2D include directory and library as advanced variables
mark_as_advanced(Blend2D_INCLUDE_DIR Blend2D_LIBRARY)