mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-01 23:22:37 +00:00
Fix qtbase cmake for gui plugins [Qt 5.6, 5.9]
This is 54377280f0
ported to Qt 5.6 and 5.9
LTS versions.
This commit is contained in:
parent
d97f3cb647
commit
bf3a98ce04
@ -46,7 +46,7 @@ let
|
||||
srcs = import ./srcs.nix { inherit fetchurl; inherit mirror; };
|
||||
|
||||
patches = {
|
||||
qtbase = [ ./qtbase.patch ];
|
||||
qtbase = [ ./qtbase.patch ./qtbase-fixguicmake.patch ];
|
||||
qtdeclarative = [ ./qtdeclarative.patch ];
|
||||
qtscript = [ ./qtscript.patch ];
|
||||
qtserialport = [ ./qtserialport.patch ];
|
||||
|
30
pkgs/development/libraries/qt-5/5.6/qtbase-fixguicmake.patch
Normal file
30
pkgs/development/libraries/qt-5/5.6/qtbase-fixguicmake.patch
Normal file
@ -0,0 +1,30 @@
|
||||
diff --git a/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in b/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in
|
||||
index 0bbc871..3673634 100644
|
||||
--- a/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in
|
||||
+++ b/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in
|
||||
@@ -286,7 +286,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(imported_location \"$${CMAKE_PLUGIN_DIR}${PLUGIN_LOCATION}\")
|
||||
+ 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}
|
||||
diff --git a/mkspecs/features/data/cmake/Qt5PluginTarget.cmake.in b/mkspecs/features/data/cmake/Qt5PluginTarget.cmake.in
|
||||
index 5baf0fd..3583745 100644
|
||||
--- a/mkspecs/features/data/cmake/Qt5PluginTarget.cmake.in
|
||||
+++ b/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 \"$${CMAKE_PLUGIN_DIR}$${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 \"$${CMAKE_PLUGIN_DIR}$${CMAKE_PLUGIN_LOCATION_DEBUG}\")
|
||||
!!ENDIF
|
||||
|
||||
list(APPEND Qt5$${CMAKE_MODULE_NAME}_PLUGINS Qt5::$$CMAKE_PLUGIN_NAME)
|
@ -38,7 +38,7 @@ let
|
||||
srcs = import ./srcs.nix { inherit fetchurl; inherit mirror; };
|
||||
|
||||
patches = {
|
||||
qtbase = [ ./qtbase.patch ] ++ optional stdenv.isDarwin ./qtbase-darwin.patch;
|
||||
qtbase = [ ./qtbase.patch ./qtbase-fixguicmake.patch ] ++ optional stdenv.isDarwin ./qtbase-darwin.patch;
|
||||
qtdeclarative = [ ./qtdeclarative.patch ];
|
||||
qtscript = [ ./qtscript.patch ];
|
||||
qtserialport = [ ./qtserialport.patch ];
|
||||
|
30
pkgs/development/libraries/qt-5/5.9/qtbase-fixguicmake.patch
Normal file
30
pkgs/development/libraries/qt-5/5.9/qtbase-fixguicmake.patch
Normal file
@ -0,0 +1,30 @@
|
||||
diff --git a/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in b/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in
|
||||
index 0bbc871..3673634 100644
|
||||
--- a/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in
|
||||
+++ b/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in
|
||||
@@ -286,7 +286,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(imported_location \"$${CMAKE_PLUGIN_DIR}${PLUGIN_LOCATION}\")
|
||||
+ 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}
|
||||
diff --git a/mkspecs/features/data/cmake/Qt5PluginTarget.cmake.in b/mkspecs/features/data/cmake/Qt5PluginTarget.cmake.in
|
||||
index 5baf0fd..3583745 100644
|
||||
--- a/mkspecs/features/data/cmake/Qt5PluginTarget.cmake.in
|
||||
+++ b/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 \"$${CMAKE_PLUGIN_DIR}$${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 \"$${CMAKE_PLUGIN_DIR}$${CMAKE_PLUGIN_LOCATION_DEBUG}\")
|
||||
!!ENDIF
|
||||
|
||||
list(APPEND Qt5$${CMAKE_MODULE_NAME}_PLUGINS Qt5::$$CMAKE_PLUGIN_NAME)
|
Loading…
Reference in New Issue
Block a user