diff --git a/.gitmodules b/.gitmodules index 0a5814035..558956e47 100644 --- a/.gitmodules +++ b/.gitmodules @@ -10,3 +10,6 @@ [submodule "3rdParty/rapidjson"] path = 3rdParty/rapidjson url = https://github.com/Tencent/rapidjson.git +[submodule "3rdParty/qtCannelloniCanBus"] + path = 3rdParty/qtCannelloniCanBus + url = https://github.com/tuvok/qtCannelloniCanBus.git diff --git a/3rdParty/qtCannelloniCanBus b/3rdParty/qtCannelloniCanBus new file mode 160000 index 000000000..db0e87457 --- /dev/null +++ b/3rdParty/qtCannelloniCanBus @@ -0,0 +1 @@ +Subproject commit db0e8745732fd60dc2821ac19a09fea13f6ccbb4 diff --git a/CMakeLists.txt b/CMakeLists.txt index 692d971ef..1593253ba 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -7,6 +7,8 @@ set(CMAKE_AUTOMOC ON) set(CMAKE_AUTOUIC ON) set(CMAKE_AUTORCC ON) set(CMAKE_CXX_STANDARD 14) +#libnodes.so will be installed to CANdevStudio dir to not override other installations. Set RPATH accordingly +SET(CMAKE_INSTALL_RPATH ${CMAKE_INSTALL_PREFIX}/lib/CANdevStudio) list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/Modules) @@ -79,8 +81,8 @@ configure_file( include_directories(${CMAKE_BINARY_DIR}/generated) # end of version Handling -add_subdirectory(3rdParty/spdlog) add_subdirectory(3rdParty/nodeeditor) +add_subdirectory(3rdParty/qtCannelloniCanBus) add_subdirectory(src/common) add_subdirectory(src/gui) add_subdirectory(src/components) @@ -90,3 +92,11 @@ if(WITH_TESTS OR WITH_COVERAGE) add_subdirectory(3rdParty/fakeit) add_subdirectory(tests) endif() + +install(PROGRAMS ${CMAKE_BINARY_DIR}/lib/libnodes.so DESTINATION lib/CANdevStudio) + +list(GET Qt5SerialBus_PLUGINS 0 SB_PLUGIN) +get_target_property(CAN_PLUGIN_PATH ${SB_PLUGIN} LOCATION) +get_filename_component(CAN_PLUGIN_PATH ${CAN_PLUGIN_PATH} PATH) + +install(PROGRAMS ${CMAKE_BINARY_DIR}/3rdParty/qtCannelloniCanBus/libqtCannelloniCanBusPlugin.so DESTINATION ${CAN_PLUGIN_PATH}) diff --git a/src/common/CMakeLists.txt b/src/common/CMakeLists.txt index bc813d0ef..870d53377 100644 --- a/src/common/CMakeLists.txt +++ b/src/common/CMakeLists.txt @@ -1,5 +1,5 @@ find_package(Threads REQUIRED) add_library(cds-common INTERFACE) -target_include_directories(cds-common INTERFACE ${CMAKE_SOURCE_DIR}/src/common) -target_link_libraries(cds-common INTERFACE spdlog ${CMAKE_THREAD_LIBS_INIT}) +target_include_directories(cds-common INTERFACE ${CMAKE_SOURCE_DIR}/src/common ${CMAKE_SOURCE_DIR}/3rdParty/spdlog/include) +target_link_libraries(cds-common INTERFACE ${CMAKE_THREAD_LIBS_INIT}) diff --git a/src/gui/CMakeLists.txt b/src/gui/CMakeLists.txt index dfa804106..1479aace5 100644 --- a/src/gui/CMakeLists.txt +++ b/src/gui/CMakeLists.txt @@ -16,3 +16,5 @@ include_directories("${CMAKE_CURRENT_SOURCE_DIR}/../components/") include_directories("${CMAKE_CURRENT_SOURCE_DIR}/../../3rdParty/rapidjson/include") target_link_libraries(CANdevStudio Qt5::Widgets candevice canrawview canrawsender cds-common nodes projectconfig) target_compile_definitions(CANdevStudio PRIVATE $<$:CDS_DEBUG=true> $<$>:CDS_DEBUG=false>) + +install(TARGETS CANdevStudio RUNTIME DESTINATION bin)