diff options
author | Kevin Funk <kevin.funk@kdab.com> | 2019-02-12 12:21:56 +0100 |
---|---|---|
committer | Kevin Funk <kevin.funk@kdab.com> | 2019-02-12 13:37:08 +0000 |
commit | 988162eaf8b2aeae61f820382021116bf4ee391d (patch) | |
tree | f2792622ac2ae52527d2801d1784be419f33be8f /src | |
parent | 05aeaed906cbec3654178d1438ae2ad361a35ddd (diff) |
cmake: Start to use ConfigExtra.cmake files
Enables the use of e.g. QT_NO_DEBUG in compiler flags, -fPIC, passing on of
QT_NAMESPACE, etc. pp.
Dropping a lot of custom code which handled adding imported targets for
the command-line tools (this is all being handled by CMake already).
It needs to be investigated if we need to resurrect
Qt5GuiConfigExtras.cmake.in in one way or the other.
Change-Id: I4fa141b68fddaad4f33e628c59d5d0b3a7b3a096
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src')
-rw-r--r-- | src/corelib/Qt5CoreConfigExtras.cmake.in | 177 | ||||
-rw-r--r-- | src/dbus/Qt5DBusConfigExtras.cmake.in | 33 | ||||
-rw-r--r-- | src/gui/Qt5GuiConfigExtras.cmake.in | 180 | ||||
-rw-r--r-- | src/testlib/Qt5TestConfigExtras.cmake.in | 6 | ||||
-rw-r--r-- | src/widgets/Qt5WidgetsConfigExtras.cmake.in | 19 |
5 files changed, 19 insertions, 396 deletions
diff --git a/src/corelib/Qt5CoreConfigExtras.cmake.in b/src/corelib/Qt5CoreConfigExtras.cmake.in index e0652fdcf9..3775fc64b9 100644 --- a/src/corelib/Qt5CoreConfigExtras.cmake.in +++ b/src/corelib/Qt5CoreConfigExtras.cmake.in @@ -1,75 +1,18 @@ - -if (NOT TARGET Qt5::qmake) - add_executable(Qt5::qmake IMPORTED) - -!!IF isEmpty(CMAKE_BIN_DIR_IS_ABSOLUTE) - set(imported_location \"${_qt5Core_install_prefix}/$${CMAKE_BIN_DIR}qmake$$CMAKE_BIN_SUFFIX\") -!!ELSE - set(imported_location \"$${CMAKE_BIN_DIR}qmake$$CMAKE_BIN_SUFFIX\") -!!ENDIF - _qt5_Core_check_file_exists(${imported_location}) - - set_target_properties(Qt5::qmake PROPERTIES - IMPORTED_LOCATION ${imported_location} - ) -endif() - -if (NOT TARGET Qt5::moc) - add_executable(Qt5::moc IMPORTED) - -!!IF isEmpty(CMAKE_BIN_DIR_IS_ABSOLUTE) - set(imported_location \"${_qt5Core_install_prefix}/$${CMAKE_BIN_DIR}moc$$CMAKE_BIN_SUFFIX\") -!!ELSE - set(imported_location \"$${CMAKE_BIN_DIR}moc$$CMAKE_BIN_SUFFIX\") -!!ENDIF - _qt5_Core_check_file_exists(${imported_location}) - - set_target_properties(Qt5::moc PROPERTIES - IMPORTED_LOCATION ${imported_location} - ) - # For CMake automoc feature - get_target_property(QT_MOC_EXECUTABLE Qt5::moc LOCATION) -endif() - -if (NOT TARGET Qt5::rcc) - add_executable(Qt5::rcc IMPORTED) - -!!IF isEmpty(CMAKE_BIN_DIR_IS_ABSOLUTE) - set(imported_location \"${_qt5Core_install_prefix}/$${CMAKE_BIN_DIR}rcc$$CMAKE_BIN_SUFFIX\") -!!ELSE - set(imported_location \"$${CMAKE_BIN_DIR}rcc$$CMAKE_BIN_SUFFIX\") -!!ENDIF - _qt5_Core_check_file_exists(${imported_location}) - - set_target_properties(Qt5::rcc PROPERTIES - IMPORTED_LOCATION ${imported_location} - ) -endif() - -set(Qt5Core_QMAKE_EXECUTABLE Qt5::qmake) -set(Qt5Core_MOC_EXECUTABLE Qt5::moc) -set(Qt5Core_RCC_EXECUTABLE Qt5::rcc) - -set_property(TARGET Qt5::Core PROPERTY INTERFACE_QT_MAJOR_VERSION 5) -set_property(TARGET Qt5::Core PROPERTY INTERFACE_QT_COORD_TYPE $$QT_COORD_TYPE) -set_property(TARGET Qt5::Core APPEND PROPERTY +set_property(TARGET @QT_CMAKE_EXPORT_NAMESPACE@::Core PROPERTY INTERFACE_QT_MAJOR_VERSION @PROJECT_MAJOR_VERSION@) +set_property(TARGET @QT_CMAKE_EXPORT_NAMESPACE@::Core PROPERTY INTERFACE_QT_COORD_TYPE $$QT_COORD_TYPE) +set_property(TARGET @QT_CMAKE_EXPORT_NAMESPACE@::Core APPEND PROPERTY COMPATIBLE_INTERFACE_STRING QT_MAJOR_VERSION QT_COORD_TYPE ) -include(\"${CMAKE_CURRENT_LIST_DIR}/Qt5CoreConfigExtrasMkspecDir.cmake\") +# include(\"${CMAKE_CURRENT_LIST_DIR}/Qt5CoreConfigExtrasMkspecDir.cmake\") +# +# foreach(_dir ${_qt5_corelib_extra_includes}) +# _qt5_Core_check_file_exists(${_dir}) +# endforeach() -foreach(_dir ${_qt5_corelib_extra_includes}) - _qt5_Core_check_file_exists(${_dir}) -endforeach() - -list(APPEND Qt5Core_INCLUDE_DIRS ${_qt5_corelib_extra_includes}) -set_property(TARGET Qt5::Core APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${_qt5_corelib_extra_includes}) -set(_qt5_corelib_extra_includes) - -# Targets using Qt need to use the POSITION_INDEPENDENT_CODE property. The -# Qt5_POSITION_INDEPENDENT_CODE variable is used in the # qt5_use_module -# macro to add it. -set(Qt5_POSITION_INDEPENDENT_CODE True) +# list(APPEND Qt5Core_INCLUDE_DIRS ${_qt5_corelib_extra_includes}) +# set_property(TARGET @QT_CMAKE_EXPORT_NAMESPACE@::Core APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${_qt5_corelib_extra_includes}) +# set(_qt5_corelib_extra_includes) # On x86 and x86-64 systems with ELF binaries (especially Linux), due to # a new optimization in GCC 5.x in combination with a recent version of @@ -78,96 +21,12 @@ set(Qt5_POSITION_INDEPENDENT_CODE True) # Applications now need to be compiled with the -fPIC option if the Qt option # \"reduce relocations\" is active. For backward compatibility only, Qt accepts # the use of -fPIE for GCC 4.x versions. -set_property(TARGET Qt5::Core APPEND PROPERTY INTERFACE_COMPILE_OPTIONS $$QMAKE_CXXFLAGS_APP) - -# TODO Qt6: Remove -set(Qt5Core_EXECUTABLE_COMPILE_FLAGS \"\") - -!!IF !isEmpty(QT_NAMESPACE) -list(APPEND Qt5Core_DEFINITIONS -DQT_NAMESPACE=$$QT_NAMESPACE) -list(APPEND Qt5Core_COMPILE_DEFINITIONS QT_NAMESPACE=$$QT_NAMESPACE) -set_property(TARGET Qt5::Core APPEND PROPERTY INTERFACE_COMPILE_DEFINITIONS QT_NAMESPACE=$$QT_NAMESPACE) -!!ENDIF - -!!IF !isEmpty(CMAKE_DISABLED_FEATURES) -set(Qt5_DISABLED_FEATURES - $$CMAKE_DISABLED_FEATURES -) -!!ENDIF - -set_property(TARGET Qt5::Core APPEND PROPERTY INTERFACE_COMPILE_DEFINITIONS $<$<NOT:$<CONFIG:Debug>>:QT_NO_DEBUG>) - -set_property(TARGET Qt5::Core PROPERTY INTERFACE_COMPILE_FEATURES cxx_decltype) - -!!IF qtConfig(reduce_exports) -set(QT_VISIBILITY_AVAILABLE \"True\") -!!ENDIF - -!!IF !isEmpty(QT_LIBINFIX) -set(QT_LIBINFIX \"$${QT_LIBINFIX}\") -!!ENDIF - -!!IF !isEmpty(CMAKE_WINDOWS_BUILD) -set(Qt5Core_QTMAIN_LIBRARIES Qt5::WinMain) - -if (NOT TARGET Qt5::WinMain) - add_library(Qt5::WinMain STATIC IMPORTED) - -!!IF !isEmpty(CMAKE_RELEASE_TYPE) - set_property(TARGET Qt5::WinMain APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE) -!!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE) - set(imported_location \"${_qt5Core_install_prefix}/$${CMAKE_LIB_DIR}$${CMAKE_WINMAIN_FILE_LOCATION_RELEASE}\") -!!ELSE - set(imported_location \"$${CMAKE_LIB_DIR}$${CMAKE_WINMAIN_FILE_LOCATION_RELEASE}\") -!!ENDIF - - set_target_properties(Qt5::WinMain PROPERTIES - IMPORTED_LOCATION_RELEASE ${imported_location} - ) -!!ENDIF - -!!IF !isEmpty(CMAKE_DEBUG_TYPE) - set_property(TARGET Qt5::WinMain APPEND PROPERTY IMPORTED_CONFIGURATIONS DEBUG) - -!!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE) - set(imported_location \"${_qt5Core_install_prefix}/$${CMAKE_LIB_DIR}$${CMAKE_WINMAIN_FILE_LOCATION_DEBUG}\") -!!ELSE - set(imported_location \"$${CMAKE_LIB_DIR}$${CMAKE_WINMAIN_FILE_LOCATION_DEBUG}\") -!!ENDIF - - set_target_properties(Qt5::WinMain PROPERTIES - IMPORTED_LOCATION_DEBUG ${imported_location} - ) -!!ENDIF - - if (NOT Qt5_NO_LINK_QTMAIN) - set(_isExe $<STREQUAL:$<TARGET_PROPERTY:TYPE>,EXECUTABLE>) - set(_isWin32 $<BOOL:$<TARGET_PROPERTY:WIN32_EXECUTABLE>>) - set(_isNotExcluded $<NOT:$<BOOL:$<TARGET_PROPERTY:Qt5_NO_LINK_QTMAIN>>>) - set(_isPolicyNEW $<TARGET_POLICY:CMP0020>) - get_target_property(_configs Qt5::Core IMPORTED_CONFIGURATIONS) - set_property(TARGET Qt5::Core APPEND PROPERTY - INTERFACE_LINK_LIBRARIES - $<$<AND:${_isExe},${_isWin32},${_isNotExcluded},${_isPolicyNEW}>:Qt5::WinMain> - ) - # For backward compatibility with CMake < 2.8.12 - foreach(_config ${_configs}) - set_property(TARGET Qt5::Core APPEND PROPERTY - IMPORTED_LINK_INTERFACE_LIBRARIES_${_config} - $<$<AND:${_isExe},${_isWin32},${_isNotExcluded},${_isPolicyNEW}>:Qt5::WinMain> - ) - endforeach() - unset(_configs) - unset(_isExe) - unset(_isWin32) - unset(_isNotExcluded) - unset(_isPolicyNEW) - endif() +if (CMAKE_CXX_COMPILER MATCHES "icc.*$" OR CMAKE_CXX_COMPILER_ID STREQUAL "GNU") + set_property(TARGET @QT_CMAKE_EXPORT_NAMESPACE@::Core APPEND PROPERTY INTERFACE_COMPILE_OPTIONS "-fPIC") endif() -!!ENDIF - -get_filename_component(_Qt5CoreConfigDir ${CMAKE_CURRENT_LIST_FILE} PATH) -set(_Qt5CTestMacros \"${_Qt5CoreConfigDir}/Qt5CTestMacros.cmake\") - -_qt5_Core_check_file_exists(${_Qt5CTestMacros}) +if (NOT "@QT_NAMESPACE@" STREQUAL "") + set_property(TARGET @QT_CMAKE_EXPORT_NAMESPACE@::Core APPEND PROPERTY INTERFACE_COMPILE_DEFINITIONS QT_NAMESPACE=@QT_NAMESPACE@) +endif() +set_property(TARGET @QT_CMAKE_EXPORT_NAMESPACE@::Core APPEND PROPERTY INTERFACE_COMPILE_DEFINITIONS $<$<NOT:$<CONFIG:Debug>>:QT_NO_DEBUG>) +set_property(TARGET @QT_CMAKE_EXPORT_NAMESPACE@::Core PROPERTY INTERFACE_COMPILE_FEATURES cxx_decltype) diff --git a/src/dbus/Qt5DBusConfigExtras.cmake.in b/src/dbus/Qt5DBusConfigExtras.cmake.in deleted file mode 100644 index 1d947159e2..0000000000 --- a/src/dbus/Qt5DBusConfigExtras.cmake.in +++ /dev/null @@ -1,33 +0,0 @@ - -if (NOT TARGET Qt5::qdbuscpp2xml) - add_executable(Qt5::qdbuscpp2xml IMPORTED) - -!!IF isEmpty(CMAKE_BIN_DIR_IS_ABSOLUTE) - set(imported_location \"${_qt5DBus_install_prefix}/$${CMAKE_BIN_DIR}qdbuscpp2xml$$CMAKE_BIN_SUFFIX\") -!!ELSE - set(imported_location \"$${CMAKE_BIN_DIR}qdbuscpp2xml$$CMAKE_BIN_SUFFIX\") -!!ENDIF - _qt5_DBus_check_file_exists(${imported_location}) - - set_target_properties(Qt5::qdbuscpp2xml PROPERTIES - IMPORTED_LOCATION ${imported_location} - ) -endif() - -if (NOT TARGET Qt5::qdbusxml2cpp) - add_executable(Qt5::qdbusxml2cpp IMPORTED) - -!!IF isEmpty(CMAKE_BIN_DIR_IS_ABSOLUTE) - set(imported_location \"${_qt5DBus_install_prefix}/$${CMAKE_BIN_DIR}qdbusxml2cpp$$CMAKE_BIN_SUFFIX\") -!!ELSE - set(imported_location \"$${CMAKE_BIN_DIR}qdbusxml2cpp$$CMAKE_BIN_SUFFIX\") -!!ENDIF - _qt5_DBus_check_file_exists(${imported_location}) - - set_target_properties(Qt5::qdbusxml2cpp PROPERTIES - IMPORTED_LOCATION ${imported_location} - ) -endif() - -set(Qt5DBus_QDBUSCPP2XML_EXECUTABLE Qt5::qdbuscpp2xml) -set(Qt5DBus_QDBUSXML2CPP_EXECUTABLE Qt5::qdbusxml2cpp) diff --git a/src/gui/Qt5GuiConfigExtras.cmake.in b/src/gui/Qt5GuiConfigExtras.cmake.in deleted file mode 100644 index 07869efd7d..0000000000 --- a/src/gui/Qt5GuiConfigExtras.cmake.in +++ /dev/null @@ -1,180 +0,0 @@ - -!!IF !isEmpty(CMAKE_ANGLE_EGL_DLL_RELEASE) - -!!IF isEmpty(CMAKE_INCLUDE_DIR_IS_ABSOLUTE) -set(Qt5Gui_EGL_INCLUDE_DIRS \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$$CMAKE_INCLUDE_DIR/QtANGLE\") -!!ELSE -set(Qt5Gui_EGL_INCLUDE_DIRS \"$$CMAKE_INCLUDE_DIR/QtANGLE\") -!!ENDIF - -_qt5_Gui_check_file_exists(${Qt5Gui_EGL_INCLUDE_DIRS}) - -list(APPEND Qt5Gui_INCLUDE_DIRS ${Qt5Gui_EGL_INCLUDE_DIRS}) -set_property(TARGET Qt5::Gui APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${Qt5Gui_EGL_INCLUDE_DIRS}) -set(Qt5Gui_OPENGL_INCLUDE_DIRS ${Qt5Gui_EGL_INCLUDE_DIRS}) - -macro(_populate_qt5gui_gl_target_properties TargetName Configuration LIB_LOCATION IMPLIB_LOCATION) - set_property(TARGET Qt5::${TargetName} APPEND PROPERTY IMPORTED_CONFIGURATIONS ${Configuration}) - -!!IF isEmpty(CMAKE_DLL_DIR_IS_ABSOLUTE) - set(imported_location \"${_qt5Gui_install_prefix}/$${CMAKE_DLL_DIR}${LIB_LOCATION}\") -!!ELSE - set(imported_location \"$${CMAKE_DLL_DIR}${LIB_LOCATION}\") -!!ENDIF - -!!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE) - set(imported_implib \"${_qt5Gui_install_prefix}/$${CMAKE_LIB_DIR}${IMPLIB_LOCATION}\") -!!ELSE - set(imported_implib \"$${CMAKE_LIB_DIR}${IMPLIB_LOCATION}\") -!!ENDIF - - set_target_properties(Qt5::${TargetName} PROPERTIES - \"IMPORTED_LOCATION_${Configuration}\" ${imported_location} - \"IMPORTED_IMPLIB_${Configuration}\" ${imported_implib} - ) -endmacro() - -add_library(Qt5::Gui_EGL SHARED IMPORTED) -_populate_qt5gui_gl_target_properties(Gui_EGL RELEASE $${CMAKE_ANGLE_EGL_DLL_RELEASE} $${CMAKE_ANGLE_EGL_IMPLIB_RELEASE}) -add_library(Qt5::Gui_GLESv2 SHARED IMPORTED) -_populate_qt5gui_gl_target_properties(Gui_GLESv2 RELEASE $${CMAKE_ANGLE_GLES2_DLL_RELEASE} $${CMAKE_ANGLE_GLES2_IMPLIB_RELEASE}) - -set_property(TARGET Qt5::Gui_EGL APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${Qt5Gui_EGL_INCLUDE_DIRS}) -set_property(TARGET Qt5::Gui_GLESv2 APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${Qt5Gui_OPENGL_INCLUDE_DIRS}) - -!!IF !isEmpty(CMAKE_DEBUG_TYPE) -_populate_qt5gui_gl_target_properties(Gui_EGL DEBUG $${CMAKE_ANGLE_EGL_DLL_DEBUG} $${CMAKE_ANGLE_EGL_IMPLIB_DEBUG}) -_populate_qt5gui_gl_target_properties(Gui_GLESv2 DEBUG $${CMAKE_ANGLE_GLES2_DLL_DEBUG} $${CMAKE_ANGLE_GLES2_IMPLIB_DEBUG}) -!!ENDIF - -set(Qt5Gui_EGL_LIBRARIES Qt5::Gui_EGL) -set(Qt5Gui_OPENGL_LIBRARIES Qt5::Gui_GLESv2) - -!!ELSE - -!!IF !isEmpty(CMAKE_GL_INCDIRS) - -set(_GL_INCDIRS $$CMAKE_GL_INCDIRS) -find_path(_qt5gui_OPENGL_INCLUDE_DIR $$CMAKE_GL_HEADER_NAME - PATHS ${_GL_INCDIRS} -) -if (NOT _qt5gui_OPENGL_INCLUDE_DIR) - message(FATAL_ERROR \"Failed to find \\\"$$CMAKE_GL_HEADER_NAME\\\" in \\\"${_GL_INCDIRS}\\\".\") -endif() -unset(_GL_INCDIRS) - -# Don\'t check for existence of the "_qt5gui_OPENGL_INCLUDE_DIR" because it is -# optional. - -list(APPEND Qt5Gui_INCLUDE_DIRS ${_qt5gui_OPENGL_INCLUDE_DIR}) -set_property(TARGET Qt5::Gui APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${_qt5gui_OPENGL_INCLUDE_DIR}) - -unset(_qt5gui_OPENGL_INCLUDE_DIR CACHE) - -!!ENDIF - -macro(_qt5gui_find_extra_libs Name Libs LibDir IncDirs) - set(Qt5Gui_${Name}_LIBRARIES) -!!IF !mac - set(Qt5Gui_${Name}_INCLUDE_DIRS ${IncDirs}) -!!ELSE - foreach(_dir ${IncDirs}) - if (EXISTS ${_dir}) - list(APPEND Qt5Gui_${Name}_INCLUDE_DIRS ${_dir}) - else() - find_path(_actual_dir ${_dir}) # Look in sdk directories - if (_actual_dir) - list(APPEND Qt5Gui_${Name}_INCLUDE_DIRS ${_actual_dir}) - endif() - unset(_actual_dir CACHE) - endif() - endforeach() -!!ENDIF - foreach(_lib ${Libs}) - string(REGEX REPLACE "[^_A-Za-z0-9]" "_" _cmake_lib_name ${_lib}) - if (NOT TARGET Qt5::Gui_${_cmake_lib_name} AND NOT _Qt5Gui_${_cmake_lib_name}_LIBRARY_DONE) - find_library(Qt5Gui_${_cmake_lib_name}_LIBRARY ${_lib} -!!IF !isEmpty(CROSS_COMPILE) - PATHS \"${LibDir}\" -!!IF !mac - NO_DEFAULT_PATH -!!ENDIF -!!ENDIF - ) -!!IF mac - set(Qt5Gui_${_cmake_lib_name}_LIBRARY "${Qt5Gui_${_cmake_lib_name}_LIBRARY}/${_lib}") - if (NOT EXISTS "${Qt5Gui_${_cmake_lib_name}_LIBRARY}") - set(Qt5Gui_${_cmake_lib_name}_LIBRARY) - endif() -!!ENDIF - if (NOT Qt5Gui_${_cmake_lib_name}_LIBRARY) - # The above find_library call doesn\'t work for finding - # libraries in Windows SDK paths outside of the proper - # environment, even if the libraries are present. In other - # cases it is OK for the libraries to not be found - # because they are optional dependencies of Qt5Gui, needed - # only if the qopengl.h header is used. - # We try to find the libraries in the first place because Qt may be - # compiled with another set of GL libraries (such as coming - # from ANGLE). The point of these find calls is to try to - # find the same binaries as Qt is compiled with (as they are - # in the interface of QtGui), so an effort is made to do so - # above with paths known to qmake. - set(_Qt5Gui_${_cmake_lib_name}_LIBRARY_DONE TRUE) - unset(Qt5Gui_${_cmake_lib_name}_LIBRARY CACHE) - else() - add_library(Qt5::Gui_${_cmake_lib_name} SHARED IMPORTED) - set_property(TARGET Qt5::Gui_${_cmake_lib_name} APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${Qt5Gui_${Name}_INCLUDE_DIRS}) - - set_property(TARGET Qt5::Gui_${_cmake_lib_name} APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE) - _qt5_Gui_check_file_exists(\"${Qt5Gui_${_cmake_lib_name}_LIBRARY}\") - set_property(TARGET Qt5::Gui_${_cmake_lib_name} PROPERTY IMPORTED_LOCATION_RELEASE \"${Qt5Gui_${_cmake_lib_name}_LIBRARY}\") - -!!IF !isEmpty(CMAKE_WINDOWS_BUILD) - set_property(TARGET Qt5::Gui_${_cmake_lib_name} PROPERTY IMPORTED_IMPLIB_RELEASE \"${Qt5Gui_${_cmake_lib_name}_LIBRARY}\") -!!ENDIF - unset(Qt5Gui_${_cmake_lib_name}_LIBRARY CACHE) - - find_library(Qt5Gui_${_cmake_lib_name}_LIBRARY_DEBUG ${_lib}d - PATHS \"${LibDir}\" -!!IF !mac - NO_DEFAULT_PATH -!!ENDIF - ) - if (Qt5Gui_${_cmake_lib_name}_LIBRARY_DEBUG) - set_property(TARGET Qt5::Gui_${_cmake_lib_name} APPEND PROPERTY IMPORTED_CONFIGURATIONS DEBUG) - _qt5_Gui_check_file_exists(\"${Qt5Gui_${_cmake_lib_name}_LIBRARY_DEBUG}\") - set_property(TARGET Qt5::Gui_${_cmake_lib_name} PROPERTY IMPORTED_LOCATION_DEBUG \"${Qt5Gui_${_cmake_lib_name}_LIBRARY_DEBUG}\") -!!IF !isEmpty(CMAKE_WINDOWS_BUILD) - set_property(TARGET Qt5::Gui_${_cmake_lib_name} PROPERTY IMPORTED_IMPLIB_DEBUG \"${Qt5Gui_${_cmake_lib_name}_LIBRARY_DEBUG}\") -!!ENDIF - endif() - unset(Qt5Gui_${_cmake_lib_name}_LIBRARY_DEBUG CACHE) - list(APPEND Qt5Gui_${Name}_LIBRARIES Qt5::Gui_${_cmake_lib_name}) - endif() - endif() - endforeach() -endmacro() - - -!!IF !isEmpty(CMAKE_EGL_LIBS) -_qt5gui_find_extra_libs(EGL \"$$CMAKE_EGL_LIBS\" \"$$CMAKE_EGL_LIBDIR\" \"$$CMAKE_EGL_INCDIRS\") -!!ENDIF - -!!IF !isEmpty(CMAKE_OPENGL_LIBS) -_qt5gui_find_extra_libs(OPENGL \"$$CMAKE_OPENGL_LIBS\" \"$$CMAKE_OPENGL_LIBDIR\" \"$$CMAKE_OPENGL_INCDIRS\") - -!!ENDIF - -!!ENDIF - -set(Qt5Gui_OPENGL_IMPLEMENTATION $$CMAKE_QT_OPENGL_IMPLEMENTATION) - -get_target_property(_configs Qt5::Gui IMPORTED_CONFIGURATIONS) -foreach(_config ${_configs}) - set_property(TARGET Qt5::Gui APPEND PROPERTY - IMPORTED_LINK_DEPENDENT_LIBRARIES_${_config} - ${Qt5Gui_EGL_LIBRARIES} ${Qt5Gui_OPENGL_LIBRARIES} - ) -endforeach() -unset(_configs) diff --git a/src/testlib/Qt5TestConfigExtras.cmake.in b/src/testlib/Qt5TestConfigExtras.cmake.in index 2a575958ae..86a706ea9d 100644 --- a/src/testlib/Qt5TestConfigExtras.cmake.in +++ b/src/testlib/Qt5TestConfigExtras.cmake.in @@ -1,5 +1 @@ - -set_property(TARGET Qt5::Test - APPEND PROPERTY - INTERFACE_COMPILE_DEFINITIONS QT_TESTCASE_BUILDDIR=\\\"\${CMAKE_BINARY_DIR}\\\" -) +set_property(TARGET @QT_CMAKE_EXPORT_NAMESPACE@::Test APPEND PROPERTY INTERFACE_COMPILE_DEFINITIONS QT_TESTCASE_BUILDDIR="${CMAKE_BINARY_DIR}") diff --git a/src/widgets/Qt5WidgetsConfigExtras.cmake.in b/src/widgets/Qt5WidgetsConfigExtras.cmake.in deleted file mode 100644 index 99d87e2e46..0000000000 --- a/src/widgets/Qt5WidgetsConfigExtras.cmake.in +++ /dev/null @@ -1,19 +0,0 @@ - -if (NOT TARGET Qt5::uic) - add_executable(Qt5::uic IMPORTED) - -!!IF isEmpty(CMAKE_BIN_DIR_IS_ABSOLUTE) - set(imported_location \"${_qt5Widgets_install_prefix}/$${CMAKE_BIN_DIR}uic$$CMAKE_BIN_SUFFIX\") -!!ELSE - set(imported_location \"$${CMAKE_BIN_DIR}uic$$CMAKE_BIN_SUFFIX\") -!!ENDIF - _qt5_Widgets_check_file_exists(${imported_location}) - - set_target_properties(Qt5::uic PROPERTIES - IMPORTED_LOCATION ${imported_location} - ) -endif() - -include(\"${CMAKE_CURRENT_LIST_DIR}/Qt5Widgets_AccessibleFactory.cmake\" OPTIONAL) - -set(Qt5Widgets_UIC_EXECUTABLE Qt5::uic) |