version bump of software suppport for Hardware Version 2 + added readme
This commit is contained in:
@@ -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})
|
||||
|
||||
Reference in New Issue
Block a user