1717#
1818# This config sets the following variables in your project::
1919#
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
2222#
2323# This config sets the following targets in your project::
2424#
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
2731
2832@PACKAGE_INIT@
2933
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+
3056set (ICEBERG_BUILD_STATIC "@ICEBERG_BUILD_STATIC@" )
3157set (ICEBERG_ARROW_VENDOR_DEPENDENCIES "@ICEBERG_ARROW_VENDOR_DEPENDENCIES@" )
3258set (ICEBERG_ARROW_SYSTEM_DEPENDENCIES "@ICEBERG_ARROW_SYSTEM_DEPENDENCIES@" )
3359
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 ()
3669
3770if (ICEBERG_BUILD_STATIC)
3871 iceberg_find_dependencies ("${ICEBERG_ARROW_SYSTEM_DEPENDENCIES} " )
3972endif ()
4073
41- include ("${CMAKE_CURRENT_LIST_DIR} /IcebergArrowTargets.cmake" )
42-
4374if (ICEBERG_BUILD_STATIC)
4475 get_target_property (
45- iceberg_arrow_static_configurations IcebergArrow ::iceberg_arrow_static
76+ iceberg_arrow_static_configurations Iceberg ::iceberg_arrow_static
4677 IMPORTED_CONFIGURATIONS )
4778
4879 foreach (dependency ${ICEBERG_ARROW_VENDOR_DEPENDENCIES} )
@@ -59,7 +90,7 @@ if(ICEBERG_BUILD_STATIC)
5990 foreach (CONFIGURATION ${iceberg_arrow_static_configurations} )
6091 string (TOUPPER "${CONFIGURATION} " CONFIGURATION)
6192 get_target_property (
62- iceberg_arrow_static_location IcebergArrow ::iceberg_arrow_static
93+ iceberg_arrow_static_location Iceberg ::iceberg_arrow_static
6394 LOCATION_${CONFIGURATION} )
6495 get_filename_component (iceberg_arrow_lib_dir
6596 "${iceberg_arrow_static_location} " DIRECTORY )
@@ -73,7 +104,4 @@ if(ICEBERG_BUILD_STATIC)
73104 "${iceberg_arrow_lib_dir} /${static_lib_name} " )
74105 endforeach ()
75106 endforeach ()
76-
77107endif ()
78-
79- check_required_components (IcebergArrow )
0 commit comments