diff options
Diffstat (limited to 'examples/quick/localstorage/CMakeLists.txt')
-rw-r--r-- | examples/quick/localstorage/CMakeLists.txt | 46 |
1 files changed, 45 insertions, 1 deletions
diff --git a/examples/quick/localstorage/CMakeLists.txt b/examples/quick/localstorage/CMakeLists.txt index 6a405efc81..1f5e60197b 100644 --- a/examples/quick/localstorage/CMakeLists.txt +++ b/examples/quick/localstorage/CMakeLists.txt @@ -1,3 +1,47 @@ # Generated from localstorage.pro. -qt_internal_add_example(localstorage) +cmake_minimum_required(VERSION 3.16) +project(localstorage LANGUAGES CXX) + +set(CMAKE_INCLUDE_CURRENT_DIR ON) + +set(CMAKE_AUTOMOC ON) +set(CMAKE_AUTORCC ON) + +if(NOT DEFINED INSTALL_EXAMPLESDIR) + set(INSTALL_EXAMPLESDIR "examples") +endif() + +set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/quick/localstorage") + +find_package(Qt6 COMPONENTS Core Gui Quick Qml) + +qt_add_executable(localstorageexample + WIN32 + MACOSX_BUNDLE + main.cpp +) + +qt_add_qml_module(localstorageexample + URI localstorage + VERSION 1.0 + QML_FILES + "Database.js" + "Header.qml" + "MyDelegate.qml" + "MyModel.qml" + "localstorage.qml" + ) + +target_link_libraries(localstorageexample PUBLIC + Qt::Core + Qt::Gui + Qt::Qml + Qt::Quick +) + +install(TARGETS localstorageexample + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" + LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}" +) |