Merge "Replace LIBRARIES by LDFLAGS for pkgconfig dep"
authorRomain Forlot <romain.forlot@iot.bzh>
Tue, 13 Jun 2017 08:51:45 +0000 (08:51 +0000)
committerGerrit Code Review <gerrit@automotivelinux.org>
Tue, 13 Jun 2017 08:51:45 +0000 (08:51 +0000)
README.md
cmake/common.cmake
cmake/config.cmake.sample
ssh/start-on-target.in

index aa76f37..77cc271 100644 (file)
--- a/README.md
+++ b/README.md
@@ -122,7 +122,7 @@ populate_widget() --> add target to widget tree depending upon target properties
 
 #### config.xml.in file
 
-To build a widget you need to configure file _config.xml_. This repo 
+To build a widget you need to configure file _config.xml_. This repo
 provide a simple default file _config.xml.in_ that will be configured using the
 variable set in _config.cmake_  file.
 
@@ -171,7 +171,7 @@ Example:
 PROJECT_TARGET_ADD(low-can-demo)
 ```
 
-> ***NOTE***: This will make available the variable `${TARGET_NAME}` 
+> ***NOTE***: This will make available the variable `${TARGET_NAME}`
 > set with the specificied name. This variable will change at the next call
 > to this macros.
 
index 3468813..353e1ec 100644 (file)
@@ -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,13 @@ 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()
+
+       if(NOT WIDGET_ENTRY_POINT)
+               set(WIDGET_ENTRY_POINT lib)
+       endif()
 
        configure_file(${WIDGET_CONFIG_TEMPLATE} ${PROJECT_PKG_BUILD_DIR}/config.xml)
        file(COPY ${WGT_TEMPLATE_DIR}/icon-default.png DESTINATION ${PROJECT_PKG_BUILD_DIR})
index 49995b9..e6a8274 100644 (file)
@@ -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/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.
index b0623cf..a21c6d1 100644 (file)
@@ -1,5 +1,5 @@
 #!/bin/sh
-# 
+#
 # File:   start-on-target.sh
 # Author: Fulup Ar Foll @ IoT.bzh
 # Object: Forward signal (SIGTERM) to remote process