diff options
author | Kai Köhne <kai.koehne@qt.io> | 2022-02-14 19:08:41 +0100 |
---|---|---|
committer | Kai Köhne <kai.koehne@qt.io> | 2022-03-01 13:12:27 +0100 |
commit | ea67ddbd467f0fd734c8772a0ec4753dd1015d1a (patch) | |
tree | b7ea3b5a404b779cccead395a2d161b108b6211e /examples/remoteobjects/ssl/sslcppclient | |
parent | adf8d361b51ddf68860a1241fc659f809164a371 (diff) |
Improve examples CMakeLists.txt
- Remove # generated from xyz.pro comment from pro2cmake
- Remove "# special case" markers for pro2cmake
- Remove automatic use of CMAKE_AUTORCC
- Only opt into CMAKE_AUTOUIC if .ui files are involved
- Remove explicit setting of CMAKE_INCLUDE_CURRENT_DIR,
if not required by qt6_add_repc-*
- Combine multiple find_package(Qt6 ... calls)
- use REQUIRED COMPONENTS
- sort components alphabetically
- Fix wrong indentations
- Use (only) one empty line after multi-line commands
Pick-to: 6.3
Change-Id: Idd8ad59c9f5dd9a6675ef83d589ad2e6d3e0a9c0
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
Diffstat (limited to 'examples/remoteobjects/ssl/sslcppclient')
-rw-r--r-- | examples/remoteobjects/ssl/sslcppclient/CMakeLists.txt | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/examples/remoteobjects/ssl/sslcppclient/CMakeLists.txt b/examples/remoteobjects/ssl/sslcppclient/CMakeLists.txt index fd24d07..62aa1a8 100644 --- a/examples/remoteobjects/ssl/sslcppclient/CMakeLists.txt +++ b/examples/remoteobjects/ssl/sslcppclient/CMakeLists.txt @@ -1,30 +1,26 @@ -# Generated from sslcppclient.pro. - cmake_minimum_required(VERSION 3.16) project(SslCppClient LANGUAGES CXX) set(CMAKE_INCLUDE_CURRENT_DIR ON) - set(CMAKE_AUTOMOC ON) -set(CMAKE_AUTORCC ON) -set(CMAKE_AUTOUIC ON) if(NOT DEFINED INSTALL_EXAMPLESDIR) - set(INSTALL_EXAMPLESDIR "examples") + set(INSTALL_EXAMPLESDIR "examples") endif() set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/remoteobjects/ssl/sslcppclient") -find_package(Qt6 COMPONENTS RemoteObjects) -find_package(Qt6 COMPONENTS Core) +find_package(Qt6 REQUIRED COMPONENTS Core RemoteObjects) qt_add_executable(SslCppClient main.cpp ) + set_target_properties(SslCppClient PROPERTIES WIN32_EXECUTABLE TRUE MACOSX_BUNDLE FALSE ) + target_link_libraries(SslCppClient PUBLIC # Remove: gui Qt::Core @@ -32,7 +28,6 @@ target_link_libraries(SslCppClient PUBLIC Qt::RemoteObjectsPrivate ) - # Resources: set(cert_resource_files "../sslserver/cert/client.crt" |