summaryrefslogtreecommitdiffstats
path: root/examples/widgets/tutorials/modelview
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@qt.io>2019-06-12 10:21:40 +0200
committerSimon Hausmann <simon.hausmann@qt.io>2019-06-12 14:19:53 +0000
commitefa9998521cb061051fe8b75d0df3206d0b32ec5 (patch)
tree814ad216d5360cea3397a22ed1d649821d76fb17 /examples/widgets/tutorials/modelview
parent6732fa3a291e77acad3ab6ba829d1026462dc139 (diff)
Fix compiling of examples on Android
* Simplify add_qt_gui_executable() to not require WIN32/MACOSX_BUNDLE but provide it implicitly. It's redundant :) * When on Android, build a module (shared library), just like qmake. This requires an additional library destination in the install() call, but that's ignored on other platforms. * Fix typos in the android deployment generation settings function * Use the correct cache variable to determine whether we're inside a Qt build or not. Right now this only works inside Qt builds anyway as QtPlatformAndroid.cmake is not publically accessible. Change-Id: If1c763c31a7a83d0e0d854362ba7901657f63eb5 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Qt CMake Build Bot
Diffstat (limited to 'examples/widgets/tutorials/modelview')
-rw-r--r--examples/widgets/tutorials/modelview/1_readonly/CMakeLists.txt3
-rw-r--r--examples/widgets/tutorials/modelview/2_formatting/CMakeLists.txt3
-rw-r--r--examples/widgets/tutorials/modelview/3_changingmodel/CMakeLists.txt3
-rw-r--r--examples/widgets/tutorials/modelview/4_headers/CMakeLists.txt3
-rw-r--r--examples/widgets/tutorials/modelview/5_edit/CMakeLists.txt3
-rw-r--r--examples/widgets/tutorials/modelview/6_treeview/CMakeLists.txt3
-rw-r--r--examples/widgets/tutorials/modelview/7_selections/CMakeLists.txt3
7 files changed, 14 insertions, 7 deletions
diff --git a/examples/widgets/tutorials/modelview/1_readonly/CMakeLists.txt b/examples/widgets/tutorials/modelview/1_readonly/CMakeLists.txt
index ee859409e5..001f6d8070 100644
--- a/examples/widgets/tutorials/modelview/1_readonly/CMakeLists.txt
+++ b/examples/widgets/tutorials/modelview/1_readonly/CMakeLists.txt
@@ -13,7 +13,7 @@ set(INSTALL_EXAMPLEDIR "examples")
find_package(Qt5 COMPONENTS Widgets)
-add_qt_gui_executable(mv_readonly WIN32 MACOSX_BUNDLE
+add_qt_gui_executable(mv_readonly
main.cpp
mymodel.cpp mymodel.h
)
@@ -24,4 +24,5 @@ target_link_libraries(mv_readonly PUBLIC
install(TARGETS mv_readonly
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+ LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
)
diff --git a/examples/widgets/tutorials/modelview/2_formatting/CMakeLists.txt b/examples/widgets/tutorials/modelview/2_formatting/CMakeLists.txt
index 75c5f431c1..6b9d5732cf 100644
--- a/examples/widgets/tutorials/modelview/2_formatting/CMakeLists.txt
+++ b/examples/widgets/tutorials/modelview/2_formatting/CMakeLists.txt
@@ -13,7 +13,7 @@ set(INSTALL_EXAMPLEDIR "examples")
find_package(Qt5 COMPONENTS Widgets)
-add_qt_gui_executable(mv_formatting WIN32 MACOSX_BUNDLE
+add_qt_gui_executable(mv_formatting
main.cpp
mymodel.cpp mymodel.h
)
@@ -24,4 +24,5 @@ target_link_libraries(mv_formatting PUBLIC
install(TARGETS mv_formatting
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+ LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
)
diff --git a/examples/widgets/tutorials/modelview/3_changingmodel/CMakeLists.txt b/examples/widgets/tutorials/modelview/3_changingmodel/CMakeLists.txt
index 60d240f170..52c4ddfc38 100644
--- a/examples/widgets/tutorials/modelview/3_changingmodel/CMakeLists.txt
+++ b/examples/widgets/tutorials/modelview/3_changingmodel/CMakeLists.txt
@@ -13,7 +13,7 @@ set(INSTALL_EXAMPLEDIR "examples")
find_package(Qt5 COMPONENTS Widgets)
-add_qt_gui_executable(mv_changingmodel WIN32 MACOSX_BUNDLE
+add_qt_gui_executable(mv_changingmodel
main.cpp
mymodel.cpp mymodel.h
)
@@ -24,4 +24,5 @@ target_link_libraries(mv_changingmodel PUBLIC
install(TARGETS mv_changingmodel
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+ LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
)
diff --git a/examples/widgets/tutorials/modelview/4_headers/CMakeLists.txt b/examples/widgets/tutorials/modelview/4_headers/CMakeLists.txt
index b719caf8ec..b248a47f57 100644
--- a/examples/widgets/tutorials/modelview/4_headers/CMakeLists.txt
+++ b/examples/widgets/tutorials/modelview/4_headers/CMakeLists.txt
@@ -13,7 +13,7 @@ set(INSTALL_EXAMPLEDIR "examples")
find_package(Qt5 COMPONENTS Widgets)
-add_qt_gui_executable(mv_headers WIN32 MACOSX_BUNDLE
+add_qt_gui_executable(mv_headers
main.cpp
mymodel.cpp mymodel.h
)
@@ -24,4 +24,5 @@ target_link_libraries(mv_headers PUBLIC
install(TARGETS mv_headers
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+ LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
)
diff --git a/examples/widgets/tutorials/modelview/5_edit/CMakeLists.txt b/examples/widgets/tutorials/modelview/5_edit/CMakeLists.txt
index 67c34521f4..d40e8674d8 100644
--- a/examples/widgets/tutorials/modelview/5_edit/CMakeLists.txt
+++ b/examples/widgets/tutorials/modelview/5_edit/CMakeLists.txt
@@ -13,7 +13,7 @@ set(INSTALL_EXAMPLEDIR "examples")
find_package(Qt5 COMPONENTS Widgets)
-add_qt_gui_executable(mv_edit WIN32 MACOSX_BUNDLE
+add_qt_gui_executable(mv_edit
main.cpp
mainwindow.cpp mainwindow.h
mymodel.cpp mymodel.h
@@ -25,4 +25,5 @@ target_link_libraries(mv_edit PUBLIC
install(TARGETS mv_edit
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+ LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
)
diff --git a/examples/widgets/tutorials/modelview/6_treeview/CMakeLists.txt b/examples/widgets/tutorials/modelview/6_treeview/CMakeLists.txt
index 2feb364569..592f7bb528 100644
--- a/examples/widgets/tutorials/modelview/6_treeview/CMakeLists.txt
+++ b/examples/widgets/tutorials/modelview/6_treeview/CMakeLists.txt
@@ -13,7 +13,7 @@ set(INSTALL_EXAMPLEDIR "examples")
find_package(Qt5 COMPONENTS Widgets)
-add_qt_gui_executable(mv_tree WIN32 MACOSX_BUNDLE
+add_qt_gui_executable(mv_tree
main.cpp
mainwindow.cpp mainwindow.h
)
@@ -24,4 +24,5 @@ target_link_libraries(mv_tree PUBLIC
install(TARGETS mv_tree
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+ LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
)
diff --git a/examples/widgets/tutorials/modelview/7_selections/CMakeLists.txt b/examples/widgets/tutorials/modelview/7_selections/CMakeLists.txt
index a974313bd7..65b58dfa74 100644
--- a/examples/widgets/tutorials/modelview/7_selections/CMakeLists.txt
+++ b/examples/widgets/tutorials/modelview/7_selections/CMakeLists.txt
@@ -13,7 +13,7 @@ set(INSTALL_EXAMPLEDIR "examples")
find_package(Qt5 COMPONENTS Widgets)
-add_qt_gui_executable(mv_selections WIN32 MACOSX_BUNDLE
+add_qt_gui_executable(mv_selections
main.cpp
mainwindow.cpp mainwindow.h
)
@@ -24,4 +24,5 @@ target_link_libraries(mv_selections PUBLIC
install(TARGETS mv_selections
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+ LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
)