Use add_compile_definitions instead of add_definitions

add_compile_definitions allows having the generator expressions as
the items in the definition list. add_definitions do not support pure
$<...> without the prescending macro name with the assignment.

Pick-to: 6.5 6.7 6.8
Change-Id: I1e79f1cf395b62b1e481eb0f3c74f93c61f06381
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This commit is contained in:
Alexey Edelev 2024-07-02 18:06:29 +02:00
parent ff391b5c17
commit 032fdcbcc0
3 changed files with 3 additions and 3 deletions

View File

@ -20,7 +20,7 @@ include_directories(
${Qt6Test_INCLUDE_DIRS}
)
add_definitions(
add_compile_definitions(
${Qt6Gui_DEFINITIONS}
${Qt6Test_DEFINITIONS}
)

View File

@ -20,7 +20,7 @@ include_directories(
${Qt6Test_INCLUDE_DIRS}
)
add_definitions(
add_compile_definitions(
${Qt6Widgets_DEFINITIONS}
${Qt6Test_DEFINITIONS}
)

View File

@ -120,7 +120,7 @@ if(TARGET Qt::Gui)
endif()
# Ensure uniform location info between release and debug builds
add_definitions(-DQT_MESSAGELOGCONTEXT)
add_compile_definitions(QT_MESSAGELOGCONTEXT)
foreach(subprogram IN LISTS subprograms)
add_subdirectory(${subprogram})