# Copyright 2017-2020 Fitbit, Inc
# SPDX-License-Identifier: Apache-2.0

# Enable/disable groups
set(GG_ENABLE_APPS FALSE CACHE BOOL "")
set(GG_ENABLE_UNIT_TESTS FALSE CACHE BOOL "")

# Enable/disable libraries
set(GG_LIBS_ENABLE_BLAST_SERVICE TRUE CACHE BOOL "")
set(GG_LIBS_ENABLE_STACK_SERVICE TRUE CACHE BOOL "")
set(GG_LIBS_ENABLE_COAP_CLIENT_SERVICE TRUE CACHE BOOL "")
set(GG_LIBS_ENABLE_COAP_TEST_SERVICE TRUE CACHE BOOL "")

# Shared configuation options
set(GG_CONFIG_ENABLE_LOGGING TRUE CACHE BOOL "")
set(GG_CONFIG_ENABLE_ANNOTATIONS FALSE CACHE BOOL "")
set(GG_CONFIG_ENABLE_THREAD_GUARDS TRUE CACHE BOOL "")
set(GG_CONFIG_LWIP_PORT "generic" CACHE STRING "")
set(GG_CONFIG_DEFAULT_SOCKETS_MODULE "Lwip" CACHE STRING "")

# Ports selection
set(GG_PORTS_ENABLE_BSD_SOCKETS TRUE CACHE BOOL "")
set(GG_PORTS_ENABLE_BSD_SELECT_LOOP TRUE CACHE BOOL "")
set(GG_PORTS_ENABLE_STDC_ENV TRUE CACHE BOOL "")
set(GG_PORTS_ENABLE_STDC_RANDOM TRUE CACHE BOOL "")
set(GG_PORTS_ENABLE_POSIX_TIME TRUE CACHE BOOL "")
set(GG_PORTS_ENABLE_POSIX_THREADS TRUE CACHE BOOL "")
set(GG_PORTS_ENABLE_POSIX_MUTEX TRUE CACHE BOOL "")
set(GG_PORTS_ENABLE_POSIX_SEMAPHORE TRUE CACHE BOOL "")
set(GG_PORTS_ENABLE_POSIX_SHARED_QUEUE TRUE CACHE BOOL "")
set(GG_PORTS_ENABLE_ANDROID_CONSOLE TRUE CACHE BOOL "")
set(GG_PORTS_ENABLE_ANDROID_LOG_CONFIG TRUE CACHE BOOL "")
set(GG_PORTS_ENABLE_LWIP_SOCKETS TRUE CACHE BOOL "")
set(GG_PORTS_ENABLE_MBEDTLS_TLS TRUE CACHE BOOL "")
set(GG_PORTS_ENABLE_LWIP TRUE CACHE BOOL "")
set(GG_PORTS_ENABLE_MBEDTLS TRUE CACHE BOOL "")

# Build options
set(GG_BUILD_SHARED_LIBRARY TRUE CACHE BOOL "")

# CMake options
set(CMAKE_POSITION_INDEPENDENT_CODE TRUE CACHE BOOL "Enable Position Independent Code")

# Android specifics
set(ANDROID_NATIVE_API_LEVEL 21 CACHE STRING "Android SDK Level")
get_filename_component(ANDROID_CMAKE_DIR ${CMAKE_COMMAND} DIRECTORY)
find_program(CMAKE_MAKE_PROGRAM ninja
                                HINTS ${ANDROID_CMAKE_DIR}
                                NO_DEFAULT_PATH)
set(ANDROID_ABI armeabi-v7a CACHE STRING "Android ABI")
