summaryrefslogtreecommitdiffstats
path: root/examples/network/http/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'examples/network/http/CMakeLists.txt')
-rw-r--r--examples/network/http/CMakeLists.txt42
1 files changed, 26 insertions, 16 deletions
diff --git a/examples/network/http/CMakeLists.txt b/examples/network/http/CMakeLists.txt
index 30f6b900e2..931c834eae 100644
--- a/examples/network/http/CMakeLists.txt
+++ b/examples/network/http/CMakeLists.txt
@@ -1,20 +1,30 @@
# Generated from http.pro.
-#####################################################################
-## http Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(http LANGUAGES CXX)
-add_qt_executable(http
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/network/http"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/network/http"
- SOURCES
- authenticationdialog.ui
- httpwindow.cpp httpwindow.h
- main.cpp
- PUBLIC_LIBRARIES
- Qt::Network
- Qt::Widgets
- ENABLE_AUTOGEN_TOOLS
- uic
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples")
+
+find_package(Qt5 COMPONENTS Network)
+find_package(Qt5 COMPONENTS Widgets)
+
+add_executable(http WIN32 MACOSX_BUNDLE
+ authenticationdialog.ui
+ httpwindow.cpp httpwindow.h
+ main.cpp
+)
+target_link_libraries(http PUBLIC
+ Qt::Network
+ Qt::Widgets
+)
+
+install(TARGETS http
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
)