17
17
#
18
18
# This config sets the following variables in your project::
19
19
#
20
- # IcebergArrow_FOUND - true if IcebergArrow found on the system
21
- # ICEBERG_ARROW_VERSION - version of the found IcebergArrow
20
+ # Iceberg_FOUND - true if Iceberg found on the system
21
+ # Iceberg_VERSION - version of the found Iceberg
22
22
#
23
23
# This config sets the following targets in your project::
24
24
#
25
- # IcebergArrow::iceberg_arrow_shared - for linked as shared library if shared library is built
26
- # IcebergArrow::iceberg_arrow_static - for linked as static library if static library is built
25
+ # Iceberg::iceberg_core_shared - for linked as shared library if shared library is built
26
+ # Iceberg::iceberg_core_static - for linked as static library if static library is built
27
+ # Iceberg::iceberg_puffin_shared - for linked as shared library if shared library is built
28
+ # Iceberg::iceberg_puffin_static - for linked as static library if static library is built
29
+ # Iceberg::iceberg_arrow_shared - for linked as shared library if shared library is built
30
+ # Iceberg::iceberg_arrow_static - for linked as static library if static library is built
27
31
28
32
@PACKAGE_INIT@
29
33
34
+ include (CMakeFindDependencyMacro)
35
+
36
+ macro (iceberg_find_dependencies dependencies)
37
+ if (DEFINED CMAKE_MODULE_PATH )
38
+ set (ICEBERG_CMAKE_MODULE_PATH_OLD ${CMAKE_MODULE_PATH} )
39
+ else ()
40
+ unset (ICEBERG_CMAKE_MODULE_PATH_OLD)
41
+ endif ()
42
+ set (CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR} " )
43
+
44
+ foreach (dependency ${dependencies} )
45
+ find_dependency(${dependency} )
46
+ endforeach ()
47
+
48
+ if (DEFINED ICEBERG_CMAKE_MODULE_PATH_OLD)
49
+ set (CMAKE_MODULE_PATH ${ICEBERG_CMAKE_MODULE_PATH_OLD} )
50
+ unset (ICEBERG_CMAKE_MODULE_PATH_OLD)
51
+ else ()
52
+ unset (CMAKE_MODULE_PATH )
53
+ endif ()
54
+ endmacro ()
55
+
30
56
set (ICEBERG_BUILD_STATIC "@ICEBERG_BUILD_STATIC@" )
31
57
set (ICEBERG_ARROW_VENDOR_DEPENDENCIES "@ICEBERG_ARROW_VENDOR_DEPENDENCIES@" )
32
58
set (ICEBERG_ARROW_SYSTEM_DEPENDENCIES "@ICEBERG_ARROW_SYSTEM_DEPENDENCIES@" )
33
59
34
- include (CMakeFindDependencyMacro)
35
- find_dependency(IcebergCore)
60
+ set (_iceberg_supported_components core puffin arrow)
61
+
62
+ foreach (_comp ${Iceberg_FIND_COMPONENTS} )
63
+ if (NOT _comp IN_LIST _iceberg_supported_components)
64
+ set (Iceberg_FOUND False )
65
+ set (Iceberg_NOT_FOUND_MESSAGE "Unsupported component: ${_comp} " )
66
+ endif ()
67
+ include ("${CMAKE_CURRENT_LIST_DIR} /iceberg-${_comp} -targets.cmake" REQUIRED)
68
+ endforeach ()
36
69
37
70
if (ICEBERG_BUILD_STATIC)
38
71
iceberg_find_dependencies("${ICEBERG_ARROW_SYSTEM_DEPENDENCIES} " )
39
72
endif ()
40
73
41
- include ("${CMAKE_CURRENT_LIST_DIR} /IcebergArrowTargets.cmake" )
42
-
43
74
if (ICEBERG_BUILD_STATIC)
44
75
get_target_property (
45
- iceberg_arrow_static_configurations IcebergArrow ::iceberg_arrow_static
76
+ iceberg_arrow_static_configurations Iceberg ::iceberg_arrow_static
46
77
IMPORTED_CONFIGURATIONS )
47
78
48
79
foreach (dependency ${ICEBERG_ARROW_VENDOR_DEPENDENCIES} )
@@ -59,7 +90,7 @@ if(ICEBERG_BUILD_STATIC)
59
90
foreach (CONFIGURATION ${iceberg_arrow_static_configurations} )
60
91
string (TOUPPER "${CONFIGURATION} " CONFIGURATION )
61
92
get_target_property (
62
- iceberg_arrow_static_location IcebergArrow ::iceberg_arrow_static
93
+ iceberg_arrow_static_location Iceberg ::iceberg_arrow_static
63
94
LOCATION_${CONFIGURATION} )
64
95
get_filename_component (iceberg_arrow_lib_dir
65
96
"${iceberg_arrow_static_location} " DIRECTORY )
@@ -73,7 +104,4 @@ if(ICEBERG_BUILD_STATIC)
73
104
"${iceberg_arrow_lib_dir} /${static_lib_name} " )
74
105
endforeach ()
75
106
endforeach ()
76
-
77
107
endif ()
78
-
79
- check_required_components(IcebergArrow)
0 commit comments