mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-27 08:04:14 +00:00
491 lines
22 KiB
Diff
491 lines
22 KiB
Diff
From 03a5a7eab673d18d00c9b5eb8c7d5b790079e8ff Mon Sep 17 00:00:00 2001
|
|
From: OPNA2608 <christoph.neidahl@gmail.com>
|
|
Date: Mon, 12 Apr 2021 20:20:46 +0200
|
|
Subject: [PATCH 03/11] qtbase-mkspecs
|
|
|
|
---
|
|
mkspecs/features/create_cmake.prf | 51 +++---------
|
|
.../data/cmake/Qt5BasicConfig.cmake.in | 80 +------------------
|
|
mkspecs/features/qml_module.prf | 2 +-
|
|
mkspecs/features/qml_plugin.prf | 2 +-
|
|
mkspecs/features/qt_app.prf | 2 +-
|
|
mkspecs/features/qt_build_paths.prf | 4 +-
|
|
mkspecs/features/qt_docs.prf | 10 +--
|
|
mkspecs/features/qt_example_installs.prf | 2 +-
|
|
mkspecs/features/qt_functions.prf | 27 ++++---
|
|
mkspecs/features/qt_installs.prf | 22 ++---
|
|
mkspecs/features/qt_plugin.prf | 2 +-
|
|
11 files changed, 52 insertions(+), 152 deletions(-)
|
|
|
|
diff --git a/mkspecs/features/create_cmake.prf b/mkspecs/features/create_cmake.prf
|
|
index 24ed125f12..f0666a1986 100644
|
|
--- a/mkspecs/features/create_cmake.prf
|
|
+++ b/mkspecs/features/create_cmake.prf
|
|
@@ -21,7 +21,7 @@ load(cmake_functions)
|
|
# at cmake time whether package has been found via a symlink, and correct
|
|
# that to an absolute path. This is only done for installations to
|
|
# the /usr or / prefix.
|
|
-CMAKE_INSTALL_LIBS_DIR = $$cmakeTargetPath($$[QT_INSTALL_LIBS])
|
|
+CMAKE_INSTALL_LIBS_DIR = $$cmakeTargetPath($$NIX_OUTPUT_OUT/lib/)
|
|
contains(CMAKE_INSTALL_LIBS_DIR, ^(/usr)?/lib(64)?.*): CMAKE_USR_MOVE_WORKAROUND = $$CMAKE_INSTALL_LIBS_DIR
|
|
|
|
CMAKE_OUT_DIR = $$MODULE_BASE_OUTDIR/lib/cmake
|
|
@@ -77,45 +77,20 @@ split_incpath {
|
|
$$cmake_extra_source_includes.output
|
|
}
|
|
|
|
-CMAKE_INCLUDE_DIR = $$cmakeRelativePath($$[QT_INSTALL_HEADERS], $$[QT_INSTALL_PREFIX])
|
|
-contains(CMAKE_INCLUDE_DIR, "^\\.\\./.*") {
|
|
- CMAKE_INCLUDE_DIR = $$[QT_INSTALL_HEADERS]/
|
|
- CMAKE_INCLUDE_DIR_IS_ABSOLUTE = True
|
|
-}
|
|
+CMAKE_INCLUDE_DIR = $$NIX_OUTPUT_DEV/include/
|
|
+CMAKE_INCLUDE_DIR_IS_ABSOLUTE = True
|
|
|
|
-CMAKE_LIB_DIR = $$cmakeRelativePath($$[QT_INSTALL_LIBS], $$[QT_INSTALL_PREFIX])
|
|
-contains(CMAKE_LIB_DIR,"^\\.\\./.*") {
|
|
- CMAKE_LIB_DIR = $$[QT_INSTALL_LIBS]/
|
|
- CMAKE_LIB_DIR_IS_ABSOLUTE = True
|
|
-} else {
|
|
- CMAKE_RELATIVE_INSTALL_LIBS_DIR = $$cmakeRelativePath($$[QT_INSTALL_PREFIX], $$[QT_INSTALL_LIBS])
|
|
- # We need to go up another two levels because the CMake files are
|
|
- # installed in $${CMAKE_LIB_DIR}/cmake/Qt5$${CMAKE_MODULE_NAME}
|
|
- CMAKE_RELATIVE_INSTALL_DIR = "$${CMAKE_RELATIVE_INSTALL_LIBS_DIR}../../"
|
|
-}
|
|
+CMAKE_BIN_DIR = $$NIX_OUTPUT_BIN/bin/
|
|
+CMAKE_BIN_DIR_IS_ABSOLUTE = True
|
|
|
|
-CMAKE_BIN_DIR = $$cmakeRelativePath($$[QT_HOST_BINS], $$[QT_INSTALL_PREFIX])
|
|
-contains(CMAKE_BIN_DIR, "^\\.\\./.*") {
|
|
- CMAKE_BIN_DIR = $$[QT_HOST_BINS]/
|
|
- CMAKE_BIN_DIR_IS_ABSOLUTE = True
|
|
-}
|
|
+CMAKE_LIB_DIR = $$NIX_OUTPUT_OUT/lib/
|
|
+CMAKE_LIB_DIR_IS_ABSOLUTE = True
|
|
|
|
-CMAKE_PLUGIN_DIR = $$cmakeRelativePath($$[QT_INSTALL_PLUGINS], $$[QT_INSTALL_PREFIX])
|
|
-contains(CMAKE_PLUGIN_DIR, "^\\.\\./.*") {
|
|
- CMAKE_PLUGIN_DIR = $$[QT_INSTALL_PLUGINS]/
|
|
- CMAKE_PLUGIN_DIR_IS_ABSOLUTE = True
|
|
-}
|
|
+CMAKE_PLUGIN_DIR = $$NIX_OUTPUT_PLUGIN/
|
|
+CMAKE_PLUGIN_DIR_IS_ABSOLUTE = True
|
|
|
|
-win32:!static:!staticlib {
|
|
- CMAKE_DLL_DIR = $$cmakeRelativePath($$[QT_INSTALL_BINS], $$[QT_INSTALL_PREFIX])
|
|
- contains(CMAKE_DLL_DIR, "^\\.\\./.*") {
|
|
- CMAKE_DLL_DIR = $$[QT_INSTALL_BINS]/
|
|
- CMAKE_DLL_DIR_IS_ABSOLUTE = True
|
|
- }
|
|
-} else {
|
|
- CMAKE_DLL_DIR = $$CMAKE_LIB_DIR
|
|
- CMAKE_DLL_DIR_IS_ABSOLUTE = $$CMAKE_LIB_DIR_IS_ABSOLUTE
|
|
-}
|
|
+CMAKE_DLL_DIR = $$NIX_OUTPUT_OUT/lib/
|
|
+CMAKE_DLL_DIR_IS_ABSOLUTE = True
|
|
|
|
static|staticlib:CMAKE_STATIC_TYPE = true
|
|
|
|
@@ -258,7 +233,7 @@ contains(CONFIG, plugin) {
|
|
|
|
cmake_qt5_plugin_file.files = $$cmake_target_file.output
|
|
static|staticlib: cmake_qt5_plugin_file.files += $$cmake_qt5_plugin_import_file.output
|
|
- cmake_qt5_plugin_file.path = $$[QT_INSTALL_LIBS]/cmake/Qt5$${CMAKE_MODULE_NAME}
|
|
+ cmake_qt5_plugin_file.path = $$NIX_OUTPUT_OUT/lib/cmake/Qt5$${CMAKE_MODULE_NAME}
|
|
INSTALLS += cmake_qt5_plugin_file
|
|
|
|
return()
|
|
@@ -400,7 +375,7 @@ exists($$cmake_macros_file.input) {
|
|
cmake_qt5_module_files.files += $$cmake_macros_file.output
|
|
}
|
|
|
|
-cmake_qt5_module_files.path = $$[QT_INSTALL_LIBS]/cmake/Qt5$${CMAKE_MODULE_NAME}
|
|
+cmake_qt5_module_files.path = $$NIX_OUTPUT_OUT/lib/cmake/Qt5$${CMAKE_MODULE_NAME}
|
|
|
|
# We are generating cmake files. Most developers of Qt are not aware of cmake,
|
|
# so we require automatic tests to be available. The only module which should
|
|
diff --git a/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in b/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in
|
|
index db18dbece6..8246f37931 100644
|
|
--- a/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in
|
|
+++ b/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in
|
|
@@ -2,30 +2,6 @@ if (CMAKE_VERSION VERSION_LESS 3.1.0)
|
|
message(FATAL_ERROR \"Qt 5 $${CMAKE_MODULE_NAME} module requires at least CMake version 3.1.0\")
|
|
endif()
|
|
|
|
-!!IF !isEmpty(CMAKE_USR_MOVE_WORKAROUND)
|
|
-!!IF !isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE)
|
|
-set(_qt5$${CMAKE_MODULE_NAME}_install_prefix \"$$[QT_INSTALL_PREFIX]\")
|
|
-!!ELSE
|
|
-get_filename_component(_IMPORT_PREFIX \"${CMAKE_CURRENT_LIST_FILE}\" PATH)
|
|
-# Use original install prefix when loaded through a
|
|
-# cross-prefix symbolic link such as /lib -> /usr/lib.
|
|
-get_filename_component(_realCurr \"${_IMPORT_PREFIX}\" REALPATH)
|
|
-get_filename_component(_realOrig \"$$CMAKE_INSTALL_LIBS_DIR/cmake/Qt5$${CMAKE_MODULE_NAME}\" REALPATH)
|
|
-if(_realCurr STREQUAL _realOrig)
|
|
- get_filename_component(_qt5$${CMAKE_MODULE_NAME}_install_prefix \"$$CMAKE_INSTALL_LIBS_DIR/$${CMAKE_RELATIVE_INSTALL_LIBS_DIR}\" ABSOLUTE)
|
|
-else()
|
|
- get_filename_component(_qt5$${CMAKE_MODULE_NAME}_install_prefix \"${CMAKE_CURRENT_LIST_DIR}/$${CMAKE_RELATIVE_INSTALL_DIR}\" ABSOLUTE)
|
|
-endif()
|
|
-unset(_realOrig)
|
|
-unset(_realCurr)
|
|
-unset(_IMPORT_PREFIX)
|
|
-!!ENDIF
|
|
-!!ELIF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE)
|
|
-get_filename_component(_qt5$${CMAKE_MODULE_NAME}_install_prefix \"${CMAKE_CURRENT_LIST_DIR}/$${CMAKE_RELATIVE_INSTALL_DIR}\" ABSOLUTE)
|
|
-!!ELSE
|
|
-set(_qt5$${CMAKE_MODULE_NAME}_install_prefix \"$$[QT_INSTALL_PREFIX]\")
|
|
-!!ENDIF
|
|
-
|
|
!!IF !equals(TEMPLATE, aux)
|
|
# For backwards compatibility only. Use Qt5$${CMAKE_MODULE_NAME}_VERSION instead.
|
|
set(Qt5$${CMAKE_MODULE_NAME}_VERSION_STRING "$$eval(QT.$${MODULE}.VERSION)")
|
|
@@ -145,11 +121,7 @@ macro(_populate_$${CMAKE_MODULE_NAME}_target_properties Configuration LIB_LOCATI
|
|
IsDebugAndRelease)
|
|
set_property(TARGET Qt5::$${CMAKE_MODULE_NAME} APPEND PROPERTY IMPORTED_CONFIGURATIONS ${Configuration})
|
|
|
|
-!!IF isEmpty(CMAKE_DLL_DIR_IS_ABSOLUTE)
|
|
- set(imported_location \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_DLL_DIR}${LIB_LOCATION}\")
|
|
-!!ELSE
|
|
set(imported_location \"$${CMAKE_DLL_DIR}${LIB_LOCATION}\")
|
|
-!!ENDIF
|
|
_qt5_$${CMAKE_MODULE_NAME}_check_file_exists(${imported_location})
|
|
set(_deps
|
|
${_Qt5$${CMAKE_MODULE_NAME}_LIB_DEPENDENCIES}
|
|
@@ -209,11 +181,7 @@ macro(_populate_$${CMAKE_MODULE_NAME}_target_properties Configuration LIB_LOCATI
|
|
!!ENDIF
|
|
|
|
!!IF !isEmpty(CMAKE_WINDOWS_BUILD)
|
|
-!!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE)
|
|
- set(imported_implib \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}${IMPLIB_LOCATION}\")
|
|
-!!ELSE
|
|
set(imported_implib \"IMPORTED_IMPLIB_${Configuration}\" \"$${CMAKE_LIB_DIR}${IMPLIB_LOCATION}\")
|
|
-!!ENDIF
|
|
_qt5_$${CMAKE_MODULE_NAME}_check_file_exists(${imported_implib})
|
|
if(NOT \"${IMPLIB_LOCATION}\" STREQUAL \"\")
|
|
set_target_properties(Qt5::$${CMAKE_MODULE_NAME} PROPERTIES
|
|
@@ -229,24 +197,13 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME})
|
|
!!IF !no_module_headers
|
|
!!IF !isEmpty(CMAKE_BUILD_IS_FRAMEWORK)
|
|
set(_Qt5$${CMAKE_MODULE_NAME}_OWN_INCLUDE_DIRS
|
|
- \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}$${CMAKE_QT_STEM}.framework\"
|
|
- \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}$${CMAKE_QT_STEM}.framework/Headers\"
|
|
+ \"$${CMAKE_LIB_DIR}$${CMAKE_QT_STEM}.framework\"
|
|
+ \"$${CMAKE_LIB_DIR}$${CMAKE_QT_STEM}.framework/Headers\"
|
|
)
|
|
!!IF isEmpty(CMAKE_NO_PRIVATE_INCLUDES)
|
|
set(Qt5$${CMAKE_MODULE_NAME}_PRIVATE_INCLUDE_DIRS
|
|
- \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}$${CMAKE_QT_STEM}.framework/Versions/$$section(VERSION, ., 0, 0)/Headers/$$VERSION/\"
|
|
- \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}$${CMAKE_QT_STEM}.framework/Versions/$$section(VERSION, ., 0, 0)/Headers/$$VERSION/$${MODULE_INCNAME}\"
|
|
- )
|
|
-!!ELSE
|
|
- set(Qt5$${CMAKE_MODULE_NAME}_PRIVATE_INCLUDE_DIRS \"\")
|
|
-!!ENDIF
|
|
-!!ELSE
|
|
-!!IF isEmpty(CMAKE_INCLUDE_DIR_IS_ABSOLUTE)
|
|
- set(_Qt5$${CMAKE_MODULE_NAME}_OWN_INCLUDE_DIRS \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$$CMAKE_INCLUDE_DIR\" \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_INCLUDE_DIR}$${MODULE_INCNAME}\")
|
|
-!!IF isEmpty(CMAKE_NO_PRIVATE_INCLUDES)
|
|
- set(Qt5$${CMAKE_MODULE_NAME}_PRIVATE_INCLUDE_DIRS
|
|
- \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_INCLUDE_DIR}$${MODULE_INCNAME}/$$VERSION\"
|
|
- \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_INCLUDE_DIR}$${MODULE_INCNAME}/$$VERSION/$${MODULE_INCNAME}\"
|
|
+ \"$${CMAKE_LIB_DIR}$${CMAKE_QT_STEM}.framework/Versions/$$section(VERSION, .,0, 0)/Headers/$$VERSION/\"
|
|
+ \"$${CMAKE_LIB_DIR}$${CMAKE_QT_STEM}.framework/Versions/$$section(VERSION, .,0, 0)/Headers/$$VERSION/$${MODULE_INCNAME}\"
|
|
)
|
|
!!ELSE
|
|
set(Qt5$${CMAKE_MODULE_NAME}_PRIVATE_INCLUDE_DIRS \"\")
|
|
@@ -262,7 +219,6 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME})
|
|
set(Qt5$${CMAKE_MODULE_NAME}_PRIVATE_INCLUDE_DIRS \"\")
|
|
!!ENDIF
|
|
!!ENDIF
|
|
-!!ENDIF
|
|
!!IF !isEmpty(CMAKE_ADD_SOURCE_INCLUDE_DIRS)
|
|
include(\"${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake\" OPTIONAL)
|
|
!!ENDIF
|
|
@@ -491,25 +447,13 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME})
|
|
!!IF !isEmpty(CMAKE_FIND_OTHER_LIBRARY_BUILD)
|
|
!!IF isEmpty(CMAKE_DEBUG_TYPE)
|
|
!!IF !isEmpty(CMAKE_STATIC_WINDOWS_BUILD)
|
|
-!!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE)
|
|
- if (EXISTS \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}$${CMAKE_IMPLIB_FILE_LOCATION_DEBUG}\" )
|
|
-!!ELSE // CMAKE_LIB_DIR_IS_ABSOLUTE
|
|
if (EXISTS \"$${CMAKE_IMPLIB_FILE_LOCATION_DEBUG}\" )
|
|
-!!ENDIF // CMAKE_LIB_DIR_IS_ABSOLUTE
|
|
_populate_$${CMAKE_MODULE_NAME}_target_properties(DEBUG \"$${CMAKE_IMPLIB_FILE_LOCATION_DEBUG}\" \"\" $${CMAKE_DEBUG_AND_RELEASE})
|
|
!!ELSE // CMAKE_STATIC_WINDOWS_BUILD
|
|
if (EXISTS
|
|
-!!IF isEmpty(CMAKE_DLL_DIR_IS_ABSOLUTE)
|
|
- \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_DLL_DIR}$${CMAKE_LIB_FILE_LOCATION_DEBUG}\"
|
|
-!!ELSE
|
|
\"$${CMAKE_LIB_FILE_LOCATION_DEBUG}\"
|
|
-!!ENDIF
|
|
AND EXISTS
|
|
-!!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE)
|
|
- \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}$${CMAKE_IMPLIB_FILE_LOCATION_DEBUG}\" )
|
|
-!!ELSE
|
|
\"$${CMAKE_IMPLIB_FILE_LOCATION_DEBUG}\" )
|
|
-!!ENDIF
|
|
_populate_$${CMAKE_MODULE_NAME}_target_properties(DEBUG \"$${CMAKE_LIB_FILE_LOCATION_DEBUG}\" \"$${CMAKE_IMPLIB_FILE_LOCATION_DEBUG}\" $${CMAKE_DEBUG_AND_RELEASE})
|
|
!!ENDIF // CMAKE_STATIC_WINDOWS_BUILD
|
|
endif()
|
|
@@ -528,25 +472,13 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME})
|
|
!!IF !isEmpty(CMAKE_FIND_OTHER_LIBRARY_BUILD)
|
|
!!IF isEmpty(CMAKE_RELEASE_TYPE)
|
|
!!IF !isEmpty(CMAKE_STATIC_WINDOWS_BUILD)
|
|
-!!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE)
|
|
- if (EXISTS \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}$${CMAKE_IMPLIB_FILE_LOCATION_RELEASE}\" )
|
|
-!!ELSE // CMAKE_LIB_DIR_IS_ABSOLUTE
|
|
if (EXISTS \"$${CMAKE_IMPLIB_FILE_LOCATION_RELEASE}\" )
|
|
-!!ENDIF // CMAKE_LIB_DIR_IS_ABSOLUTE
|
|
_populate_$${CMAKE_MODULE_NAME}_target_properties(RELEASE \"$${CMAKE_IMPLIB_FILE_LOCATION_RELEASE}\" \"\" $${CMAKE_DEBUG_AND_RELEASE})
|
|
!!ELSE // CMAKE_STATIC_WINDOWS_BUILD
|
|
if (EXISTS
|
|
-!!IF isEmpty(CMAKE_DLL_DIR_IS_ABSOLUTE)
|
|
- \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_DLL_DIR}$${CMAKE_LIB_FILE_LOCATION_RELEASE}\"
|
|
-!!ELSE
|
|
\"$${CMAKE_LIB_FILE_LOCATION_RELEASE}\"
|
|
-!!ENDIF
|
|
AND EXISTS
|
|
-!!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE)
|
|
- \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}$${CMAKE_IMPLIB_FILE_LOCATION_RELEASE}\" )
|
|
-!!ELSE
|
|
\"$${CMAKE_IMPLIB_FILE_LOCATION_RELEASE}\" )
|
|
-!!ENDIF
|
|
_populate_$${CMAKE_MODULE_NAME}_target_properties(RELEASE \"$${CMAKE_LIB_FILE_LOCATION_RELEASE}\" \"$${CMAKE_IMPLIB_FILE_LOCATION_RELEASE}\" $${CMAKE_DEBUG_AND_RELEASE})
|
|
!!ENDIF // CMAKE_STATIC_WINDOWS_BUILD
|
|
endif()
|
|
@@ -573,11 +505,7 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME})
|
|
IsDebugAndRelease)
|
|
set_property(TARGET Qt5::${Plugin} APPEND PROPERTY IMPORTED_CONFIGURATIONS ${Configuration})
|
|
|
|
-!!IF isEmpty(CMAKE_PLUGIN_DIR_IS_ABSOLUTE)
|
|
- set(imported_location \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_PLUGIN_DIR}${PLUGIN_LOCATION}\")
|
|
-!!ELSE
|
|
set(imported_location \"$${CMAKE_PLUGIN_DIR}${PLUGIN_LOCATION}\")
|
|
-!!ENDIF
|
|
_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/qml_module.prf b/mkspecs/features/qml_module.prf
|
|
index 3d6cd9b3db..ca8b0b2701 100644
|
|
--- a/mkspecs/features/qml_module.prf
|
|
+++ b/mkspecs/features/qml_module.prf
|
|
@@ -51,7 +51,7 @@ builtin_resources {
|
|
# Install rules
|
|
qmldir.base = $$qmldir_path
|
|
qmldir.files = $$qmldir_file
|
|
-qmldir.path = $$[QT_INSTALL_QML]/$$TARGETPATH
|
|
+qmldir.path = $$NIX_OUTPUT_QML/$$TARGETPATH
|
|
|
|
qmlfiles.base = $$_PRO_FILE_PWD_
|
|
qmlfiles.files = $$fq_aux_qml_files
|
|
diff --git a/mkspecs/features/qml_plugin.prf b/mkspecs/features/qml_plugin.prf
|
|
index 1b67435787..24a1f78c17 100644
|
|
--- a/mkspecs/features/qml_plugin.prf
|
|
+++ b/mkspecs/features/qml_plugin.prf
|
|
@@ -50,7 +50,7 @@ load(qt_build_paths)
|
|
|
|
DESTDIR = $$MODULE_BASE_OUTDIR/qml/$$TARGETPATH
|
|
|
|
-target.path = $$[QT_INSTALL_QML]/$$TARGETPATH
|
|
+target.path = $$NIX_OUTPUT_QML/$$TARGETPATH
|
|
INSTALLS += target
|
|
|
|
# Some final setup
|
|
diff --git a/mkspecs/features/qt_app.prf b/mkspecs/features/qt_app.prf
|
|
index 8354f30eea..62028fef8e 100644
|
|
--- a/mkspecs/features/qt_app.prf
|
|
+++ b/mkspecs/features/qt_app.prf
|
|
@@ -30,7 +30,7 @@ host_build:force_bootstrap {
|
|
target.path = $$[QT_HOST_BINS]
|
|
} else {
|
|
!build_pass:qtConfig(debug_and_release): CONFIG += release
|
|
- target.path = $$[QT_INSTALL_BINS]
|
|
+ target.path = $$NIX_OUTPUT_BIN/bin
|
|
CONFIG += relative_qt_rpath # Qt's tools and apps should be relocatable
|
|
}
|
|
INSTALLS += target
|
|
diff --git a/mkspecs/features/qt_build_paths.prf b/mkspecs/features/qt_build_paths.prf
|
|
index 3bb3823a8e..655b7b7db8 100644
|
|
--- a/mkspecs/features/qt_build_paths.prf
|
|
+++ b/mkspecs/features/qt_build_paths.prf
|
|
@@ -24,6 +24,6 @@ exists($$MODULE_BASE_INDIR/.git): \
|
|
!force_independent {
|
|
# If the module is not built independently, everything ends up in qtbase.
|
|
# This is the case in non-prefix builds, except for selected modules.
|
|
- MODULE_BASE_OUTDIR = $$[QT_HOST_PREFIX]
|
|
- MODULE_QMAKE_OUTDIR = $$[QT_HOST_PREFIX]
|
|
+ MODULE_BASE_OUTDIR = $$NIX_OUTPUT_OUT
|
|
+ MODULE_QMAKE_OUTDIR = $$NIX_OUTPUT_OUT
|
|
}
|
|
diff --git a/mkspecs/features/qt_docs.prf b/mkspecs/features/qt_docs.prf
|
|
index 095bf15dac..4cc977bea5 100644
|
|
--- a/mkspecs/features/qt_docs.prf
|
|
+++ b/mkspecs/features/qt_docs.prf
|
|
@@ -65,7 +65,7 @@ QMAKE_DOCS_OUTPUTDIR = $$QMAKE_DOCS_BASE_OUTDIR/$$QMAKE_DOCS_TARGETDIR
|
|
|
|
QDOC += -outputdir $$shell_quote($$QMAKE_DOCS_OUTPUTDIR)
|
|
!build_online_docs: \
|
|
- QDOC += -installdir $$shell_quote($$[QT_INSTALL_DOCS])
|
|
+ QDOC += -installdir $$shell_quote($$NIX_OUTPUT_DOC)
|
|
PREP_DOC_INDEXES =
|
|
DOC_INDEXES =
|
|
!isEmpty(QTREPOS) {
|
|
@@ -84,8 +84,8 @@ DOC_INDEXES =
|
|
DOC_INDEXES += -indexdir $$shell_quote($$qrep/doc)
|
|
} else {
|
|
prepare_docs: \
|
|
- PREP_DOC_INDEXES += -indexdir $$shell_quote($$[QT_INSTALL_DOCS/get])
|
|
- DOC_INDEXES += -indexdir $$shell_quote($$[QT_INSTALL_DOCS/get])
|
|
+ PREP_DOC_INDEXES += -indexdir $$shell_quote($$NIX_OUTPUT_DOC)
|
|
+ DOC_INDEXES += -indexdir $$shell_quote($$NIX_OUTPUT_DOC)
|
|
}
|
|
|
|
qtattributionsscanner.target = qtattributionsscanner
|
|
@@ -108,12 +108,12 @@ prepare_docs {
|
|
qch_docs.commands = $$QHELPGENERATOR $$shell_quote($$QMAKE_DOCS_OUTPUTDIR/$${QMAKE_DOCS_TARGET}.qhp) -o $$shell_quote($$QMAKE_DOCS_BASE_OUTDIR/$${QMAKE_DOCS_TARGET}.qch)
|
|
|
|
inst_html_docs.files = $$QMAKE_DOCS_OUTPUTDIR
|
|
- inst_html_docs.path = $$[QT_INSTALL_DOCS]
|
|
+ inst_html_docs.path = $$NIX_OUTPUT_DOC
|
|
inst_html_docs.CONFIG += no_check_exist directory no_default_install no_build
|
|
INSTALLS += inst_html_docs
|
|
|
|
inst_qch_docs.files = $$QMAKE_DOCS_BASE_OUTDIR/$${QMAKE_DOCS_TARGET}.qch
|
|
- inst_qch_docs.path = $$[QT_INSTALL_DOCS]
|
|
+ inst_qch_docs.path = $$NIX_OUTPUT_DOC
|
|
inst_qch_docs.CONFIG += no_check_exist no_default_install no_build
|
|
INSTALLS += inst_qch_docs
|
|
|
|
diff --git a/mkspecs/features/qt_example_installs.prf b/mkspecs/features/qt_example_installs.prf
|
|
index 15b373ba40..5c373fe1d5 100644
|
|
--- a/mkspecs/features/qt_example_installs.prf
|
|
+++ b/mkspecs/features/qt_example_installs.prf
|
|
@@ -91,7 +91,7 @@ sourcefiles += \
|
|
$$SOURCES $$HEADERS $$FORMS $$RESOURCES $$TRANSLATIONS \
|
|
$$DBUS_ADAPTORS $$DBUS_INTERFACES
|
|
addInstallFiles(sources.files, $$sourcefiles)
|
|
-sources.path = $$[QT_INSTALL_EXAMPLES]/$$probase
|
|
+sources.path = $$NIX_OUTPUT_DEV/share/examples/$$probase
|
|
INSTALLS += sources
|
|
|
|
check_examples {
|
|
diff --git a/mkspecs/features/qt_functions.prf b/mkspecs/features/qt_functions.prf
|
|
index 7777e615bd..b0c6880a74 100644
|
|
--- a/mkspecs/features/qt_functions.prf
|
|
+++ b/mkspecs/features/qt_functions.prf
|
|
@@ -87,19 +87,22 @@ defineTest(qtHaveModule) {
|
|
defineTest(qtPrepareTool) {
|
|
cmd = $$eval(QT_TOOL.$${2}.binary)
|
|
isEmpty(cmd) {
|
|
- cmd = $$[QT_HOST_BINS]/$$2
|
|
- exists($${cmd}.pl) {
|
|
- $${1}_EXE = $${cmd}.pl
|
|
- cmd = perl -w $$system_path($${cmd}.pl)
|
|
- } else: contains(QMAKE_HOST.os, Windows) {
|
|
- $${1}_EXE = $${cmd}.exe
|
|
- cmd = $$system_path($${cmd}.exe)
|
|
- } else:contains(QMAKE_HOST.os, Darwin) {
|
|
- BUNDLENAME = $${cmd}.app/Contents/MacOS/$$2
|
|
- exists($$BUNDLENAME) {
|
|
- cmd = $$BUNDLENAME
|
|
+ cmd = $$system("command -v $${2}")
|
|
+ isEmpty(cmd) {
|
|
+ cmd = $$system("command -v $${2}.pl")
|
|
+ !isEmpty(cmd) {
|
|
+ $${1}_EXE = $$cmd
|
|
+ cmd = perl -w $$system_path($${cmd})
|
|
+ } else: contains(QMAKE_HOST.os, Windows) {
|
|
+ cmd = $$system("command -v $${2}.exe")
|
|
+ $${1}_EXE = $$cmd
|
|
+ } else: contains(QMAKE_HOST.os, Darwin) {
|
|
+ cmd = $$system("command -v $${2}.app")
|
|
+ !isEmpty(cmd) {
|
|
+ cmd = $${cmd}/Contents/MacOS/$${2}
|
|
+ $${1}_EXE = $$cmd
|
|
+ }
|
|
}
|
|
- $${1}_EXE = $$cmd
|
|
} else {
|
|
$${1}_EXE = $$cmd
|
|
}
|
|
diff --git a/mkspecs/features/qt_installs.prf b/mkspecs/features/qt_installs.prf
|
|
index 1ebca17366..a8f958eae8 100644
|
|
--- a/mkspecs/features/qt_installs.prf
|
|
+++ b/mkspecs/features/qt_installs.prf
|
|
@@ -12,16 +12,10 @@
|
|
#library
|
|
!qt_no_install_library {
|
|
win32 {
|
|
- host_build: \
|
|
- dlltarget.path = $$[QT_HOST_BINS]
|
|
- else: \
|
|
- dlltarget.path = $$[QT_INSTALL_BINS]
|
|
+ dlltarget.path = $$NIX_OUTPUT_BIN/bin
|
|
INSTALLS += dlltarget
|
|
}
|
|
- host_build: \
|
|
- target.path = $$[QT_HOST_LIBS]
|
|
- else: \
|
|
- target.path = $$[QT_INSTALL_LIBS]
|
|
+ target.path = $$NIX_OUTPUT_OUT/lib
|
|
!static: target.CONFIG = no_dll
|
|
INSTALLS += target
|
|
}
|
|
@@ -29,35 +23,35 @@
|
|
#headers
|
|
qt_install_headers {
|
|
gen_headers.files = $$SYNCQT.GENERATED_HEADER_FILES
|
|
- gen_headers.path = $$[QT_INSTALL_HEADERS]/$$MODULE_INCNAME
|
|
+ gen_headers.path = $$NIX_OUTPUT_DEV/include/$$MODULE_INCNAME
|
|
INSTALLS += gen_headers
|
|
|
|
targ_headers.files = $$SYNCQT.HEADER_FILES $$SYNCQT.INJECTED_HEADER_FILES
|
|
- targ_headers.path = $$[QT_INSTALL_HEADERS]/$$MODULE_INCNAME
|
|
+ targ_headers.path = $$NIX_OUTPUT_DEV/include/$$MODULE_INCNAME
|
|
INSTALLS += targ_headers
|
|
|
|
private_headers.files = $$SYNCQT.PRIVATE_HEADER_FILES $$SYNCQT.INJECTED_PRIVATE_HEADER_FILES
|
|
- private_headers.path = $$[QT_INSTALL_HEADERS]/$$MODULE_INCNAME/$$VERSION/$$MODULE_INCNAME/private
|
|
+ private_headers.path = $$NIX_OUTPUT_DEV/include/$$MODULE_INCNAME/$$VERSION/$$MODULE_INCNAME/private
|
|
generated_privates: \
|
|
private_headers.CONFIG += no_check_exist
|
|
INSTALLS += private_headers
|
|
|
|
qpa_headers.files = $$SYNCQT.QPA_HEADER_FILES
|
|
- qpa_headers.path = $$[QT_INSTALL_HEADERS]/$$MODULE_INCNAME/$$VERSION/$$MODULE_INCNAME/qpa
|
|
+ qpa_headers.path = $$NIX_OUTPUT_DEV/include/$$MODULE_INCNAME/$$VERSION/$$MODULE_INCNAME/qpa
|
|
INSTALLS += qpa_headers
|
|
}
|
|
|
|
#module
|
|
qt_install_module {
|
|
!isEmpty(MODULE_PRI) {
|
|
- pritarget.path = $$[QT_HOST_DATA]/mkspecs/modules
|
|
+ pritarget.path = $$NIX_OUTPUT_DEV/mkspecs/modules
|
|
pritarget.files = $$MODULE_PRI
|
|
INSTALLS += pritarget
|
|
} else: isEmpty(MODULE_PRIVATE_PRI) {
|
|
warning("Project $$basename(_PRO_FILE_) is a module, but has not defined MODULE_PRI, which is required for Qt to expose the module to other projects.")
|
|
}
|
|
!isEmpty(MODULE_PRIVATE_PRI) {
|
|
- privpritarget.path = $$[QT_HOST_DATA]/mkspecs/modules
|
|
+ privpritarget.path = $$NIX_OUTPUT_DEV/mkspecs/modules
|
|
privpritarget.files = $$MODULE_PRIVATE_PRI
|
|
INSTALLS += privpritarget
|
|
}
|
|
diff --git a/mkspecs/features/qt_plugin.prf b/mkspecs/features/qt_plugin.prf
|
|
index 573d717eea..024c624cb6 100644
|
|
--- a/mkspecs/features/qt_plugin.prf
|
|
+++ b/mkspecs/features/qt_plugin.prf
|
|
@@ -88,7 +88,7 @@ CONFIG(static, static|shared)|prefix_build {
|
|
}
|
|
}
|
|
|
|
-target.path = $$[QT_INSTALL_PLUGINS]/$$PLUGIN_TYPE
|
|
+target.path = $$NIX_OUTPUT_PLUGIN/$$PLUGIN_TYPE
|
|
INSTALLS += target
|
|
|
|
qt_libinfix_plugins: TARGET = $$TARGET$$QT_LIBINFIX
|
|
--
|
|
2.29.3
|
|
|