mirror of
https://github.com/platformio/platformio-core.git
synced 2025-07-29 17:47:14 +02:00
qtcreator IDE template now generates a "generic" Qt project (#4262)
* Create qtcreator-generic IDE template. * Fix case of #define in qtcreator-generic template .config file. * follow directory move * * fix includes output * fixup -mlong-calls for clang * add Makefile to files output * fix escaping in config output * Makefile improvements: * support any platformio run target * remove platformio deprecated -f option * remove explicit default target (first is always default) * replace qtcreator rather than making another IDE target Co-authored-by: Donna Whisnant <dewhisna@users.noreply.github.com>
This commit is contained in:
2
platformio/project/tpls/qtcreator/.gitignore.tpl
Normal file
2
platformio/project/tpls/qtcreator/.gitignore.tpl
Normal file
@ -0,0 +1,2 @@
|
||||
.pio
|
||||
*.creator.user
|
6
platformio/project/tpls/qtcreator/Makefile.tpl
Normal file
6
platformio/project/tpls/qtcreator/Makefile.tpl
Normal file
@ -0,0 +1,6 @@
|
||||
all:
|
||||
platformio -c qtcreator run
|
||||
|
||||
# forward any other target (clean, build, etc.) to pio run
|
||||
{{'%'}}:
|
||||
platformio -c qtcreator run --target $*
|
1
platformio/project/tpls/qtcreator/platformio.cflags.tpl
Normal file
1
platformio/project/tpls/qtcreator/platformio.cflags.tpl
Normal file
@ -0,0 +1 @@
|
||||
{{cc_flags.replace('-mlongcalls', '-mlong-calls')}}
|
8
platformio/project/tpls/qtcreator/platformio.config.tpl
Normal file
8
platformio/project/tpls/qtcreator/platformio.config.tpl
Normal file
@ -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
|
2
platformio/project/tpls/qtcreator/platformio.creator.tpl
Normal file
2
platformio/project/tpls/qtcreator/platformio.creator.tpl
Normal file
@ -0,0 +1,2 @@
|
||||
[General]
|
||||
|
@ -0,0 +1 @@
|
||||
{{cxx_flags.replace('-mlongcalls', '-mlong-calls')}}
|
5
platformio/project/tpls/qtcreator/platformio.files.tpl
Normal file
5
platformio/project/tpls/qtcreator/platformio.files.tpl
Normal file
@ -0,0 +1,5 @@
|
||||
Makefile
|
||||
platformio.ini
|
||||
% for file in src_files:
|
||||
{{file}}
|
||||
% end
|
@ -0,0 +1,4 @@
|
||||
./
|
||||
% for include in filter_includes(includes):
|
||||
{{include}}
|
||||
% end
|
@ -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
|
Reference in New Issue
Block a user