From cf013eb832f323cb9de6b114038233b77d115bc8 Mon Sep 17 00:00:00 2001 From: Orangerot Date: Sun, 4 Aug 2024 04:50:11 +0200 Subject: feat(QJsonModel): compile and first model test --- CMakeLists.txt | 37 ++++++++++++++++++++++++++++++------- 1 file changed, 30 insertions(+), 7 deletions(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 8b82d00..4d985e2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3,14 +3,37 @@ project(itat_challange_olympics) set(CMAKE_CXX_STANDARD 17) -find_package(Qt6 REQUIRED COMPONENTS Core) +find_package(Qt6 COMPONENTS + Core REQUIRED + Gui REQUIRED + Widgets REQUIRED + Network REQUIRED + Quick REQUIRED +) + +# SET(MODULES_EXTERNAL_DIR ${CMAKE_CURRENT_SOURCE_DIR}/external) + +# include_directories(BEFORE ${MODULES_EXTERNAL_DIR}) + set(CMAKE_AUTORCC ON) -qt_add_executable(itat_challange_olympics application.qrc main.cpp) -target_link_libraries(itat_challange_olympics PRIVATE Qt6::Core) +set(CMAKE_AUTOMOC ON) +set(CMAKE_AUTOUIC ON) +qt_add_executable(itat_challange_olympics application.qrc main.cpp + external/QJsonModel/include/QJsonModel.hpp + external/QJsonModel/QJsonModel.cpp) -find_package(Qt6 REQUIRED COMPONENTS Quick) -target_link_libraries(itat_challange_olympics PRIVATE Qt6::Quick) +target_include_directories(itat_challange_olympics PRIVATE + external/QJsonModel/include) -find_package(Qt6 REQUIRED COMPONENTS Network) -target_link_libraries(itat_challange_olympics PRIVATE Qt6::Network) +# add_subdirectory(${MODULES_EXTERNAL_DIR}/QJsonModel) +# target_link_libraries(itat_challange_olympics PRIVATE Qt6::QJsonModelStatic) +# target_include_directories(itat_challange_olympics PRIVATE ${CMAKE_BINARY_DIR}/include) +target_link_libraries(itat_challange_olympics +PUBLIC + Qt6::Core + Qt6::Gui + Qt6::Widgets + Qt6::Network + Qt6::Quick +) -- cgit v1.2.3