2021-04-24 16:22:04 +01:00
|
|
|
cmake_minimum_required(VERSION 3.12)
|
2021-10-30 21:08:51 +01:00
|
|
|
project(Bloom LANGUAGES CXX VERSION 0.4.2)
|
2021-04-04 21:04:12 +01:00
|
|
|
|
|
|
|
|
set(CMAKE_VERBOSE_MAKEFILE off)
|
|
|
|
|
|
|
|
|
|
# Create directory for generated sources
|
|
|
|
|
file(MAKE_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/src/Generated)
|
|
|
|
|
|
|
|
|
|
set(CMAKE_CXX_STANDARD 20)
|
|
|
|
|
set(ENABLE_SANITIZERS off)
|
|
|
|
|
|
|
|
|
|
add_definitions(-D_GLIBCXX_USE_CXX11_ABI=0)
|
|
|
|
|
|
|
|
|
|
# The HIDAPI library lives here
|
|
|
|
|
link_directories(/usr/local/lib)
|
|
|
|
|
|
|
|
|
|
set(CMAKE_AUTOMOC ON)
|
|
|
|
|
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
|
|
|
|
set(AUTOGEN_BUILD_DIR ../build/)
|
|
|
|
|
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/build/bin")
|
|
|
|
|
|
2021-08-18 22:49:23 +01:00
|
|
|
find_package(Qt6Core)
|
|
|
|
|
find_package(Qt6Gui)
|
|
|
|
|
find_package(Qt6Widgets)
|
|
|
|
|
find_package(Qt6Xml)
|
|
|
|
|
find_package(Qt6Svg)
|
|
|
|
|
find_package(Qt6UiTools)
|
2021-08-20 22:51:47 +01:00
|
|
|
find_package(Qt6SvgWidgets)
|
2021-10-18 01:04:40 +01:00
|
|
|
find_package(Qt6Network)
|
2021-04-04 21:04:12 +01:00
|
|
|
|
2021-04-14 23:17:30 +01:00
|
|
|
set(CMAKE_SKIP_BUILD_RPATH false)
|
2021-04-04 21:04:12 +01:00
|
|
|
set(CMAKE_BUILD_RPATH_USE_ORIGIN true)
|
|
|
|
|
set(CMAKE_INSTALL_RPATH "\$ORIGIN/../lib")
|
|
|
|
|
set(CMAKE_BUILD_RPATH ${CMAKE_INSTALL_RPATH})
|
|
|
|
|
|
2021-04-25 16:20:30 +01:00
|
|
|
if (${CMAKE_BUILD_TYPE} STREQUAL "Debug")
|
|
|
|
|
add_compile_definitions(BLOOM_DEBUG_BUILD)
|
|
|
|
|
|
2021-05-30 19:05:18 +01:00
|
|
|
# BLOOM_COMPILED_RESOURCES_PATH_OVERRIDE can be used to override the file path used for compiled resources.
|
|
|
|
|
# We override this path in debug builds to avoid using compiled resources. This makes debugging and small tweaks
|
|
|
|
|
# a lot easier, as it removes the need to recompile for each tweak.
|
|
|
|
|
# CAUTION: Although convenient, this does add a limitation; the debug build can only be run on the same machine
|
|
|
|
|
# that compiled it. Or a machine that has the Bloom source located in the same place.
|
|
|
|
|
# See Paths::compiledResourcesPath() for more.
|
|
|
|
|
add_compile_definitions(BLOOM_COMPILED_RESOURCES_PATH_OVERRIDE="${CMAKE_CURRENT_SOURCE_DIR}")
|
|
|
|
|
|
2021-11-02 23:26:11 +00:00
|
|
|
# BLOOM_HOME_DOMAIN_NAME_OVERRIDE can be used to override the domain name used in URLs to the Bloom website.
|
|
|
|
|
# I (Nav) use this in debug builds, so I can test local changes that involve the Bloom website as well as Bloom
|
|
|
|
|
# itself. Other users can comment out this override if they don't have a copy of the Bloom website running on their
|
|
|
|
|
# local machine. See Paths::homeDomainName() for more.
|
|
|
|
|
add_compile_definitions(BLOOM_HOME_DOMAIN_NAME_OVERRIDE="http://bloom.local")
|
|
|
|
|
|
2021-04-25 16:20:30 +01:00
|
|
|
# CMAKE_SKIP_BUILD_RPATH needs to be set to true to use Gammaray during development.
|
|
|
|
|
# This is because the distributed Qt binaries may not be compatible with the local installation of Gammaray
|
2021-08-18 22:49:23 +01:00
|
|
|
set(CMAKE_BUILD_RPATH /opt/Qt/6.1.2/gcc_64/lib/)
|
2021-04-25 16:20:30 +01:00
|
|
|
endif()
|
|
|
|
|
|
2021-04-04 21:04:12 +01:00
|
|
|
add_executable(Bloom
|
2021-05-31 00:03:57 +01:00
|
|
|
src/main.cpp
|
|
|
|
|
src/Application.cpp
|
|
|
|
|
|
2021-08-08 13:59:22 +01:00
|
|
|
# Helpers & other
|
|
|
|
|
src/Logger/Logger.cpp
|
|
|
|
|
src/Helpers/Paths.cpp
|
2021-10-19 23:00:54 +01:00
|
|
|
src/VersionNumber.cpp
|
2021-08-08 13:59:22 +01:00
|
|
|
src/Generated/resources.cpp
|
|
|
|
|
|
|
|
|
|
# Project & application configuration
|
|
|
|
|
src/ApplicationConfig.cpp
|
|
|
|
|
|
|
|
|
|
# Events
|
2021-05-31 00:03:57 +01:00
|
|
|
src/EventManager/EventListener.cpp
|
|
|
|
|
src/EventManager/EventManager.cpp
|
2021-08-08 13:59:22 +01:00
|
|
|
|
|
|
|
|
# Signal handler
|
|
|
|
|
src/SignalHandler/SignalHandler.cpp
|
|
|
|
|
|
|
|
|
|
# Target controller
|
|
|
|
|
src/TargetController/TargetController.cpp
|
2021-05-31 00:03:57 +01:00
|
|
|
src/TargetController/TargetControllerConsole.cpp
|
|
|
|
|
|
2021-08-08 13:59:22 +01:00
|
|
|
# Debug tool drivers
|
2021-05-31 00:03:57 +01:00
|
|
|
src/DebugToolDrivers/USB/UsbDevice.cpp
|
2021-04-04 21:04:12 +01:00
|
|
|
src/DebugToolDrivers/USB/Interface.cpp
|
|
|
|
|
src/DebugToolDrivers/USB/HID/HidInterface.cpp
|
|
|
|
|
src/DebugToolDrivers/Microchip/AtmelICE/AtmelIce.cpp
|
|
|
|
|
src/DebugToolDrivers/Microchip/PowerDebugger/PowerDebugger.cpp
|
2021-04-07 23:30:30 +01:00
|
|
|
src/DebugToolDrivers/Microchip/MplabSnap/MplabSnap.cpp
|
2021-11-28 22:41:41 +00:00
|
|
|
src/DebugToolDrivers/Microchip/MplabPickit4/MplabPickit4.cpp
|
2021-11-22 23:05:46 +00:00
|
|
|
src/DebugToolDrivers/Microchip/XplainedPro/XplainedPro.cpp
|
2021-11-28 20:27:02 +00:00
|
|
|
src/DebugToolDrivers/Microchip/XplainedMini/XplainedMini.cpp
|
2021-11-28 22:12:51 +00:00
|
|
|
src/DebugToolDrivers/Microchip/XplainedNano/XplainedNano.cpp
|
2021-11-27 14:54:43 +00:00
|
|
|
src/DebugToolDrivers/Microchip/CuriosityNano/CuriosityNano.cpp
|
2021-04-04 21:04:12 +01:00
|
|
|
src/DebugToolDrivers/Protocols/CMSIS-DAP/Command.cpp
|
|
|
|
|
src/DebugToolDrivers/Protocols/CMSIS-DAP/Response.cpp
|
|
|
|
|
src/DebugToolDrivers/Protocols/CMSIS-DAP/VendorSpecific/EDBG/AVR/AvrCommand.cpp
|
|
|
|
|
src/DebugToolDrivers/Protocols/CMSIS-DAP/VendorSpecific/EDBG/AVR/CommandFrames/AvrCommandFrame.cpp
|
2021-08-30 22:30:35 +01:00
|
|
|
src/DebugToolDrivers/Protocols/CMSIS-DAP/VendorSpecific/EDBG/AVR/CommandFrames/AVR8Generic/ReadMemory.cpp
|
2021-04-04 21:04:12 +01:00
|
|
|
src/DebugToolDrivers/Protocols/CMSIS-DAP/VendorSpecific/EDBG/AVR/AvrResponse.cpp
|
|
|
|
|
src/DebugToolDrivers/Protocols/CMSIS-DAP/VendorSpecific/EDBG/AVR/ResponseFrames/AvrResponseFrame.cpp
|
|
|
|
|
src/DebugToolDrivers/Protocols/CMSIS-DAP/VendorSpecific/EDBG/AVR/AvrEvent.cpp
|
|
|
|
|
src/DebugToolDrivers/Protocols/CMSIS-DAP/VendorSpecific/EDBG/AVR/Events/AVR8Generic/BreakEvent.cpp
|
|
|
|
|
src/DebugToolDrivers/Protocols/CMSIS-DAP/CmsisDapInterface.cpp
|
|
|
|
|
src/DebugToolDrivers/Protocols/CMSIS-DAP/VendorSpecific/EDBG/EdbgInterface.cpp
|
|
|
|
|
src/DebugToolDrivers/Protocols/CMSIS-DAP/VendorSpecific/EDBG/AVR/EdbgAvr8Interface.cpp
|
2021-05-31 00:03:57 +01:00
|
|
|
|
2021-08-08 13:59:22 +01:00
|
|
|
# Targets
|
2021-05-31 01:01:14 +01:00
|
|
|
src/Targets/TargetDescription/TargetDescriptionFile.cpp
|
2021-08-30 22:20:36 +01:00
|
|
|
src/Targets/TargetRegister.cpp
|
2021-04-04 21:04:12 +01:00
|
|
|
src/Targets/Microchip/AVR/AVR8/Avr8.cpp
|
2021-05-31 01:01:14 +01:00
|
|
|
src/Targets/Microchip/AVR/AVR8/TargetDescription/TargetDescriptionFile.cpp
|
|
|
|
|
build/resources/TargetDescriptionFiles/AVR/Mapping.json
|
2021-05-31 00:03:57 +01:00
|
|
|
|
2021-08-08 13:59:22 +01:00
|
|
|
# Debug servers
|
|
|
|
|
src/DebugServers/DebugServer.cpp
|
2021-04-04 21:04:12 +01:00
|
|
|
src/DebugServers/GdbRsp/GdbRspDebugServer.cpp
|
2021-08-07 17:22:59 +01:00
|
|
|
src/DebugServers/GdbRsp/AvrGdbRsp/AvrGdbRsp.cpp
|
2021-05-31 00:03:57 +01:00
|
|
|
src/DebugServers/GdbRsp/Connection.cpp
|
2021-04-04 21:04:12 +01:00
|
|
|
src/DebugServers/GdbRsp/CommandPackets/CommandPacket.cpp
|
|
|
|
|
src/DebugServers/GdbRsp/CommandPackets/CommandPacketFactory.cpp
|
|
|
|
|
src/DebugServers/GdbRsp/CommandPackets/SupportedFeaturesQuery.cpp
|
2021-08-07 17:07:04 +01:00
|
|
|
src/DebugServers/GdbRsp/CommandPackets/ReadRegisters.cpp
|
|
|
|
|
src/DebugServers/GdbRsp/CommandPackets/WriteRegister.cpp
|
2021-04-04 21:04:12 +01:00
|
|
|
src/DebugServers/GdbRsp/CommandPackets/ContinueExecution.cpp
|
|
|
|
|
src/DebugServers/GdbRsp/CommandPackets/StepExecution.cpp
|
|
|
|
|
src/DebugServers/GdbRsp/CommandPackets/InterruptExecution.cpp
|
|
|
|
|
src/DebugServers/GdbRsp/CommandPackets/ReadMemory.cpp
|
|
|
|
|
src/DebugServers/GdbRsp/CommandPackets/WriteMemory.cpp
|
|
|
|
|
src/DebugServers/GdbRsp/CommandPackets/SetBreakpoint.cpp
|
|
|
|
|
src/DebugServers/GdbRsp/CommandPackets/RemoveBreakpoint.cpp
|
|
|
|
|
src/DebugServers/GdbRsp/ResponsePackets/SupportedFeaturesResponse.cpp
|
2021-05-31 00:03:57 +01:00
|
|
|
|
2021-08-08 13:59:22 +01:00
|
|
|
# Insight
|
|
|
|
|
src/Insight/Insight.cpp
|
2021-08-30 22:17:59 +01:00
|
|
|
src/Insight/InsightWorker/InsightWorker.cpp
|
2021-08-22 20:38:44 +01:00
|
|
|
src/Insight/UserInterfaces/InsightWindow/UiLoader.cpp
|
2021-12-18 00:16:11 +00:00
|
|
|
src/Insight/UserInterfaces/InsightWindow/BloomProxyStyle.cpp
|
2021-04-04 21:04:12 +01:00
|
|
|
src/Insight/UserInterfaces/InsightWindow/InsightWindow.cpp
|
|
|
|
|
src/Insight/UserInterfaces/InsightWindow/AboutWindow.cpp
|
2021-10-06 00:27:49 +01:00
|
|
|
src/Insight/UserInterfaces/InsightWindow/Widgets/PanelWidget.cpp
|
2021-08-22 20:41:52 +01:00
|
|
|
src/Insight/UserInterfaces/InsightWindow/Widgets/RotatableLabel.cpp
|
2021-12-18 18:02:01 +00:00
|
|
|
src/Insight/UserInterfaces/InsightWindow/Widgets/LabeledSeparator.cpp
|
2021-12-19 18:30:41 +00:00
|
|
|
src/Insight/UserInterfaces/InsightWindow/Widgets/TextInput.cpp
|
2021-08-22 20:38:05 +01:00
|
|
|
src/Insight/UserInterfaces/InsightWindow/Widgets/SvgWidget.cpp
|
2021-12-04 21:23:58 +00:00
|
|
|
src/Insight/UserInterfaces/InsightWindow/Widgets/SvgToolButton.cpp
|
2021-08-22 20:43:43 +01:00
|
|
|
src/Insight/UserInterfaces/InsightWindow/Widgets/ClickableWidget.cpp
|
2021-08-22 20:42:21 +01:00
|
|
|
src/Insight/UserInterfaces/InsightWindow/Widgets/ExpandingHeightScrollAreaWidget.hpp
|
2021-08-08 13:59:22 +01:00
|
|
|
|
2021-08-30 22:17:59 +01:00
|
|
|
# Insight worker tasks
|
|
|
|
|
src/Insight/InsightWorker/Tasks/InsightWorkerTask.cpp
|
|
|
|
|
src/Insight/InsightWorker/Tasks/ReadTargetRegisters.cpp
|
2021-09-11 18:52:59 +01:00
|
|
|
src/Insight/InsightWorker/Tasks/WriteTargetRegister.cpp
|
2021-09-02 21:19:46 +01:00
|
|
|
src/Insight/InsightWorker/Tasks/RefreshTargetPinStates.cpp
|
2021-09-04 18:11:52 +01:00
|
|
|
src/Insight/InsightWorker/Tasks/SetTargetPinState.cpp
|
2021-10-17 20:39:10 +01:00
|
|
|
src/Insight/InsightWorker/Tasks/ReadTargetMemory.cpp
|
2021-11-11 19:06:28 +00:00
|
|
|
src/Insight/InsightWorker/Tasks/ReadStackPointer.cpp
|
2021-10-18 01:04:40 +01:00
|
|
|
src/Insight/InsightWorker/Tasks/QueryLatestVersionNumber.cpp
|
2021-10-17 20:39:10 +01:00
|
|
|
|
|
|
|
|
# Error dialogue window
|
|
|
|
|
src/Insight/UserInterfaces/InsightWindow/Widgets/ErrorDialogue/ErrorDialogue.cpp
|
2021-08-30 22:17:59 +01:00
|
|
|
|
2021-08-08 13:59:22 +01:00
|
|
|
# Target package widgets
|
2021-09-26 18:18:12 +01:00
|
|
|
src/Insight/UserInterfaces/InsightWindow/Widgets/TargetWidgets/TargetPackageWidgetContainer.cpp
|
2021-09-02 21:19:46 +01:00
|
|
|
src/Insight/UserInterfaces/InsightWindow/Widgets/TargetWidgets/TargetPackageWidget.cpp
|
2021-09-04 18:11:52 +01:00
|
|
|
src/Insight/UserInterfaces/InsightWindow/Widgets/TargetWidgets/TargetPinWidget.cpp
|
2021-07-19 20:24:07 +01:00
|
|
|
src/Insight/UserInterfaces/InsightWindow/Widgets/TargetWidgets/TargetPinBodyWidget.cpp
|
2021-07-07 20:54:45 +01:00
|
|
|
src/Insight/UserInterfaces/InsightWindow/Widgets/TargetWidgets/DIP/DualInlinePackageWidget.cpp
|
|
|
|
|
src/Insight/UserInterfaces/InsightWindow/Widgets/TargetWidgets/DIP/PinWidget.cpp
|
|
|
|
|
src/Insight/UserInterfaces/InsightWindow/Widgets/TargetWidgets/DIP/PinBodyWidget.cpp
|
|
|
|
|
src/Insight/UserInterfaces/InsightWindow/Widgets/TargetWidgets/DIP/BodyWidget.cpp
|
|
|
|
|
src/Insight/UserInterfaces/InsightWindow/Widgets/TargetWidgets/QFP/QuadFlatPackageWidget.cpp
|
|
|
|
|
src/Insight/UserInterfaces/InsightWindow/Widgets/TargetWidgets/QFP/PinWidget.cpp
|
|
|
|
|
src/Insight/UserInterfaces/InsightWindow/Widgets/TargetWidgets/QFP/PinBodyWidget.cpp
|
|
|
|
|
src/Insight/UserInterfaces/InsightWindow/Widgets/TargetWidgets/QFP/BodyWidget.cpp
|
2021-09-04 18:11:52 +01:00
|
|
|
|
|
|
|
|
# Target register side pane
|
|
|
|
|
src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegistersPane/TargetRegistersPaneWidget.cpp
|
|
|
|
|
src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegistersPane/ItemWidget.cpp
|
|
|
|
|
src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegistersPane/RegisterGroupWidget.cpp
|
|
|
|
|
src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegistersPane/RegisterWidget.cpp
|
2021-09-18 22:41:08 +01:00
|
|
|
|
|
|
|
|
# Target register inspector window
|
|
|
|
|
src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegisterInspector/TargetRegisterInspectorWindow.cpp
|
|
|
|
|
src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegisterInspector/RegisterHistoryWidget/RegisterHistoryWidget.cpp
|
|
|
|
|
src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegisterInspector/RegisterHistoryWidget/Item.cpp
|
|
|
|
|
src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegisterInspector/RegisterHistoryWidget/CurrentItem.cpp
|
|
|
|
|
src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegisterInspector/RegisterHistoryWidget/RegisterHistoryItem.cpp
|
|
|
|
|
src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegisterInspector/BitsetWidget/BitsetWidget.cpp
|
|
|
|
|
src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegisterInspector/BitsetWidget/BitWidget.cpp
|
|
|
|
|
src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegisterInspector/BitsetWidget/BitBodyWidget.cpp
|
2021-09-25 20:18:41 +01:00
|
|
|
|
2021-10-17 20:44:40 +01:00
|
|
|
# Target memory inspection pane
|
|
|
|
|
src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/TargetMemoryInspectionPane.cpp
|
|
|
|
|
src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/HexViewerWidget/HexViewerWidget.cpp
|
2021-10-24 20:40:53 +01:00
|
|
|
src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/HexViewerWidget/ByteItemContainerGraphicsView.cpp
|
|
|
|
|
src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/HexViewerWidget/ByteItemGraphicsScene.cpp
|
|
|
|
|
src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/HexViewerWidget/ByteItem.cpp
|
2021-10-29 22:47:41 +01:00
|
|
|
src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/HexViewerWidget/ByteAddressContainer.cpp
|
|
|
|
|
src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/HexViewerWidget/ByteAddressItem.cpp
|
2021-04-04 21:04:12 +01:00
|
|
|
)
|
|
|
|
|
|
|
|
|
|
set_target_properties(Bloom PROPERTIES OUTPUT_NAME bloom)
|
|
|
|
|
target_include_directories(Bloom PUBLIC ./)
|
2021-10-21 19:25:58 +01:00
|
|
|
target_include_directories(Bloom PUBLIC /opt/Qt/6.1.2/Src)
|
2021-04-04 21:04:12 +01:00
|
|
|
|
2021-06-08 00:29:11 +01:00
|
|
|
# Copy AVR8 TDFs to build directory and construct JSON mapping of AVR8 target signatures to TDF paths.
|
2021-04-04 21:04:12 +01:00
|
|
|
add_custom_command(
|
|
|
|
|
OUTPUT
|
2021-05-31 01:01:14 +01:00
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/build/resources/TargetDescriptionFiles/AVR/Mapping.json
|
2021-04-04 21:04:12 +01:00
|
|
|
DEPENDS
|
2021-06-08 00:29:11 +01:00
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/build/scripts/Avr8TargetDescriptionFiles.php
|
2021-04-04 21:04:12 +01:00
|
|
|
COMMAND echo 'Processing AVR target description files.'
|
|
|
|
|
COMMAND
|
2021-06-08 00:29:11 +01:00
|
|
|
php ${CMAKE_CURRENT_SOURCE_DIR}/build/scripts/Avr8TargetDescriptionFiles.php
|
2021-04-04 21:04:12 +01:00
|
|
|
)
|
|
|
|
|
|
|
|
|
|
# Compile resources
|
|
|
|
|
add_custom_command(
|
|
|
|
|
OUTPUT
|
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/src/Generated/resources.cpp
|
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/src/Generated/resources_fake.cpp
|
|
|
|
|
DEPENDS
|
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/src/resources.qrc
|
|
|
|
|
COMMAND echo 'Compiling QT resources. |${CMAKE_BUILD_TYPE}|'
|
|
|
|
|
COMMAND
|
|
|
|
|
rcc -o ${CMAKE_CURRENT_SOURCE_DIR}/src/Generated/resources.cpp
|
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/src/resources.qrc
|
|
|
|
|
)
|
|
|
|
|
|
2021-09-25 01:10:01 +01:00
|
|
|
# Copy resources/fonts into build/resources/Fonts
|
|
|
|
|
add_custom_command(
|
|
|
|
|
TARGET Bloom
|
|
|
|
|
POST_BUILD
|
|
|
|
|
COMMAND ${CMAKE_COMMAND} -E copy_directory
|
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/resources/fonts
|
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/build/resources/Fonts
|
|
|
|
|
)
|
|
|
|
|
|
2021-09-25 01:09:00 +01:00
|
|
|
# Copy resources/udevrules/99-bloom.rules to build/resources/UDevRules/99-bloom.rules
|
|
|
|
|
add_custom_command(
|
|
|
|
|
TARGET Bloom
|
|
|
|
|
POST_BUILD
|
|
|
|
|
COMMAND ${CMAKE_COMMAND} -E copy
|
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/resources/udevrules/99-bloom.rules
|
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/build/resources/UDevRules/99-bloom.rules
|
|
|
|
|
)
|
|
|
|
|
|
2021-04-04 21:04:12 +01:00
|
|
|
target_link_libraries(Bloom -static-libgcc -static-libstdc++)
|
|
|
|
|
target_link_libraries(Bloom -lstdc++fs)
|
|
|
|
|
target_link_libraries(Bloom -lpthread)
|
|
|
|
|
target_link_libraries(Bloom -lusb-1.0)
|
|
|
|
|
target_link_libraries(Bloom -lhidapi-libusb)
|
2021-08-18 22:49:23 +01:00
|
|
|
target_link_libraries(Bloom Qt6::Core)
|
|
|
|
|
target_link_libraries(Bloom Qt6::Gui)
|
|
|
|
|
target_link_libraries(Bloom Qt6::UiTools)
|
|
|
|
|
target_link_libraries(Bloom Qt6::Widgets)
|
|
|
|
|
target_link_libraries(Bloom Qt6::Xml)
|
|
|
|
|
target_link_libraries(Bloom Qt6::Svg)
|
2021-08-20 22:51:47 +01:00
|
|
|
target_link_libraries(Bloom Qt6::SvgWidgets)
|
2021-10-18 01:04:40 +01:00
|
|
|
target_link_libraries(Bloom Qt6::Network)
|
2021-04-04 21:04:12 +01:00
|
|
|
|
|
|
|
|
target_compile_options(
|
|
|
|
|
Bloom
|
|
|
|
|
PUBLIC -std=c++2a
|
|
|
|
|
PUBLIC -pedantic
|
|
|
|
|
PUBLIC -Wconversion
|
2021-10-21 19:25:58 +01:00
|
|
|
PUBLIC -Wpessimizing-move
|
|
|
|
|
PUBLIC -Wredundant-move
|
2021-04-04 21:04:12 +01:00
|
|
|
PUBLIC -fno-sized-deallocation
|
|
|
|
|
PUBLIC $<$<CONFIG:DEBUG>:-g>
|
2021-04-07 23:30:30 +01:00
|
|
|
PUBLIC $<$<CONFIG:DEBUG>:-O0>
|
2021-10-17 20:44:56 +01:00
|
|
|
# PUBLIC $<$<CONFIG:DEBUG>:-O3>
|
2021-08-20 22:52:39 +01:00
|
|
|
PUBLIC $<$<CONFIG:RELEASE>:-Ofast>
|
2021-04-04 21:04:12 +01:00
|
|
|
PUBLIC $<$<CONFIG:DEBUG>:-fno-inline>
|
|
|
|
|
PUBLIC $<$<CONFIG:DEBUG>:-fkeep-static-functions>
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
target_link_options(
|
|
|
|
|
Bloom
|
|
|
|
|
PUBLIC [=[-Wl,--disable-new-dtags]=] #,--verbose
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
if (${ENABLE_SANITIZERS})
|
|
|
|
|
message(WARNING "Sanitizers have been enabled")
|
|
|
|
|
|
|
|
|
|
# For TSAN, see ThreadSanitizerSuppression.txt
|
|
|
|
|
|
|
|
|
|
# Some sanitizers are not compatible with each other.
|
|
|
|
|
target_compile_options(
|
|
|
|
|
Bloom
|
|
|
|
|
PUBLIC "-fsanitize=address"
|
|
|
|
|
#PUBLIC "-fsanitize=undefined"
|
|
|
|
|
# PUBLIC "-fsanitize=thread"
|
|
|
|
|
# PUBLIC "$<$<BOOL:${ENABLE_SANITIZERS}>:-fsanitize=address>"
|
|
|
|
|
# PUBLIC "$<$<BOOL:${ENABLE_SANITIZERS}>:-fsanitize=undefined>"
|
|
|
|
|
# PUBLIC "$<$<BOOL:${ENABLE_SANITIZERS}>:-fsanitize=integer-divide-by-zero>"
|
|
|
|
|
# PUBLIC "$<$<BOOL:${ENABLE_SANITIZERS}>:-fsanitize=unreachable>"
|
|
|
|
|
# PUBLIC "$<$<BOOL:${ENABLE_SANITIZERS}>:-fsanitize=vla-bound>"
|
|
|
|
|
# PUBLIC "$<$<BOOL:${ENABLE_SANITIZERS}>:-fsanitize=null>"
|
|
|
|
|
# PUBLIC "$<$<BOOL:${ENABLE_SANITIZERS}>:-fsanitize=return>"
|
|
|
|
|
# PUBLIC "$<$<BOOL:${ENABLE_SANITIZERS}>:-fsanitize=signed-integer-overflow>"
|
|
|
|
|
# PUBLIC "$<$<BOOL:${ENABLE_SANITIZERS}>:-fsanitize=bounds>"
|
|
|
|
|
# PUBLIC "$<$<BOOL:${ENABLE_SANITIZERS}>:-fsanitize=alignment>"
|
|
|
|
|
# PUBLIC "$<$<BOOL:${ENABLE_SANITIZERS}>:-fsanitize=object-size>"
|
|
|
|
|
# PUBLIC "$<$<BOOL:${ENABLE_SANITIZERS}>:-fsanitize=float-divide-by-zero>"
|
|
|
|
|
# PUBLIC "$<$<BOOL:${ENABLE_SANITIZERS}>:-fsanitize=float-cast-overflow>"
|
|
|
|
|
# PUBLIC "$<$<BOOL:${ENABLE_SANITIZERS}>:-fsanitize=nonnull-attribute>"
|
|
|
|
|
# PUBLIC "$<$<BOOL:${ENABLE_SANITIZERS}>:-fsanitize=returns-nonnull-attribute>"
|
|
|
|
|
# PUBLIC "$<$<BOOL:${ENABLE_SANITIZERS}>:-fsanitize=bool>"
|
|
|
|
|
# PUBLIC "$<$<BOOL:${ENABLE_SANITIZERS}>:-fsanitize=enum>"
|
|
|
|
|
# PUBLIC "$<$<BOOL:${ENABLE_SANITIZERS}>:-fsanitize=vptr>"
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
target_link_libraries(
|
|
|
|
|
Bloom
|
|
|
|
|
"-fsanitize=address"
|
|
|
|
|
# "-fsanitize=undefined"
|
|
|
|
|
# "-fsanitize=thread"
|
|
|
|
|
)
|
|
|
|
|
endif()
|
|
|
|
|
|
|
|
|
|
# Installation configuration
|
|
|
|
|
set(CMAKE_INSTALL_PREFIX "${CMAKE_CURRENT_SOURCE_DIR}/release/")
|
|
|
|
|
install(TARGETS Bloom DESTINATION bin PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ)
|
|
|
|
|
|
|
|
|
|
install(DIRECTORY build/bin/plugins DESTINATION "bin" DIRECTORY_PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ FILE_PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ)
|
|
|
|
|
install(DIRECTORY build/bin/platforms DESTINATION "bin" DIRECTORY_PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ FILE_PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ)
|
|
|
|
|
install(DIRECTORY build/resources DESTINATION "." DIRECTORY_PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ FILE_PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ)
|
|
|
|
|
install(DIRECTORY build/lib DESTINATION "." DIRECTORY_PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ FILE_PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ)
|
|
|
|
|
|
|
|
|
|
# Debian package configuration
|
|
|
|
|
set(CPACK_GENERATOR "DEB")
|
|
|
|
|
set(CPACK_DEBIAN_PACKAGE_NAME "Bloom")
|
|
|
|
|
set(CPACK_DEBIAN_PACKAGE_DESCRIPTION "")
|
|
|
|
|
file(READ ${CMAKE_CURRENT_SOURCE_DIR}/resources/packaging/description.txt CPACK_DEBIAN_PACKAGE_DESCRIPTION)
|
2021-04-14 23:17:30 +01:00
|
|
|
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "A debug interface for embedded systems development on Linux")
|
2021-04-04 21:04:12 +01:00
|
|
|
set(CPACK_DEBIAN_PACKAGE_MAINTAINER "Bloom Support <support@bloom.oscillate.io>")
|
|
|
|
|
set(CPACK_DEBIAN_PACKAGE_HOMEPAGE "https://bloom.oscillate.io")
|
|
|
|
|
set(CPACK_PACKAGE_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
|
|
|
|
|
set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON)
|
|
|
|
|
set(CPACK_PACKAGING_INSTALL_PREFIX "/opt/bloom")
|
|
|
|
|
set(
|
|
|
|
|
CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA
|
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/resources/packaging/postinst;
|
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/resources/packaging/postrm
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
include(CPack)
|