| 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 |
|
| 24 |
if(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() |
| 30 |
endif() |
| 31 |
|
| 32 |
|
| 33 |
include(${BUILD_SYS_INC}/bs_base_utils.cmake) |
| 34 |
|
| 35 |
bs_check_build_type() |
| 36 |
|
| 37 |
if(DEFINED UFO_ANDROID_VERSION) |
| 38 |
add_definition(-DANDROID_VERSION=${UFO_ANDROID_VERSION}) |
| 39 |
elseif(DEFINED ENV{UFO_ANDROID_VERSION}) |
| 40 |
add_definition(-DANDROID_VERSION=$ENV{UFO_ANDROID_VERSION}) |
| 41 |
endif() |
| 42 |
|
| 43 |
# Ensure definitions for some variables that should be set by the overall build system. |
| 44 |
bs_set_if_undefined(PLATFORM "linux") |
| 45 |
bs_set_if_undefined(ARCH "64") |
| 46 |
bs_set_if_undefined(GFXGEN "9") |
| 47 |
bs_set_if_undefined(CXXFLAGS "-D_GLIBCXX_USE_CXX11_ABI=0") |
| 48 |
|
| 49 |
# Other useful definitions |
| 50 |
bs_set_if_undefined(CMAKE_EXPORT_COMPILE_COMMANDS "ON") |
| 51 |
bs_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 |
|
| 57 |
include(${BUILD_SYS_INC}/bs_dir_names.cmake) |
| 58 |
|
| 59 |
# Needed for bs_add_some_common_includes |
| 60 |
include(${BUILD_SYS_INC}/utils.cmake) |
| 61 |
|
| 62 |
if(BS_USE_OSDM_BUILD_SYSTEM) |
| 63 |
|
| 64 |
include(${BUILD_SYS_INC}/stdvars.cmake) |
| 65 |
|
| 66 |
include(${BUILD_SYS_DIR}/build_sys.cmake) |
| 67 |
|
| 68 |
bs_set_base_flags() |
| 69 |
|
| 70 |
endif(BS_USE_OSDM_BUILD_SYSTEM) |