|
| 1 | +# ############################################################################## |
| 2 | +# apps/math/gemmlowp/CMakeLists.txt |
| 3 | +# |
| 4 | +# Licensed to the Apache Software Foundation (ASF) under one or more contributor |
| 5 | +# license agreements. See the NOTICE file distributed with this work for |
| 6 | +# additional information regarding copyright ownership. The ASF licenses this |
| 7 | +# file to you under the Apache License, Version 2.0 (the "License"); you may not |
| 8 | +# use this file except in compliance with the License. You may obtain a copy of |
| 9 | +# the License at |
| 10 | +# |
| 11 | +# http://www.apache.org/licenses/LICENSE-2.0 |
| 12 | +# |
| 13 | +# Unless required by applicable law or agreed to in writing, software |
| 14 | +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT |
| 15 | +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the |
| 16 | +# License for the specific language governing permissions and limitations under |
| 17 | +# the License. |
| 18 | +# |
| 19 | +# ############################################################################## |
| 20 | + |
| 21 | +if(CONFIG_MATH_GEMMLOWP) |
| 22 | + |
| 23 | + # ############################################################################ |
| 24 | + # Config and Fetch gemmlowp lib |
| 25 | + # ############################################################################ |
| 26 | + |
| 27 | + set(GEMMLOWP_DIR ${CMAKE_CURRENT_LIST_DIR}/gemmlowp) |
| 28 | + |
| 29 | + if(NOT EXISTS ${GEMMLOWP_DIR}) |
| 30 | + set(GEMMLOWP_URL |
| 31 | + https://github.com/google/gemmlowp/archive/719139ce755a0f31cbf1c37f7f98adcc7fc9f425.zip |
| 32 | + ) |
| 33 | + FetchContent_Declare( |
| 34 | + gemmlowp_fetch |
| 35 | + URL ${GEMMLOWP_URL} SOURCE_DIR ${CMAKE_CURRENT_LIST_DIR}/gemmlowp |
| 36 | + BINARY_DIR ${CMAKE_BINARY_DIR}/apps/math/gemmlowp/gemmlowp |
| 37 | + DOWNLOAD_NO_PROGRESS true |
| 38 | + TIMEOUT 30) |
| 39 | + |
| 40 | + FetchContent_GetProperties(gemmlowp_fetch) |
| 41 | + |
| 42 | + if(NOT gemmlowp_fetch_POPULATED) |
| 43 | + FetchContent_Populate(gemmlowp_fetch) |
| 44 | + endif() |
| 45 | + endif() |
| 46 | +endif() |
0 commit comments