forked from madler/zlib
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathzlibConfig.cmake.in
More file actions
40 lines (35 loc) · 1.75 KB
/
Copy pathzlibConfig.cmake.in
File metadata and controls
40 lines (35 loc) · 1.75 KB
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
set(_ZLIB_supported_components "shared" "static")
if(ZLIB_FIND_COMPONENTS)
foreach(_comp ${ZLIB_FIND_COMPONENTS})
if(NOT _comp IN_LIST _ZLIB_supported_components)
set(ZLIB_FOUND False)
set(ZLIB_NOT_FOUND_MESSAGE "Unsupported component: ${_comp}")
endif(NOT _comp IN_LIST _ZLIB_supported_components)
include("${CMAKE_CURRENT_LIST_DIR}/ZLIB-${_comp}.cmake"
OPTIONAL
RESULT_VARIABLE _comp_loaded)
if(NOT _comp_loaded)
set(ZLIB_FOUND False)
set(ZLIB_NOT_FOUND_MESSAGE "Component ${_comp} not found.")
else(NOT _comp_loaded)
set(ZLIB_${_comp}_FOUND TRUE)
endif(NOT _comp_loaded)
endforeach(_comp ${ZLIB_FIND_COMPONENTS})
else(ZLIB_FIND_COMPONENTS)
foreach(_component_config IN LISTS _ZLIB_supported_components)
include("${CMAKE_CURRENT_LIST_DIR}/ZLIB-${_component_config}.cmake"
OPTIONAL)
endforeach(_component_config IN LISTS _ZLIB_supported_components)
if(NOT TARGET ZLIB::ZLIB)
set(ZLIB_FOUND False)
set(ZLIB_NOT_FOUND_MESSAGE "Target ZLIB::ZLIB not created\n")
string(APPEND ZLIB_NOT_FOUND_MESSAGE "build zlib with support for shared libs or\n")
string(APPEND ZLIB_NOT_FOUND_MESSAGE "specify COMPONENTS static in your find_package call")
endif(NOT TARGET ZLIB::ZLIB)
if(NOT TARGET ZLIB::ZLIBSTATIC)
set(ZLIB_FOUND False)
set(ZLIB_NOT_FOUND_MESSAGE "Target ZLIB::ZLIBSTATIC not created\n")
string(APPEND ZLIB_NOT_FOUND_MESSAGE "build zlib with support for static libs or\n")
string(APPEND ZLIB_NOT_FOUND_MESSAGE "specify COMPONENTS shared in your find_package call")
endif(NOT TARGET ZLIB::ZLIBSTATIC)
endif(ZLIB_FIND_COMPONENTS)