diff options
author | Simon Hausmann <simon.hausmann@qt.io> | 2019-06-06 15:09:40 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@qt.io> | 2019-06-06 14:10:26 +0000 |
commit | abe12f600b1f626c9d228ad5234c14784e7845f1 (patch) | |
tree | 408535fc609ab0dc81d8a6ab90d9dd8913bbd35f /cmake/QtInternalTargets.cmake | |
parent | e7d1ec61e39da682fb4942af9a9bf74a9dd5913c (diff) |
Simplify per-module option handling
Move flags/options that we use for modules from add_module to the new
platform module target.
Change-Id: I89e414690336dcd37253432fe5116226d1c8dd82
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'cmake/QtInternalTargets.cmake')
-rw-r--r-- | cmake/QtInternalTargets.cmake | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/cmake/QtInternalTargets.cmake b/cmake/QtInternalTargets.cmake index 832e5d21b4..7ca78fbbff 100644 --- a/cmake/QtInternalTargets.cmake +++ b/cmake/QtInternalTargets.cmake @@ -67,3 +67,17 @@ if(WARNINGS_ARE_ERRORS) qt_internal_set_warnings_are_errors_flags(PlatformPluginInternal) qt_internal_set_warnings_are_errors_flags(PlatformToolInternal) endif() +if(WIN32) + # Needed for M_PI define. Same as mkspecs/features/qt_module.prf. + # It's set for every module being built, but it's not propagated to user apps. + target_compile_definitions(PlatformModuleInternal INTERFACE _USE_MATH_DEFINES) +endif() +if(FEATURE_largefile) + target_compile_definitions(PlatformModuleInternal INTERFACE "_LARGEFILE64_SOURCE;_LARGEFILE_SOURCE") +endif() + +# We can't use the gold linker on android with the NDK, which is the default +# linker. To build our own target we will use the lld linker. +if (ANDROID) + target_link_options(PlatformModuleInternal INTERFACE -fuse-ld=lld) +endif() |