| # 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) |
| cmake_policy(SET CMP0053 NEW) |
| |
| 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_CODE_GENERATION "Disable all code generation building steps") |
| option(ONLY_HOST "Disable non host build steps") |
| set(DEVICE_BUILDS armeabi aarch64 CACHE STRING "The set of android abi's to build") |
| |
| include(cmake/Init.cmake) |
| project(GAPID ${languages}) |
| include(Config) |
| |
| build_subdirectory(cmd) |
| build_subdirectory(gapid) |
| build_subdirectory(tools) |
| build_subdirectory(cc) |
| |
| # 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 |
| framework/stringtable/msg |
| gapid/atom |
| gapid/atom/test |
| gapid/builder |
| gapid/gfxapi |
| gapid/gfxapi/gles |
| gapid/gfxapi/test |
| gapid/image |
| gapid/memory |
| gapid/replay/protocol |
| gapid/service/path |
| gapid/service |
| gapid/vertex |
| integration/replay/gles |
| ) |
| |
| if(NOT DISABLE_DEVICE_BUILDS) |
| set(android_dir_armeabi "armv7a") |
| set(android_dir_aarch64 "armv8a") |
| foreach(abi ${DEVICE_BUILDS}) |
| add_cmake(${abi} "-DANDROID_ABI:STRING=${abi}") |
| foreach(tgt gapir gapii) |
| set(dst "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/android-${android_dir_${abi}}/") |
| add_cmake_library(${abi} ${tgt} ${dst}) |
| endforeach() |
| endforeach() |
| endif() |
| |
| if(EXPORT) |
| export(EXPORT all NAMESPACE ${EXPORT}_ FILE ${EXPORT}.cmake) |
| endif() |