diff options
author | Simon Hausmann <simon.hausmann@qt.io> | 2019-06-12 10:21:40 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@qt.io> | 2019-06-12 14:19:53 +0000 |
commit | efa9998521cb061051fe8b75d0df3206d0b32ec5 (patch) | |
tree | 814ad216d5360cea3397a22ed1d649821d76fb17 /examples/widgets/animation | |
parent | 6732fa3a291e77acad3ab6ba829d1026462dc139 (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/animation')
6 files changed, 12 insertions, 6 deletions
diff --git a/examples/widgets/animation/animatedtiles/CMakeLists.txt b/examples/widgets/animation/animatedtiles/CMakeLists.txt index e3fa88aebb..ea48cf56a3 100644 --- a/examples/widgets/animation/animatedtiles/CMakeLists.txt +++ b/examples/widgets/animation/animatedtiles/CMakeLists.txt @@ -13,7 +13,7 @@ set(INSTALL_EXAMPLEDIR "examples") find_package(Qt5 COMPONENTS Widgets) -add_qt_gui_executable(animatedtiles WIN32 MACOSX_BUNDLE +add_qt_gui_executable(animatedtiles animatedtiles.qrc main.cpp ) @@ -24,4 +24,5 @@ target_link_libraries(animatedtiles PUBLIC install(TARGETS animatedtiles RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" + LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}" ) diff --git a/examples/widgets/animation/easing/CMakeLists.txt b/examples/widgets/animation/easing/CMakeLists.txt index 441b27b0c4..840e4e59ab 100644 --- a/examples/widgets/animation/easing/CMakeLists.txt +++ b/examples/widgets/animation/easing/CMakeLists.txt @@ -13,7 +13,7 @@ set(INSTALL_EXAMPLEDIR "examples") find_package(Qt5 COMPONENTS Widgets) -add_qt_gui_executable(easing WIN32 MACOSX_BUNDLE +add_qt_gui_executable(easing animation.h easing.qrc form.ui @@ -27,4 +27,5 @@ target_link_libraries(easing PUBLIC install(TARGETS easing RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" + LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}" ) diff --git a/examples/widgets/animation/moveblocks/CMakeLists.txt b/examples/widgets/animation/moveblocks/CMakeLists.txt index 971bf2e7e5..6f8aa9ceff 100644 --- a/examples/widgets/animation/moveblocks/CMakeLists.txt +++ b/examples/widgets/animation/moveblocks/CMakeLists.txt @@ -13,7 +13,7 @@ set(INSTALL_EXAMPLEDIR "examples") find_package(Qt5 COMPONENTS Widgets) -add_qt_gui_executable(moveblocks WIN32 MACOSX_BUNDLE +add_qt_gui_executable(moveblocks main.cpp ) target_link_libraries(moveblocks PUBLIC @@ -23,4 +23,5 @@ target_link_libraries(moveblocks PUBLIC install(TARGETS moveblocks RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" + LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}" ) diff --git a/examples/widgets/animation/states/CMakeLists.txt b/examples/widgets/animation/states/CMakeLists.txt index bd353422d2..5974f28de8 100644 --- a/examples/widgets/animation/states/CMakeLists.txt +++ b/examples/widgets/animation/states/CMakeLists.txt @@ -13,7 +13,7 @@ set(INSTALL_EXAMPLEDIR "examples") find_package(Qt5 COMPONENTS Widgets) -add_qt_gui_executable(states WIN32 MACOSX_BUNDLE +add_qt_gui_executable(states main.cpp states.qrc ) @@ -24,4 +24,5 @@ target_link_libraries(states PUBLIC install(TARGETS states RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" + LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}" ) diff --git a/examples/widgets/animation/stickman/CMakeLists.txt b/examples/widgets/animation/stickman/CMakeLists.txt index 90bc09e5d7..62a35ed796 100644 --- a/examples/widgets/animation/stickman/CMakeLists.txt +++ b/examples/widgets/animation/stickman/CMakeLists.txt @@ -13,7 +13,7 @@ set(INSTALL_EXAMPLEDIR "examples") find_package(Qt5 COMPONENTS Widgets) -add_qt_gui_executable(stickman WIN32 MACOSX_BUNDLE +add_qt_gui_executable(stickman animation.cpp animation.h graphicsview.cpp graphicsview.h lifecycle.cpp lifecycle.h @@ -29,4 +29,5 @@ target_link_libraries(stickman PUBLIC install(TARGETS stickman RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" + LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}" ) diff --git a/examples/widgets/animation/sub-attaq/CMakeLists.txt b/examples/widgets/animation/sub-attaq/CMakeLists.txt index 883c1cd0c5..969a24c1da 100644 --- a/examples/widgets/animation/sub-attaq/CMakeLists.txt +++ b/examples/widgets/animation/sub-attaq/CMakeLists.txt @@ -14,7 +14,7 @@ set(INSTALL_EXAMPLEDIR "examples") find_package(Qt5 COMPONENTS Widgets) find_package(Qt5 COMPONENTS OpenGL) # special case -add_qt_gui_executable(sub-attaq WIN32 MACOSX_BUNDLE +add_qt_gui_executable(sub-attaq animationmanager.cpp animationmanager.h boat.cpp boat.h boat_p.h bomb.cpp bomb.h @@ -40,4 +40,5 @@ endif() install(TARGETS sub-attaq RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" + LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}" ) |