diff options
author | Mikhail Svetkin <mikhail.svetkin@gmail.com> | 2020-04-09 11:18:07 +0200 |
---|---|---|
committer | Mikhail Svetkin <mikhail.svetkin@gmail.com> | 2020-05-05 19:43:56 +0200 |
commit | 4b2790aa6d61790c291d4744d77732db7cccc752 (patch) | |
tree | 9267fd92950c3f8882e24dd5d40f4186c2e4b282 /examples | |
parent | 6d0a9b6f834c097bc79de75d1684a26291b08098 (diff) |
Add cmake support for Qt6/dev branch
Change-Id: Icca0edab01d6028d786b76f99fba388565bd6e76
Reviewed-by: MÃ¥rten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Diffstat (limited to 'examples')
-rw-r--r-- | examples/CMakeLists.txt | 7 | ||||
-rw-r--r-- | examples/httpserver/CMakeLists.txt | 3 | ||||
-rw-r--r-- | examples/httpserver/simple/CMakeLists.txt | 40 |
3 files changed, 50 insertions, 0 deletions
diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt new file mode 100644 index 0000000..247cb4e --- /dev/null +++ b/examples/CMakeLists.txt @@ -0,0 +1,7 @@ +# Generated from examples.pro. + +qt_examples_build_begin() + +add_subdirectory(httpserver) + +qt_examples_build_end() diff --git a/examples/httpserver/CMakeLists.txt b/examples/httpserver/CMakeLists.txt new file mode 100644 index 0000000..693183c --- /dev/null +++ b/examples/httpserver/CMakeLists.txt @@ -0,0 +1,3 @@ +# Generated from httpserver.pro. + +add_subdirectory(simple) diff --git a/examples/httpserver/simple/CMakeLists.txt b/examples/httpserver/simple/CMakeLists.txt new file mode 100644 index 0000000..07d21a7 --- /dev/null +++ b/examples/httpserver/simple/CMakeLists.txt @@ -0,0 +1,40 @@ +# Generated from simple.pro. + +cmake_minimum_required(VERSION 3.14) +project(simple LANGUAGES CXX) + +set(CMAKE_INCLUDE_CURRENT_DIR ON) + +set(CMAKE_AUTOMOC ON) +set(CMAKE_AUTORCC ON) +set(CMAKE_AUTOUIC ON) + +set(INSTALL_EXAMPLEDIR "examples/httpserver/simple") + +find_package(Qt6 COMPONENTS HttpServer) + +add_executable(simple + main.cpp +) +target_link_libraries(simple PUBLIC + Qt::HttpServer +) + + +# Resources: +set(assets_resource_files + "assets/qt-logo.png" +) + +qt6_add_resources(simple "assets" + PREFIX + "/" + FILES + ${assets_resource_files} +) + +install(TARGETS simple + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" + LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}" +) |