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/qpa | |
parent | 6732fa3a291e77acad3ab6ba829d1026462dc139 (diff) | |
download | qtbase-efa9998521cb061051fe8b75d0df3206d0b32ec5.tar.gz |
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/qpa')
-rw-r--r-- | examples/qpa/qrasterwindow/CMakeLists.txt | 3 | ||||
-rw-r--r-- | examples/qpa/windows/CMakeLists.txt | 1 |
2 files changed, 3 insertions, 1 deletions
diff --git a/examples/qpa/qrasterwindow/CMakeLists.txt b/examples/qpa/qrasterwindow/CMakeLists.txt index f718796eb9..3baff1ed61 100644 --- a/examples/qpa/qrasterwindow/CMakeLists.txt +++ b/examples/qpa/qrasterwindow/CMakeLists.txt @@ -13,7 +13,7 @@ set(CMAKE_AUTOUIC ON) set(INSTALL_EXAMPLEDIR "examples") -add_qt_gui_executable(qrasterwindow WIN32 MACOSX_BUNDLE +add_qt_gui_executable(qrasterwindow main.cpp ) target_link_libraries(qrasterwindow PUBLIC Qt::Gui) # special case: add @@ -21,4 +21,5 @@ target_link_libraries(qrasterwindow PUBLIC Qt::Gui) # special case: add install(TARGETS qrasterwindow RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" + LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}" ) diff --git a/examples/qpa/windows/CMakeLists.txt b/examples/qpa/windows/CMakeLists.txt index 2bd7b6fd85..afd1b57615 100644 --- a/examples/qpa/windows/CMakeLists.txt +++ b/examples/qpa/windows/CMakeLists.txt @@ -30,4 +30,5 @@ target_link_libraries(windows PUBLIC install(TARGETS windows RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" + LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}" ) |