version bump of software suppport for Hardware Version 2 + added readme

This commit is contained in:
2018-12-30 21:34:34 +01:00
parent 50ab4dffef
commit 8dfece7633
4 changed files with 109 additions and 107 deletions

View File

@@ -38,6 +38,38 @@ find_package(Qt5Widgets CONFIG REQUIRED)
find_package(Qt5Sql REQUIRED)
# check dependency for atmega
find_path(LIBUSB_INCLUDE_DIR
NAMES "libusb.h"
PATH_SUFFIXES "include" "libusb" "libusb-1.0")
set(CMAKE_PREFIX_PATH usr)
find_library(LIBUSB_LIBRARY
NAMES
"usb"
"libusb"
"libusb-1.0"
"libusb-1.0.so"
PATH_SUFFIXES
"lib"
"lib32"
"lib64")
if(LIBUSB_LIBRARY)
message("usb lib found" ${LIBUSB_LIBRARY})
else()
message("usb lib not found")
endif()
if(LIBUSB_INCLUDE_DIR)
add_definitions(-DATMEGA)
message("usb include dir found")
include_directories(${LIBUSB_INCLUDE_DIR})
else()
message("usb include dir not found")
endif()
# Populate a CMake variable with the sources
set(helloworld_SRCS
main.cpp
@@ -73,5 +105,5 @@ set(helloworld_SRCS
add_executable(Rennbahn ${helloworld_SRCS} )
# Use the Widgets module from Qt 5
target_link_libraries(Rennbahn Qt5::Widgets Qt5::Core Qt5::Sql)
target_link_libraries(Rennbahn Qt5::Widgets Qt5::Core Qt5::Sql ${LIBUSB_LIBRARY})
target_link_libraries(Rennbahn ${Boost_LIBRARIES})