40 lines
1.1 KiB
CMake
40 lines
1.1 KiB
CMake
add_subdirectory("Authorization")
|
|
add_subdirectory("transport")
|
|
add_subdirectory("ui")
|
|
add_subdirectory("ledhal")
|
|
|
|
cmake_minimum_required(VERSION 3.1 FATAL_ERROR)
|
|
|
|
execute_process(
|
|
COMMAND git log -1 --format=%h
|
|
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
|
|
OUTPUT_VARIABLE GIT_VERSION
|
|
)
|
|
string (REGEX REPLACE "[\n\t\r]" "" GIT_VERSION ${GIT_VERSION})
|
|
add_definitions( -DGIT_VERSION=\"${GIT_VERSION}\")
|
|
|
|
string(TIMESTAMP COMPILE_TIME "%Y%m%d %H%M%S")
|
|
add_definitions( -DCOMPILE_TIME=\"${COMPILE_TIME}\")
|
|
|
|
#set(CMAKE_VERBOSE_MAKEFILE ON)
|
|
|
|
set(VALID FALSE)
|
|
|
|
if (PORTAUDIO AND (GSTREAMER_MEDIA_PLAYER OR CUSTOM_MEDIA_PLAYER))
|
|
set(VALID TRUE)
|
|
elseif (ASPMIC AND (GSTREAMER_MEDIA_PLAYER OR CUSTOM_MEDIA_PLAYER))
|
|
set(VALID TRUE)
|
|
elseif (ANDROID_MEDIA_PLAYER AND ANDROID_MICROPHONE)
|
|
set(VALID TRUE)
|
|
elseif (AUDIO_INJECTION AND (GSTREAMER_MEDIA_PLAYER OR ANDROID_MEDIA_PLAYER OR CUSTOM_MEDIA_PLAYER))
|
|
set(VALID TRUE)
|
|
endif()
|
|
|
|
if (VALID)
|
|
project(SampleApp LANGUAGES CXX)
|
|
include("${AVS_CMAKE_BUILD}/BuildDefaults.cmake")
|
|
|
|
add_subdirectory("src")
|
|
else()
|
|
message("To build the Sample App, please enable microphone and media player modules.")
|
|
endif() |