CMake: Ensure that the EXECUTABLE_COMPILE_FLAGS list exists
This is needed to ensure that list(REMOVE_DUPLICATES) can work. Change-Id: I3d992aa244fcdfbda7e3b48ce416e0ba5ffcde96 Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
This commit is contained in:
parent
c0e826e244
commit
3a7025ffac
@ -163,6 +163,8 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME})
|
||||
set(_Qt5$${CMAKE_MODULE_NAME}_FIND_VERSION_EXACT EXACT)
|
||||
endif()
|
||||
|
||||
set(Qt5$${CMAKE_MODULE_NAME}_EXECUTABLE_COMPILE_FLAGS \"\")
|
||||
|
||||
foreach(_module_dep ${_Qt5$${CMAKE_MODULE_NAME}_MODULE_DEPENDENCIES})
|
||||
if (NOT Qt5${_module_dep}_FOUND)
|
||||
find_package(Qt5${_module_dep}
|
||||
@ -188,9 +190,7 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME})
|
||||
list(REMOVE_DUPLICATES Qt5$${CMAKE_MODULE_NAME}_PRIVATE_INCLUDE_DIRS)
|
||||
list(REMOVE_DUPLICATES Qt5$${CMAKE_MODULE_NAME}_DEFINITIONS)
|
||||
list(REMOVE_DUPLICATES Qt5$${CMAKE_MODULE_NAME}_COMPILE_DEFINITIONS)
|
||||
if (Qt5$${CMAKE_MODULE_NAME}_EXECUTABLE_COMPILE_FLAGS)
|
||||
list(REMOVE_DUPLICATES Qt5$${CMAKE_MODULE_NAME}_EXECUTABLE_COMPILE_FLAGS)
|
||||
endif()
|
||||
list(REMOVE_DUPLICATES Qt5$${CMAKE_MODULE_NAME}_EXECUTABLE_COMPILE_FLAGS)
|
||||
|
||||
set(_Qt5$${CMAKE_MODULE_NAME}_LIB_DEPENDENCIES \"$${CMAKE_QT5_MODULE_DEPS}\")
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user