diff options
Diffstat (limited to 'examples/widgets/tools/customcompleter/CMakeLists.txt')
-rw-r--r-- | examples/widgets/tools/customcompleter/CMakeLists.txt | 41 |
1 files changed, 24 insertions, 17 deletions
diff --git a/examples/widgets/tools/customcompleter/CMakeLists.txt b/examples/widgets/tools/customcompleter/CMakeLists.txt index 04f8035ff3..7c1db10bef 100644 --- a/examples/widgets/tools/customcompleter/CMakeLists.txt +++ b/examples/widgets/tools/customcompleter/CMakeLists.txt @@ -1,22 +1,29 @@ # Generated from customcompleter.pro. -##################################################################### -## customcompleter Binary: -##################################################################### +cmake_minimum_required(VERSION 3.14) +project(customcompleter LANGUAGES CXX) -add_qt_executable(customcompleter - GUI - OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/tools/customcompleter" - INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/tools/customcompleter" - SOURCES - main.cpp - mainwindow.cpp mainwindow.h - textedit.cpp textedit.h - LIBRARIES - Qt::Widgets -) +set(CMAKE_INCLUDE_CURRENT_DIR ON) + +set(CMAKE_AUTOMOC ON) +set(CMAKE_AUTORCC ON) +set(CMAKE_AUTOUIC ON) -# Resources: -add_qt_resource(customcompleter "customcompleter" PREFIX "/" FILES - resources/wordlist.txt) +set(INSTALL_EXAMPLEDIR "examples") +find_package(Qt5 COMPONENTS Widgets) + +add_executable(customcompleter WIN32 MACOSX_BUNDLE + customcompleter.qrc + main.cpp + mainwindow.cpp mainwindow.h + textedit.cpp textedit.h +) +target_link_libraries(customcompleter PUBLIC + Qt::Widgets +) + +install(TARGETS customcompleter + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" +) |