qtbase: fix plugin path in CMake modules

This commit is contained in:
Thomas Tuegel 2017-05-18 21:04:39 -05:00
parent d9f29afa64
commit dea7372ebf
No known key found for this signature in database
GPG Key ID: 22CBF5249D4B4D59
4 changed files with 11 additions and 8 deletions

View File

@ -237,8 +237,9 @@ stdenv.mkDerivation {
postInstall = ''
find "$out" -name "*.cmake" | while read file; do
substituteInPlace "$file" \
--subst-var-by NIX_OUT "$out" \
--subst-var-by NIX_DEV "$dev"
--subst-var-by NIX_OUT "''${!outputLib}" \
--subst-var-by NIX_DEV "''${!outputDev}" \
--subst-var-by NIX_BIN "''${!outputBin}"
done
'';

View File

@ -306,11 +306,11 @@ Index: qtbase-opensource-src-5.8.0/mkspecs/features/data/cmake/Qt5PluginTarget.c
!!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}\")
+_populate_$${CMAKE_MODULE_NAME}_plugin_properties($$CMAKE_PLUGIN_NAME RELEASE \"@NIX_BIN@/$${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}\")
+_populate_$${CMAKE_MODULE_NAME}_plugin_properties($$CMAKE_PLUGIN_NAME DEBUG \"@NIX_BIN@/$${CMAKE_PLUGIN_LOCATION_DEBUG}\")
!!ENDIF
list(APPEND Qt5$${CMAKE_MODULE_NAME}_PLUGINS Qt5::$$CMAKE_PLUGIN_NAME)

View File

@ -269,8 +269,9 @@ stdenv.mkDerivation {
''
find "$out" -name "*.cmake" | while read file; do
substituteInPlace "$file" \
--subst-var-by NIX_OUT "$out" \
--subst-var-by NIX_DEV "$dev"
--subst-var-by NIX_OUT "''${!outputLib}" \
--subst-var-by NIX_DEV "''${!outputDev}" \
--subst-var-by NIX_BIN "''${!outputBin}"
done
'';

View File

@ -72,8 +72,9 @@ _qtPostInstallHook() {
if [ -n "$NIX_QT_SUBMODULE" ]; then
find "${!outputLib}" -name "*.cmake" | while read file; do
substituteInPlace "$file" \
--subst-var-by NIX_OUT "${!outputLib}" \
--subst-var-by NIX_DEV "${!outputDev}"
--subst-var-by NIX_OUT "${!outputLib}" \
--subst-var-by NIX_DEV "${!outputDev}" \
--subst-var-by NIX_BIN "${!outputBin}"
done
fi
}