Skip to content

Commit

Permalink
(#6019) qt: raise conan libs priority vs system libs
Browse files Browse the repository at this point in the history
* qt: raise conan libs priority vs system libs

* Update conanfile.py

* fix test recipe

qmake already links to qt libraries
  • Loading branch information
ericLemanissier committed Jun 26, 2021
1 parent 26f4276 commit 39a9ad7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions recipes/qt/5.x.x/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -567,6 +567,8 @@ def build(self):
for package in self.deps_cpp_info.deps:
args += ["-I \"%s\"" % s for s in self.deps_cpp_info[package].include_paths]
args += ["-D %s" % s for s in self.deps_cpp_info[package].defines]
lib_arg = "/LIBPATH:" if self.settings.compiler == "Visual Studio" else "-L"
args.append("QMAKE_LFLAGS+=\"%s\"" % " ".join("%s%s" % (lib_arg, l) for package in self.deps_cpp_info.deps for l in self.deps_cpp_info[package].lib_paths))

if "libmysqlclient" in self.deps_cpp_info.deps:
args.append("-mysql_config \"%s\"" % os.path.join(self.deps_cpp_info["libmysqlclient"].rootpath, "bin", "mysql_config"))
Expand Down Expand Up @@ -641,8 +643,6 @@ def _getenvpath(var):
if self.settings.os == "Windows":
build_env["PATH"] = [os.path.join(self.source_folder, "qt5", "gnuwin32", "bin")]

build_env["LIB" if self.settings.compiler == "Visual Studio" else "LIBRARY_PATH"] = \
[l for package in self.deps_cpp_info.deps for l in self.deps_cpp_info[package].lib_paths]
with tools.environment_append(build_env):

if tools.os_info.is_macos:
Expand Down
1 change: 1 addition & 0 deletions recipes/qt/5.x.x/test_package/test_package.pro
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ CONFIG += console

CONFIG += conan_basic_setup
include($$OUT_PWD/../conanbuildinfo.pri)
LIBS -= $$CONAN_LIBS_QT

0 comments on commit 39a9ad7

Please sign in to comment.