OlivierLDff / QtIosCMake

📱 Deploy Qt Application for iOS with a single macro when using CMake.
BSD 3-Clause "New" or "Revised" License
58 stars 15 forks source link

At least cmake + Qt 5.15 works fine without QT_EXTRA_LIBS #10

Closed Dushistov closed 4 years ago

Dushistov commented 4 years ago

I made clean build of my application with this "fix" and it compiles and run on real iOS device just fine.

fix #9

OlivierLDff commented 4 years ago

I approve the fact we need to move to Qt 5.15. Can you add a note in Readme.md for users using version other than 5.15.

If you are using Qt version lower than 5.15 you might need to add some required link flags by hand if you have undefined symbols. For example:

target_link_libraries(MyApp PUBLIC "-framework Foundation -framework AVFoundation -framework SystemConfiguration -framework AssetsLibrary -framework OpenGLES \
     -framework CoreText -framework QuartzCore -framework CoreGraphics -framework ImageIO -framework Security -framework UIKit -framework WebKit \
    -framework CoreBluetooth -framework MobileCoreServices -framework QuickLook -framework AudioToolbox -framework CoreLocation \
    -framework Accelerate -framework CoreMedia -framework CoreVideo -framework MediaToolbox -framework MediaPlayer -framework GameController
    -framework CoreMotion -framework StoreKit -weak_framework Metal -lz")
Dushistov commented 4 years ago

Can you add a note in Readme.md for users using version other than 5.15.

Done.

OlivierLDff commented 4 years ago

Perfect thank you!

OlivierLDff commented 4 years ago

Github didn't seem to like the indentation before ```. I edited that. I also added changed to target_link_libraries i think it's more elegant. User shouldn't user internal variable of the function as part of the API.

Dushistov commented 4 years ago

@OlivierLDff

I also added changed to target_link_libraries i think it's more elegant.

I think the opposite :) The QT_EXTRA_LIBS make possible to distinguish between "this is my dependencies" and this is "Qt dependencies'. But this is not important for me, because of I use 5.15 anyway.

OlivierLDff commented 4 years ago

Yes i see what you mean, but i find it to "hacky" to set QT_EXTRA_LIBS before calling the function. Anyway at the end the script is calling target_link_libraries, so better make it clear.