mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-27 20:58:47 +00:00
Add support for Qt resources in Subsurface
Signed-off-by: Thiago Macieira <thiago@macieira.org>
This commit is contained in:
parent
17ea074dc0
commit
c5d244eeea
4 changed files with 13 additions and 1 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -23,3 +23,4 @@ Documentation/user-manual.text
|
|||
packaging/windows/subsurface.nsi
|
||||
packaging/macos/Info.plist
|
||||
config.cache
|
||||
*.qrc.cpp
|
||||
|
|
3
Makefile
3
Makefile
|
@ -77,6 +77,9 @@ SOURCES = \
|
|||
qt-ui/starwidget.cpp \
|
||||
$(RESFILE)
|
||||
|
||||
|
||||
RESOURCES = subsurface.qrc
|
||||
|
||||
ifneq ($(SQLITE3FLAGS),)
|
||||
EXTRA_FLAGS += -DSQLITE3 $(SQLITE3FLAGS)
|
||||
endif
|
||||
|
|
9
Rules.mk
9
Rules.mk
|
@ -28,7 +28,7 @@ else
|
|||
endif
|
||||
|
||||
C_SOURCES = $(filter %.c, $(SOURCES))
|
||||
CXX_SOURCES = $(filter %.cpp, $(SOURCES))
|
||||
CXX_SOURCES = $(filter %.cpp, $(SOURCES)) $(RESOURCES:.qrc=.qrc.cpp)
|
||||
OTHER_SOURCES = $(filter-out %.c %.cpp, $(SOURCES))
|
||||
OBJS = $(C_SOURCES:.c=.o) $(CXX_SOURCES:.cpp=.o) $(OTHER_SOURCES)
|
||||
|
||||
|
@ -164,6 +164,12 @@ MOCFLAGS = $(filter -I%, $(CXXFLAGS) $(EXTRA_FLAGS)) $(filter -D%, $(CXXFLAGS) $
|
|||
@$(PRETTYECHO) ' MOC' $<
|
||||
$(COMPILE_PREFIX)$(MOC) -i $(MOCFLAGS) $< -o $@
|
||||
|
||||
# This creates the Qt resource sources.
|
||||
%.qrc.cpp: %.qrc
|
||||
@$(PRETTYECHO) ' RCC' $<
|
||||
$(COMPILE_PREFIX)$(RCC) $< -o $@
|
||||
%.qrc:
|
||||
|
||||
# This creates the ui headers.
|
||||
ui_%.h: %.ui
|
||||
@$(PRETTYECHO) ' UIC' $<
|
||||
|
@ -205,6 +211,7 @@ doc:
|
|||
clean:
|
||||
rm -f $(ALL_OBJS) *~ $(NAME) $(NAME).exe po/*~ po/subsurface-new.pot \
|
||||
$(VERSION_FILE) qt-ui/*.moc qt-ui/ui_*.h
|
||||
rm -f $(RESOURCES:.qrc=.qrc.cpp)
|
||||
rm -rf share
|
||||
|
||||
confclean: clean
|
||||
|
|
1
subsurface.qrc
Normal file
1
subsurface.qrc
Normal file
|
@ -0,0 +1 @@
|
|||
<RCC/>
|
Loading…
Reference in a new issue