forked from LMMS/lmms
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This adds * a script that runs qmake and then patches includes/defines/QT-vars * a code style script that helps following our coding conventions
- Loading branch information
1 parent
ac257f0
commit ce108d6
Showing
2 changed files
with
80 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE QtCreatorCodeStyle> | ||
<!-- Written by QtCreator 4.8.2, 2019-04-27T23:08:23. --> | ||
<qtcreator> | ||
<data> | ||
<variable>CodeStyleData</variable> | ||
<valuemap type="QVariantMap"> | ||
<value type="bool" key="AlignAssignments">false</value> | ||
<value type="bool" key="AutoSpacesForTabs">false</value> | ||
<value type="bool" key="BindStarToIdentifier">true</value> | ||
<value type="bool" key="BindStarToLeftSpecifier">false</value> | ||
<value type="bool" key="BindStarToRightSpecifier">false</value> | ||
<value type="bool" key="BindStarToTypeName">false</value> | ||
<value type="bool" key="ExtraPaddingForConditionsIfConfusingAlign">true</value> | ||
<value type="bool" key="IndentAccessSpecifiers">false</value> | ||
<value type="bool" key="IndentBlockBody">true</value> | ||
<value type="bool" key="IndentBlockBraces">true</value> | ||
<value type="bool" key="IndentBlocksRelativeToSwitchLabels">true</value> | ||
<value type="bool" key="IndentClassBraces">false</value> | ||
<value type="bool" key="IndentControlFlowRelativeToSwitchLabels">true</value> | ||
<value type="bool" key="IndentDeclarationsRelativeToAccessSpecifiers">true</value> | ||
<value type="bool" key="IndentEnumBraces">false</value> | ||
<value type="bool" key="IndentFunctionBody">true</value> | ||
<value type="bool" key="IndentFunctionBraces">false</value> | ||
<value type="bool" key="IndentNamespaceBody">true</value> | ||
<value type="bool" key="IndentNamespaceBraces">false</value> | ||
<value type="int" key="IndentSize">4</value> | ||
<value type="bool" key="IndentStatementsRelativeToSwitchLabels">true</value> | ||
<value type="bool" key="IndentSwitchLabels">true</value> | ||
<value type="int" key="PaddingMode">2</value> | ||
<value type="bool" key="ShortGetterName">true</value> | ||
<value type="bool" key="SpacesForTabs">false</value> | ||
<value type="int" key="TabSize">4</value> | ||
</valuemap> | ||
</data> | ||
<data> | ||
<variable>DisplayName</variable> | ||
<value type="QString">LMMS</value> | ||
</data> | ||
</qtcreator> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
#!/bin/bash | ||
|
||
die() | ||
{ | ||
echo "$@" | ||
exit 1 | ||
} | ||
|
||
main() | ||
{ | ||
[ "${BASH_SOURCE[0]}" ] || die "Variable BASH_SOURCE missing" | ||
command -v dirname >/dev/null || die "Function 'dirname' missing" | ||
command -v qmake >/dev/null || die "Mising command or alias 'qmake'" | ||
local cwd | ||
cwd="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" | ||
[ "$cwd" ] || die "Could not find current working dir" | ||
cd "$cwd/../../../" || die "Could not change directory" | ||
|
||
|
||
local builddir=$1 | ||
[ -d "$builddir" ] || die "Please specify a build directory for 1st arg" | ||
|
||
local settings=() | ||
settings+=('QT += core gui widgets xml') | ||
settings+=('INCLUDEPATH += include') | ||
settings+=("INCLUDEPATH += $builddir $builddir/src") | ||
settings+=("DEFINES += LMMS_EXPORT=") | ||
|
||
[ -d /usr/include/lilv-0 ] && settings+=('INCLUDEPATH += /usr/include/lilv-0') | ||
|
||
local basename=$(basename $PWD) | ||
[ "$basename" ] || die "Can't get basename of $PWD" | ||
local profile=$(basename $PWD).pro | ||
qmake -project "${settings[@]}" -o $(basename $PWD).pro || die "qmake failure" | ||
|
||
echo "Created $profile" | ||
echo "If you have not already, import code style " | ||
} | ||
|
||
main "$@" |