From e1ef035594fc80baaf5cd571ab4d04023309a906 Mon Sep 17 00:00:00 2001 From: Romain Forlot Date: Thu, 10 Aug 2017 18:25:48 +0200 Subject: Extending pluggable arch for templates Idea is to be able to use custom templates from home dir and system dir Change-Id: I74b48458f3dcc26b49f8144e042c213691028167 Signed-off-by: Romain Forlot --- cmake/CMakeLists.txt.sample | 21 ----- cmake/cmake.d/01-variables.cmake | 9 +- cmake/cmake.d/02-macros.cmake | 22 ++--- cmake/cmake.d/03-extra_targets.cmake | 40 ++++----- cmake/config.cmake.sample | 167 ----------------------------------- 5 files changed, 34 insertions(+), 225 deletions(-) delete mode 100644 cmake/CMakeLists.txt.sample delete mode 100644 cmake/config.cmake.sample (limited to 'cmake') diff --git a/cmake/CMakeLists.txt.sample b/cmake/CMakeLists.txt.sample deleted file mode 100644 index b485097..0000000 --- a/cmake/CMakeLists.txt.sample +++ /dev/null @@ -1,21 +0,0 @@ -########################################################################### -# Copyright 2015, 2016, 2017 IoT.bzh -# -# author: Romain Forlot -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -########################################################################### - -CMAKE_MINIMUM_REQUIRED(VERSION 3.3) - -include(${CMAKE_CURRENT_SOURCE_DIR}/conf.d/cmake/config.cmake) diff --git a/cmake/cmake.d/01-variables.cmake b/cmake/cmake.d/01-variables.cmake index 5118b57..867a723 100644 --- a/cmake/cmake.d/01-variables.cmake +++ b/cmake/cmake.d/01-variables.cmake @@ -116,14 +116,11 @@ endif() # Paths to templates files set (PKG_TEMPLATE_PREFIX ${CMAKE_SOURCE_DIR}/${PROJECT_APP_TEMPLATES_DIR} CACHE PATH "Default Package Templates Directory") -set(SSH_TEMPLATE_DIR "${PKG_TEMPLATE_PREFIX}/ssh" CACHE PATH "Subpath to a directory where are stored needed files to launch on remote target to debuging purposes") -set(GDB_TEMPLATE_DIR "${PKG_TEMPLATE_PREFIX}/gdb" CACHE PATH "Subpath to a directory where are stored needed files to launch debuging server on a remote target. Use gdbserver.") -set(WGT_TEMPLATE_DIR "${PKG_TEMPLATE_PREFIX}/wgt" CACHE PATH "Subpath to a directory where are stored needed files to build widget") +set(TEMPLATE_DIR "${PKG_TEMPLATE_PREFIX}/cmake/template.d" CACHE PATH "Subpath to a directory where are stored needed files to launch on remote target to debuging purposes") + if(NOT WIDGET_CONFIG_TEMPLATE) - set(WIDGET_CONFIG_TEMPLATE ${WGT_TEMPLATE_DIR}/config.xml.in CACHE PATH "Path to widget config file template (config.xml.in)") + set(WIDGET_CONFIG_TEMPLATE ${TEMPLATE_DIR}/config.xml.in CACHE PATH "Path to widget config file template (config.xml.in)") endif() -set(RPM_TEMPLATE_DIR "${PKG_TEMPLATE_PREFIX}/rpm" CACHE PATH "Subpath to a directory where are stored needed files to build rpm package") -set(DEB_TEMPLATE_DIR "${PKG_TEMPLATE_PREFIX}/deb" CACHE PATH "Subpath to a directory where are stored needed files to build deb package") string(REGEX REPLACE "^(.*)/.*$" "\\1" ENTRY_POINT "${PKG_TEMPLATE_PREFIX}") set(PROJECT_PKG_ENTRY_POINT ${ENTRY_POINT}/packaging CACHE PATH "Where package build files, like rpm.spec file or config.xml, are write.") diff --git a/cmake/cmake.d/02-macros.cmake b/cmake/cmake.d/02-macros.cmake index e116d2e..3787817 100644 --- a/cmake/cmake.d/02-macros.cmake +++ b/cmake/cmake.d/02-macros.cmake @@ -185,8 +185,8 @@ macro(remote_targets_populate) endif() endif() - configure_files_in_dir(${SSH_TEMPLATE_DIR}) - configure_files_in_dir(${GDB_TEMPLATE_DIR}) + configure_files_in_dir(${TEMPLATE_DIR}) + configure_files_in_dir(${TEMPLATE_DIR}) add_custom_target(remote-target-populate COMMAND chmod +x ${CMAKE_CURRENT_BINARY_DIR}/target/*.sh @@ -201,8 +201,8 @@ macro(wgt_package_build) if(NOT EXISTS ${WIDGET_CONFIG_TEMPLATE}) MESSAGE(FATAL_ERROR "${Red}WARNING ! Missing mandatory files to build widget file.\nYou need a config.xml template: please specify WIDGET_CONFIG_TEMPLATE correctly.${ColourReset}") endif() - if(NOT EXISTS ${WGT_TEMPLATE_DIR}/icon-default.png) - MESSAGE(FATAL_ERROR "${Red}WARNING ! Missing mandatory files to build widget file.\nYou need ${PROJECT_ICON} file in ${WGT_TEMPLATE_DIR} folder.${ColourReset}") + if(NOT EXISTS ${TEMPLATE_DIR}/icon-default.png) + MESSAGE(FATAL_ERROR "${Red}WARNING ! Missing mandatory files to build widget file.\nYou need ${PROJECT_ICON} file in ${TEMPLATE_DIR} folder.${ColourReset}") endif() if(NOT WIDGET_TYPE) MESSAGE(FATAL_ERROR "WIDGET_TYPE must be set in your config.cmake.\neg.: set(WIDGET_TYPE application/vnd.agl.service)") @@ -214,15 +214,15 @@ macro(wgt_package_build) add_custom_command(OUTPUT ${PROJECT_PKG_BUILD_DIR}/config.xml COMMAND ${CMAKE_COMMAND} -DINFILE=${WIDGET_CONFIG_TEMPLATE} -DOUTFILE=${PROJECT_PKG_BUILD_DIR}/config.xml -DPROJECT_BINARY_DIR=${CMAKE_CURRENT_BINARY_DIR} -P ${CMAKE_CURRENT_SOURCE_DIR}/${PROJECT_APP_TEMPLATES_DIR}/cmake/configure_file.cmake - COMMAND cp ${WGT_TEMPLATE_DIR}/icon-default.png ${PROJECT_PKG_BUILD_DIR}/${PROJECT_ICON} + COMMAND cp ${TEMPLATE_DIR}/icon-default.png ${PROJECT_PKG_BUILD_DIR}/${PROJECT_ICON} ) add_custom_target(packaging_wgt DEPENDS ${PROJECT_PKG_BUILD_DIR}/config.xml) # Fulup ??? copy any extra file in wgt/etc into populate package before building the widget - file(GLOB PROJECT_CONF_FILES "${WGT_TEMPLATE_DIR}/etc/*") + file(GLOB PROJECT_CONF_FILES "${TEMPLATE_DIR}/etc/*") if(${PROJECT_CONF_FILES}) - file(COPY "${WGT_TEMPLATE_DIR}/etc/*" DESTINATION ${PROJECT_PKG_BUILD_DIR}/etc/) + file(COPY "${TEMPLATE_DIR}/etc/*" DESTINATION ${PROJECT_PKG_BUILD_DIR}/etc/) endif(${PROJECT_CONF_FILES}) add_custom_command(OUTPUT ${PROJECT_NAME}.wgt @@ -241,7 +241,7 @@ macro(wgt_package_build) COMMAND exit -1 ) else() - configure_files_in_dir(${WGT_TEMPLATE_DIR}) + configure_files_in_dir(${TEMPLATE_DIR}) add_custom_target(widget-target-install DEPENDS widget COMMAND chmod +x ${CMAKE_CURRENT_BINARY_DIR}/target/install-wgt-on-${RSYNC_TARGET}.sh @@ -279,15 +279,15 @@ macro(deb_package_build) endmacro(deb_package_build) macro(project_package_build) - if(EXISTS ${RPM_TEMPLATE_DIR}) + if(EXISTS ${TEMPLATE_DIR}) rpm_package_build() endif() - if(EXISTS ${WGT_TEMPLATE_DIR}) + if(EXISTS ${TEMPLATE_DIR}) wgt_package_build() endif() - if(EXISTS ${DEB_TEMPLATE_DIR}) + if(EXISTS ${TEMPLATE_DIR}) deb_package_build() endif() endmacro(project_package_build) diff --git a/cmake/cmake.d/03-extra_targets.cmake b/cmake/cmake.d/03-extra_targets.cmake index 61f5adb..2c635db 100644 --- a/cmake/cmake.d/03-extra_targets.cmake +++ b/cmake/cmake.d/03-extra_targets.cmake @@ -93,8 +93,8 @@ foreach (PKG_CONFIG ${PKG_REQUIRED_LIST}) endif() endforeach() -if(NOT EXISTS ${RPM_TEMPLATE_DIR}/rpm-config.spec.in) - MESSAGE(FATAL_ERROR "${Red}Missing mandatory files: you need rpm-config.spec.in in ${RPM_TEMPLATE_DIR} folder.${ColourReset}") +if(NOT EXISTS ${TEMPLATE_DIR}/rpm-config.spec.in) + MESSAGE(FATAL_ERROR "${Red}Missing mandatory files: you need rpm-config.spec.in in ${TEMPLATE_DIR} folder.${ColourReset}") endif() # Because the tool "dpkg" is used on the packages db to find the @@ -102,25 +102,25 @@ endif() # to test the OS release package type # Only doable within a native environment not under SDK if(OSRELEASE MATCHES "debian" AND NOT DEFINED ENV{SDKTARGETSYSROOT} AND NOT DEFINED CMAKE_TOOLCHAIN_FILE) - add_custom_target(packaging_deb DEPENDS ${DEB_TEMPLATE_DIR}/debian.compat.in - ${DEB_TEMPLATE_DIR}/debian.changelog.in - ${DEB_TEMPLATE_DIR}/deb-config.dsc.in - ${DEB_TEMPLATE_DIR}/deb-config.install.in - ${DEB_TEMPLATE_DIR}/debian.control.in - ${DEB_TEMPLATE_DIR}/debian.rules.in - COMMAND ${CMAKE_COMMAND} -DINFILE=${DEB_TEMPLATE_DIR}/debian.compat.in -DOUTFILE=${PACKAGING_DEB_OUTPUT_COMPAT} -DPROJECT_BINARY_DIR=${CMAKE_CURRENT_BINARY_DIR} -P ${CMAKE_CURRENT_SOURCE_DIR}/${PROJECT_APP_TEMPLATES_DIR}/cmake/configure_file.cmake - COMMAND ${CMAKE_COMMAND} -DINFILE=${DEB_TEMPLATE_DIR}/debian.changelog.in -DOUTFILE=${PACKAGING_DEB_OUTPUT_CHANGELOG} -DPROJECT_BINARY_DIR=${CMAKE_CURRENT_BINARY_DIR} -P ${CMAKE_CURRENT_SOURCE_DIR}/${PROJECT_APP_TEMPLATES_DIR}/cmake/configure_file.cmake - COMMAND ${CMAKE_COMMAND} -DINFILE=${DEB_TEMPLATE_DIR}/deb-config.dsc.in -DOUTFILE=${PACKAGING_DEB_OUTPUT_DSC} -DPROJECT_BINARY_DIR=${CMAKE_CURRENT_BINARY_DIR} -P ${CMAKE_CURRENT_SOURCE_DIR}/${PROJECT_APP_TEMPLATES_DIR}/cmake/configure_file.cmake - COMMAND ${CMAKE_COMMAND} -DINFILE=${DEB_TEMPLATE_DIR}/deb-config.install.in -DOUTFILE=${PACKAGING_DEB_OUTPUT_INSTALL} -DPROJECT_BINARY_DIR=${CMAKE_CURRENT_BINARY_DIR} -P ${CMAKE_CURRENT_SOURCE_DIR}/${PROJECT_APP_TEMPLATES_DIR}/cmake/configure_file.cmake - COMMAND ${CMAKE_COMMAND} -DINFILE=${DEB_TEMPLATE_DIR}/debian.control.in -DOUTFILE=${PACKAGING_DEB_OUTPUT_CONTROL} -DPROJECT_BINARY_DIR=${CMAKE_CURRENT_BINARY_DIR} -P ${CMAKE_CURRENT_SOURCE_DIR}/${PROJECT_APP_TEMPLATES_DIR}/cmake/configure_file.cmake - COMMAND ${CMAKE_COMMAND} -DINFILE=${DEB_TEMPLATE_DIR}/debian.rules.in -DOUTFILE=${PACKAGING_DEB_OUTPUT_RULES} -DPROJECT_BINARY_DIR=${CMAKE_CURRENT_BINARY_DIR} -P ${CMAKE_CURRENT_SOURCE_DIR}/${PROJECT_APP_TEMPLATES_DIR}/cmake/configure_file.cmake + add_custom_target(packaging_deb DEPENDS ${TEMPLATE_DIR}/debian.compat.in + ${TEMPLATE_DIR}/debian.changelog.in + ${TEMPLATE_DIR}/deb-config.dsc.in + ${TEMPLATE_DIR}/deb-config.install.in + ${TEMPLATE_DIR}/debian.control.in + ${TEMPLATE_DIR}/debian.rules.in + COMMAND ${CMAKE_COMMAND} -DINFILE=${TEMPLATE_DIR}/debian.compat.in -DOUTFILE=${PACKAGING_DEB_OUTPUT_COMPAT} -DPROJECT_BINARY_DIR=${CMAKE_CURRENT_BINARY_DIR} -P ${CMAKE_CURRENT_SOURCE_DIR}/${PROJECT_APP_TEMPLATES_DIR}/cmake/configure_file.cmake + COMMAND ${CMAKE_COMMAND} -DINFILE=${TEMPLATE_DIR}/debian.changelog.in -DOUTFILE=${PACKAGING_DEB_OUTPUT_CHANGELOG} -DPROJECT_BINARY_DIR=${CMAKE_CURRENT_BINARY_DIR} -P ${CMAKE_CURRENT_SOURCE_DIR}/${PROJECT_APP_TEMPLATES_DIR}/cmake/configure_file.cmake + COMMAND ${CMAKE_COMMAND} -DINFILE=${TEMPLATE_DIR}/deb-config.dsc.in -DOUTFILE=${PACKAGING_DEB_OUTPUT_DSC} -DPROJECT_BINARY_DIR=${CMAKE_CURRENT_BINARY_DIR} -P ${CMAKE_CURRENT_SOURCE_DIR}/${PROJECT_APP_TEMPLATES_DIR}/cmake/configure_file.cmake + COMMAND ${CMAKE_COMMAND} -DINFILE=${TEMPLATE_DIR}/deb-config.install.in -DOUTFILE=${PACKAGING_DEB_OUTPUT_INSTALL} -DPROJECT_BINARY_DIR=${CMAKE_CURRENT_BINARY_DIR} -P ${CMAKE_CURRENT_SOURCE_DIR}/${PROJECT_APP_TEMPLATES_DIR}/cmake/configure_file.cmake + COMMAND ${CMAKE_COMMAND} -DINFILE=${TEMPLATE_DIR}/debian.control.in -DOUTFILE=${PACKAGING_DEB_OUTPUT_CONTROL} -DPROJECT_BINARY_DIR=${CMAKE_CURRENT_BINARY_DIR} -P ${CMAKE_CURRENT_SOURCE_DIR}/${PROJECT_APP_TEMPLATES_DIR}/cmake/configure_file.cmake + COMMAND ${CMAKE_COMMAND} -DINFILE=${TEMPLATE_DIR}/debian.rules.in -DOUTFILE=${PACKAGING_DEB_OUTPUT_RULES} -DPROJECT_BINARY_DIR=${CMAKE_CURRENT_BINARY_DIR} -P ${CMAKE_CURRENT_SOURCE_DIR}/${PROJECT_APP_TEMPLATES_DIR}/cmake/configure_file.cmake ) endif() add_custom_target(packaging) set(PACKAGING_SPEC_OUTPUT ${PROJECT_PKG_ENTRY_POINT}/${NPKG_PROJECT_NAME}.spec) -add_custom_target(packaging_rpm DEPENDS ${RPM_TEMPLATE_DIR}/rpm-config.spec.in - COMMAND ${CMAKE_COMMAND} -DINFILE=${RPM_TEMPLATE_DIR}/rpm-config.spec.in -DOUTFILE=${PACKAGING_SPEC_OUTPUT} -DPROJECT_BINARY_DIR=${CMAKE_CURRENT_BINARY_DIR} -P ${CMAKE_CURRENT_SOURCE_DIR}/${PROJECT_APP_TEMPLATES_DIR}/cmake/configure_file.cmake +add_custom_target(packaging_rpm DEPENDS ${TEMPLATE_DIR}/rpm-config.spec.in + COMMAND ${CMAKE_COMMAND} -DINFILE=${TEMPLATE_DIR}/rpm-config.spec.in -DOUTFILE=${PACKAGING_SPEC_OUTPUT} -DPROJECT_BINARY_DIR=${CMAKE_CURRENT_BINARY_DIR} -P ${CMAKE_CURRENT_SOURCE_DIR}/${PROJECT_APP_TEMPLATES_DIR}/cmake/configure_file.cmake ) add_dependencies(packaging packaging_rpm) if(TARGET packaging_wgt) @@ -152,8 +152,8 @@ endforeach() # Autobuild target # ---------------------------------------------------------------------------- -add_custom_target(autobuild ALL DEPENDS ${CMAKE_SOURCE_DIR}/${PROJECT_APP_TEMPLATES_DIR}/autobuild/agl/autobuild.in - ${CMAKE_SOURCE_DIR}/${PROJECT_APP_TEMPLATES_DIR}/autobuild/linux/autobuild.in - COMMAND ${CMAKE_COMMAND} -DINFILE=${CMAKE_SOURCE_DIR}/${PROJECT_APP_TEMPLATES_DIR}/autobuild/agl/autobuild.in -DOUTFILE=${PROJECT_TEMPLATE_AGL_AUTOBUILD_DIR}/autobuild -DPROJECT_BINARY_DIR=${CMAKE_CURRENT_BINARY_DIR} -P ${CMAKE_CURRENT_SOURCE_DIR}/${PROJECT_APP_TEMPLATES_DIR}/cmake/configure_file.cmake - COMMAND ${CMAKE_COMMAND} -DINFILE=${CMAKE_SOURCE_DIR}/${PROJECT_APP_TEMPLATES_DIR}/autobuild/agl/autobuild.in -DOUTFILE=${PROJECT_TEMPLATE_LINUX_AUTOBUILD_DIR}/autobuild -DPROJECT_BINARY_DIR=${CMAKE_CURRENT_BINARY_DIR} -P ${CMAKE_CURRENT_SOURCE_DIR}/${PROJECT_APP_TEMPLATES_DIR}/cmake/configure_file.cmake +add_custom_target(autobuild ALL DEPENDS ${CMAKE_SOURCE_DIR}/${PROJECT_APP_TEMPLATES_DIR}/cmake/template.d/autobuild/agl/autobuild.in + ${CMAKE_SOURCE_DIR}/${PROJECT_APP_TEMPLATES_DIR}/cmake/template.d/autobuild/linux/autobuild.in + COMMAND ${CMAKE_COMMAND} -DINFILE=${CMAKE_SOURCE_DIR}/${PROJECT_APP_TEMPLATES_DIR}/cmake/template.d/autobuild/agl/autobuild.in -DOUTFILE=${PROJECT_TEMPLATE_AGL_AUTOBUILD_DIR}/autobuild -DPROJECT_BINARY_DIR=${CMAKE_CURRENT_BINARY_DIR} -P ${CMAKE_CURRENT_SOURCE_DIR}/${PROJECT_APP_TEMPLATES_DIR}/cmake/configure_file.cmake + COMMAND ${CMAKE_COMMAND} -DINFILE=${CMAKE_SOURCE_DIR}/${PROJECT_APP_TEMPLATES_DIR}/cmake/template.d/autobuild/agl/autobuild.in -DOUTFILE=${PROJECT_TEMPLATE_LINUX_AUTOBUILD_DIR}/autobuild -DPROJECT_BINARY_DIR=${CMAKE_CURRENT_BINARY_DIR} -P ${CMAKE_CURRENT_SOURCE_DIR}/${PROJECT_APP_TEMPLATES_DIR}/cmake/configure_file.cmake ) diff --git a/cmake/config.cmake.sample b/cmake/config.cmake.sample deleted file mode 100644 index f5ac42a..0000000 --- a/cmake/config.cmake.sample +++ /dev/null @@ -1,167 +0,0 @@ -########################################################################### -# Copyright 2015, 2016, 2017 IoT.bzh -# -# author: Fulup Ar Foll -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -########################################################################### - -# Project Info -# ------------------ -set(PROJECT_NAME example) -set(PROJECT_VERSION "0.0") -set(PROJECT_PRETTY_NAME "Example") -set(PROJECT_DESCRIPTION "AGL application example") -set(PROJECT_URL "https://gerrit.automotivelinux.org/gerrit/apps/app-templates") -set(PROJECT_ICON "icon.png") -set(PROJECT_AUTHOR "Last Name, First Name") -set(PROJECT_AUTHOR_MAIL "example.man@bigouden.bzh") -set(PROJECT_LICENSE "APL2.0") -set(PROJECT_LANGUAGES,"C") - -# Where are stored default templates files from submodule or subtree app-templates in your project tree -# relative to the root project directory -set(PROJECT_APP_TEMPLATES_DIR "conf.d/app-templates") - -# Where are stored your external libraries for your project. This is 3rd party library that you don't maintain -# but used and must be built and linked. -# set(PROJECT_LIBDIR "libs") - -# Where are stored data for your application. Pictures, static resources must be placed in that folder. -# set(PROJECT_RESOURCES "data") - -# Which directories inspect to find CMakeLists.txt target files -# set(PROJECT_SRC_DIR_PATTERN "*") - -# Compilation Mode (DEBUG, RELEASE) -# ---------------------------------- -set(CMAKE_BUILD_TYPE "DEBUG") - -# Kernel selection if needed. You can choose between a -# mandatory version to impose a minimal version. -# Or check Kernel minimal version and just print a Warning -# about missing features and define a preprocessor variable -# to be used as preprocessor condition in code to disable -# incompatibles features. Preprocessor define is named -# KERNEL_MINIMAL_VERSION_OK. -# -# NOTE*** FOR NOW IT CHECKS KERNEL Yocto environment and -# Yocto SDK Kernel version. -# ----------------------------------------------- -#set (kernel_mandatory_version 4.8) -#set (kernel_minimal_version 4.8) - -# Compiler selection if needed. Impose a minimal version. -# ----------------------------------------------- -set (gcc_minimal_version 4.9) - -# PKG_CONFIG required packages -# ----------------------------- -set (PKG_REQUIRED_LIST - json-c - libsystemd>=222 - afb-daemon - libmicrohttpd>=0.9.55 -) - -# Customize link option -# ----------------------------- -#list(APPEND link_libraries -an-option) - -# Compilation options definition -# Use CMake generator expressions to specify only for a specific language -# Values are prefilled with default options that is currently used. -# Either separate options with ";", or each options must be quoted separately -# DO NOT PUT ALL OPTION QUOTED AT ONCE , COMPILATION COULD FAILED ! -# ---------------------------------------------------------------------------- -#set(COMPILE_OPTIONS "-Wall" "-Wextra" "-Wconversion" "-Wno-unused-parameter" "-Wno-sign-compare" "-Wno-sign-conversion" "-Werror=maybe-uninitialized" "-Werror=implicit-function-declaration" "-ffunction-sections" "-fdata-sections" "-fPIC" 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.") -#set(PROFILING_COMPILE_OPTIONS "-g" "-O0" "-pg" "-Wp,-U_FORTIFY_SOURCE" CACHE STRING "Compilation flags for PROFILING build type.") -#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.") - -# Print a helper message when every thing is finished -# ---------------------------------------------------- -#set(CLOSING_MESSAGE "") -#set(PACKAGE_MESSAGE "Install widget file using in the target : afm-util install ${PROJECT_NAME}.wgt") - -# (BUG!!!) as PKG_CONFIG_PATH does not work [should be an env variable] -# --------------------------------------------------------------------- -set(CMAKE_INSTALL_PREFIX $ENV{HOME}/opt) -set(CMAKE_PREFIX_PATH ${CMAKE_INSTALL_PREFIX}/lib64/pkgconfig ${CMAKE_INSTALL_PREFIX}/lib/pkgconfig) -set(LD_LIBRARY_PATH ${CMAKE_INSTALL_PREFIX}/lib64 ${CMAKE_INSTALL_PREFIX}/lib) - -# Optional location for config.xml.in -# ----------------------------------- -#set(WIDGET_CONFIG_TEMPLATE ${CMAKE_CURRENT_SOURCE_DIR}/conf.d/wgt/config.xml.in) - -# Mandatory widget Mimetype specification of the main unit -# -------------------------------------------------------------------------- -# Choose between : -#- text/html : HTML application, -# content.src designates the home page of the application -# -#- application/vnd.agl.native : AGL compatible native, -# content.src designates the relative path of the binary. -# -# - application/vnd.agl.service: AGL service, content.src is not used. -# -#- ***application/x-executable***: Native application, -# content.src designates the relative path of the binary. -# For such application, only security setup is made. -# -set(WIDGET_TYPE MimeType_Not_Set) - -# Mandatory Widget entry point file of the main unit -# -------------------------------------------------------------- -# This is the file that will be executed, loaded, -# at launch time by the application framework. -# -set(WIDGET_ENTRY_POINT EntryPoint_Path_Not_Set) - -# Optional dependencies order -# --------------------------- -#set(EXTRA_DEPENDENCIES_ORDER) - -# Optional Extra global include path -# ----------------------------------- -#set(EXTRA_INCLUDE_DIRS) - -# Optional extra libraries -# ------------------------- -#set(EXTRA_LINK_LIBRARIES) - -# Optional force binding installation -# ------------------------------------ -# set(BINDINGS_INSTALL_PREFIX PrefixPath ) - -# Optional force binding Linking flag -# ------------------------------------ -# set(BINDINGS_LINK_FLAG LinkOptions ) - -# Optional force package prefix generation, like widget -# ----------------------------------------------------- -# set(PKG_PREFIX DestinationPath) - -# Optional Application Framework security token -# and port use for remote debugging. -#------------------------------------------------------------ -#set(AFB_TOKEN "" CACHE PATH "Default AFB_TOKEN") -#set(AFB_REMPORT "1234" CACHE PATH "Default AFB_TOKEN") - -# This include is mandatory and MUST happens at the end -# of this file, else you expose you to unexpected behavior -# ----------------------------------------------------------- -include(${PROJECT_APP_TEMPLATES_DIR}/cmake/common.cmake) -- cgit 1.2.3-korg