qt5: use absolute paths to plugins in CMake

CMake needs absolute paths to plugin shared objects in case one package
provides a plugin for a different package.
This commit is contained in:
Thomas Tuegel 2016-08-27 11:59:55 -05:00
parent 5f0db537df
commit 7a9e04943d
No known key found for this signature in database
GPG key ID: 22CBF5249D4B4D59
3 changed files with 256 additions and 64 deletions

View file

@ -1,7 +1,7 @@
Index: qtbase-opensource-src-5.6.0/qtbase/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in Index: qtbase-opensource-src-5.7.0/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in
=================================================================== ===================================================================
--- qtbase-opensource-src-5.6.0.orig/qtbase/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in --- qtbase-opensource-src-5.7.0.orig/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in
+++ qtbase-opensource-src-5.6.0/qtbase/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in +++ qtbase-opensource-src-5.7.0/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in
@@ -9,30 +9,6 @@ if (CMAKE_VERSION VERSION_LESS 3.0.0) @@ -9,30 +9,6 @@ if (CMAKE_VERSION VERSION_LESS 3.0.0)
endif() endif()
!!ENDIF !!ENDIF
@ -173,19 +173,23 @@ Index: qtbase-opensource-src-5.6.0/qtbase/mkspecs/features/data/cmake/Qt5BasicCo
endif() endif()
!!ENDIF // CMAKE_RELEASE_TYPE !!ENDIF // CMAKE_RELEASE_TYPE
!!ENDIF // CMAKE_FIND_OTHER_LIBRARY_BUILD !!ENDIF // CMAKE_FIND_OTHER_LIBRARY_BUILD
@@ -329,7 +259,7 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME @@ -328,11 +258,7 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME
macro(_populate_$${CMAKE_MODULE_NAME}_plugin_properties Plugin Configuration PLUGIN_LOCATION)
set_property(TARGET Qt5::${Plugin} APPEND PROPERTY IMPORTED_CONFIGURATIONS ${Configuration}) set_property(TARGET Qt5::${Plugin} APPEND PROPERTY IMPORTED_CONFIGURATIONS ${Configuration})
!!IF isEmpty(CMAKE_PLUGIN_DIR_IS_ABSOLUTE) -!!IF isEmpty(CMAKE_PLUGIN_DIR_IS_ABSOLUTE)
- set(imported_location \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_PLUGIN_DIR}${PLUGIN_LOCATION}\") - set(imported_location \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_PLUGIN_DIR}${PLUGIN_LOCATION}\")
+ set(imported_location \"@NIX_OUT@/$${CMAKE_PLUGIN_DIR}${PLUGIN_LOCATION}\") -!!ELSE
!!ELSE - set(imported_location \"$${CMAKE_PLUGIN_DIR}${PLUGIN_LOCATION}\")
set(imported_location \"$${CMAKE_PLUGIN_DIR}${PLUGIN_LOCATION}\") -!!ENDIF
!!ENDIF + set(imported_location \"${PLUGIN_LOCATION}\")
Index: qtbase-opensource-src-5.6.0/qtbase/src/gui/Qt5GuiConfigExtras.cmake.in _qt5_$${CMAKE_MODULE_NAME}_check_file_exists(${imported_location})
set_target_properties(Qt5::${Plugin} PROPERTIES
\"IMPORTED_LOCATION_${Configuration}\" ${imported_location}
Index: qtbase-opensource-src-5.7.0/src/gui/Qt5GuiConfigExtras.cmake.in
=================================================================== ===================================================================
--- qtbase-opensource-src-5.6.0.orig/qtbase/src/gui/Qt5GuiConfigExtras.cmake.in --- qtbase-opensource-src-5.7.0.orig/src/gui/Qt5GuiConfigExtras.cmake.in
+++ qtbase-opensource-src-5.6.0/qtbase/src/gui/Qt5GuiConfigExtras.cmake.in +++ qtbase-opensource-src-5.7.0/src/gui/Qt5GuiConfigExtras.cmake.in
@@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
!!IF !isEmpty(CMAKE_ANGLE_EGL_DLL_RELEASE) !!IF !isEmpty(CMAKE_ANGLE_EGL_DLL_RELEASE)
@ -211,10 +215,10 @@ Index: qtbase-opensource-src-5.6.0/qtbase/src/gui/Qt5GuiConfigExtras.cmake.in
!!ELSE !!ELSE
set(imported_implib \"$${CMAKE_LIB_DIR}${IMPLIB_LOCATION}\") set(imported_implib \"$${CMAKE_LIB_DIR}${IMPLIB_LOCATION}\")
!!ENDIF !!ENDIF
Index: qtbase-opensource-src-5.6.0/qtbase/src/widgets/Qt5WidgetsConfigExtras.cmake.in Index: qtbase-opensource-src-5.7.0/src/widgets/Qt5WidgetsConfigExtras.cmake.in
=================================================================== ===================================================================
--- qtbase-opensource-src-5.6.0.orig/qtbase/src/widgets/Qt5WidgetsConfigExtras.cmake.in --- qtbase-opensource-src-5.7.0.orig/src/widgets/Qt5WidgetsConfigExtras.cmake.in
+++ qtbase-opensource-src-5.6.0/qtbase/src/widgets/Qt5WidgetsConfigExtras.cmake.in +++ qtbase-opensource-src-5.7.0/src/widgets/Qt5WidgetsConfigExtras.cmake.in
@@ -3,7 +3,7 @@ if (NOT TARGET Qt5::uic) @@ -3,7 +3,7 @@ if (NOT TARGET Qt5::uic)
add_executable(Qt5::uic IMPORTED) add_executable(Qt5::uic IMPORTED)
@ -224,10 +228,10 @@ Index: qtbase-opensource-src-5.6.0/qtbase/src/widgets/Qt5WidgetsConfigExtras.cma
!!ELSE !!ELSE
set(imported_location \"$${CMAKE_BIN_DIR}uic$$CMAKE_BIN_SUFFIX\") set(imported_location \"$${CMAKE_BIN_DIR}uic$$CMAKE_BIN_SUFFIX\")
!!ENDIF !!ENDIF
Index: qtbase-opensource-src-5.6.0/qtbase/src/corelib/Qt5CoreConfigExtras.cmake.in Index: qtbase-opensource-src-5.7.0/src/corelib/Qt5CoreConfigExtras.cmake.in
=================================================================== ===================================================================
--- qtbase-opensource-src-5.6.0.orig/qtbase/src/corelib/Qt5CoreConfigExtras.cmake.in --- qtbase-opensource-src-5.7.0.orig/src/corelib/Qt5CoreConfigExtras.cmake.in
+++ qtbase-opensource-src-5.6.0/qtbase/src/corelib/Qt5CoreConfigExtras.cmake.in +++ qtbase-opensource-src-5.7.0/src/corelib/Qt5CoreConfigExtras.cmake.in
@@ -3,7 +3,7 @@ if (NOT TARGET Qt5::qmake) @@ -3,7 +3,7 @@ if (NOT TARGET Qt5::qmake)
add_executable(Qt5::qmake IMPORTED) add_executable(Qt5::qmake IMPORTED)
@ -255,7 +259,7 @@ Index: qtbase-opensource-src-5.6.0/qtbase/src/corelib/Qt5CoreConfigExtras.cmake.
!!ELSE !!ELSE
set(imported_location \"$${CMAKE_BIN_DIR}rcc$$CMAKE_BIN_SUFFIX\") set(imported_location \"$${CMAKE_BIN_DIR}rcc$$CMAKE_BIN_SUFFIX\")
!!ENDIF !!ENDIF
@@ -131,7 +131,7 @@ if (NOT TARGET Qt5::WinMain) @@ -133,7 +133,7 @@ if (NOT TARGET Qt5::WinMain)
!!IF !isEmpty(CMAKE_RELEASE_TYPE) !!IF !isEmpty(CMAKE_RELEASE_TYPE)
set_property(TARGET Qt5::WinMain APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE) set_property(TARGET Qt5::WinMain APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE)
!!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE) !!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE)
@ -264,7 +268,7 @@ Index: qtbase-opensource-src-5.6.0/qtbase/src/corelib/Qt5CoreConfigExtras.cmake.
!!ELSE !!ELSE
set(imported_location \"$${CMAKE_LIB_DIR}$${CMAKE_WINMAIN_FILE_LOCATION_RELEASE}\") set(imported_location \"$${CMAKE_LIB_DIR}$${CMAKE_WINMAIN_FILE_LOCATION_RELEASE}\")
!!ENDIF !!ENDIF
@@ -145,7 +145,7 @@ if (NOT TARGET Qt5::WinMain) @@ -147,7 +147,7 @@ if (NOT TARGET Qt5::WinMain)
set_property(TARGET Qt5::WinMain APPEND PROPERTY IMPORTED_CONFIGURATIONS DEBUG) set_property(TARGET Qt5::WinMain APPEND PROPERTY IMPORTED_CONFIGURATIONS DEBUG)
!!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE) !!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE)
@ -273,10 +277,10 @@ Index: qtbase-opensource-src-5.6.0/qtbase/src/corelib/Qt5CoreConfigExtras.cmake.
!!ELSE !!ELSE
set(imported_location \"$${CMAKE_LIB_DIR}$${CMAKE_WINMAIN_FILE_LOCATION_DEBUG}\") set(imported_location \"$${CMAKE_LIB_DIR}$${CMAKE_WINMAIN_FILE_LOCATION_DEBUG}\")
!!ENDIF !!ENDIF
Index: qtbase-opensource-src-5.6.0/qtbase/src/corelib/Qt5CoreConfigExtrasMkspecDirForInstall.cmake.in Index: qtbase-opensource-src-5.7.0/src/corelib/Qt5CoreConfigExtrasMkspecDirForInstall.cmake.in
=================================================================== ===================================================================
--- qtbase-opensource-src-5.6.0.orig/qtbase/src/corelib/Qt5CoreConfigExtrasMkspecDirForInstall.cmake.in --- qtbase-opensource-src-5.7.0.orig/src/corelib/Qt5CoreConfigExtrasMkspecDirForInstall.cmake.in
+++ qtbase-opensource-src-5.6.0/qtbase/src/corelib/Qt5CoreConfigExtrasMkspecDirForInstall.cmake.in +++ qtbase-opensource-src-5.7.0/src/corelib/Qt5CoreConfigExtrasMkspecDirForInstall.cmake.in
@@ -1,6 +1,6 @@ @@ -1,6 +1,6 @@
!!IF isEmpty(CMAKE_INSTALL_DATA_DIR_IS_ABSOLUTE) !!IF isEmpty(CMAKE_INSTALL_DATA_DIR_IS_ABSOLUTE)
@ -285,10 +289,10 @@ Index: qtbase-opensource-src-5.6.0/qtbase/src/corelib/Qt5CoreConfigExtrasMkspecD
!!ELSE !!ELSE
set(_qt5_corelib_extra_includes \"$${CMAKE_INSTALL_DATA_DIR}mkspecs/$${CMAKE_MKSPEC}\") set(_qt5_corelib_extra_includes \"$${CMAKE_INSTALL_DATA_DIR}mkspecs/$${CMAKE_MKSPEC}\")
!!ENDIF !!ENDIF
Index: qtbase-opensource-src-5.6.0/qtbase/src/corelib/Qt5CoreConfigExtrasMkspecDir.cmake.in Index: qtbase-opensource-src-5.7.0/src/corelib/Qt5CoreConfigExtrasMkspecDir.cmake.in
=================================================================== ===================================================================
--- qtbase-opensource-src-5.6.0.orig/qtbase/src/corelib/Qt5CoreConfigExtrasMkspecDir.cmake.in --- qtbase-opensource-src-5.7.0.orig/src/corelib/Qt5CoreConfigExtrasMkspecDir.cmake.in
+++ qtbase-opensource-src-5.6.0/qtbase/src/corelib/Qt5CoreConfigExtrasMkspecDir.cmake.in +++ qtbase-opensource-src-5.7.0/src/corelib/Qt5CoreConfigExtrasMkspecDir.cmake.in
@@ -1,6 +1,6 @@ @@ -1,6 +1,6 @@
!!IF isEmpty(CMAKE_HOST_DATA_DIR_IS_ABSOLUTE) !!IF isEmpty(CMAKE_HOST_DATA_DIR_IS_ABSOLUTE)
@ -297,10 +301,10 @@ Index: qtbase-opensource-src-5.6.0/qtbase/src/corelib/Qt5CoreConfigExtrasMkspecD
!!ELSE !!ELSE
set(_qt5_corelib_extra_includes \"$${CMAKE_HOST_DATA_DIR}mkspecs/$${CMAKE_MKSPEC}\") set(_qt5_corelib_extra_includes \"$${CMAKE_HOST_DATA_DIR}mkspecs/$${CMAKE_MKSPEC}\")
!!ENDIF !!ENDIF
Index: qtbase-opensource-src-5.6.0/src/qtbase/dbus/Qt5DBusConfigExtras.cmake.in Index: qtbase-opensource-src-5.7.0/src/dbus/Qt5DBusConfigExtras.cmake.in
=================================================================== ===================================================================
--- qtbase-opensource-src-5.6.0.orig/qtbase/src/dbus/Qt5DBusConfigExtras.cmake.in --- qtbase-opensource-src-5.7.0.orig/src/dbus/Qt5DBusConfigExtras.cmake.in
+++ qtbase-opensource-src-5.6.0/qtbase/src/dbus/Qt5DBusConfigExtras.cmake.in +++ qtbase-opensource-src-5.7.0/src/dbus/Qt5DBusConfigExtras.cmake.in
@@ -3,7 +3,7 @@ if (NOT TARGET Qt5::qdbuscpp2xml) @@ -3,7 +3,7 @@ if (NOT TARGET Qt5::qdbuscpp2xml)
add_executable(Qt5::qdbuscpp2xml IMPORTED) add_executable(Qt5::qdbuscpp2xml IMPORTED)
@ -319,3 +323,63 @@ Index: qtbase-opensource-src-5.6.0/src/qtbase/dbus/Qt5DBusConfigExtras.cmake.in
!!ELSE !!ELSE
set(imported_location \"$${CMAKE_BIN_DIR}qdbusxml2cpp$$CMAKE_BIN_SUFFIX\") set(imported_location \"$${CMAKE_BIN_DIR}qdbusxml2cpp$$CMAKE_BIN_SUFFIX\")
!!ENDIF !!ENDIF
Index: qtbase-opensource-src-5.7.0/mkspecs/features/create_cmake.prf
===================================================================
--- qtbase-opensource-src-5.7.0.orig/mkspecs/features/create_cmake.prf
+++ qtbase-opensource-src-5.7.0/mkspecs/features/create_cmake.prf
@@ -136,28 +136,28 @@ contains(CONFIG, plugin) {
win32 {
isEmpty(CMAKE_STATIC_TYPE) {
- CMAKE_PLUGIN_LOCATION_RELEASE = $$PLUGIN_TYPE/$${TARGET}.dll
- CMAKE_PLUGIN_LOCATION_DEBUG = $$PLUGIN_TYPE/$${TARGET}d.dll
+ CMAKE_PLUGIN_LOCATION_RELEASE = $${CMAKE_PLUGIN_DIR}$$PLUGIN_TYPE/$${TARGET}.dll
+ CMAKE_PLUGIN_LOCATION_DEBUG = $${CMAKE_PLUGIN_DIR}$$PLUGIN_TYPE/$${TARGET}d.dll
} else:mingw {
- CMAKE_PLUGIN_LOCATION_RELEASE = $$PLUGIN_TYPE/lib$${TARGET}.a
- CMAKE_PLUGIN_LOCATION_DEBUG = $$PLUGIN_TYPE/lib$${TARGET}d.a
+ CMAKE_PLUGIN_LOCATION_RELEASE = $${CMAKE_PLUGIN_DIR}/$$PLUGIN_TYPE/lib$${TARGET}.a
+ CMAKE_PLUGIN_LOCATION_DEBUG = $${CMAKE_PLUGIN_DIR}$$PLUGIN_TYPE/lib$${TARGET}d.a
} else { # MSVC static
- CMAKE_PLUGIN_LOCATION_RELEASE = $$PLUGIN_TYPE/$${TARGET}.lib
- CMAKE_PLUGIN_LOCATION_DEBUG = $$PLUGIN_TYPE/$${TARGET}d.lib
+ CMAKE_PLUGIN_LOCATION_RELEASE = $${CMAKE_PLUGIN_DIR}$$PLUGIN_TYPE/$${TARGET}.lib
+ CMAKE_PLUGIN_LOCATION_DEBUG = $${CMAKE_PLUGIN_DIR}$$PLUGIN_TYPE/$${TARGET}d.lib
}
} else {
mac {
isEmpty(CMAKE_STATIC_TYPE): CMAKE_PlUGIN_EXT = .dylib
else: CMAKE_PlUGIN_EXT = .a
- CMAKE_PLUGIN_LOCATION_RELEASE = $$PLUGIN_TYPE/lib$${TARGET}$${CMAKE_PlUGIN_EXT}
- CMAKE_PLUGIN_LOCATION_DEBUG = $$PLUGIN_TYPE/lib$${TARGET}$${CMAKE_PlUGIN_EXT}
+ CMAKE_PLUGIN_LOCATION_RELEASE = $${CMAKE_PLUGIN_DIR}$$PLUGIN_TYPE/lib$${TARGET}$${CMAKE_PlUGIN_EXT}
+ CMAKE_PLUGIN_LOCATION_DEBUG = $${CMAKE_PLUGIN_DIR}$$PLUGIN_TYPE/lib$${TARGET}$${CMAKE_PlUGIN_EXT}
} else {
isEmpty(CMAKE_STATIC_TYPE): CMAKE_PlUGIN_EXT = .so
else: CMAKE_PlUGIN_EXT = .a
- CMAKE_PLUGIN_LOCATION_RELEASE = $$PLUGIN_TYPE/lib$${TARGET}$${CMAKE_PlUGIN_EXT}
- CMAKE_PLUGIN_LOCATION_DEBUG = $$PLUGIN_TYPE/lib$${TARGET}$${CMAKE_PlUGIN_EXT}
+ CMAKE_PLUGIN_LOCATION_RELEASE = $${CMAKE_PLUGIN_DIR}$$PLUGIN_TYPE/lib$${TARGET}$${CMAKE_PlUGIN_EXT}
+ CMAKE_PLUGIN_LOCATION_DEBUG = $${CMAKE_PLUGIN_DIR}$$PLUGIN_TYPE/lib$${TARGET}$${CMAKE_PlUGIN_EXT}
}
}
cmake_target_file.input = $$PWD/data/cmake/Qt5PluginTarget.cmake.in
Index: qtbase-opensource-src-5.7.0/mkspecs/features/data/cmake/Qt5PluginTarget.cmake.in
===================================================================
--- qtbase-opensource-src-5.7.0.orig/mkspecs/features/data/cmake/Qt5PluginTarget.cmake.in
+++ qtbase-opensource-src-5.7.0/mkspecs/features/data/cmake/Qt5PluginTarget.cmake.in
@@ -2,10 +2,10 @@
add_library(Qt5::$$CMAKE_PLUGIN_NAME MODULE IMPORTED)
!!IF !isEmpty(CMAKE_RELEASE_TYPE)
-_populate_$${CMAKE_MODULE_NAME}_plugin_properties($$CMAKE_PLUGIN_NAME RELEASE \"$${CMAKE_PLUGIN_LOCATION_RELEASE}\")
+_populate_$${CMAKE_MODULE_NAME}_plugin_properties($$CMAKE_PLUGIN_NAME RELEASE \"@NIX_OUT@/$${CMAKE_PLUGIN_LOCATION_RELEASE}\")
!!ENDIF
!!IF !isEmpty(CMAKE_DEBUG_TYPE)
-_populate_$${CMAKE_MODULE_NAME}_plugin_properties($$CMAKE_PLUGIN_NAME DEBUG \"$${CMAKE_PLUGIN_LOCATION_DEBUG}\")
+_populate_$${CMAKE_MODULE_NAME}_plugin_properties($$CMAKE_PLUGIN_NAME DEBUG \"@NIX_OUT@/$${CMAKE_PLUGIN_LOCATION_DEBUG}\")
!!ENDIF
list(APPEND Qt5$${CMAKE_MODULE_NAME}_PLUGINS Qt5::$$CMAKE_PLUGIN_NAME)

View file

@ -1,7 +1,7 @@
Index: qtbase-opensource-src-5.6.0/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in Index: qtbase-opensource-src-5.7.0/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in
=================================================================== ===================================================================
--- qtbase-opensource-src-5.6.0.orig/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in --- qtbase-opensource-src-5.7.0.orig/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in
+++ qtbase-opensource-src-5.6.0/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in +++ qtbase-opensource-src-5.7.0/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in
@@ -9,30 +9,6 @@ if (CMAKE_VERSION VERSION_LESS 3.0.0) @@ -9,30 +9,6 @@ if (CMAKE_VERSION VERSION_LESS 3.0.0)
endif() endif()
!!ENDIF !!ENDIF
@ -173,19 +173,23 @@ Index: qtbase-opensource-src-5.6.0/mkspecs/features/data/cmake/Qt5BasicConfig.cm
endif() endif()
!!ENDIF // CMAKE_RELEASE_TYPE !!ENDIF // CMAKE_RELEASE_TYPE
!!ENDIF // CMAKE_FIND_OTHER_LIBRARY_BUILD !!ENDIF // CMAKE_FIND_OTHER_LIBRARY_BUILD
@@ -329,7 +259,7 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME @@ -328,11 +258,7 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME
macro(_populate_$${CMAKE_MODULE_NAME}_plugin_properties Plugin Configuration PLUGIN_LOCATION)
set_property(TARGET Qt5::${Plugin} APPEND PROPERTY IMPORTED_CONFIGURATIONS ${Configuration}) set_property(TARGET Qt5::${Plugin} APPEND PROPERTY IMPORTED_CONFIGURATIONS ${Configuration})
!!IF isEmpty(CMAKE_PLUGIN_DIR_IS_ABSOLUTE) -!!IF isEmpty(CMAKE_PLUGIN_DIR_IS_ABSOLUTE)
- set(imported_location \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_PLUGIN_DIR}${PLUGIN_LOCATION}\") - set(imported_location \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_PLUGIN_DIR}${PLUGIN_LOCATION}\")
+ set(imported_location \"@NIX_OUT@/$${CMAKE_PLUGIN_DIR}${PLUGIN_LOCATION}\") -!!ELSE
!!ELSE - set(imported_location \"$${CMAKE_PLUGIN_DIR}${PLUGIN_LOCATION}\")
set(imported_location \"$${CMAKE_PLUGIN_DIR}${PLUGIN_LOCATION}\") -!!ENDIF
!!ENDIF + set(imported_location \"${PLUGIN_LOCATION}\")
Index: qtbase-opensource-src-5.6.0/src/gui/Qt5GuiConfigExtras.cmake.in _qt5_$${CMAKE_MODULE_NAME}_check_file_exists(${imported_location})
set_target_properties(Qt5::${Plugin} PROPERTIES
\"IMPORTED_LOCATION_${Configuration}\" ${imported_location}
Index: qtbase-opensource-src-5.7.0/src/gui/Qt5GuiConfigExtras.cmake.in
=================================================================== ===================================================================
--- qtbase-opensource-src-5.6.0.orig/src/gui/Qt5GuiConfigExtras.cmake.in --- qtbase-opensource-src-5.7.0.orig/src/gui/Qt5GuiConfigExtras.cmake.in
+++ qtbase-opensource-src-5.6.0/src/gui/Qt5GuiConfigExtras.cmake.in +++ qtbase-opensource-src-5.7.0/src/gui/Qt5GuiConfigExtras.cmake.in
@@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
!!IF !isEmpty(CMAKE_ANGLE_EGL_DLL_RELEASE) !!IF !isEmpty(CMAKE_ANGLE_EGL_DLL_RELEASE)
@ -211,10 +215,10 @@ Index: qtbase-opensource-src-5.6.0/src/gui/Qt5GuiConfigExtras.cmake.in
!!ELSE !!ELSE
set(imported_implib \"$${CMAKE_LIB_DIR}${IMPLIB_LOCATION}\") set(imported_implib \"$${CMAKE_LIB_DIR}${IMPLIB_LOCATION}\")
!!ENDIF !!ENDIF
Index: qtbase-opensource-src-5.6.0/src/widgets/Qt5WidgetsConfigExtras.cmake.in Index: qtbase-opensource-src-5.7.0/src/widgets/Qt5WidgetsConfigExtras.cmake.in
=================================================================== ===================================================================
--- qtbase-opensource-src-5.6.0.orig/src/widgets/Qt5WidgetsConfigExtras.cmake.in --- qtbase-opensource-src-5.7.0.orig/src/widgets/Qt5WidgetsConfigExtras.cmake.in
+++ qtbase-opensource-src-5.6.0/src/widgets/Qt5WidgetsConfigExtras.cmake.in +++ qtbase-opensource-src-5.7.0/src/widgets/Qt5WidgetsConfigExtras.cmake.in
@@ -3,7 +3,7 @@ if (NOT TARGET Qt5::uic) @@ -3,7 +3,7 @@ if (NOT TARGET Qt5::uic)
add_executable(Qt5::uic IMPORTED) add_executable(Qt5::uic IMPORTED)
@ -224,10 +228,10 @@ Index: qtbase-opensource-src-5.6.0/src/widgets/Qt5WidgetsConfigExtras.cmake.in
!!ELSE !!ELSE
set(imported_location \"$${CMAKE_BIN_DIR}uic$$CMAKE_BIN_SUFFIX\") set(imported_location \"$${CMAKE_BIN_DIR}uic$$CMAKE_BIN_SUFFIX\")
!!ENDIF !!ENDIF
Index: qtbase-opensource-src-5.6.0/src/corelib/Qt5CoreConfigExtras.cmake.in Index: qtbase-opensource-src-5.7.0/src/corelib/Qt5CoreConfigExtras.cmake.in
=================================================================== ===================================================================
--- qtbase-opensource-src-5.6.0.orig/src/corelib/Qt5CoreConfigExtras.cmake.in --- qtbase-opensource-src-5.7.0.orig/src/corelib/Qt5CoreConfigExtras.cmake.in
+++ qtbase-opensource-src-5.6.0/src/corelib/Qt5CoreConfigExtras.cmake.in +++ qtbase-opensource-src-5.7.0/src/corelib/Qt5CoreConfigExtras.cmake.in
@@ -3,7 +3,7 @@ if (NOT TARGET Qt5::qmake) @@ -3,7 +3,7 @@ if (NOT TARGET Qt5::qmake)
add_executable(Qt5::qmake IMPORTED) add_executable(Qt5::qmake IMPORTED)
@ -255,7 +259,7 @@ Index: qtbase-opensource-src-5.6.0/src/corelib/Qt5CoreConfigExtras.cmake.in
!!ELSE !!ELSE
set(imported_location \"$${CMAKE_BIN_DIR}rcc$$CMAKE_BIN_SUFFIX\") set(imported_location \"$${CMAKE_BIN_DIR}rcc$$CMAKE_BIN_SUFFIX\")
!!ENDIF !!ENDIF
@@ -131,7 +131,7 @@ if (NOT TARGET Qt5::WinMain) @@ -133,7 +133,7 @@ if (NOT TARGET Qt5::WinMain)
!!IF !isEmpty(CMAKE_RELEASE_TYPE) !!IF !isEmpty(CMAKE_RELEASE_TYPE)
set_property(TARGET Qt5::WinMain APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE) set_property(TARGET Qt5::WinMain APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE)
!!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE) !!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE)
@ -264,7 +268,7 @@ Index: qtbase-opensource-src-5.6.0/src/corelib/Qt5CoreConfigExtras.cmake.in
!!ELSE !!ELSE
set(imported_location \"$${CMAKE_LIB_DIR}$${CMAKE_WINMAIN_FILE_LOCATION_RELEASE}\") set(imported_location \"$${CMAKE_LIB_DIR}$${CMAKE_WINMAIN_FILE_LOCATION_RELEASE}\")
!!ENDIF !!ENDIF
@@ -145,7 +145,7 @@ if (NOT TARGET Qt5::WinMain) @@ -147,7 +147,7 @@ if (NOT TARGET Qt5::WinMain)
set_property(TARGET Qt5::WinMain APPEND PROPERTY IMPORTED_CONFIGURATIONS DEBUG) set_property(TARGET Qt5::WinMain APPEND PROPERTY IMPORTED_CONFIGURATIONS DEBUG)
!!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE) !!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE)
@ -273,10 +277,10 @@ Index: qtbase-opensource-src-5.6.0/src/corelib/Qt5CoreConfigExtras.cmake.in
!!ELSE !!ELSE
set(imported_location \"$${CMAKE_LIB_DIR}$${CMAKE_WINMAIN_FILE_LOCATION_DEBUG}\") set(imported_location \"$${CMAKE_LIB_DIR}$${CMAKE_WINMAIN_FILE_LOCATION_DEBUG}\")
!!ENDIF !!ENDIF
Index: qtbase-opensource-src-5.6.0/src/corelib/Qt5CoreConfigExtrasMkspecDirForInstall.cmake.in Index: qtbase-opensource-src-5.7.0/src/corelib/Qt5CoreConfigExtrasMkspecDirForInstall.cmake.in
=================================================================== ===================================================================
--- qtbase-opensource-src-5.6.0.orig/src/corelib/Qt5CoreConfigExtrasMkspecDirForInstall.cmake.in --- qtbase-opensource-src-5.7.0.orig/src/corelib/Qt5CoreConfigExtrasMkspecDirForInstall.cmake.in
+++ qtbase-opensource-src-5.6.0/src/corelib/Qt5CoreConfigExtrasMkspecDirForInstall.cmake.in +++ qtbase-opensource-src-5.7.0/src/corelib/Qt5CoreConfigExtrasMkspecDirForInstall.cmake.in
@@ -1,6 +1,6 @@ @@ -1,6 +1,6 @@
!!IF isEmpty(CMAKE_INSTALL_DATA_DIR_IS_ABSOLUTE) !!IF isEmpty(CMAKE_INSTALL_DATA_DIR_IS_ABSOLUTE)
@ -285,10 +289,10 @@ Index: qtbase-opensource-src-5.6.0/src/corelib/Qt5CoreConfigExtrasMkspecDirForIn
!!ELSE !!ELSE
set(_qt5_corelib_extra_includes \"$${CMAKE_INSTALL_DATA_DIR}mkspecs/$${CMAKE_MKSPEC}\") set(_qt5_corelib_extra_includes \"$${CMAKE_INSTALL_DATA_DIR}mkspecs/$${CMAKE_MKSPEC}\")
!!ENDIF !!ENDIF
Index: qtbase-opensource-src-5.6.0/src/corelib/Qt5CoreConfigExtrasMkspecDir.cmake.in Index: qtbase-opensource-src-5.7.0/src/corelib/Qt5CoreConfigExtrasMkspecDir.cmake.in
=================================================================== ===================================================================
--- qtbase-opensource-src-5.6.0.orig/src/corelib/Qt5CoreConfigExtrasMkspecDir.cmake.in --- qtbase-opensource-src-5.7.0.orig/src/corelib/Qt5CoreConfigExtrasMkspecDir.cmake.in
+++ qtbase-opensource-src-5.6.0/src/corelib/Qt5CoreConfigExtrasMkspecDir.cmake.in +++ qtbase-opensource-src-5.7.0/src/corelib/Qt5CoreConfigExtrasMkspecDir.cmake.in
@@ -1,6 +1,6 @@ @@ -1,6 +1,6 @@
!!IF isEmpty(CMAKE_HOST_DATA_DIR_IS_ABSOLUTE) !!IF isEmpty(CMAKE_HOST_DATA_DIR_IS_ABSOLUTE)
@ -297,10 +301,10 @@ Index: qtbase-opensource-src-5.6.0/src/corelib/Qt5CoreConfigExtrasMkspecDir.cmak
!!ELSE !!ELSE
set(_qt5_corelib_extra_includes \"$${CMAKE_HOST_DATA_DIR}mkspecs/$${CMAKE_MKSPEC}\") set(_qt5_corelib_extra_includes \"$${CMAKE_HOST_DATA_DIR}mkspecs/$${CMAKE_MKSPEC}\")
!!ENDIF !!ENDIF
Index: qtbase-opensource-src-5.6.0/src/dbus/Qt5DBusConfigExtras.cmake.in Index: qtbase-opensource-src-5.7.0/src/dbus/Qt5DBusConfigExtras.cmake.in
=================================================================== ===================================================================
--- qtbase-opensource-src-5.6.0.orig/src/dbus/Qt5DBusConfigExtras.cmake.in --- qtbase-opensource-src-5.7.0.orig/src/dbus/Qt5DBusConfigExtras.cmake.in
+++ qtbase-opensource-src-5.6.0/src/dbus/Qt5DBusConfigExtras.cmake.in +++ qtbase-opensource-src-5.7.0/src/dbus/Qt5DBusConfigExtras.cmake.in
@@ -3,7 +3,7 @@ if (NOT TARGET Qt5::qdbuscpp2xml) @@ -3,7 +3,7 @@ if (NOT TARGET Qt5::qdbuscpp2xml)
add_executable(Qt5::qdbuscpp2xml IMPORTED) add_executable(Qt5::qdbuscpp2xml IMPORTED)
@ -319,3 +323,63 @@ Index: qtbase-opensource-src-5.6.0/src/dbus/Qt5DBusConfigExtras.cmake.in
!!ELSE !!ELSE
set(imported_location \"$${CMAKE_BIN_DIR}qdbusxml2cpp$$CMAKE_BIN_SUFFIX\") set(imported_location \"$${CMAKE_BIN_DIR}qdbusxml2cpp$$CMAKE_BIN_SUFFIX\")
!!ENDIF !!ENDIF
Index: qtbase-opensource-src-5.7.0/mkspecs/features/create_cmake.prf
===================================================================
--- qtbase-opensource-src-5.7.0.orig/mkspecs/features/create_cmake.prf
+++ qtbase-opensource-src-5.7.0/mkspecs/features/create_cmake.prf
@@ -136,28 +136,28 @@ contains(CONFIG, plugin) {
win32 {
isEmpty(CMAKE_STATIC_TYPE) {
- CMAKE_PLUGIN_LOCATION_RELEASE = $$PLUGIN_TYPE/$${TARGET}.dll
- CMAKE_PLUGIN_LOCATION_DEBUG = $$PLUGIN_TYPE/$${TARGET}d.dll
+ CMAKE_PLUGIN_LOCATION_RELEASE = $${CMAKE_PLUGIN_DIR}$$PLUGIN_TYPE/$${TARGET}.dll
+ CMAKE_PLUGIN_LOCATION_DEBUG = $${CMAKE_PLUGIN_DIR}$$PLUGIN_TYPE/$${TARGET}d.dll
} else:mingw {
- CMAKE_PLUGIN_LOCATION_RELEASE = $$PLUGIN_TYPE/lib$${TARGET}.a
- CMAKE_PLUGIN_LOCATION_DEBUG = $$PLUGIN_TYPE/lib$${TARGET}d.a
+ CMAKE_PLUGIN_LOCATION_RELEASE = $${CMAKE_PLUGIN_DIR}/$$PLUGIN_TYPE/lib$${TARGET}.a
+ CMAKE_PLUGIN_LOCATION_DEBUG = $${CMAKE_PLUGIN_DIR}$$PLUGIN_TYPE/lib$${TARGET}d.a
} else { # MSVC static
- CMAKE_PLUGIN_LOCATION_RELEASE = $$PLUGIN_TYPE/$${TARGET}.lib
- CMAKE_PLUGIN_LOCATION_DEBUG = $$PLUGIN_TYPE/$${TARGET}d.lib
+ CMAKE_PLUGIN_LOCATION_RELEASE = $${CMAKE_PLUGIN_DIR}$$PLUGIN_TYPE/$${TARGET}.lib
+ CMAKE_PLUGIN_LOCATION_DEBUG = $${CMAKE_PLUGIN_DIR}$$PLUGIN_TYPE/$${TARGET}d.lib
}
} else {
mac {
isEmpty(CMAKE_STATIC_TYPE): CMAKE_PlUGIN_EXT = .dylib
else: CMAKE_PlUGIN_EXT = .a
- CMAKE_PLUGIN_LOCATION_RELEASE = $$PLUGIN_TYPE/lib$${TARGET}$${CMAKE_PlUGIN_EXT}
- CMAKE_PLUGIN_LOCATION_DEBUG = $$PLUGIN_TYPE/lib$${TARGET}$${CMAKE_PlUGIN_EXT}
+ CMAKE_PLUGIN_LOCATION_RELEASE = $${CMAKE_PLUGIN_DIR}$$PLUGIN_TYPE/lib$${TARGET}$${CMAKE_PlUGIN_EXT}
+ CMAKE_PLUGIN_LOCATION_DEBUG = $${CMAKE_PLUGIN_DIR}$$PLUGIN_TYPE/lib$${TARGET}$${CMAKE_PlUGIN_EXT}
} else {
isEmpty(CMAKE_STATIC_TYPE): CMAKE_PlUGIN_EXT = .so
else: CMAKE_PlUGIN_EXT = .a
- CMAKE_PLUGIN_LOCATION_RELEASE = $$PLUGIN_TYPE/lib$${TARGET}$${CMAKE_PlUGIN_EXT}
- CMAKE_PLUGIN_LOCATION_DEBUG = $$PLUGIN_TYPE/lib$${TARGET}$${CMAKE_PlUGIN_EXT}
+ CMAKE_PLUGIN_LOCATION_RELEASE = $${CMAKE_PLUGIN_DIR}$$PLUGIN_TYPE/lib$${TARGET}$${CMAKE_PlUGIN_EXT}
+ CMAKE_PLUGIN_LOCATION_DEBUG = $${CMAKE_PLUGIN_DIR}$$PLUGIN_TYPE/lib$${TARGET}$${CMAKE_PlUGIN_EXT}
}
}
cmake_target_file.input = $$PWD/data/cmake/Qt5PluginTarget.cmake.in
Index: qtbase-opensource-src-5.7.0/mkspecs/features/data/cmake/Qt5PluginTarget.cmake.in
===================================================================
--- qtbase-opensource-src-5.7.0.orig/mkspecs/features/data/cmake/Qt5PluginTarget.cmake.in
+++ qtbase-opensource-src-5.7.0/mkspecs/features/data/cmake/Qt5PluginTarget.cmake.in
@@ -2,10 +2,10 @@
add_library(Qt5::$$CMAKE_PLUGIN_NAME MODULE IMPORTED)
!!IF !isEmpty(CMAKE_RELEASE_TYPE)
-_populate_$${CMAKE_MODULE_NAME}_plugin_properties($$CMAKE_PLUGIN_NAME RELEASE \"$${CMAKE_PLUGIN_LOCATION_RELEASE}\")
+_populate_$${CMAKE_MODULE_NAME}_plugin_properties($$CMAKE_PLUGIN_NAME RELEASE \"@NIX_OUT@/$${CMAKE_PLUGIN_LOCATION_RELEASE}\")
!!ENDIF
!!IF !isEmpty(CMAKE_DEBUG_TYPE)
-_populate_$${CMAKE_MODULE_NAME}_plugin_properties($$CMAKE_PLUGIN_NAME DEBUG \"$${CMAKE_PLUGIN_LOCATION_DEBUG}\")
+_populate_$${CMAKE_MODULE_NAME}_plugin_properties($$CMAKE_PLUGIN_NAME DEBUG \"@NIX_OUT@/$${CMAKE_PLUGIN_LOCATION_DEBUG}\")
!!ENDIF
list(APPEND Qt5$${CMAKE_MODULE_NAME}_PLUGINS Qt5::$$CMAKE_PLUGIN_NAME)

View file

@ -173,15 +173,19 @@ Index: qtbase-opensource-src-5.7.0/mkspecs/features/data/cmake/Qt5BasicConfig.cm
endif() endif()
!!ENDIF // CMAKE_RELEASE_TYPE !!ENDIF // CMAKE_RELEASE_TYPE
!!ENDIF // CMAKE_FIND_OTHER_LIBRARY_BUILD !!ENDIF // CMAKE_FIND_OTHER_LIBRARY_BUILD
@@ -329,7 +259,7 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME @@ -328,11 +258,7 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME
macro(_populate_$${CMAKE_MODULE_NAME}_plugin_properties Plugin Configuration PLUGIN_LOCATION)
set_property(TARGET Qt5::${Plugin} APPEND PROPERTY IMPORTED_CONFIGURATIONS ${Configuration}) set_property(TARGET Qt5::${Plugin} APPEND PROPERTY IMPORTED_CONFIGURATIONS ${Configuration})
!!IF isEmpty(CMAKE_PLUGIN_DIR_IS_ABSOLUTE) -!!IF isEmpty(CMAKE_PLUGIN_DIR_IS_ABSOLUTE)
- set(imported_location \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_PLUGIN_DIR}${PLUGIN_LOCATION}\") - set(imported_location \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_PLUGIN_DIR}${PLUGIN_LOCATION}\")
+ set(imported_location \"@NIX_OUT@/$${CMAKE_PLUGIN_DIR}${PLUGIN_LOCATION}\") -!!ELSE
!!ELSE - set(imported_location \"$${CMAKE_PLUGIN_DIR}${PLUGIN_LOCATION}\")
set(imported_location \"$${CMAKE_PLUGIN_DIR}${PLUGIN_LOCATION}\") -!!ENDIF
!!ENDIF + set(imported_location \"${PLUGIN_LOCATION}\")
_qt5_$${CMAKE_MODULE_NAME}_check_file_exists(${imported_location})
set_target_properties(Qt5::${Plugin} PROPERTIES
\"IMPORTED_LOCATION_${Configuration}\" ${imported_location}
Index: qtbase-opensource-src-5.7.0/src/gui/Qt5GuiConfigExtras.cmake.in Index: qtbase-opensource-src-5.7.0/src/gui/Qt5GuiConfigExtras.cmake.in
=================================================================== ===================================================================
--- qtbase-opensource-src-5.7.0.orig/src/gui/Qt5GuiConfigExtras.cmake.in --- qtbase-opensource-src-5.7.0.orig/src/gui/Qt5GuiConfigExtras.cmake.in
@ -319,3 +323,63 @@ Index: qtbase-opensource-src-5.7.0/src/dbus/Qt5DBusConfigExtras.cmake.in
!!ELSE !!ELSE
set(imported_location \"$${CMAKE_BIN_DIR}qdbusxml2cpp$$CMAKE_BIN_SUFFIX\") set(imported_location \"$${CMAKE_BIN_DIR}qdbusxml2cpp$$CMAKE_BIN_SUFFIX\")
!!ENDIF !!ENDIF
Index: qtbase-opensource-src-5.7.0/mkspecs/features/create_cmake.prf
===================================================================
--- qtbase-opensource-src-5.7.0.orig/mkspecs/features/create_cmake.prf
+++ qtbase-opensource-src-5.7.0/mkspecs/features/create_cmake.prf
@@ -136,28 +136,28 @@ contains(CONFIG, plugin) {
win32 {
isEmpty(CMAKE_STATIC_TYPE) {
- CMAKE_PLUGIN_LOCATION_RELEASE = $$PLUGIN_TYPE/$${TARGET}.dll
- CMAKE_PLUGIN_LOCATION_DEBUG = $$PLUGIN_TYPE/$${TARGET}d.dll
+ CMAKE_PLUGIN_LOCATION_RELEASE = $${CMAKE_PLUGIN_DIR}$$PLUGIN_TYPE/$${TARGET}.dll
+ CMAKE_PLUGIN_LOCATION_DEBUG = $${CMAKE_PLUGIN_DIR}$$PLUGIN_TYPE/$${TARGET}d.dll
} else:mingw {
- CMAKE_PLUGIN_LOCATION_RELEASE = $$PLUGIN_TYPE/lib$${TARGET}.a
- CMAKE_PLUGIN_LOCATION_DEBUG = $$PLUGIN_TYPE/lib$${TARGET}d.a
+ CMAKE_PLUGIN_LOCATION_RELEASE = $${CMAKE_PLUGIN_DIR}/$$PLUGIN_TYPE/lib$${TARGET}.a
+ CMAKE_PLUGIN_LOCATION_DEBUG = $${CMAKE_PLUGIN_DIR}$$PLUGIN_TYPE/lib$${TARGET}d.a
} else { # MSVC static
- CMAKE_PLUGIN_LOCATION_RELEASE = $$PLUGIN_TYPE/$${TARGET}.lib
- CMAKE_PLUGIN_LOCATION_DEBUG = $$PLUGIN_TYPE/$${TARGET}d.lib
+ CMAKE_PLUGIN_LOCATION_RELEASE = $${CMAKE_PLUGIN_DIR}$$PLUGIN_TYPE/$${TARGET}.lib
+ CMAKE_PLUGIN_LOCATION_DEBUG = $${CMAKE_PLUGIN_DIR}$$PLUGIN_TYPE/$${TARGET}d.lib
}
} else {
mac {
isEmpty(CMAKE_STATIC_TYPE): CMAKE_PlUGIN_EXT = .dylib
else: CMAKE_PlUGIN_EXT = .a
- CMAKE_PLUGIN_LOCATION_RELEASE = $$PLUGIN_TYPE/lib$${TARGET}$${CMAKE_PlUGIN_EXT}
- CMAKE_PLUGIN_LOCATION_DEBUG = $$PLUGIN_TYPE/lib$${TARGET}$${CMAKE_PlUGIN_EXT}
+ CMAKE_PLUGIN_LOCATION_RELEASE = $${CMAKE_PLUGIN_DIR}$$PLUGIN_TYPE/lib$${TARGET}$${CMAKE_PlUGIN_EXT}
+ CMAKE_PLUGIN_LOCATION_DEBUG = $${CMAKE_PLUGIN_DIR}$$PLUGIN_TYPE/lib$${TARGET}$${CMAKE_PlUGIN_EXT}
} else {
isEmpty(CMAKE_STATIC_TYPE): CMAKE_PlUGIN_EXT = .so
else: CMAKE_PlUGIN_EXT = .a
- CMAKE_PLUGIN_LOCATION_RELEASE = $$PLUGIN_TYPE/lib$${TARGET}$${CMAKE_PlUGIN_EXT}
- CMAKE_PLUGIN_LOCATION_DEBUG = $$PLUGIN_TYPE/lib$${TARGET}$${CMAKE_PlUGIN_EXT}
+ CMAKE_PLUGIN_LOCATION_RELEASE = $${CMAKE_PLUGIN_DIR}$$PLUGIN_TYPE/lib$${TARGET}$${CMAKE_PlUGIN_EXT}
+ CMAKE_PLUGIN_LOCATION_DEBUG = $${CMAKE_PLUGIN_DIR}$$PLUGIN_TYPE/lib$${TARGET}$${CMAKE_PlUGIN_EXT}
}
}
cmake_target_file.input = $$PWD/data/cmake/Qt5PluginTarget.cmake.in
Index: qtbase-opensource-src-5.7.0/mkspecs/features/data/cmake/Qt5PluginTarget.cmake.in
===================================================================
--- qtbase-opensource-src-5.7.0.orig/mkspecs/features/data/cmake/Qt5PluginTarget.cmake.in
+++ qtbase-opensource-src-5.7.0/mkspecs/features/data/cmake/Qt5PluginTarget.cmake.in
@@ -2,10 +2,10 @@
add_library(Qt5::$$CMAKE_PLUGIN_NAME MODULE IMPORTED)
!!IF !isEmpty(CMAKE_RELEASE_TYPE)
-_populate_$${CMAKE_MODULE_NAME}_plugin_properties($$CMAKE_PLUGIN_NAME RELEASE \"$${CMAKE_PLUGIN_LOCATION_RELEASE}\")
+_populate_$${CMAKE_MODULE_NAME}_plugin_properties($$CMAKE_PLUGIN_NAME RELEASE \"@NIX_OUT@/$${CMAKE_PLUGIN_LOCATION_RELEASE}\")
!!ENDIF
!!IF !isEmpty(CMAKE_DEBUG_TYPE)
-_populate_$${CMAKE_MODULE_NAME}_plugin_properties($$CMAKE_PLUGIN_NAME DEBUG \"$${CMAKE_PLUGIN_LOCATION_DEBUG}\")
+_populate_$${CMAKE_MODULE_NAME}_plugin_properties($$CMAKE_PLUGIN_NAME DEBUG \"@NIX_OUT@/$${CMAKE_PLUGIN_LOCATION_DEBUG}\")
!!ENDIF
list(APPEND Qt5$${CMAKE_MODULE_NAME}_PLUGINS Qt5::$$CMAKE_PLUGIN_NAME)