diff options
Diffstat (limited to 'low-can-binding/CMakeLists.txt')
-rw-r--r-- | low-can-binding/CMakeLists.txt | 45 |
1 files changed, 7 insertions, 38 deletions
diff --git a/low-can-binding/CMakeLists.txt b/low-can-binding/CMakeLists.txt index ecfd5fa0..a1768abb 100644 --- a/low-can-binding/CMakeLists.txt +++ b/low-can-binding/CMakeLists.txt @@ -2,6 +2,7 @@ # Copyright 2015, 2016, 2017 IoT.bzh # # author: Fulup Ar Foll <fulup@iot.bzh> +# contrib: Romain Forlot <romain.forlot@iot.bzh> # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -20,17 +21,6 @@ PROJECT_TARGET_ADD(low-can-binding) # Define project Targets - fill_include_dir(${PROJECT_LIBDIR}) - file(GLOB filelist "${PROJECT_LIBDIR}/*") - foreach(filename ${filelist}) - if(IS_DIRECTORY ${filename}) - include_directories(${filename}) - STRING(REGEX REPLACE "^.*\/(.*)$" "\\1" shortname ${filename}) - find_source_files(${PROJECT_LIBDIR}) - add_library(${shortname} STATIC ${sources_files}) - endif(IS_DIRECTORY ${filename}) - endforeach() - add_library(${TARGET_NAME} MODULE ${TARGET_NAME}.cpp configuration.cpp configuration-generated.cpp can/can-bus.cpp can/can-bus-dev.cpp can/can-message-set.cpp can/can-message-definition.cpp can/can-message.cpp can/can-signals.cpp can/can-decoder.cpp diagnostic/diagnostic-message.cpp diagnostic/diagnostic-manager.cpp diagnostic/active-diagnostic-request.cpp @@ -45,7 +35,11 @@ PROJECT_TARGET_ADD(low-can-binding) # Library dependencies (include updates automatically) TARGET_LINK_LIBRARIES(${TARGET_NAME} - ${EXTRA_LINK_LIBRARIES} + openxc-message-format + nanopb + uds-c + isotp-c + bitfield-c ${link_libraries} ) @@ -53,29 +47,4 @@ PROJECT_TARGET_ADD(low-can-binding) INSTALL(TARGETS ${TARGET_NAME} LIBRARY DESTINATION ${BINDINGS_INSTALL_DIR}) - # WGT packaging - message(STATUS "Creation of ${TARGET_NAME}.wgt package for AppFW") - - configure_file(${PROJECT_WGT_DIR}/config.xml config.xml) - - if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${PROJECT_WGT_DIR}/etc") - file(GLOB conf_files "${PROJECT_WGT_DIR}/etc/*") - foreach(filename ${conf_files}) - STRING(REGEX REPLACE "^.*\/(.*)$" "\\1" shortname ${filename}) - message(STATUS "Copying config file ${shortname}") - configure_file(${filename} ${shortname}) - endforeach() - endif(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${PROJECT_WGT_DIR}/etc") - - add_custom_command( - OUTPUT ${TARGET_NAME}.wgt - DEPENDS ${TARGET_NAME} ${EXTRA_LINK_LIBRARIES} ${conf_files} ${PROJECT_WGT_DIR}/config.xml - COMMAND rm -rf package - COMMAND mkdir -p package/lib package/htdocs package/etc - COMMAND cp config.xml package/ - COMMAND cp ${conf_files} package/etc - COMMAND cp ${CMAKE_CURRENT_SOURCE_DIR}/packaging/wgt/${PROJECT_ICON} package/icon.png - COMMAND cp ${TARGET_NAME}.so package/lib - COMMAND wgtpkg-pack -f -o ${TARGET_NAME}.wgt package - ) - add_custom_target(widget ALL DEPENDS ${TARGET_NAME}.wgt) + build_widget("BINDING") |