aboutsummaryrefslogtreecommitdiffstats
path: root/examples/macextras
diff options
context:
space:
mode:
Diffstat (limited to 'examples/macextras')
-rw-r--r--examples/macextras/CMakeLists.txt8
-rw-r--r--examples/macextras/embeddedqwindow/CMakeLists.txt41
-rw-r--r--examples/macextras/macfunctions/CMakeLists.txt50
-rw-r--r--examples/macextras/macpasteboardmime/CMakeLists.txt33
-rw-r--r--examples/macextras/mactoolbar/CMakeLists.txt46
-rw-r--r--examples/macextras/mactoolbar/rasterwindow.h7
6 files changed, 184 insertions, 1 deletions
diff --git a/examples/macextras/CMakeLists.txt b/examples/macextras/CMakeLists.txt
new file mode 100644
index 0000000..03f6bd5
--- /dev/null
+++ b/examples/macextras/CMakeLists.txt
@@ -0,0 +1,8 @@
+# Generated from macextras.pro.
+
+add_subdirectory(macfunctions)
+if(APPLE_OSX)
+ add_subdirectory(embeddedqwindow)
+ # TODO: add_subdirectory(macpasteboardmime) # special case
+ add_subdirectory(mactoolbar)
+endif()
diff --git a/examples/macextras/embeddedqwindow/CMakeLists.txt b/examples/macextras/embeddedqwindow/CMakeLists.txt
new file mode 100644
index 0000000..fda9f68
--- /dev/null
+++ b/examples/macextras/embeddedqwindow/CMakeLists.txt
@@ -0,0 +1,41 @@
+# Generated from embeddedqwindow.pro.
+
+cmake_minimum_required(VERSION 3.14)
+project(embeddedqwindow LANGUAGES CXX)
+
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples/macextras/embeddedqwindow")
+
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
+find_package(Qt6 COMPONENTS Widgets)
+find_package(Qt6 COMPONENTS MacExtras)
+
+add_qt_gui_executable(embeddedqwindow
+ main.mm
+ window.cpp window.h
+)
+target_link_libraries(embeddedqwindow PRIVATE
+ Qt::CorePrivate
+ Qt::GuiPrivate
+ Qt::WidgetsPrivate
+)
+
+target_link_libraries(embeddedqwindow PUBLIC
+ "-framework Cocoa"
+ Qt::Core
+ Qt::Gui
+ Qt::MacExtras
+ Qt::Widgets
+)
+
+install(TARGETS embeddedqwindow
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+ LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
+)
diff --git a/examples/macextras/macfunctions/CMakeLists.txt b/examples/macextras/macfunctions/CMakeLists.txt
new file mode 100644
index 0000000..d3d6e28
--- /dev/null
+++ b/examples/macextras/macfunctions/CMakeLists.txt
@@ -0,0 +1,50 @@
+# Generated from macfunctions.pro.
+
+cmake_minimum_required(VERSION 3.14)
+project(macfunctions LANGUAGES CXX)
+
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples/macextras/macfunctions")
+
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
+find_package(Qt6 COMPONENTS Widgets)
+find_package(Qt6 COMPONENTS MacExtras)
+
+add_qt_gui_executable(macfunctions
+ main.cpp
+)
+target_include_directories(macfunctions PUBLIC
+ .
+)
+
+target_link_libraries(macfunctions PUBLIC
+ Qt::Core
+ Qt::Gui
+ Qt::MacExtras
+ Qt::Widgets
+)
+
+
+# Resources:
+set(macfunctions_resource_files
+ "qtlogo.png"
+)
+
+qt6_add_resources(macfunctions "macfunctions"
+ PREFIX
+ "/"
+ FILES
+ ${macfunctions_resource_files}
+)
+
+install(TARGETS macfunctions
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+ LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
+)
diff --git a/examples/macextras/macpasteboardmime/CMakeLists.txt b/examples/macextras/macpasteboardmime/CMakeLists.txt
new file mode 100644
index 0000000..424cb80
--- /dev/null
+++ b/examples/macextras/macpasteboardmime/CMakeLists.txt
@@ -0,0 +1,33 @@
+# Generated from macpasteboardmime.pro.
+
+cmake_minimum_required(VERSION 3.14)
+project(macpasteboardmime LANGUAGES CXX)
+
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples/macextras/macpasteboardmime")
+
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
+find_package(Qt6 COMPONENTS MacExtras)
+find_package(Qt6 COMPONENTS Widgets)
+
+add_qt_gui_executable(macpasteboardmime
+ main.cpp
+)
+target_link_libraries(macpasteboardmime PUBLIC
+ Qt::Core
+ Qt::Gui
+ Qt::MacExtras
+ Qt::Widgets
+)
+
+install(TARGETS macpasteboardmime
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+ LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
+)
diff --git a/examples/macextras/mactoolbar/CMakeLists.txt b/examples/macextras/mactoolbar/CMakeLists.txt
new file mode 100644
index 0000000..9054940
--- /dev/null
+++ b/examples/macextras/mactoolbar/CMakeLists.txt
@@ -0,0 +1,46 @@
+# Generated from mactoolbar.pro.
+
+cmake_minimum_required(VERSION 3.14)
+project(mactoolbar LANGUAGES CXX)
+
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples/macextras/mactoolbar")
+
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
+find_package(Qt6 COMPONENTS MacExtras)
+
+add_qt_gui_executable(mactoolbar
+ main.cpp
+ rasterwindow.cpp rasterwindow.h
+ toolbarcontrollerwindow.cpp toolbarcontrollerwindow.h
+)
+target_link_libraries(mactoolbar PUBLIC
+ Qt::Core
+ Qt::Gui
+ Qt::MacExtras
+)
+
+
+# Resources:
+set(mactoolbar_resource_files
+ "qtlogo.png"
+)
+
+qt6_add_resources(mactoolbar "mactoolbar"
+ PREFIX
+ "/"
+ FILES
+ ${mactoolbar_resource_files}
+)
+
+install(TARGETS mactoolbar
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+ LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
+)
diff --git a/examples/macextras/mactoolbar/rasterwindow.h b/examples/macextras/mactoolbar/rasterwindow.h
index 5465344..c65a2b2 100644
--- a/examples/macextras/mactoolbar/rasterwindow.h
+++ b/examples/macextras/mactoolbar/rasterwindow.h
@@ -48,6 +48,9 @@
**
****************************************************************************/
+#ifndef RASTERWINDOW_H
+#define RASTERWINDOW_H
+
#include <QtGui>
class RasterWindow : public QWindow
@@ -66,4 +69,6 @@ protected:
private:
QBackingStore *m_backingStore;
QString m_text;
-}; \ No newline at end of file
+};
+
+#endif // RASTERWINDOW_H