-
Notifications
You must be signed in to change notification settings - Fork 16
/
add_qt_path.pri
executable file
·37 lines (37 loc) · 2.06 KB
/
add_qt_path.pri
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# ADD CATCH
INCLUDEPATH += $$PWD/catch1
# ADD BIN DIRS FOR WINDOWS
# test if windows
win32 {
# test if already exists
VCXPROJ_USER_FILE = "$${_PRO_FILE_PWD_}/$${TARGET}.vcxproj.user"
!exists( $${VCXPROJ_USER_FILE}) {
# generate file contents
TEMPNAME = $${QMAKE_QMAKE} # contains full dir of qmake used
DEPENDS_DIR_REL = $$dirname(TEMPNAME)
DEPENDS_DIR_DBG = $$dirname(TEMPNAME)
# vcxproj.user template
VCXPROJ_USER = "<?xml version=\"1.0\" encoding=\"utf-8\"?>$$escape_expand(\\n)\
<Project xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">$$escape_expand(\\n)\
<PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\">$$escape_expand(\\n)\
<LocalDebuggerEnvironment>PATH=$${DEPENDS_DIR_DBG};%PATH%</LocalDebuggerEnvironment>$$escape_expand(\\n)\
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>$$escape_expand(\\n)\
</PropertyGroup>$$escape_expand(\\n)\
<PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\">$$escape_expand(\\n)\
<LocalDebuggerEnvironment>PATH=$${DEPENDS_DIR_REL};%PATH%</LocalDebuggerEnvironment>$$escape_expand(\\n)\
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>$$escape_expand(\\n)\
</PropertyGroup>$$escape_expand(\\n)\
<PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|x64'\">$$escape_expand(\\n)\
<LocalDebuggerEnvironment>PATH=$${DEPENDS_DIR_DBG};%PATH%</LocalDebuggerEnvironment>$$escape_expand(\\n)\
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>$$escape_expand(\\n)\
</PropertyGroup>$$escape_expand(\\n)\
<PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|x64'\">$$escape_expand(\\n)\
<LocalDebuggerEnvironment>PATH=$${DEPENDS_DIR_REL};%PATH%</LocalDebuggerEnvironment>$$escape_expand(\\n)\
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>$$escape_expand(\\n)\
</PropertyGroup>$$escape_expand(\\n)\
</Project>$$escape_expand(\\n)\
"
# write file
write_file($${VCXPROJ_USER_FILE}, VCXPROJ_USER)
}
}