1# ***************************************************************************** 2# Copyright (c) 2017 Intel Corporation 3# 4# Permission is hereby granted, free of charge, to any person obtaining a copy 5# of this software and associated documentation files (the "Software"), to deal 6# in the Software without restriction, including without limitation the rights 7# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8# copies of the Software, and to permit persons to whom the Software is 9# furnished to do so, subject to the following conditions: 10# 11# The above copyright notice and this permission notice shall be included in all 12# copies or substantial portions of the Software. 13# 14# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20# SOFTWARE. 21# ***************************************************************************** 22 23 24if(NOT DEFINED BS_USE_OSDM_BUILD_SYSTEM) 25 if(DEFINED ENV{BS_USE_OSDM_BUILD_SYSTEM}) 26 set(BS_USE_OSDM_BUILD_SYSTEM "$ENV{BS_USE_OSDM_BUILD_SYSTEM}") 27 else() 28 set(BS_USE_OSDM_BUILD_SYSTEM TRUE) 29 endif() 30endif() 31 32 33include(${BUILD_SYS_INC}/bs_base_utils.cmake) 34 35bs_check_build_type() 36 37if(DEFINED UFO_ANDROID_VERSION) 38 add_definition(-DANDROID_VERSION=${UFO_ANDROID_VERSION}) 39elseif(DEFINED ENV{UFO_ANDROID_VERSION}) 40 add_definition(-DANDROID_VERSION=$ENV{UFO_ANDROID_VERSION}) 41endif() 42 43# Ensure definitions for some variables that should be set by the overall build system. 44bs_set_if_undefined(PLATFORM "linux") 45bs_set_if_undefined(ARCH "64") 46bs_set_if_undefined(GFXGEN "9") 47bs_set_if_undefined(CXXFLAGS "-D_GLIBCXX_USE_CXX11_ABI=0") 48 49# Other useful definitions 50bs_set_if_undefined(CMAKE_EXPORT_COMPILE_COMMANDS "ON") 51bs_set_if_undefined(CMAKE_VERBOSE_MAKEFILE "1") 52 53## bs_set_if_undefined(UFO_CMAKE_DEBUG "ON") 54## bs_set_if_undefined(BUILD_VERSION_STRING "9999") 55 56 57include(${BUILD_SYS_INC}/bs_dir_names.cmake) 58 59# Needed for bs_add_some_common_includes 60include(${BUILD_SYS_INC}/utils.cmake) 61 62if(BS_USE_OSDM_BUILD_SYSTEM) 63 64include(${BUILD_SYS_INC}/stdvars.cmake) 65 66include(${BUILD_SYS_DIR}/build_sys.cmake) 67 68bs_set_base_flags() 69 70endif(BS_USE_OSDM_BUILD_SYSTEM) 71