|
1 | | -# Copyright 2012 Cloudera Inc. |
| 1 | +# Licensed to the Apache Software Foundation (ASF) under one |
| 2 | +# or more contributor license agreements. See the NOTICE file |
| 3 | +# distributed with this work for additional information |
| 4 | +# regarding copyright ownership. The ASF licenses this file |
| 5 | +# to you under the Apache License, Version 2.0 (the |
| 6 | +# "License"); you may not use this file except in compliance |
| 7 | +# with the License. You may obtain a copy of the License at |
2 | 8 | # |
3 | | -# Licensed under the Apache License, Version 2.0 (the "License"); |
4 | | -# you may not use this file except in compliance with the License. |
5 | | -# You may obtain a copy of the License at |
| 9 | +# http://www.apache.org/licenses/LICENSE-2.0 |
6 | 10 | # |
7 | | -# http://www.apache.org/licenses/LICENSE-2.0 |
8 | | -# |
9 | | -# Unless required by applicable law or agreed to in writing, software |
10 | | -# distributed under the License is distributed on an "AS IS" BASIS, |
11 | | -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
12 | | -# See the License for the specific language governing permissions and |
13 | | -# limitations under the License. |
| 11 | +# Unless required by applicable law or agreed to in writing, |
| 12 | +# software distributed under the License is distributed on an |
| 13 | +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| 14 | +# KIND, either express or implied. See the License for the |
| 15 | +# specific language governing permissions and limitations |
| 16 | +# under the License. |
14 | 17 |
|
15 | 18 | # - Find PARQUET (parquet/parquet.h, libparquet.a, libparquet.so) |
16 | 19 | # This module defines |
@@ -71,21 +74,31 @@ endif() |
71 | 74 |
|
72 | 75 | if (PARQUET_INCLUDE_DIR AND PARQUET_LIBRARIES) |
73 | 76 | set(PARQUET_FOUND TRUE) |
74 | | - set(PARQUET_LIB_NAME libparquet) |
75 | | - set(PARQUET_STATIC_LIB ${PARQUET_LIBS}/${PARQUET_LIB_NAME}.a) |
76 | | - set(PARQUET_SHARED_LIB ${PARQUET_LIBS}/${PARQUET_LIB_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX}) |
| 77 | + if (MSVC) |
| 78 | + set(PARQUET_STATIC_LIB "${PARQUET_LIBRARIES}_static") |
| 79 | + set(PARQUET_SHARED_LIB "${PARQUET_LIBRARIES}") |
| 80 | + else() |
| 81 | + set(PARQUET_LIB_NAME libparquet) |
| 82 | + set(PARQUET_STATIC_LIB ${PARQUET_LIBS}/${PARQUET_LIB_NAME}.a) |
| 83 | + set(PARQUET_SHARED_LIB ${PARQUET_LIBS}/${PARQUET_LIB_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX}) |
| 84 | + endif() |
77 | 85 | else () |
78 | 86 | set(PARQUET_FOUND FALSE) |
79 | 87 | endif () |
80 | 88 |
|
81 | 89 | if (PARQUET_INCLUDE_DIR AND PARQUET_ARROW_LIBRARIES) |
82 | 90 | set(PARQUET_ARROW_FOUND TRUE) |
83 | 91 | get_filename_component(PARQUET_ARROW_LIBS ${PARQUET_ARROW_LIBRARIES} PATH) |
84 | | - set(PARQUET_ARROW_LIB_NAME libparquet_arrow) |
85 | | - set(PARQUET_ARROW_STATIC_LIB |
86 | | - ${PARQUET_ARROW_LIBS}/${PARQUET_ARROW_LIB_NAME}.a) |
87 | | - set(PARQUET_ARROW_SHARED_LIB |
88 | | - ${PARQUET_ARROW_LIBS}/${PARQUET_ARROW_LIB_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX}) |
| 92 | + if (MSVC) |
| 93 | + set(PARQUET_STATIC_LIB "${PARQUET_ARROW_LIBRARIES}_static") |
| 94 | + set(PARQUET_SHARED_LIB "${PARQUET_ARROW_LIBRARIES}") |
| 95 | + else() |
| 96 | + set(PARQUET_ARROW_LIB_NAME libparquet_arrow) |
| 97 | + set(PARQUET_ARROW_STATIC_LIB |
| 98 | + ${PARQUET_ARROW_LIBS}/${PARQUET_ARROW_LIB_NAME}.a) |
| 99 | + set(PARQUET_ARROW_SHARED_LIB |
| 100 | + ${PARQUET_ARROW_LIBS}/${PARQUET_ARROW_LIB_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX}) |
| 101 | + endif() |
89 | 102 | else () |
90 | 103 | set(PARQUET_ARROW_FOUND FALSE) |
91 | 104 | endif () |
|
0 commit comments