LibraryProbe

Locates library files outside the project. More...

Inherits:

PathProbe

Detailed Description

On Windows, searches for library files within directories specified by the PATH environment variable.

On Unix, searches for library files within directories specified by the LIBRARY_PATH environment variable, as well as in "/usr/lib" and "/usr/local/lib".

On Linux, also searches in platform-specific directories, such as "/usr/lib64" and "/usr/lib/x86_64-linux-gnu".

For example, LibraryProbe can be used to search for a zlib library as follows:

import qbs.Probes

CppApplication {
    Probes.LibraryProbe {
        id: zlibProbe
        names: "z"
    }
    cpp.libraryPaths: zlibProbe.found ? [zlibProbe.path] : []
    cpp.dynamicLibraries: zlibProbe.found ? [zlibProbe.names] : []
    files: 'main.cpp'
}

© 2023 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.