diff options
Diffstat (limited to 'examples/sql/books/CMakeLists.txt')
-rw-r--r-- | examples/sql/books/CMakeLists.txt | 54 |
1 files changed, 29 insertions, 25 deletions
diff --git a/examples/sql/books/CMakeLists.txt b/examples/sql/books/CMakeLists.txt index 7a25b95cde..294a764a9b 100644 --- a/examples/sql/books/CMakeLists.txt +++ b/examples/sql/books/CMakeLists.txt @@ -1,31 +1,35 @@ # Generated from books.pro. -##################################################################### -## books Binary: -##################################################################### +cmake_minimum_required(VERSION 3.14) +project(books LANGUAGES CXX) -add_qt_executable(books - GUI - OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/sql/books" - INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/sql/books" - SOURCES - bookdelegate.cpp bookdelegate.h - bookwindow.cpp bookwindow.h bookwindow.ui - initdb.h - main.cpp - INCLUDE_DIRECTORIES - . - PUBLIC_LIBRARIES - Qt::Sql - Qt::Widgets - ENABLE_AUTOGEN_TOOLS - uic -) +set(CMAKE_INCLUDE_CURRENT_DIR ON) + +set(CMAKE_AUTOMOC ON) +set(CMAKE_AUTORCC ON) +set(CMAKE_AUTOUIC ON) -# Resources: -add_qt_resource(books "books" PREFIX "/" FILES - images/star.png) +set(INSTALL_EXAMPLEDIR "examples") +find_package(Qt5 COMPONENTS Sql) +find_package(Qt5 COMPONENTS Widgets) -#### Keys ignored in scope 1:.:.:books.pro:<TRUE>: -# TEMPLATE = "app" +add_executable(books WIN32 MACOSX_BUNDLE + bookdelegate.cpp bookdelegate.h + books.qrc + bookwindow.cpp bookwindow.h bookwindow.ui + initdb.h + main.cpp +) +target_include_directories(books PUBLIC + . +) +target_link_libraries(books PUBLIC + Qt::Sql + Qt::Widgets +) + +install(TARGETS books + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" +) |