From 1a51a0a3eb1316f8464e7bd9ded78aa52fa2d837 Mon Sep 17 00:00:00 2001 From: Peter M. Groen Date: Tue, 13 Sep 2022 22:10:21 +0200 Subject: [PATCH] Fixed CMakeLists --- CMakeLists.txt | 34 ++++------------------------------ src/CMakeLists.txt | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 38 insertions(+), 30 deletions(-) create mode 100644 src/CMakeLists.txt diff --git a/CMakeLists.txt b/CMakeLists.txt index 5e92c8b..fdda5e8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,34 +1,8 @@ cmake_minimum_required(VERSION 3.16) LIST( APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/submodules/cmake ) include(projectheader) -project_header(datamodels) +project_header(osdev_datamodels) -find_package(Qt5 "5.15.0" COMPONENTS Core CONFIG REQUIRED ) - -include_directories( SYSTEM - ${Qt5Core_INCLUDE_DIRS} -) - -include(compiler) - -set( SRC_LIST - ${CMAKE_SOURCE_DIR}/src/tablemodel/tablemodel.cpp -) - -include(qtmoc) -create_mocs( SRC_LIST MOC_LIST - ${CMAKE_SOURCE_DIR}/src/tablemodel/tablemodel.h -) - -link_directories( - ${CMAKE_BINARY_DIR}/lib -) - -include(library) -add_libraries( - ${Qt5Core_LIBRARIES} -) - - -include(installation) -install_component() +add_subdirectory(src) +#add_subdirectory(examples) +#add_subdirectory(test) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt new file mode 100644 index 0000000..e4f1735 --- /dev/null +++ b/src/CMakeLists.txt @@ -0,0 +1,34 @@ +cmake_minimum_required(VERSION 3.16) +LIST( APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/submodules/cmake ) +include(projectheader) +project_header(datamodels) + +find_package(Qt5 "5.15.0" COMPONENTS Core CONFIG REQUIRED ) + +include_directories( SYSTEM + ${Qt5Core_INCLUDE_DIRS} +) + +include(compiler) + +set( SRC_LIST + ${CMAKE_CURRENT_SOURCE_DIR}/tablemodel/tablemodel.cpp +) + +include(qtmoc) +create_mocs( SRC_LIST MOC_LIST + ${CMAKE_CURRENT_SOURCE_DIR}/tablemodel/tablemodel.h +) + +link_directories( + ${CMAKE_BINARY_DIR}/lib +) + +include(library) +add_libraries( + ${Qt5Core_LIBRARIES} +) + + +include(installation) +install_component() -- libgit2 0.21.4