diff options
author | Romain Forlot <romain.forlot@iot.bzh> | 2017-04-29 18:13:28 +0200 |
---|---|---|
committer | Romain Forlot <romain.forlot@iot.bzh> | 2017-04-29 18:13:28 +0200 |
commit | 6b5723d18a3c4d4f583e6edab38fe7731cda13bf (patch) | |
tree | e150b7e5a07a996f05af0f7c3a15b490d7d2146d | |
parent | d5a9a1906e1487d1af3526d23b7415e81c989caf (diff) |
Adapt CMake files to use new capabilities with widget
Change-Id: I88a1ef090b7ce40c833c5780f5a481876ff7ea09
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
-rw-r--r-- | CAN-binder/etc/config.cmake | 15 | ||||
-rw-r--r-- | CAN-binder/libs/CMakeLists.txt | 2 | ||||
-rw-r--r-- | CAN-binder/low-can-binding/CMakeLists.txt | 10 | ||||
-rw-r--r-- | CAN-binder/packaging/wgt/config.xml.in | 11 | ||||
-rw-r--r-- | CAN-binder/packaging/wgt/icon.png.in | bin | 0 -> 4035 bytes | |||
-rw-r--r-- | CAN-binder/packaging/wgt/package.in | 4 |
6 files changed, 32 insertions, 10 deletions
diff --git a/CAN-binder/etc/config.cmake b/CAN-binder/etc/config.cmake index 7bbcc628..ac06926a 100644 --- a/CAN-binder/etc/config.cmake +++ b/CAN-binder/etc/config.cmake @@ -29,6 +29,11 @@ set(PROJECT_ICON "icon.png") # ---------------------------------- setc(CMAKE_BUILD_TYPE "DEBUG") +# Compiler selection if needed. Overload the detected compiler. +# ----------------------------------------------- +#set(CMAKE_C_COMPILER "gcc") +#set(CMAKE_CXX_COMPILER "g++") + # PKG_CONFIG required packages # ----------------------------- set (PKG_REQUIRED_LIST @@ -47,8 +52,9 @@ set(CMAKE_C_FLAGS "") set(CMAKE_CXX_FLAGS "-std=c++11") # Print a helper message when every thing is finished -setc(CLOSING_MESSAGE "Test with: afb-daemon --rootdir=\$\$(pwd)/low-can-binding/package --ldpaths=\$\$(pwd)/low-can-binding/package/lib --port=1234 --roothttp=\$\$(pwd)/low-can-binding/package/htdocs --tracereq=common --token=\"\" --verbose") # ---------------------------------------------------- +setc(CLOSING_MESSAGE "Test with: afb-daemon --rootdir=\$\$(pwd)/low-can-binding/package --ldpaths=\$\$(pwd)/low-can-binding/package/lib --port=1234 --roothttp=\$\$(pwd)/low-can-binding/package/htdocs --tracereq=common --token=\"\" --verbose") + # (BUG!!!) as PKG_CONFIG_PATH does not work [should be an env variable] # --------------------------------------------------------------------- @@ -58,11 +64,11 @@ setc(LD_LIBRARY_PATH ${CMAKE_INSTALL_PREFIX}/lib64 ${CMAKE_INSTALL_PREFIX}/lib) # Optional dependencies order # --------------------------- -set(EXTRA_DEPENDENCIES_ORDER can-config-generator low-can-binding) +#set(EXTRA_DEPENDENCIES_ORDER) # Optional Extra global include path # ----------------------------------- -#set(EXTRA_INCLUDE_DIRS can-config-generator/3rdparty/json libs/openxc-message-format/gen/cpp libs/nanopb libs/uds-c/src libs/isotp-c/src libs/bitfield-c/src) +set(EXTRA_INCLUDE_DIRS libs/openxc-message-format/gen/cpp libs/nanopb libs/uds-c/src libs/isotp-c/src libs/bitfield-c/src libs/ini-config) # Optional extra libraries # ------------------------- @@ -70,7 +76,8 @@ set(EXTRA_DEPENDENCIES_ORDER can-config-generator low-can-binding) # Optional force binding installation # ------------------------------------ -# set(BINDINGS_INSTALL_PREFIX DestinationPath ) +set(BINDINGS_INSTALL_PREFIX /opt ) +# set(WIDGET_PREFIX DestinationPath) # Optional force binding Linking flag # ------------------------------------ diff --git a/CAN-binder/libs/CMakeLists.txt b/CAN-binder/libs/CMakeLists.txt index cd29ea83..38ccd2d1 100644 --- a/CAN-binder/libs/CMakeLists.txt +++ b/CAN-binder/libs/CMakeLists.txt @@ -26,4 +26,4 @@ foreach(filename ${filelist}) PROJECT_TARGET_ADD(${shortname}) add_library(${shortname} STATIC ${sources_files}) endif(IS_DIRECTORY ${filename}) -endforeach()
\ No newline at end of file +endforeach() diff --git a/CAN-binder/low-can-binding/CMakeLists.txt b/CAN-binder/low-can-binding/CMakeLists.txt index a68ea2a2..ddac1db6 100644 --- a/CAN-binder/low-can-binding/CMakeLists.txt +++ b/CAN-binder/low-can-binding/CMakeLists.txt @@ -29,8 +29,9 @@ PROJECT_TARGET_ADD(low-can-binding) # Binder exposes a unique public entry point SET_TARGET_PROPERTIES(${TARGET_NAME} PROPERTIES PREFIX "" + LABELS "BINDING" LINK_FLAGS ${BINDINGS_LINK_FLAG} - OUTPUT_NAME ${TARGET_NAME} + OUTPUT_NAME ${TARGET_NAME} ) # Library dependencies (include updates automatically) @@ -41,11 +42,10 @@ PROJECT_TARGET_ADD(low-can-binding) uds-c isotp-c bitfield-c - ${link_libraries} - ) + ${link_libraries}) + + populate_widget() # installation directory INSTALL(TARGETS ${TARGET_NAME} LIBRARY DESTINATION ${BINDINGS_INSTALL_DIR}) - - build_widget("BINDING")
\ No newline at end of file diff --git a/CAN-binder/packaging/wgt/config.xml.in b/CAN-binder/packaging/wgt/config.xml.in new file mode 100644 index 00000000..5965904d --- /dev/null +++ b/CAN-binder/packaging/wgt/config.xml.in @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="UTF-8"?> +<widget xmlns="http://www.w3.org/ns/widgets" id="@PROJECT_NAME@" version="@PROJECT_VERSION@"> + <name>@PROJECT_NAME@</name> + <icon src="icon.png"/> + <content src="htdocs/index.html" type="application/vnd.agl.html.hybrid"/> + <description>This is a demo application used with low-can binding.</description> + <author>Romain Forlot <romain.forlot@iot.bzh></author> + <license>APL 2.0</license> +</widget> + + diff --git a/CAN-binder/packaging/wgt/icon.png.in b/CAN-binder/packaging/wgt/icon.png.in Binary files differnew file mode 100644 index 00000000..9bd6a6e4 --- /dev/null +++ b/CAN-binder/packaging/wgt/icon.png.in diff --git a/CAN-binder/packaging/wgt/package.in b/CAN-binder/packaging/wgt/package.in new file mode 100644 index 00000000..5e12032b --- /dev/null +++ b/CAN-binder/packaging/wgt/package.in @@ -0,0 +1,4 @@ +can_buses.json +low-can-demo/dist.prod +low-can-demo/cpu-stat-binding.so +low-can-binding/low-can-binding.so
\ No newline at end of file |