-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
AVRO-3088: [C++] Export CMake package config file
- Loading branch information
Showing
2 changed files
with
114 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
# | ||
# Licensed to the Apache Software Foundation (ASF) under one | ||
# or more contributor license agreements. See the NOTICE file | ||
# distributed with this work for additional information | ||
# regarding copyright ownership. The ASF licenses this file | ||
# to you under the Apache License, Version 2.0 (the | ||
# "License"); you may not use this file except in compliance | ||
# with the License. You may obtain a copy of the License at | ||
# | ||
# https://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, | ||
# software distributed under the License is distributed on an | ||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
# KIND, either express or implied. See the License for the | ||
# specific language governing permissions and limitations | ||
# under the License. | ||
# | ||
# This config sets the following variables in your project:: | ||
# | ||
# Avro_FOUND - true if Avro found on the system | ||
# Avro_VERSION - version of the found Avro | ||
# | ||
# This config sets the following targets in your project:: | ||
# | ||
# Avro::avrocpp_shared | ||
# Avro::avrocpp_static | ||
|
||
@PACKAGE_INIT@ | ||
|
||
include(CMakeFindDependencyMacro) | ||
|
||
if(DEFINED CMAKE_MODULE_PATH) | ||
set(AVRO_CMAKE_MODULE_PATH_OLD ${CMAKE_MODULE_PATH}) | ||
else() | ||
unset(AVRO_CMAKE_MODULE_PATH_OLD) | ||
endif() | ||
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}") | ||
|
||
find_dependency(ZLIB REQUIRED) | ||
find_dependency(fmt REQUIRED) | ||
if(@Snappy_FOUND@) | ||
find_dependency(Snappy) | ||
endif() | ||
if(@Boost_FOUND@) | ||
find_dependency(Boost 1.70 REQUIRED COMPONENTS system) | ||
endif() | ||
|
||
if(DEFINED AVRO_CMAKE_MODULE_PATH_OLD) | ||
set(CMAKE_MODULE_PATH ${AVRO_CMAKE_MODULE_PATH_OLD}) | ||
unset(AVRO_CMAKE_MODULE_PATH_OLD) | ||
else() | ||
unset(CMAKE_MODULE_PATH) | ||
endif() | ||
|
||
include("${CMAKE_CURRENT_LIST_DIR}/AvroTargets.cmake") | ||
|
||
add_library(Avro::avrocpp_static ALIAS Avro::avrocpp_s) | ||
add_library(Avro::avrocpp_shared ALIAS Avro::avrocpp) | ||
|
||
check_required_components(Avro) |