Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Qt CMake and iPhone simulator

Qt CMake and iPhone simulator

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
1 Posts 1 Posters 712 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    Reghu_Att
    wrote on last edited by
    #1

    Hello,
    I've been trying to develop a simple test app with Qt/QML and using CMake as my build tool (instead of qmake).
    When I use CMake to build and run the app for the MacOS environment everything works fine. When I use the same code to build using qmake the app works perfectly under MacOS and iPhone simulator.

    So currently I am stuck. Below is my CMakelists.txt:

    cmake_minimum_required(VERSION 3.1)
    
    project(TestFirebase1 LANGUAGES CXX)
    
    set(CMAKE_INCLUDE_CURRENT_DIR ON)
    set(CMAKE_AUTOMOC ON)
    set(CMAKE_AUTORCC ON)
    set(CMAKE_CXX_STANDARD 11)
    set(CMAKE_CXX_STANDARD_REQUIRED ON)
    set(CMAKE_MACOSX_BUNDLE ON)
    
    #iPhone simulator settings
    set(CMAKE_OSX_SYSROOT /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk)
    #set(CMAKE_OSX_ARCHITECTURES $(ARCHS_STANDARD_32_BIT))
    
    
    #set(CMAKE_XCODE_EFFECTIVE_PLATFORMS "-iphonesimulator")
    #========================
    
    find_package(Qt5 COMPONENTS Core Quick REQUIRED)
    
    set(project_headers
        backend.h)
    
    set(project_sources
        main.cpp
        backend.cpp)
    
    add_executable(${PROJECT_NAME} ${project_headers} ${project_sources} "qml.qrc")
    target_compile_definitions(${PROJECT_NAME} PRIVATE $<$<OR:$<CONFIG:Debug>,$<CONFIG:RelWithDebInfo>>:QT_QML_DEBUG>)
    target_link_libraries(${PROJECT_NAME} PRIVATE Qt5::Core Qt5::Quick)
    set_target_properties(${PROJECT_NAME} PROPERTIES
        MACOSX_BUNDLE_BUNDLE_NAME $(PROJECT_NAME))
    

    The code compiles under Xcode. But when it tries to run it produces a "The bundle identifier of the application could not be determined." error.

    Is there something that I need to add? Is there a simple Qt + CMake + iPhone simulator example that I can follow?

    Thank you.

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved