12345678910111213141516171819202122232425262728293031 |
- cmake_minimum_required(VERSION 2.8)
- project(NeuralNetworkUi LANGUAGES CXX)
- set(TARGET NeuralNetworkUi)
- find_package(Qt5 COMPONENTS Quick Gui Core Qml REQUIRED)
- if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/qtprotobuf/CMakeLists.txt")
- set(QT_PROTOBUF_MAKE_TESTS OFF CACHE BOOL "" FORCE)
- set(QT_PROTOBUF_MAKE_EXAMPLES OFF CACHE BOOL "" FORCE)
- set(BUILD_SHARED_LIBS ON CACHE BOOL "" FORCE)
- add_subdirectory("qtprotobuf")
- endif()
- find_package(QtProtobufProject CONFIG COMPONENTS QtProtobuf QtGrpc REQUIRED)
- if(Qt5_POSITION_INDEPENDENT_CODE)
- set(CMAKE_POSITION_INDEPENDENT_CODE TRUE)
- endif()
- file(GLOB PROTO_FILES ABSOLUTE "${CMAKE_CURRENT_SOURCE_DIR}/../../NeuralNetwork/remotecontrol/remotecontrol.proto")
- file(GLOB VISUALIZATION_PROTO "${CMAKE_CURRENT_SOURCE_DIR}/../visualization/visualization.proto")
- message("PROTO_FILES: ${PROTO_FILES} ${VISUALIZATION_PROTO}")
- set(CMAKE_AUTOMOC ON)
- set(CMAKE_AUTORCC ON)
- add_executable(NeuralNetworkUi main.cpp qml.qrc valueindicator.cpp visualizermodel.cpp dense.cpp layertrigger.cpp)
- qtprotobuf_generate(TARGET ${TARGET} PROTO_FILES ${PROTO_FILES} ${VISUALIZATION_PROTO} QML)
- target_link_libraries(NeuralNetworkUi PRIVATE Qt5::Gui QtProtobufProject::QtProtobuf QtProtobufProject::QtGrpc)
|