cmake_minimum_required(VERSION 3.24) project(addressbook) include(../3rdparty/QxOrm/QxOrm.cmake) set (CMAKE_LIBRARY_OUTPUT_DIRECTORY ../plugins) set(CMAKE_CXX_STANDARD 17) set(CMAKE_AUTOMOC ON) set(CMAKE_AUTORCC ON) set(CMAKE_AUTOUIC ON) find_package(Qt6 COMPONENTS Core Gui Widgets Qml REQUIRED) add_library(addressbook SHARED addressbook.cpp addressbook.h addressbookrc.qrc addressbook_global.h addressbookform.cpp addressbookform.h addressbookform.ui addressbookgrid.cpp addressbookgrid.h addressbookservice.cpp addressbookservice.h addressbooktablemodel.cpp addressbooktablemodel.h data/addressbookdata.cpp data/addressbookdata.h) target_compile_definitions(addressbook PRIVATE -DADDRESSBOOK_LIBRARY) include_directories(../core) include_directories(../countryregister) target_link_libraries(addressbook Qt::Core Qt::Gui Qt::Widgets Qt::Qml qdecimal decnumber QxOrm core countryregister ) install(TARGETS addressbook LIBRARY DESTINATION ../plugins)