diff --git a/platformio/project/tpls/qtcreator/.gitignore.tpl b/platformio/project/tpls/qtcreator/.gitignore.tpl new file mode 100644 index 00000000..d45ef2cf --- /dev/null +++ b/platformio/project/tpls/qtcreator/.gitignore.tpl @@ -0,0 +1,2 @@ +.pio +*.creator.user diff --git a/platformio/project/tpls/qtcreator/Makefile.tpl b/platformio/project/tpls/qtcreator/Makefile.tpl new file mode 100644 index 00000000..3fcc86ff --- /dev/null +++ b/platformio/project/tpls/qtcreator/Makefile.tpl @@ -0,0 +1,6 @@ +all: + platformio -c qtcreator run + +# forward any other target (clean, build, etc.) to pio run +{{'%'}}: + platformio -c qtcreator run --target $* diff --git a/platformio/project/tpls/qtcreator/platformio.cflags.tpl b/platformio/project/tpls/qtcreator/platformio.cflags.tpl new file mode 100644 index 00000000..f09a94f9 --- /dev/null +++ b/platformio/project/tpls/qtcreator/platformio.cflags.tpl @@ -0,0 +1 @@ +{{cc_flags.replace('-mlongcalls', '-mlong-calls')}} diff --git a/platformio/project/tpls/qtcreator/platformio.config.tpl b/platformio/project/tpls/qtcreator/platformio.config.tpl new file mode 100644 index 00000000..936fdad0 --- /dev/null +++ b/platformio/project/tpls/qtcreator/platformio.config.tpl @@ -0,0 +1,8 @@ +% for define in defines: +% tokens = define.split("=", 1) +% if len(tokens) > 1: +#define {{tokens[0].strip()}} {{!tokens[1].strip()}} +% else: +#define {{define}} +% end +% end diff --git a/platformio/project/tpls/qtcreator/platformio.creator.tpl b/platformio/project/tpls/qtcreator/platformio.creator.tpl new file mode 100644 index 00000000..d0cc464e --- /dev/null +++ b/platformio/project/tpls/qtcreator/platformio.creator.tpl @@ -0,0 +1,2 @@ +[General] + diff --git a/platformio/project/tpls/qtcreator/platformio.cxxflags.tpl b/platformio/project/tpls/qtcreator/platformio.cxxflags.tpl new file mode 100644 index 00000000..c5b30511 --- /dev/null +++ b/platformio/project/tpls/qtcreator/platformio.cxxflags.tpl @@ -0,0 +1 @@ +{{cxx_flags.replace('-mlongcalls', '-mlong-calls')}} diff --git a/platformio/project/tpls/qtcreator/platformio.files.tpl b/platformio/project/tpls/qtcreator/platformio.files.tpl new file mode 100644 index 00000000..39dcf2e2 --- /dev/null +++ b/platformio/project/tpls/qtcreator/platformio.files.tpl @@ -0,0 +1,5 @@ +Makefile +platformio.ini +% for file in src_files: +{{file}} +% end diff --git a/platformio/project/tpls/qtcreator/platformio.includes.tpl b/platformio/project/tpls/qtcreator/platformio.includes.tpl new file mode 100644 index 00000000..435cab10 --- /dev/null +++ b/platformio/project/tpls/qtcreator/platformio.includes.tpl @@ -0,0 +1,4 @@ +./ +% for include in filter_includes(includes): +{{include}} +% end diff --git a/platformio/project/tpls/qtcreator/platformio.pro.tpl b/platformio/project/tpls/qtcreator/platformio.pro.tpl deleted file mode 100644 index 89774699..00000000 --- a/platformio/project/tpls/qtcreator/platformio.pro.tpl +++ /dev/null @@ -1,45 +0,0 @@ -% import re -% -% cpp_standards_remap = { -% "0x": "11", -% "1y": "14", -% "1z": "17", -% "2a": "20", -% "2b": "23" -% } - -win32 { - HOMEDIR += $$(USERPROFILE) -} -else { - HOMEDIR += $$(HOME) -} - -% for include in filter_includes(includes): -% if include.startswith(user_home_dir): -INCLUDEPATH += "$${HOMEDIR}{{include.replace(user_home_dir, "")}}" -% else: -INCLUDEPATH += "{{include}}" -% end -% end - -% for define in defines: -% tokens = define.split("##", 1) -DEFINES += "{{tokens[0].strip()}}" -% end - -OTHER_FILES += platformio.ini - -% for file in src_files: -% if file.endswith((".h", ".hpp")): -HEADERS += {{file}} -% else: -SOURCES += {{file}} -% end -% end - -% STD_RE = re.compile(r"\-std=[a-z\+]+(\w+)") -% cxx_stds = STD_RE.findall(cxx_flags) -% if cxx_stds: -CONFIG += c++{{ cpp_standards_remap.get(cxx_stds[-1], cxx_stds[-1]) }} -% end