| # Copyright (C) 2016 The Android Open Source Project |
| # |
| # Licensed 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 |
| # |
| # http://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. |
| |
| cmake_minimum_required(VERSION 3.2) |
| cmake_policy(SET CMP0009 NEW) # GLOB_RECURSE does not recurse symlinks |
| cmake_policy(SET CMP0053 NEW) # Simplify variable reference |
| cmake_policy(SET CMP0003 NEW) # Link by full path |
| |
| set(GAPID_CMAKE_VERSION "1") |
| set(GAPID_CMAKE_VERSION_STORE ${GAPID_CMAKE_VERSION} CACHE STRING "Version of the gapic cmake build system") |
| if(NOT ${GAPID_CMAKE_VERSION} STREQUAL ${GAPID_CMAKE_VERSION_STORE}) |
| message(FATAL_ERROR " |
| Output directory version is ${GAPID_CMAKE_VERSION_STORE}, required version is ${GAPID_CMAKE_VERSION} |
| The cmake output directory needs to be deleted and regenerated... |
| ") |
| endif() |
| |
| file(LOCK ${CMAKE_BINARY_DIR} DIRECTORY GUARD PROCESS RESULT_VARIABLE locked) |
| |
| # Basic selection controls |
| option(BUILDBOT "Running in buildbot mode") |
| option(DISABLE_CXX "Disable all c++ building steps") |
| option(DISABLE_GO "Disable all go building steps") |
| option(DISABLE_PROTOC "Disable all proto building steps") |
| option(DISABLE_CODE_GENERATION "Disable all code generation building steps") |
| option(ONLY_HOST "Disable non host build steps") |
| |
| include(cmake/Init.cmake) |
| project(GAPID ${languages}) |
| include(Config) |
| |
| foreach(abi ${ANDROID_ACTIVE_ABI_LIST}) |
| # Build a cmake output directory for the specific abi |
| add_cmake(${abi} ${CMAKE_SOURCE_DIR} "-DANDROID_ABI:STRING=${abi}") |
| endforeach() |
| |
| if(NOT DISABLE_PROTOC) |
| go_install("vendor/github.com/golang/protobuf/protoc-gen-go") |
| go_install("vendor/github.com/gogo/protobuf/protoc-gen-gogo") |
| endif() |
| |
| build_subdirectory(cmd) |
| build_subdirectory(framework) |
| build_subdirectory(api) |
| build_subdirectory(gapid) |
| build_subdirectory(tools) |
| build_subdirectory(cc) |
| |
| scan_for_protos() |
| |
| # The codergen rules are still slightly broken, because of the cpp |
| # generation steps. |
| # Might have to add an explicit dependancy on codergen-all to fix it. |
| codergen( |
| api/snippets |
| framework/binary/any |
| framework/binary/test |
| framework/compare |
| framework/multiplexer |
| framework/rpc |
| framework/rpc/test |
| framework/stringtable/msg |
| gapid/atom |
| gapid/atom/test |
| gapid/builder |
| gapid/gfxapi |
| gapid/gfxapi/core |
| gapid/gfxapi/gles |
| gapid/gfxapi/vulkan |
| gapid/gfxapi/test |
| gapid/image |
| gapid/memory |
| gapid/replay/protocol |
| gapid/service/path |
| gapid/service |
| gapid/vertex |
| integration/replay/gles |
| ) |
| |
| include(Package) |