#**********************************************************************************#
# Copyright by @bkozdras <b.kozdras@gmail.com>                                     #
# Version: 1.0                                                                     #
# Licence: MIT                                                                     #
#**********************************************************************************#

message(STATUS "Processing: ${CMAKE_CURRENT_LIST_FILE}")

option(BEEHIVEIOT_LC_BUILD_BEECONTROLLER_FOR_TARGET OFF, "Build BeeController for ARM32 target")
option(BEEHIVEIOT_LC_BUILD_BEEROUTER_FOR_TARGET OFF, "Build BeeController for ARM32 target")
option(BEEHIVEIOT_LC_BUILD_DEVELOPMENT_BINARIES_FOR_TARGET OFF, "Build development binaries for ARM32 target")
option(BEEHIVEIOT_LC_USB_SERIAL_CONSOLE OFF, "Direct stdout to USB device")
option(BEEHIVEIOT_LC_BUILD_UNIT_TESTS OFF, "Build unit tests")
option(BEEHIVEIOT_LC_BUILD_MODULE_TESTS OFF, "Build module tests")

message(STATUS "Chosen options:")
message(STATUS "BEEHIVEIOT_LC_BUILD_BEECONTROLLER_FOR_TARGET: " ${BEEHIVEIOT_LC_BUILD_BEECONTROLLER_FOR_TARGET})
message(STATUS "BEEHIVEIOT_LC_BUILD_BEEROUTER_FOR_TARGET: " ${BEEHIVEIOT_LC_BUILD_BEEROUTER_FOR_TARGET})
message(STATUS "BEEHIVEIOT_LC_BUILD_DEVELOPMENT_BINARIES_FOR_TARGET: " ${BEEHIVEIOT_LC_BUILD_DEVELOPMENT_BINARIES_FOR_TARGET})
message(STATUS "BEEHIVEIOT_LC_USB_SERIAL_CONSOLE: " ${BEEHIVEIOT_LC_USB_SERIAL_CONSOLE})
message(STATUS "BEEHIVEIOT_LC_BUILD_UNIT_TESTS: " ${BEEHIVEIOT_LC_BUILD_UNIT_TESTS})
message(STATUS "BEEHIVEIOT_LC_BUILD_MODULE_TESTS: " ${BEEHIVEIOT_LC_BUILD_MODULE_TESTS})

set(BUILD_FOR_TARGET OFF)
if (BEEHIVEIOT_LC_BUILD_BEECONTROLLER_FOR_TARGET OR BEEHIVEIOT_LC_BUILD_BEEROUTER_FOR_TARGET)
    set(BUILD_FOR_TARGET ON)
endif (BEEHIVEIOT_LC_BUILD_BEECONTROLLER_FOR_TARGET OR BEEHIVEIOT_LC_BUILD_BEEROUTER_FOR_TARGET)

set(BUILD_BEECONTROLLER_FOR_TARGET OFF)
if (BEEHIVEIOT_LC_BUILD_BEECONTROLLER_FOR_TARGET)
    set(BUILD_BEECONTROLLER_FOR_TARGET ON)
endif (BEEHIVEIOT_LC_BUILD_BEECONTROLLER_FOR_TARGET)

set(BUILD_BEEROUTER_FOR_TARGET OFF)
if (BEEHIVEIOT_LC_BUILD_BEEROUTER_FOR_TARGET)
    set(BUILD_BEEROUTER_FOR_TARGET ON)
endif (BEEHIVEIOT_LC_BUILD_BEEROUTER_FOR_TARGET)

set(BUILD_DEVELOPMENT_BINARIES_FOR_TARGET OFF)
if (BEEHIVEIOT_LC_BUILD_DEVELOPMENT_BINARIES_FOR_TARGET)
    set(BUILD_DEVELOPMENT_BINARIES_FOR_TARGET ON)
endif (BEEHIVEIOT_LC_BUILD_DEVELOPMENT_BINARIES_FOR_TARGET)

set(USB_SERIAL_CONSOLE OFF)
if (BEEHIVEIOT_LC_USB_SERIAL_CONSOLE)
    set(USB_SERIAL_CONSOLE ON)
endif (BEEHIVEIOT_LC_USB_SERIAL_CONSOLE)

set(BUILD_UNIT_TESTS OFF)
if (BEEHIVEIOT_LC_BUILD_UNIT_TESTS)
    set(BUILD_UNIT_TESTS ON)
endif (BEEHIVEIOT_LC_BUILD_UNIT_TESTS)

set(BUILD_MODULE_TESTS OFF)
if (BEEHIVEIOT_LC_BUILD_MODULE_TESTS)
    set(BUILD_MODULE_TESTS ON)
endif (BEEHIVEIOT_LC_BUILD_MODULE_TESTS)

message(STATUS "BUILD_FOR_TARGET: " ${BUILD_FOR_TARGET})
message(STATUS "BUILD_BEECONTROLLER_FOR_TARGET: " ${BUILD_BEECONTROLLER_FOR_TARGET})
message(STATUS "BUILD_BEEROUTER_FOR_TARGET: " ${BUILD_BEEROUTER_FOR_TARGET})
message(STATUS "USB_SERIAL_CONSOLE: " ${USB_SERIAL_CONSOLE})
message(STATUS "BUILD_DEVELOPMENT_BINARIES_FOR_TARGET: " ${BUILD_DEVELOPMENT_BINARIES_FOR_TARGET})
message(STATUS "BUILD_UNIT_TESTS: " ${BUILD_UNIT_TESTS})
message(STATUS "BUILD_MODULE_TESTS: " ${BUILD_MODULE_TESTS})
