mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-30 22:20:21 +00:00
Add a make rule (creator-files) that creates files for using Qt Creator
Qt Creator cannot import Subsurface directly because our buildsystem is not any of the three that it understands (qmake, cmake, autotools). So, instead, we can create the files Creator uses for "Other Project" projects. The files are: - subsurface.config: the #defines from the command line (-D args) - subsurface.creator: an XDG Desktop-style file with Creator settings - subsurface.files: the list of source and header files - subsurface.includes: the include paths (-I args) They are also added to .gitignore, alongside the *.user file that Creator uses to store per-user settings (editor configuration). Signed-off-by: Thiago Macieira <thiago@macieira.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
45afd712e8
commit
aea8493165
2 changed files with 21 additions and 0 deletions
5
.gitignore
vendored
5
.gitignore
vendored
|
@ -24,3 +24,8 @@ packaging/windows/subsurface.nsi
|
||||||
packaging/macos/Info.plist
|
packaging/macos/Info.plist
|
||||||
config.cache
|
config.cache
|
||||||
*.qrc.cpp
|
*.qrc.cpp
|
||||||
|
/subsurface.config
|
||||||
|
/subsurface.creator
|
||||||
|
/subsurface.creator.user
|
||||||
|
/subsurface.files
|
||||||
|
/subsurface.includes
|
||||||
|
|
16
Rules.mk
16
Rules.mk
|
@ -38,6 +38,9 @@ MOC_OBJS = $(HEADERS_NEEDING_MOC:.h=.moc.o)
|
||||||
|
|
||||||
ALL_OBJS = $(OBJS) $(MOC_OBJS)
|
ALL_OBJS = $(OBJS) $(MOC_OBJS)
|
||||||
|
|
||||||
|
# Files for using Qt Creator
|
||||||
|
CREATOR_FILES = subsurface.config subsurface.creator subsurface.files subsurface.includes
|
||||||
|
|
||||||
all: $(NAME)
|
all: $(NAME)
|
||||||
|
|
||||||
$(NAME): gen_version_file $(ALL_OBJS) $(MSGOBJS) $(INFOPLIST)
|
$(NAME): gen_version_file $(ALL_OBJS) $(MSGOBJS) $(INFOPLIST)
|
||||||
|
@ -219,6 +222,19 @@ confclean: clean
|
||||||
rm -rf .dep
|
rm -rf .dep
|
||||||
|
|
||||||
distclean: confclean
|
distclean: confclean
|
||||||
|
rm -f $(CREATOR_FILES)
|
||||||
|
|
||||||
|
.PHONY: creator-files
|
||||||
|
creator-files: $(CREATOR_FILES)
|
||||||
|
subsurface.files: Makefile $(CONFIGFILE)
|
||||||
|
echo $(wildcard *.h) $(HEADERS) $(SOURCES) | tr ' ' '\n' | sort | uniq > subsurface.files
|
||||||
|
subsurface.config: Makefile $(CONFIGFILE)
|
||||||
|
echo $(patsubst -D%,%,$(filter -D%, $(CXXFLAGS) $(CFLAGS) $(EXTRA_FLAGS))) | tr ' ' '\n' | sort | uniq > subsurface.config
|
||||||
|
subsurface.includes: Makefile $(CONFIGFILE)
|
||||||
|
echo $$PWD > subsurface.includes
|
||||||
|
echo $(patsubst -I%,%,$(filter -I%, $(CXXFLAGS) $(CFLAGS) $(EXTRA_FLAGS))) | tr ' ' '\n' | sort | uniq >> subsurface.includes
|
||||||
|
subsurface.creator:
|
||||||
|
echo '[General]' > subsurface.creator
|
||||||
|
|
||||||
ifneq ($(CONFIGURED)$(CONFIGURING),)
|
ifneq ($(CONFIGURED)$(CONFIGURING),)
|
||||||
.dep/%.o.dep: %.cpp
|
.dep/%.o.dep: %.cpp
|
||||||
|
|
Loading…
Reference in a new issue