diff options
Diffstat (limited to 'conf.d/cmake/config.cmake')
-rw-r--r-- | conf.d/cmake/config.cmake | 25 |
1 files changed, 18 insertions, 7 deletions
diff --git a/conf.d/cmake/config.cmake b/conf.d/cmake/config.cmake index b89c5ed..6c0afb0 100644 --- a/conf.d/cmake/config.cmake +++ b/conf.d/cmake/config.cmake @@ -1,7 +1,7 @@ ########################################################################### -# Copyright 2017 Audiokinetic +# Copyright 2018 IoT.bzh # -# author: Tai Vuong <tvuong@audiokinetic.com> +# author: Loïc Collignon <loic.collignon@iot.bzh> # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -23,8 +23,8 @@ set(PROJECT_VERSION "1.0") set(PROJECT_PRETTY_NAME "Audio High Level Binding") set(PROJECT_DESCRIPTION "AGL High Level Interface for Audio") set(PROJECT_ICON "icon.png") -set(PROJECT_AUTHOR "Tai, Vuong") -set(PROJECT_AUTHOR_MAIL "tvuong@audiokinetic.com") +set(PROJECT_AUTHOR "Collignon, Loïc") +set(PROJECT_AUTHOR_MAIL "loic.collignon@iot.bzh") set(PROJECT_LICENCE "APL2.0") set(PROJECT_LANGUAGES,"C") @@ -37,12 +37,18 @@ set(PROJECT_SRC_DIR_PATTERN "[^_]*") # Compilation Mode (DEBUG, RELEASE) # ---------------------------------- -set(CMAKE_BUILD_TYPE "DEBUG") +# Set a default build type if none was specified +set(default_build_type "Debug") +if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) + message(STATUS "Setting build type to '${default_build_type}' as none was specified.") + set(CMAKE_BUILD_TYPE "${default_build_type}" CACHE STRING "Choose the type of build." FORCE) + # Set the possible values of build type for cmake-gui + set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release" "MinSizeRel" "RelWithDebInfo") +endif() # Alsa does not really like libEfence set(USE_EFENCE 0) - # Compiler selection if needed. Overload the detected compiler. # ----------------------------------------------- set (gcc_minimal_version 4.9) @@ -63,6 +69,7 @@ set (PKG_REQUIRED_LIST json-c libafbwsc glib-2.0 + lua>=5.3 ) # Compilation options definition @@ -88,7 +95,10 @@ set(COMPILE_OPTIONS -DMAX_LINEAR_DB_SCALE=24 # until 24db volume normalisation use a simple linear scale -DTLV_BYTE_SIZE=256 # Alsa use 4096 as default but 256 should fit most sndcards -DCONTROL_MAXPATH_LEN=255 --DCONTROL_CONFIG_PATH="${CMAKE_SOURCE_DIR}/conf.d/project:${CMAKE_INSTALL_PREFIX}/${PROJECT_NAME}" +-DCONTROL_CONFIG_PATH="${CMAKE_CURRENT_BINARY_DIR}/package/etc:${CMAKE_SOURCE_DIR}/conf.d/project:${CMAKE_INSTALL_PREFIX}/${PROJECT_NAME}:/var/local/lib/afm/applications/${PROJECT_NAME}/${PROJECT_VERSION}/etc" +-DCONTROL_PLUGIN_PATH="${CMAKE_INSTALL_PREFIX}/${PROJECT_NAME}/plugins/lib:${CMAKE_BINARY_DIR}/package/lib/plugins:/var/local/lib/afm/applications/${PROJECT_NAME}/${PROJECT_VERSION}/lib/plugins" +-DCONTROL_LUA_PATH="${CMAKE_INSTALL_PREFIX}/${PROJECT_NAME}/plugins/lua:${CMAKE_BINARY_DIR}/package/data:/var/local/lib/afm/applications/${PROJECT_NAME}/${PROJECT_VERSION}/var" +-DUSE_API_DYN=1 CACHE STRING "Compilation flags") #set(C_COMPILE_OPTIONS "" CACHE STRING "Compilation flags for C language.") #set(CXX_COMPILE_OPTIONS "" CACHE STRING "Compilation flags for C++ language.") @@ -96,6 +106,7 @@ set(COMPILE_OPTIONS #set(DEBUG_COMPILE_OPTIONS -g -ggdb -Wp,-U_FORTIFY_SOURCE CACHE STRING "Compilation flags for DEBUG build type.") #set(CCOV_COMPILE_OPTIONS -g -O2 --coverage CACHE STRING "Compilation flags for CCOV build type.") #set(RELEASE_COMPILE_OPTIONS -g -O2 CACHE STRING "Compilation flags for RELEASE build type.") +#include_directories(${CMAKE_SOURCE_DIR}/controller/ctl-lib ${CMAKE_SOURCE_DIR}/afb-utilities) # Print a helper message when every thing is finished # ---------------------------------------------------- |