|  | Home · All Classes · Main Classes · Annotated · Grouped Classes · Functions |

[Previous: qmake Reference] [Contents] [Next: qmake Function Reference]

# qmake Variable Reference

CONFIG DEFINES DEF_FILE DESTDIR DLLDESTDIR DISTFILES HEADERS INCLUDEPATH FORMS LEXSOURCES LIBS MOC_DIR OBJECTS_DIR UI_DIR UI_HEADERS_DIR UI_SOURCES_DIR RCC_DIR REQUIRES SOURCES SUBDIRS TARGET TEMPLATE VERSION YACCSOURCES DESTDIR_TARGET DSP_TEMPLATE LEXIMPLS LEXOBJECTS MAKEFILE MAKEFILE_GENERATOR OBJECTS OBJMOC PRECOMPILED_HEADER QMAKE QMAKESPEC QMAKE_APP_FLAG QMAKE_APP_OR_DLL QMAKE_AR_CMD QMAKE_CFLAGS_DEBUG QMAKE_CFLAGS_MT QMAKE_CFLAGS_MT_DBG QMAKE_CFLAGS_MT_DLL QMAKE_CFLAGS_MT_DLLDBG QMAKE_CFLAGS_RELEASE QMAKE_CFLAGS_SHLIB QMAKE_CFLAGS_THREAD QMAKE_CFLAGS_WARN_OFF | QMAKE_CFLAGS_WARN_ON QMAKE_CLEAN QMAKE_CXXFLAGS_DEBUG QMAKE_CXXFLAGS_MT QMAKE_CXXFLAGS_MT_DBG QMAKE_CXXFLAGS_MT_DLL QMAKE_CXXFLAGS_MT_DLLDBG QMAKE_CXXFLAGS_RELEASE QMAKE_CXXFLAGS_SHLIB QMAKE_CXXFLAGS_THREAD QMAKE_CXXFLAGS_WARN_OFF QMAKE_CXXFLAGS_WARN_ON QMAKE_EXTENSION_SHLIB QMAKE_FAILED_REQUIREMENTS QMAKE_FILETAGS QMAKE_INCDIR POST_TARGETDEPS PRE_TARGETDEPS QMAKE_INCDIR_OPENGL QMAKE_INCDIR_QT QMAKE_INCDIR_THREAD QMAKE_INCDIR_X11 QMAKE_LFLAGS_CONSOLE QMAKE_LFLAGS_CONSOLE_DLL QMAKE_LFLAGS_DEBUG QMAKE_LFLAGS_PLUGIN QMAKE_LFLAGS_QT_DLL QMAKE_LFLAGS_RELEASE QMAKE_LFLAGS_SHAPP QMAKE_LFLAGS_SHLIB QMAKE_LFLAGS_SONAME QMAKE_LFLAGS_THREAD QMAKE_LFLAGS_WINDOWS QMAKE_LFLAGS_WINDOWS_DLL QMAKE_LIBDIR QMAKE_LIBDIR_FLAGS VPATH DEPENDPATH QMAKE_LIBDIR_OPENGL QMAKE_LIBDIR_QT QMAKE_LIBDIR_X11 QMAKE_LIBS QMAKE_LIBS_CONSOLE QMAKE_LIBS_OPENGL QMAKE_LIBS_OPENGL_QT QMAKE_LIBS_QT QMAKE_LIBS_QT_DLL | QMAKE_LIBS_QT_OPENGL QMAKE_LIBS_QT_THREAD QMAKE_LIBS_RT QMAKE_LIBS_RTMT QMAKE_LIBS_THREAD QMAKE_LIBS_WINDOWS QMAKE_LIBS_X11 QMAKE_LIBS_X11SM QMAKE_LIB_FLAG QMAKE_LINK_SHLIB_CMD QMAKE_POST_LINK QMAKE_PRE_LINK QMAKE_LN_SHLIB QMAKE_MAKEFILE QMAKE_MOC_SRC QMAKE_QMAKE QMAKE_QT_DLL QMAKE_RUN_CC QMAKE_RUN_CC_IMP QMAKE_RUN_CXX QMAKE_RUN_CXX_IMP QMAKE_TARGET QMAKE_UIC RC_FILE RES_FILE SRCMOC TARGET_EXT TARGET_x TARGET_x.y.z UICIMPLS UICOBJECTS VER_MAJ VER_MIN VER_PAT QMAKE_EXT_MOC QMAKE_EXT_UI QMAKE_EXT_PRL QMAKE_EXT_LEX QMAKE_EXT_YACC QMAKE_EXT_OBJ QMAKE_EXT_CPP QMAKE_EXT_H YACCIMPLS YACCOBJECTS

## CONFIG

The `CONFIG` variable specifies project configuration and compiler options. The values will be recognized internally by `qmake` and have special meaning. They are as follows.

These `CONFIG` values control compilation flags:

- release - Compile with optimization enabled, ignored if "debug" is specified
- debug - Compile with debug options enabled
- warn_on - The compiler should emit more warnings than normally, ignored if "warn_off" is specified
- warn_off - The compiler should only emit severe warnings.

These options define the application/library type:

- qt - The target is a Qt application/library and requires the Qt header files/library. The proper include and library paths for the Qt library will automatically be added to the project.
- opengl - The target requires the OpenGL (or Mesa) headers/libraries. The proper include and library paths for these libraries will automatically be added to the project.
- thread - The target is a multi-threaded application or library. The proper defines and compiler flags will automatically be added to the project.
- x11 - The target is a X11 application or library. The proper include paths and libraries will automatically be added to the project.
- windows - The target is a Win32 window application (app only). The proper include paths,compiler flags and libraries will automatically be added to the project.
- console - The target is a Win32 console application (app only). The proper include paths, compiler flags and libraries will automatically be added to the project.
- dll - The target is a shared object/DLL.The proper include paths, compiler flags and libraries will automatically be added to the project.
- staticlib - The target is a static library (lib only). The proper compiler flags will automatically be added to the project.
- plugin - The target is a plugin (lib only). This enables dll as well.

These options are used to set the compiler flags:

- exceptions - Exception support is enabled
- rtti - RTTI support is enabled
- stl - STL support is enabled

These options define specific things depending on the platform and/or template:

- flat - When using the vcapp template this will put all the source files into the source group and the header files into the header group regardless of what directory they reside in. Turning this option off will group the files within the source/header group depending on the directory they reside. This is turned on by default.

The `CONFIG` variable will also be checked when resolving scopes. You may assign anything to this variable.

For example:

        CONFIG += qt console newstuff
        ...
        newstuff {
            SOURCES += new.cpp
            HEADERS += new.h
        }

## DEFINES

`qmake` adds the values of this variable as compiler C preprocessor macros (-D option).

For example:

        DEFINES += USE_MY_STUFF QT_DLL

## DEF_FILE

This is only used on Windows when using the `app` template.

Specifies a .def file to be included in the project.

## DESTDIR

Specifies where to put the target file.

For example:

        DESTDIR = ../../lib

## DLLDESTDIR

Specifies where to copy the target dll.

## DISTFILES

This variable contains a list of files to be included in the dist target. This feature is supported by UnixMake specs only.

For example:

        DISTFILES += ../program.txt

## HEADERS

Defines the header files for the project.

`qmake` will generate dependency information (unless `-nodepend` is specified on the command line) for the specified headers. `qmake` will also automatically detect if `moc` is required by the classes in these headers, and add the appropriate dependencies and files to the project for generating and linking the moc files.

For example:

        HEADERS = myclass.h \
                  login.h \
                  mainwindow.h

See also SOURCES.

## INCLUDEPATH

This variable specifies the #include directories which should be searched when compiling the project. Use ';' or a space as the directory separator.

For example:

        INCLUDEPATH = c:\msdev\include d:\stl\include

## FORMS

This variable specifies the .ui files (see Qt Designer) to be processed through `uic` before compiling. All dependencies, headers and source files required to build these .ui files will automatically be added to the project.

For example:

        FORMS = mydialog.ui \
            mywidget.ui \
                myconfig.ui

## LEXSOURCES

This variable contains a list of lex source files. All dependencies, headers and source files will automatically be added to the project for building these lex files.

For example:

        LEXSOURCES = lexer.l

## LIBS

This variable contains a list of libraries to be linked into the project. If you are more comfortable with the Unix convension of -L/-l flags you are free to use them in a cross-platform manner and qmake will do the correct thing with these libraries on Windows (namely this means passing the full path of the library to the linker). The only limitation to this is the library must exist, for qmake to find which directory a -l lib lives in.

For example:

        unix:LIBS += -lmath -L/usr/local/lib
        win32:LIBS += c:\mylibs\math.lib

## MOC_DIR

This variable specifies the directory where all intermediate moc files should be placed.

For example:

        unix:MOC_DIR = ../myproject/tmp
        win32:MOC_DIR = c:\myproject\tmp

## OBJECTS_DIR

This variable specifies the directory where all intermediate objects should be placed.

For example:

        unix:OBJECTS_DIR = ../myproject/tmp
        win32:OBJECTS__DIR = c:\myproject\tmp

## UI_DIR

This variable specifies the directory where all intermediate files from uic should be placed. This variable overrides both UI_SOURCES_DIR and UI_HEADERS_DIR.

For example:

        unix:UI_DIR = ../myproject/ui
        win32:UI_DIR = c:\myproject\ui

## UI_HEADERS_DIR

This variable specifies the directory where all declaration files (as generated by uic) should be placed.

For example:

        unix:UI_HEADERS_DIR = ../myproject/ui/include
        win32:UI_HEADERS_DIR = c:\myproject\ui\include

## UI_SOURCES_DIR

This variable specifies the directory where all implementation files (as generated by uic) should be placed.

For example:

        unix:UI_SOURCES_DIR = ../myproject/ui/src
        win32:UI_SOURCES_DIR = c:\myproject\ui\src

## RCC_DIR

This variable specifies the directory where all intermediate resource files should be placed.

For example:

        unix:RCC_DIR = ../myproject/resources
        win32:RCC_DIR = c:\myproject\resources

## REQUIRES

This is a special variable processed by `qmake`. If the contents of this variable do not appear in CONFIG by the time this variable is assigned, then a minimal Makefile will be generated that states what dependencies (the values assigned to REQUIRES) are missing.

This is mainly used in Qt's build system for building the examples.

## SOURCES

This variable contains the name of all source files in the project.

For example:

        SOURCES = myclass.cpp \
              login.cpp \
              mainwindow.cpp

See also HEADERS

## SUBDIRS

This variable, when used with the `subdirs` TEMPLATE contains the names of all subdirectories to look for a project file.

For example:

        SUBDIRS = kernel \
              tools

## TARGET

This specifies the name of the target file.

For example:

        TEMPLATE = app
        TARGET = myapp
        SOURCES = main.cpp

The project file above would produce an executable named `myapp` on unix and 'myapp.exe' on windows.

## TEMPLATE

This variable contains the name of the template to use when generating the project. The allowed values are:

- app - Creates a Makefile for building applications (the default)
- lib - Creates a Makefile for building libraries
- subdirs - Creates a Makefile for building targets in subdirectories
- vcapp - win32 only Creates an application project file for Visual Studio
- vclib - win32 only Creates a library project file for Visual Studio

For example:

        TEMPLATE = lib
        SOURCES = main.cpp
        TARGET = mylib

The template can be overridden by specifying a new template type with the `-t` command line option. This overrides the template type after the .pro file has been processed. With .pro files that use the template type to determine how the project is built, it is necessary to declare TEMPLATE on the command line rather than use the `-t` option.

## VERSION

This variable contains the version number of the library if the `lib` TEMPLATE is specified.

For example:

        VERSION = 1.2.3

## YACCSOURCES

This variable contains a list of yacc source files to be included in the project. All dependencies, headers and source files will automatically be included in the project.

For example:

        YACCSOURCES = moc.y

## DESTDIR_TARGET

This variable is set internally by `qmake`, which is basically the `DESTDIR` variable with the `TARGET` variable appened at the end. The value of this variable is typically handled by `qmake` or qmake.conf and rarely needs to be modified.

## DSP_TEMPLATE

This variable is set internally by `qmake`, which specifies where the dsp template file for basing generated dsp files is stored. The value of this variable is typically handled by `qmake` or qmake.conf and rarely needs to be modified.

## LEXIMPLS

This variable contains a list of lex implementation files. The value of this variable is typically handled by `qmake` or qmake.conf and rarely needs to be modified.

## LEXOBJECTS

This variable contains the names of intermediate lex object files.The value of this variable is typically handled by `qmake` and rarely needs to be modified.

## MAKEFILE

This variable specifies the name of the Makefile which `qmake` should use when outputting the dependency information for building a project. The value of this variable is typically handled by `qmake` or qmake.conf and rarely needs to be modified.

## MAKEFILE_GENERATOR

This variable contains the name of the Makefile generator to use when generating a Makefile. The value of this variable is typically handled internally by `qmake` and rarely needs to be modified.

## OBJECTS

This variable is generated from the SOURCES variable. The extension of each source file will have been replaced by .o (Unix) or .obj (Win32). The value of this variable is typically handled by `qmake` or qmake.conf and rarely needs to be modified.

## OBJMOC

This variable is set by `qmake` if files can be found that contain the Q_OBJECT macro. `OBJMOC` contains the name of all intermediate moc object files. The value of this variable is typically handled by `qmake` or qmake.conf and rarely needs to be modified.

## PRECOMPILED_HEADER

This variable indicates the header file for creating a precompiled header file, to increase the compilation speed of a project. Precompiled headers are currently only supported on some platforms (Windows - all MSVC project types, Mac OS X - Xcode, Makefile, Unix - gcc 3.3 and up).

On other platforms, this variable has different meaning, as noted below.

This variable contains a list of header files that require some sort of pre-compilation step (such as with moc). The value of this variable is typically handled by `qmake` or qmake.conf and rarely needs to be modified.

## QMAKE

This variable contains the name of the `qmake` program itself and is placed in generated Makefiles. The value of this variable is typically handled by `qmake` or qmake.conf and rarely needs to be modified.

## QMAKESPEC

This variable contains the name of the `qmake` configuration to use when generating Makefiles. The value of this variable is typically handled by `qmake` and rarely needs to be modified. Use the QMAKESPEC environment variable instead.

## QMAKE_APP_FLAG

This variable is empty unless the `app` TEMPLATE is specified. The value of this variable is typically handled by `qmake` or qmake.conf and rarely needs to be modified. Use the following instead:

        app {
            # Conditional code for 'app' template here
        }

## QMAKE_APP_OR_DLL

This variable is empty unless the `app` or `dll` TEMPLATE is specified. The value of this variable is typically handled by `qmake` or qmake.conf and rarely needs to be modified.

## QMAKE_AR_CMD

This is used on Unix platforms only

This variable contains the command for invoking the program which creates, modifies and extracts archives. The value of this variable is typically handled by `qmake` or qmake.conf and rarely needs to be modified.

## QMAKE_CFLAGS_DEBUG

This variable contains the flags for the C compiler in debug mode.The value of this variable is typically handled by `qmake` or qmake.conf and rarely needs to be modified.

## QMAKE_CFLAGS_MT

This variable contains the compiler flags for creating a multi-threaded application or when the version of Qt that you link against is a multi-threaded statically linked library. The value of this variable is typically handled by `qmake` or qmake.conf and rarely needs to be modified.

## QMAKE_CFLAGS_MT_DBG

This variable contains the compiler flags for creating a debuggable multi-threaded application or when the version of Qt that you link against is a debuggable multi-threaded statically linked library. The value of this variable is typically handled by `qmake` or qmake.conf and rarely needs to be modified.

## QMAKE_CFLAGS_MT_DLL

This is used on Windows only

This variable contains the compiler flags for creating a multi-threaded dll or when the version of Qt that you link against is a multi-threaded dll. The value of this variable is typically handled by `qmake` or qmake.conf and rarely needs to be modified.

## QMAKE_CFLAGS_MT_DLLDBG

This is used on Windows only

This variable contains the compiler flags for creating a debuggable multi-threaded dll or when the version of Qt that you link against is a debuggable multi-threaded statically linked library. The value of this variable is typically handled by `qmake` or qmake.conf and rarely needs to be modified.

## QMAKE_CFLAGS_RELEASE

This variable contains the compiler flags for creating a non-debuggable application. The value of this variable is typically handled by `qmake` or qmake.conf and rarely needs to be modified.

## QMAKE_CFLAGS_SHLIB

This is used on Unix platforms only

This variable contains the compiler flags for creating a shared library. The value of this variable is typically handled by `qmake` or qmake.conf and rarely needs to be modified.

## QMAKE_CFLAGS_THREAD

This variable contains the compiler flags for creating a multi-threaded application. The value of this variable is typically handled by `qmake` or qmake.conf and rarely needs to be modified.

## QMAKE_CFLAGS_WARN_OFF

This variable is not empty if the warn_off TEMPLATE option is specified. The value of this variable is typically handled by `qmake` or qmake.conf and rarely needs to be modified.

## QMAKE_CFLAGS_WARN_ON

This variable is not empty if the warn_on TEMPLATE option is specified. The value of this variable is typically handled by `qmake` or qmake.conf and rarely needs to be modified.

## QMAKE_CLEAN

This variable contains any files which are not generated files (such as moc and uic generated files) and object files that should be removed when using "make clean".

## QMAKE_CXXFLAGS_DEBUG

This variable contains the C++ compiler flags for creating a debuggable application. The value of this variable is typically handled by `qmake` or qmake.conf and rarely needs to be modified.

## QMAKE_CXXFLAGS_MT

This variable contains the C++ compiler flags for creating a multi-threaded application. The value of this variable is typically handled by `qmake` or qmake.conf and rarely needs to be modified.

## QMAKE_CXXFLAGS_MT_DBG

This variable contains the C++ compiler flags for creating a debuggable multi-threaded application. The value of this variable is typically handled by `qmake` or qmake.conf and rarely needs to be modified.

## QMAKE_CXXFLAGS_MT_DLL

`This is used on Windows only`

This variable contains the C++ compiler flags for creating a multi-threaded dll. The value of this variable is typically handled by `qmake` or qmake.conf and rarely needs to be modified.

## QMAKE_CXXFLAGS_MT_DLLDBG

`This is used on Windows only`

This variable contains the C++ compiler flags for creating a multi-threaded debuggable dll. The value of this variable is typically handled by `qmake` or qmake.conf and rarely needs to be modified.

## QMAKE_CXXFLAGS_RELEASE

This variable contains the C++ compiler flags for creating an application. The value of this variable is typically handled by `qmake` or qmake.conf and rarely needs to be modified.

## QMAKE_CXXFLAGS_SHLIB

This variable contains the C++ compiler flags for creating a shared library. The value of this variable is typically handled by `qmake` or qmake.conf and rarely needs to be modified.

## QMAKE_CXXFLAGS_THREAD

This variable contains the C++ compiler flags for creating a multi-threaded application. The value of this variable is typically handled by `qmake` or qmake.conf and rarely needs to be modified.

## QMAKE_CXXFLAGS_WARN_OFF

This variable contains the C++ compiler flags for suppressing compiler warnings. The value of this variable is typically handled by `qmake` or qmake.conf and rarely needs to be modified.

## QMAKE_CXXFLAGS_WARN_ON

This variable contains C++ compiler flags for generating compiler warnings. The value of this variable is typically handled by `qmake` or qmake.conf and rarely needs to be modified.

## QMAKE_EXTENSION_SHLIB

This variable contains the extention for shared libraries. The value of this variable is typically handled by `qmake` or qmake.conf and rarely needs to be modified.

## QMAKE_FAILED_REQUIREMENTS

This variable contains the list of requirements that were failed to be met when `qmake` was used. For example, the sql module is needed and wasn't compiled into Qt. The value of this variable is typically handled by `qmake` or qmake.conf and rarely needs to be modified.

## QMAKE_FILETAGS

This variable contains the file tags needed to be entered into the Makefile, such as SOURCES and HEADERS. The value of this variable is typically handled by `qmake` or qmake.conf and rarely needs to be modified.

## QMAKE_INCDIR

This variable contains the location of all known header files to be added to INCLUDEPATH when building an application. The value of this variable is typically handled by `qmake` or qmake.conf and rarely needs to be modified.

## POST_TARGETDEPS

All libraries that the target depends on can be listed in this variable. Some backends do not support this, these include MSVC Dsp, and ProjectBuilder .pbproj files. Generally this is support internally by these build tools, this is usefull for explicitly listing dependant static libraries.

This list will go after all builtin (and $$PRE_TARGETDEPS) dependencies.

## PRE_TARGETDEPS

All libraries that the target depends on can be listed in this variable. Some backends do not support this, these include MSVC Dsp, and ProjectBuilder .pbproj files. Generally this is support internally by these build tools, this is usefull for explicitly listing dependant static libraries.

This list will go before all builtin dependencies.

## QMAKE_INCDIR_OPENGL

This variable contains the location of OpenGL header files to be added to INCLUDEPATH when building an application with OpenGL support. The value of this variable is typically handled by `qmake` or qmake.conf and rarely needs to be modified.

## QMAKE_INCDIR_QT

This variable contains the location of all known header file paths to be added to INCLUDEPATH when building a Qt application. The value of this variable is typically handled by `qmake` or qmake.conf and rarely needs to be modified.

## QMAKE_INCDIR_THREAD

This variable contains the location of all known header file paths to be added to INCLUDEPATH when building a multi-threaded application. The value of this variable is typically handled by `qmake` or qmake.conf and rarely needs to be modified.

## QMAKE_INCDIR_X11

This is used on Unix platforms only

This variable contains the location of X11 header file paths to be added to INCLUDEPATH when building a X11 application. The value of this variable is typically handled by `qmake` or qmake.conf and rarely needs to be modified.

## QMAKE_LFLAGS_CONSOLE

This is used on Windows only

This variable contains link flags when building console programs. The value of this variable is typically handled by `qmake` or qmake.conf and rarely needs to be modified.

## QMAKE_LFLAGS_CONSOLE_DLL

This is used on Windows only

This variable contains link flags when building console dlls. The value of this variable is typically handled by `qmake` or qmake.conf and rarely needs to be modified.

## QMAKE_LFLAGS_DEBUG

This variable contains link flags when building debuggable applications. The value of this variable is typically handled by `qmake` or qmake.conf and rarely needs to be modified.

## QMAKE_LFLAGS_PLUGIN

This variable contains link flags when building plugins. The value of this variable is typically handled by `qmake` or qmake.conf and rarely needs to be modified.

## QMAKE_LFLAGS_QT_DLL

This variable contains link flags when building programs that use the Qt library built as a dll. The value of this variable is typically handled by `qmake` or qmake.conf and rarely needs to be modified.

## QMAKE_LFLAGS_RELEASE

This variable contains link flags when building applications for release. The value of this variable is typically handled by `qmake` or qmake.conf and rarely needs to be modified.

## QMAKE_LFLAGS_SHAPP

This variable contains link flags when building applications which are using the `app` template. The value of this variable is typically handled by `qmake` or qmake.conf and rarely needs to be modified.

## QMAKE_LFLAGS_SHLIB

This variable contains link flags when building shared libraries The value of this variable is typically handled by `qmake` or qmake.conf and rarely needs to be modified.

## QMAKE_LFLAGS_SONAME

This variable specifies the link flags to set the name of shared objects, such as .so or .dll. The value of this variable is typically handled by `qmake` or qmake.conf and rarely needs to be modified.

## QMAKE_LFLAGS_THREAD

This variable contains link flags when building multi-threaded projects. The value of this variable is typically handled by `qmake` or qmake.conf and rarely needs to be modified.

## QMAKE_LFLAGS_WINDOWS

This is used on Windows only

This variable contains link flags when building windows projects. The value of this variable is typically handled by `qmake` or qmake.conf and rarely needs to be modified.

## QMAKE_LFLAGS_WINDOWS_DLL

This is used on Windows only

This variable contains link flags when building windows dll projects. The value of this variable is typically handled by `qmake` or qmake.conf and rarely needs to be modified.

## QMAKE_LIBDIR

This variable contains the location of all known library directories.The value of this variable is typically handled by `qmake` or qmake.conf and rarely needs to be modified.

## QMAKE_LIBDIR_FLAGS

This is used on Unix platforms only

This variable contains the location of all library directory with -L prefixed. The value of this variable is typically handled by `qmake` or qmake.conf and rarely needs to be modified.

## VPATH

This variable tells `qmake` where to search for files it cannot open. With this you may tell `qmake` where it may look for things like SOURCES, and if it finds an entry in SOURCES that cannot be opened it will look through the entire VPATH list to see if it can find the file on its own.

See also DEPENDPATH.

## DEPENDPATH

This variable contains the list of all directories to look in to resolve dependencies. This will be used when crawling through `included` files.

## QMAKE_LIBDIR_OPENGL

This variable contains the location of the OpenGL library directory.The value of this variable is typically handled by `qmake` or qmake.conf and rarely needs to be modified.

## QMAKE_LIBDIR_QT

This variable contains the location of the Qt library directory.The value of this variable is typically handled by `qmake` or qmake.conf and rarely needs to be modified.

## QMAKE_LIBDIR_X11

This is used on Unix platforms only

This variable contains the location of the X11 library directory.The value of this variable is typically handled by `qmake` or qmake.conf and rarely needs to be modified.

## QMAKE_LIBS

This variable contains all project libraries. The value of this variable is typically handled by `qmake` or qmake.conf and rarely needs to be modified.

## QMAKE_LIBS_CONSOLE

This is used on Windows only

This variable contains all project libraries that should be linked against when building a console application. The value of this variable is typically handled by `qmake` or qmake.conf and rarely needs to be modified.

## QMAKE_LIBS_OPENGL

This variable contains all OpenGL libraries. The value of this variable is typically handled by `qmake` or qmake.conf and rarely needs to be modified.

## QMAKE_LIBS_OPENGL_QT

This variable contains all OpenGL Qt libraries.The value of this variable is typically handled by `qmake` or qmake.conf and rarely needs to be modified.

## QMAKE_LIBS_QT

This variable contains all Qt libraries.The value of this variable is typically handled by `qmake` or qmake.conf and rarely needs to be modified.

## QMAKE_LIBS_QT_DLL

This is used on Windows only

This variable contains all Qt libraries when Qt is built as a dll. The value of this variable is typically handled by `qmake` or qmake.conf and rarely needs to be modified.

## QMAKE_LIBS_QT_OPENGL

This variable contains all the libraries needed to link against if OpenGL support is turned on. The value of this variable is typically handled by `qmake` or qmake.conf and rarely needs to be modified.

## QMAKE_LIBS_QT_THREAD

This variable contains all the libraries needed to link against if thread support is turned on. The value of this variable is typically handled by `qmake` or qmake.conf and rarely needs to be modified.

## QMAKE_LIBS_RT

This is used with Borland compilers only

This variable contains the runtime library needed to link against when building an application. The value of this variable is typically handled by `qmake` or qmake.conf and rarely needs to be modified.

## QMAKE_LIBS_RTMT

This is used with Borland compilers only

This variable contains the runtime library needed to link against when building a multi-threaded application. The value of this variable is typically handled by `qmake` or qmake.conf and rarely needs to be modified.

## QMAKE_LIBS_THREAD

This is used on Unix platforms only

This variable contains all libraries that need to be linked against when building a multi-threaded application. The value of this variable is typically handled by `qmake` or qmake.conf and rarely needs to be modified.

## QMAKE_LIBS_WINDOWS

This is used on Windows only

This variable contains all windows libraries.The value of this variable is typically handled by `qmake` or qmake.conf and rarely needs to be modified.

## QMAKE_LIBS_X11

This is used on Unix platforms only

This variable contains all X11 libraries.The value of this variable is typically handled by `qmake` or qmake.conf and rarely needs to be modified.

## QMAKE_LIBS_X11SM

This is used on Unix platforms only

This variable contains all X11 session management libraries. The value of this variable is typically handled by `qmake` or qmake.conf and rarely needs to be modified.

## QMAKE_LIB_FLAG

This variable is not empty if the `lib` template is specified. The value of this variable is typically handled by `qmake` or qmake.conf and rarely needs to be modified.

## QMAKE_LINK_SHLIB_CMD

This variable contains the command to execute when creating a shared library. The value of this variable is typically handled by `qmake` or qmake.conf and rarely needs to be modified.

## QMAKE_POST_LINK

This variable contains the command to execute after linking the TARGET together. This variable is normally empty and therefore nothing is executed, additionally some backends will not support this - mostly only Makefile backends.

## QMAKE_PRE_LINK

This variable contains the command to execute before linking the TARGET together. This variable is normally empty and therefore nothing is executed, additionally some backends will not support this - mostly only Makefile backends.

## QMAKE_LN_SHLIB

This variable contains the command to execute when creating a link to a shared library. The value of this variable is typically handled by `qmake` or qmake.conf and rarely needs to be modified.

## QMAKE_MAKEFILE

This variable contains the name of the Makefile to create. The value of this variable is typically handled by `qmake` or qmake.conf and rarely needs to be modified.

## QMAKE_MOC_SRC

This variable contains the names of all moc source files to generate and include in the project. The value of this variable is typically handled by `qmake` or qmake.conf and rarely needs to be modified.

## QMAKE_QMAKE

This variable contains the location of qmake if it is not in the path. The value of this variable is typically handled by `qmake` or qmake.conf and rarely needs to be modified.

## QMAKE_QT_DLL

This variable is not empty if Qt was built as a dll. The value of this variable is typically handled by `qmake` or qmake.conf and rarely needs to be modified.

## QMAKE_RUN_CC

This variable specifies the individual rule needed to build an object. The value of this variable is typically handled by `qmake` or qmake.conf and rarely needs to be modified.

## QMAKE_RUN_CC_IMP

This variable specifies the individual rule needed to build an object. The value of this variable is typically handled by `qmake` or qmake.conf and rarely needs to be modified.

## QMAKE_RUN_CXX

This variable specifies the individual rule needed to build an object. The value of this variable is typically handled by `qmake` or qmake.conf and rarely needs to be modified.

## QMAKE_RUN_CXX_IMP

This variable specifies the individual rule needed to build an object. The value of this variable is typically handled by `qmake` or qmake.conf and rarely needs to be modified.

## QMAKE_TARGET

This variable contains the name of the project target. The value of this variable is typically handled by `qmake` or qmake.conf and rarely needs to be modified.

## QMAKE_UIC

This variable contains the location of uic if it is not in the path. The value of this variable is typically handled by `qmake` or qmake.conf and rarely needs to be modified.

It can be used to specify arguments to uic as well, such as additional plugin paths. For example:

        QMAKE_UIC = uic -L /path/to/plugin

## RC_FILE

This variable contains the name of the resource file for the application. The value of this variable is typically handled by `qmake` or qmake.conf and rarely needs to be modified.

## RES_FILE

This variable contains the name of the resource file for the application. The value of this variable is typically handled by `qmake` or qmake.conf and rarely needs to be modified.

## SRCMOC

This variable is set by `qmake` if files can be found that contain the Q_OBJECT macro. `SRCMOC` contains the name of all the generated moc files. The value of this variable is typically handled by `qmake` or qmake.conf and rarely needs to be modified.

## TARGET_EXT

This variable specifies the target's extension. The value of this variable is typically handled by `qmake` or qmake.conf and rarely needs to be modified.

## TARGET_x

This variable specifies the target's extension with a major version number. The value of this variable is typically handled by `qmake` or qmake.conf and rarely needs to be modified.

## TARGET_x.y.z

This variable specifies the target's extension with version number. The value of this variable is typically handled by `qmake` or qmake.conf and rarely needs to be modified.

## UICIMPLS

This variable contains a list of the generated implementation files by UIC. The value of this variable is typically handled by `qmake` or qmake.conf and rarely needs to be modified.

## UICOBJECTS

This variable is generated from the UICIMPLS variable. The extension of each file will have been replaced by .o (Unix) or .obj (Win32). The value of this variable is typically handled by `qmake` or qmake.conf and rarely needs to be modified.

## VER_MAJ

This variable contains the major version number of the library, if the `lib` template is specified.

## VER_MIN

This variable contains the minor version number of the library, if the `lib` template is specified.

## VER_PAT

This variable contains the patch version number of the library, if the `lib` template is specified.

## QMAKE_EXT_MOC

This variable changes the extention used on included moc files.

See also File Extensions.

## QMAKE_EXT_UI

This variable changes the extention used on /e Designer UI files.

See also File Extensions.

## QMAKE_EXT_PRL

This variable changes the extention used on created PRL files.

See also File Extensions, Library Dependencies.

## QMAKE_EXT_LEX

This variable changes the extention used on files given to lex.

See also File Extensions, LEXSOURCES.

## QMAKE_EXT_YACC

This variable changes the extention used on files given to yacc.

See also File Extensions, YACCSOURCES.

## QMAKE_EXT_OBJ

This variable changes the extention used on generated object files.

See also File Extensions.

## QMAKE_EXT_CPP

This variable changes the interpretation of all suffixes in this list of values as files of type C++ source code.

See also File Extensions.

## QMAKE_EXT_H

This variable changes the interpretation of all suffixes in this list of values as files of type C header files.

See also File Extensions.

## YACCIMPLS

This variable contains a list of yacc source files. The value of this variable is typically handled by `qmake` or qmake.conf and rarely needs to be modified.

## YACCOBJECTS

This variable contains a list of yacc object files. The value of this variable is typically handled by `qmake` or qmake.conf and rarely needs to be modified.

[Previous: qmake Reference] [Contents] [Next: qmake Function Reference]