diff options
author | Kai Köhne <kai.koehne@qt.io> | 2022-06-29 13:29:31 +0200 |
---|---|---|
committer | Kai Köhne <kai.koehne@qt.io> | 2022-06-29 14:24:42 +0200 |
commit | 2c80bd221c34df0316325845ddb9e60a168d75dd (patch) | |
tree | 73caffbab2a87492289b8f52a16235e0319ddd99 /examples | |
parent | 340e2286f7d91d0684f28aba7cb97f7c516e5627 (diff) |
Clean up CMakeLists.txt in examples
* Remove "# Generated from" comments
* Remove unneeded CMAKE_AUTOXXX variables
* Prefer unversioned CMake commands
Change-Id: I0671ffba98c4da781faa638bb70ae19555744619
Reviewed-by: Mikhail Svetkin <mikhail.svetkin@gmail.com>
Diffstat (limited to 'examples')
-rw-r--r-- | examples/CMakeLists.txt | 2 | ||||
-rw-r--r-- | examples/httpserver/CMakeLists.txt | 2 | ||||
-rw-r--r-- | examples/httpserver/afterrequest/CMakeLists.txt | 9 | ||||
-rw-r--r-- | examples/httpserver/simple/CMakeLists.txt | 13 |
4 files changed, 3 insertions, 23 deletions
diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt index 5b38096..be21b88 100644 --- a/examples/CMakeLists.txt +++ b/examples/CMakeLists.txt @@ -1,5 +1,3 @@ -# Generated from examples.pro. - qt_examples_build_begin(EXTERNAL_BUILD) add_subdirectory(httpserver) diff --git a/examples/httpserver/CMakeLists.txt b/examples/httpserver/CMakeLists.txt index 27851c2..d09253f 100644 --- a/examples/httpserver/CMakeLists.txt +++ b/examples/httpserver/CMakeLists.txt @@ -1,4 +1,2 @@ -# Generated from httpserver.pro. - qt_internal_add_example(afterrequest) qt_internal_add_example(simple) diff --git a/examples/httpserver/afterrequest/CMakeLists.txt b/examples/httpserver/afterrequest/CMakeLists.txt index 94b7a8f..e52f220 100644 --- a/examples/httpserver/afterrequest/CMakeLists.txt +++ b/examples/httpserver/afterrequest/CMakeLists.txt @@ -1,14 +1,6 @@ -# Generated from afterrequest.pro. - cmake_minimum_required(VERSION 3.16) project(afterrequest 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/afterrequest") find_package(Qt6 REQUIRED COMPONENTS HttpServer) @@ -16,6 +8,7 @@ find_package(Qt6 REQUIRED COMPONENTS HttpServer) qt_add_executable(afterrequest main.cpp ) + target_link_libraries(afterrequest PUBLIC Qt::HttpServer ) diff --git a/examples/httpserver/simple/CMakeLists.txt b/examples/httpserver/simple/CMakeLists.txt index 08024f1..ac69080 100644 --- a/examples/httpserver/simple/CMakeLists.txt +++ b/examples/httpserver/simple/CMakeLists.txt @@ -1,14 +1,6 @@ -# Generated from simple.pro. - cmake_minimum_required(VERSION 3.16) 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 REQUIRED COMPONENTS HttpServer) @@ -16,17 +8,16 @@ find_package(Qt6 REQUIRED COMPONENTS HttpServer) qt_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" +qt_add_resources(simple "assets" PREFIX "/" FILES |