Add private define _USE_MATH_DEFINES on Windows for every module
It's needed when building QtQml on Windows, otherwise compilation fails. Add it as a private define for every module being built, as it is done in qt_module.prf. Change-Id: I1e322d1da15adea8b3f037a722b3260a552dfb62 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
This commit is contained in:
parent
962ee4ea37
commit
5715ef13d2
@ -1057,6 +1057,12 @@ function(add_qt_module target)
|
||||
DISABLE_AUTOGEN_TOOLS ${arg_DISABLE_AUTOGEN_TOOLS}
|
||||
)
|
||||
|
||||
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("${target}" PRIVATE _USE_MATH_DEFINES)
|
||||
endif()
|
||||
|
||||
set(configureFile "${CMAKE_CURRENT_SOURCE_DIR}/configure.cmake")
|
||||
if(EXISTS "${configureFile}")
|
||||
qt_feature_module_begin(
|
||||
|
Loading…
x
Reference in New Issue
Block a user