aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan-Simon Moeller <jsmoeller@linuxfoundation.org>2017-06-12 08:35:03 +0000
committerGerrit Code Review <gerrit@automotivelinux.org>2017-06-12 08:35:03 +0000
commitc1fd7934d537bd76976da510a5eb41051c8a82d5 (patch)
tree03f4fdc9c205a9d51342e9774f3454f1ab747c1b
parentf3e177c12b5f4e971240698090d2998d8727e04b (diff)
parent44221a2db5ce2fb5fd9d6f0dac896b732949d8bc (diff)
Merge "Set default value for APP_TEMPLATES_DIR and WIDGET_ENTRY_POINT"
-rw-r--r--cmake/common.cmake17
-rw-r--r--cmake/config.cmake.sample2
2 files changed, 13 insertions, 6 deletions
diff --git a/cmake/common.cmake b/cmake/common.cmake
index 6daba89..d88f89c 100644
--- a/cmake/common.cmake
+++ b/cmake/common.cmake
@@ -113,7 +113,7 @@ macro(project_targets_populate)
COMMAND cp ${BD}/${P}${OUT}.so ${PACKAGE_LIBDIR}
)
add_custom_target(${POPULE_PACKAGE_TARGET} DEPENDS ${PACKAGE_LIBDIR}/${P}${TARGET}.so)
- add_dependencies(populate ${POPULE_PACKAGE_TARGET})
+ add_dependencies(populate ${POPULE_PACKAGE_TARGET})
elseif(${T} STREQUAL "EXECUTABLE")
add_custom_command(OUTPUT ${PACKAGE_BINDIR}/${P}${TARGET}
DEPENDS ${TARGET}
@@ -121,7 +121,7 @@ macro(project_targets_populate)
COMMAND cp ${BD}/${P}${OUT} ${PACKAGE_BINDIR}
)
add_custom_target(${POPULE_PACKAGE_TARGET} DEPENDS ${PACKAGE_BINDIR}/${P}${TARGET})
- add_dependencies(populate ${POPULE_PACKAGE_TARGET})
+ add_dependencies(populate ${POPULE_PACKAGE_TARGET})
elseif(${T} STREQUAL "HTDOCS")
add_custom_command(OUTPUT ${PACKAGE_HTTPDIR}-xx
DEPENDS ${TARGET}
@@ -130,7 +130,7 @@ macro(project_targets_populate)
COMMAND cp -r ${BD}/${P}${OUT}/* ${PACKAGE_HTTPDIR}
)
add_custom_target(${POPULE_PACKAGE_TARGET} DEPENDS ${PACKAGE_HTTPDIR}-xx)
- add_dependencies(populate ${POPULE_PACKAGE_TARGET})
+ add_dependencies(populate ${POPULE_PACKAGE_TARGET})
elseif(${T} STREQUAL "DATA")
add_custom_command(OUTPUT ${PACKAGE_DATADIR}-xx
DEPENDS ${TARGET}
@@ -139,7 +139,7 @@ macro(project_targets_populate)
COMMAND cp -r ${BD}/${P}${OUT} ${PACKAGE_DATADIR}
)
add_custom_target(${POPULE_PACKAGE_TARGET} DEPENDS ${PACKAGE_DATADIR}-xx)
- add_dependencies(populate ${POPULE_PACKAGE_TARGET})
+ add_dependencies(populate ${POPULE_PACKAGE_TARGET})
endif(${T} STREQUAL "BINDING")
elseif(${CMAKE_BUILD_TYPE} MATCHES "[Dd][Ee][Bb][Uu][Gg]")
MESSAGE(".. Warning: ${TARGET} ignored when packaging.")
@@ -156,7 +156,7 @@ macro(remote_targets_populate)
endif()
set(
- REMOTE_LAUNCH "Test on target with: ${CMAKE_CURRENT_BINARY_DIR}/target/start-on-${RSYNC_TARGET}.sh"
+ REMOTE_LAUNCH "Test on target with: ${CMAKE_CURRENT_BINARY_DIR}/target/start-on-${RSYNC_TARGET}.sh"
CACHE STRING "Command to start ${PROJECT_NAME} on remote target ${RSYNC_TARGET}"
)
@@ -187,6 +187,11 @@ macro(wgt_package_build)
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}")
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)")
+ endif()
+
+ set(WIDGET_ENTRY_POINT lib CACHE STRING "the widget entry point file")
configure_file(${WIDGET_CONFIG_TEMPLATE} ${PROJECT_PKG_BUILD_DIR}/config.xml)
file(COPY ${WGT_TEMPLATE_DIR}/icon-default.png DESTINATION ${PROJECT_PKG_BUILD_DIR})
@@ -364,6 +369,8 @@ else()
set(PROJECT_PKG_BUILD_DIR ${CMAKE_CURRENT_BINARY_DIR}/package CACHE PATH "Application contents to be packaged")
endif()
+set (PROJECT_APP_TEMPLATES_DIR "conf.d/templates" CACHE PATH "Default Templates directory")
+
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.")
diff --git a/cmake/config.cmake.sample b/cmake/config.cmake.sample
index 49995b9..793c2a0 100644
--- a/cmake/config.cmake.sample
+++ b/cmake/config.cmake.sample
@@ -31,7 +31,7 @@ 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/default")
+set(PROJECT_APP_TEMPLATES_DIR "conf.d/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.