diff options
author | 2017-03-02 22:20:10 +0100 | |
---|---|---|
committer | 2017-03-02 22:20:10 +0100 | |
commit | 3668abdfa5c5f27751216105c3ba7e018485563d (patch) | |
tree | 4ce683253048574820a7ed8b5e2ecc1d360e159b /src/CMakeLists.txt | |
parent | e86b3ccdc23f70a6f692801972cf0aaabbed7e56 (diff) |
Tests with CmakeTools extension for VSCode. Can install on target
from VSCode.
Change-Id: I464d3379fe061605fcc84ba432e7a8a8b6ec6ec7
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to 'src/CMakeLists.txt')
-rw-r--r-- | src/CMakeLists.txt | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index c60bc49..93b35c1 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -21,6 +21,10 @@ project(low-can-binding) cmake_minimum_required(VERSION 3.3) +# Include useful for CMakeTools VSCode extensions +include(CMakeToolsHelpers REQUIRED) +set(TARGET_DBG "root@192.168.1.206") + include(GNUInstallDirs) set(PROJECT_VERSION "0.1") @@ -57,8 +61,6 @@ set(CMAKE_CXX_FLAGS_CCOV "-g -O2 -std=c++11 --coverage") include(FindPkgConfig) pkg_check_modules(EXTRAS REQUIRED json-c afb-daemon) -#set(THREADS_PREFER_PTHREAD_FLAG ON) -#find_package(Threads REQUIRED) add_compile_options(${EXTRAS_CFLAGS}) add_compile_options(${EXTRAS_CXXFLAGS}) @@ -96,7 +98,7 @@ set_target_properties(${PROJECT_NAME} PROPERTIES # WGT packaging message(STATUS "Creation of ${PROJECT_NAME}.wgt package for AppFW") -############################################################### +########################################################################### configure_file(config.xml.in config.xml) configure_file(can_buses.json.in can_buses.json) @@ -112,3 +114,13 @@ add_custom_command( COMMAND wgtpkg-pack -f -o ${PROJECT_NAME}.wgt package ) add_custom_target(widget ALL DEPENDS ${PROJECT_NAME}.wgt) + +########################################################################### +# WGT install + +#message(STATUS "Creation of ${PROJECT_NAME}.wgt package for AppFW") +########################################################################### +install(CODE "execute_process( + COMMAND scp -r ${CMAKE_SOURCE_DIR} ${PROJECT_NAME}.wgt ${TARGET_DBG}:/tmp + COMMAND ssh ${TARGET_DBG} \"/usr/bin/afm-util remove ${PROJECT_NAME}@${PROJECT_VERSION} && /usr/bin/afm-util install /tmp/${PROJECT_NAME}.wgt\")" + )
\ No newline at end of file |