-
Notifications
You must be signed in to change notification settings - Fork 2.2k
/
PocoConfig.cmake.in
46 lines (38 loc) · 1.51 KB
/
PocoConfig.cmake.in
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
if (CMAKE_VERSION VERSION_LESS 2.8.9)
message(FATAL_ERROR "Poco requires at least CMake version 2.8.9")
endif()
if (NOT Poco_FIND_COMPONENTS)
set(Poco_NOT_FOUND_MESSAGE "The Poco package requires at least one component")
set(Poco_FOUND False)
return()
endif()
set(_Poco_FIND_PARTS_REQUIRED)
if (Poco_FIND_REQUIRED)
set(_Poco_FIND_PARTS_REQUIRED REQUIRED)
endif()
set(_Poco_FIND_PARTS_QUIET)
if (Poco_FIND_QUIETLY)
set(_Poco_FIND_PARTS_QUIET QUIET)
endif()
get_filename_component(_Poco_install_prefix "${CMAKE_CURRENT_LIST_DIR}" ABSOLUTE)
set(_Poco_NOTFOUND_MESSAGE)
foreach(module ${Poco_FIND_COMPONENTS})
find_package(Poco${module}
${_Poco_FIND_PARTS_QUIET}
${_Poco_FIND_PARTS_REQUIRED}
PATHS "${_Poco_install_prefix}" NO_DEFAULT_PATH
)
if (NOT Poco${module}_FOUND)
if (Poco_FIND_REQUIRED_${module})
set(_Poco_NOTFOUND_MESSAGE "${_Poco_NOTFOUND_MESSAGE}Failed to find Poco component \"${module}\" config file at \"${_Poco_install_prefix}/Poco${module}/Poco${module}Config.cmake\"\n")
elseif(NOT Poco_FIND_QUIETLY)
message(WARNING "Failed to find Poco component \"${module}\" config file at \"${_Poco_install_prefix}/Poco${module}/Poco${module}Config.cmake\"")
endif()
endif()
# For backward compatibility set the LIBRARIES variable
list(APPEND Poco_LIBRARIES "Poco::${module}")
endforeach()
if (_Poco_NOTFOUND_MESSAGE)
set(Poco_NOT_FOUND_MESSAGE "${_Poco_NOTFOUND_MESSAGE}")
set(Poco_FOUND False)
endif()