CMakeLists.txt 1.1 KB

123456789101112131415161718192021222324252627
  1. cmake_minimum_required(VERSION 2.8)
  2. project(NeuralNetworkUi LANGUAGES CXX)
  3. set(TARGET NeuralNetworkUi)
  4. find_package(Qt5 COMPONENTS Quick Gui Core Qml REQUIRED)
  5. set(QTPROTOBUF_MAKE_TESTS false)
  6. set(QTPROTOBUF_MAKE_EXAMPLES false)
  7. add_subdirectory("qtprotobuf")
  8. find_package(QtProtobufProject CONFIG COMPONENTS QtProtobuf QtGrpc REQUIRED)
  9. if(Qt5_POSITION_INDEPENDENT_CODE)
  10. set(CMAKE_POSITION_INDEPENDENT_CODE TRUE)
  11. endif()
  12. file(GLOB PROTO_FILES ABSOLUTE "${CMAKE_CURRENT_SOURCE_DIR}/../src/git.semlanik.org/semlanik/NeuralNetwork/remotecontrol/remotecontrol.proto")
  13. file(GLOB VISUALIZATION_PROTO "${CMAKE_CURRENT_SOURCE_DIR}/../visualization/visualization.proto")
  14. message("PROTO_FILES: ${PROTO_FILES} ${VISUALIZATION_PROTO}")
  15. set(CMAKE_AUTOMOC ON)
  16. set(CMAKE_AUTORCC ON)
  17. add_executable(NeuralNetworkUi main.cpp qml.qrc valueindicator.cpp visualizermodel.cpp dense.cpp layertrigger.cpp)
  18. generate_qtprotobuf(TARGET ${TARGET} PROTO_FILES ${PROTO_FILES} ${VISUALIZATION_PROTO} QML TRUE)
  19. target_link_libraries(NeuralNetworkUi PRIVATE Qt5::Core Qt5::Gui Qt5::Qml Qt5::Quick QtProtobufProject::QtProtobuf QtProtobufProject::QtGrpc ${QtProtobuf_GENERATED})