Xcode fails builds after adding multimedia in CMakeLists.txt
Solved
Mobile and Embedded
-
Hi, I am new to building and deploying a qt app to iOS Simulator and I get a build error when I try to add multimedia in the CMakeLists.txt. I guess it would be the same for networkauth. I will attach an image of the build errors in Xcode but they are just linking errors
Here is my CMakeLists.txt
cmake_minimum_required(VERSION 3.16) project(ios2 VERSION 0.1 LANGUAGES CXX) set(CMAKE_CXX_STANDARD_REQUIRED ON) set(CMAKE_OSX_DEPLOYMENT_TARGET "13.0") find_package(Qt6 6.5 REQUIRED COMPONENTS Quick Multimedia) qt_standard_project_setup(REQUIRES 6.5) qt_add_executable(appios2 main.cpp ) qt_add_qml_module(appios2 URI ios2 VERSION 1.0 QML_FILES Main.qml ) # Qt for iOS sets MACOSX_BUNDLE_GUI_IDENTIFIER automatically since Qt 6.1. # If you are developing for iOS or macOS you should consider setting an # explicit, fixed bundle identifier manually though. set_target_properties(appios2 PROPERTIES # MACOSX_BUNDLE_GUI_IDENTIFIER com.example.appios2 MACOSX_BUNDLE_BUNDLE_VERSION ${PROJECT_VERSION} MACOSX_BUNDLE_SHORT_VERSION_STRING ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR} MACOSX_BUNDLE TRUE WIN32_EXECUTABLE TRUE ) target_link_libraries(appios2 PRIVATE Qt6::Quick PRIVATE Qt6::Multimedia ) include(GNUInstallDirs) install(TARGETS appios2 BUNDLE DESTINATION . LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} )
It built and deployed when Multimedia is not added as a library
-
You are likely missing some dependencies. See: https://doc.qt.io/qt-6/qtmultimedia-apple.html
-
-
I am now facing a problem with NetworkAuth and WebAssembly. I opened another request but got left behind
https://forum.qt.io/topic/159704/how-to-install-qtnetworkauth-for-webassemby/8?_=1732390034893