question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

`qmake` generator produces two `LIBS` lines and no `RES` line

See original GitHub issue
class QmakeGenerator(Generator):
...
    @property
    def content(self):
...
# no RES here
        template = ('CONAN_INCLUDEPATH{dep_name} += {deps.include_paths}\n'
                    'CONAN_LIBS{dep_name} += {deps.lib_paths}\n'
                    'CONAN_BINDIRS{dep_name} += {deps.bin_paths}\n'
                    'CONAN_LIBS{dep_name} += {deps.libs}\n'
                    'CONAN_DEFINES{dep_name} += {deps.defines}\n'
                    'CONAN_QMAKE_CXXFLAGS{dep_name} += {deps.cppflags}\n'
                    'CONAN_QMAKE_CFLAGS{dep_name} += {deps.cflags}\n'
                    'CONAN_QMAKE_LFLAGS{dep_name} += {deps.sharedlinkflags}\n'
                    'CONAN_QMAKE_LFLAGS{dep_name} += {deps.exelinkflags}\n')
...
        output += ('\nCONFIG(conan_basic_setup) {\n'
                   '    INCLUDEPATH += $$CONAN_INCLUDEPATH\n'
=>                 '    LIBS += $$CONAN_LIBS\n'
                   '    BINDIRS += $$CONAN_BINDIRS\n'
=>                 '    LIBS += $$CONAN_LIBS\n'
                   '    DEFINES += $$CONAN_DEFINES\n'
                   '    QMAKE_CXXFLAGS += $$CONAN_QMAKE_CXXFLAGS\n'
                   '    QMAKE_CFLAGS += $$CONAN_QMAKE_CFLAGS\n'
                   '    QMAKE_LFLAGS += $$CONAN_QMAKE_LFLAGS\n'
                   '}\n')

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:7 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
DmitrySokolovcommented, Apr 20, 2017

There is no “res” directory in qmake. It uses

  • RESOURCES for Qt .qrc files
  • RC_FILE, RES_FILE for Windows resources (files)
  • QMAKE_INFO_PLIST + QMAKE_BUNDLE_DATA for iOS

and so on. If a library has a resource you should add it, for instance, RES_FILE += $$shell_path($$CONAN_RES_MYLIB/file.res).

qmake supports release and debug in the same config. There are 2 methods.

As an alternative to manually writing build type conditionals, some variables offer build-specific variants, for example QMAKE_LFLAGS_RELEASE in addition to the general QMAKE_LFLAGS. These should be used when available.

I am not sure if there are LIBS_DEBUG and LIBS_RELEASE vars (docs don’t mention them but qt_configure.prf has some vars).

0reactions
memshardedcommented, Jun 1, 2017

This has been released in 0.23, please upgrade, try it and report. Thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Variables | qmake Manual - Qt Documentation
Lists the libraries that the target depends on. Some backends, such as the generators for Visual Studio and Xcode project files, do not...
Read more >
Qt 4.7: qmake Variable Reference
qmake's fundamental behavior is influenced by variable declarations that define the build process of each project. Some of these declare resources, ...
Read more >
Variables | qmake Manual
The fundamental behavior of qmake is influenced by variable declarations that define the build process of each project. Some of these declare resources, ......
Read more >
Qt 4.4: qmake Variable Reference
qmake's fundamental behavior is influenced by variable declarations that define the build process of each project. Some of these declare resources, ...
Read more >
qmake not finding some existing libraries - Stack Overflow
Both of them are working 100% in a project in Eclipse (so no qmake/Qt Creator involved). I mentioned the /bin folder of the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found