build: Avoid mixing add_definitions() with find_package()

master
Vlad Zahorodnii 2 years ago
parent a5db2e732b
commit fe86eea311

@ -67,22 +67,6 @@ if (NOT Qt${QT_MAJOR_VERSION}Test_FOUND)
set(BUILD_TESTING OFF CACHE BOOL "Build the testing tree.")
endif()
add_definitions(
-DQT_DISABLE_DEPRECATED_BEFORE=0
-DQT_NO_KEYWORDS
-DQT_USE_QSTRINGBUILDER
-DQT_NO_URL_CAST_FROM_STRING
-DQT_NO_CAST_TO_ASCII
-DQT_NO_FOREACH
)
# Prevent EGL headers from including platform headers, in particular Xlib.h.
add_definitions(-DMESA_EGL_NO_X11_HEADERS)
add_definitions(-DEGL_NO_X11)
add_definitions(-DEGL_NO_PLATFORM_SPECIFIC_TYPES)
# required frameworks by Core
find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS
Auth
@ -446,6 +430,20 @@ if (COMPILER_UNUSED_PARAMETER_SUPPORTED)
add_compile_options(-Wno-unused-parameter)
endif()
add_definitions(
-DQT_DISABLE_DEPRECATED_BEFORE=0
-DQT_NO_KEYWORDS
-DQT_USE_QSTRINGBUILDER
-DQT_NO_URL_CAST_FROM_STRING
-DQT_NO_CAST_TO_ASCII
-DQT_NO_FOREACH
# Prevent EGL headers from including platform headers, in particular Xlib.h.
-DMESA_EGL_NO_X11_HEADERS
-DEGL_NO_X11
-DEGL_NO_PLATFORM_SPECIFIC_TYPES
)
if (KF5DocTools_FOUND)
add_subdirectory(doc)
endif()

Loading…
Cancel
Save