From: Romain Forlot Date: Sat, 29 Apr 2017 16:13:28 +0000 (+0200) Subject: Adapt CMake files to use new capabilities with widget X-Git-Tag: 5.0.2~284 X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=commitdiff_plain;ds=sidebyside;h=6b5723d18a3c4d4f583e6edab38fe7731cda13bf;hp=d5a9a1906e1487d1af3526d23b7415e81c989caf;p=apps%2Fagl-service-can-low-level.git Adapt CMake files to use new capabilities with widget Change-Id: I88a1ef090b7ce40c833c5780f5a481876ff7ea09 Signed-off-by: Romain Forlot --- 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 @@ + + + @PROJECT_NAME@ + + + This is a demo application used with low-can binding. + Romain Forlot <romain.forlot@iot.bzh> + APL 2.0 + + + diff --git a/CAN-binder/packaging/wgt/icon.png.in b/CAN-binder/packaging/wgt/icon.png.in new file mode 100644 index 00000000..9bd6a6e4 Binary files /dev/null and b/CAN-binder/packaging/wgt/icon.png.in differ 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