Switching all build system to qmake
This commit is contained in:
parent
c46afa4152
commit
08d7b56f00
12 changed files with 208 additions and 132 deletions
30
.gitignore
vendored
30
.gitignore
vendored
|
@ -1,19 +1,19 @@
|
|||
build/
|
||||
cache/
|
||||
docs/
|
||||
data/i18n/paysages_*.qm
|
||||
gmon.out
|
||||
nbproject/
|
||||
output/
|
||||
src/editing/Makefile
|
||||
/build/
|
||||
/cache/
|
||||
/docs/
|
||||
/data/i18n/paysages_*.qm
|
||||
/gmon.out
|
||||
/nbproject/
|
||||
/output/
|
||||
/src/*/Makefile.*
|
||||
*.pro.user
|
||||
*.pro.user.*
|
||||
qrc_*.cpp
|
||||
ui_*.h
|
||||
tags
|
||||
.session.vim
|
||||
*-stamp
|
||||
debian/*.log
|
||||
debian/files
|
||||
debian/*.substvars
|
||||
debian/paysages3d
|
||||
/tags
|
||||
/.session.vim
|
||||
/*-stamp
|
||||
/debian/*.log
|
||||
/debian/files
|
||||
/debian/*.substvars
|
||||
/debian/paysages3d
|
||||
|
|
59
Makefile
59
Makefile
|
@ -1,39 +1,58 @@
|
|||
BUILDMODE=release
|
||||
BUILDPATH=./build/${BUILDMODE}
|
||||
CC=gcc
|
||||
MAKE=make
|
||||
MAKE=make -f Makefile.${BUILDMODE}
|
||||
|
||||
ifneq (,$(COMPILER))
|
||||
CC=$(COMPILER)
|
||||
endif
|
||||
|
||||
all:
|
||||
@+cd src/rendering && $(MAKE) CC=${CC} BUILDMODE=${BUILDMODE} PROJECT_PATH=${CURDIR}
|
||||
@+cd src/exploring && $(MAKE) CC=${CC} BUILDMODE=${BUILDMODE} PROJECT_PATH=${CURDIR}
|
||||
@+cd src/controlling && $(MAKE) CC=${CC} BUILDMODE=${BUILDMODE} PROJECT_PATH=${CURDIR}
|
||||
@+cd src/editing && qmake "BUILDMODE=${BUILDMODE}" "PROJECT_PATH=${CURDIR}" && $(MAKE)
|
||||
@+cd src/testing && $(MAKE) CC=${CC} BUILDMODE=${BUILDMODE} PROJECT_PATH=${CURDIR}
|
||||
all:dirs makefiles
|
||||
@+cd src/rendering && $(MAKE)
|
||||
@+cd src/exploring && $(MAKE)
|
||||
@+cd src/controlling && $(MAKE)
|
||||
@+cd src/editing && $(MAKE)
|
||||
@+cd src/testing && $(MAKE)
|
||||
|
||||
dirs:
|
||||
mkdir -p ${BUILDPATH}/rendering
|
||||
mkdir -p ${BUILDPATH}/exploring
|
||||
mkdir -p ${BUILDPATH}/controlling
|
||||
mkdir -p ${BUILDPATH}/editing
|
||||
mkdir -p ${BUILDPATH}/testing
|
||||
|
||||
makefiles:
|
||||
@+cd src/rendering && qmake rendering.pro "CONFIG=$(BUILDMODE)" -r -spec linux-clang
|
||||
@+cd src/exploring && qmake exploring.pro "CONFIG=$(BUILDMODE)" -r -spec linux-clang
|
||||
@+cd src/controlling && qmake controlling.pro "CONFIG=$(BUILDMODE)" -r -spec linux-clang
|
||||
@+cd src/editing && qmake editing.pro "CONFIG=${BUILDMODE}" -r -spec linux-clang
|
||||
@+cd src/testing && qmake testing.pro "CONFIG=$(BUILDMODE)" -r -spec linux-clang
|
||||
|
||||
clean:
|
||||
cd src/rendering && $(MAKE) clean BUILDMODE=${BUILDMODE} PROJECT_PATH=${CURDIR}
|
||||
cd src/exploring && $(MAKE) clean BUILDMODE=${BUILDMODE} PROJECT_PATH=${CURDIR}
|
||||
cd src/controlling && $(MAKE) clean BUILDMODE=${BUILDMODE} PROJECT_PATH=${CURDIR}
|
||||
cd src/editing && qmake "BUILDMODE=${BUILDMODE}" "PROJECT_PATH=${CURDIR}" && $(MAKE) clean
|
||||
cd src/testing && $(MAKE) clean BUILDMODE=${BUILDMODE} PROJECT_PATH=${CURDIR}
|
||||
@+cd src/rendering && qmake "CONFIG=$(BUILDMODE)" && $(MAKE) clean
|
||||
@+cd src/exploring && qmake "CONFIG=$(BUILDMODE)" && $(MAKE) clean
|
||||
@+cd src/controlling && qmake "CONFIG=$(BUILDMODE)" && $(MAKE) clean
|
||||
@+cd src/editing && qmake "CONFIG=${BUILDMODE}" && $(MAKE) clean
|
||||
@+cd src/testing && qmake "CONFIG=$(BUILDMODE)" && $(MAKE) clean
|
||||
rm -f src/rendering/Makefile
|
||||
rm -f src/exploring/Makefile
|
||||
rm -f src/controlling/Makefile
|
||||
rm -f src/editing/Makefile
|
||||
rm -f src/testing/Makefile
|
||||
rm -f ${BUILDPATH}/paysages-cli
|
||||
rm -f ${BUILDPATH}/paysages-qt
|
||||
rm -f ${BUILDPATH}/paysages-gui
|
||||
rm -f ${BUILDPATH}/paysages-tests
|
||||
rm -f ${BUILDPATH}/libpaysages_exploring.so
|
||||
rm -f ${BUILDPATH}/libpaysages_rendering.so
|
||||
rm -f ${BUILDPATH}/libpaysages_exploring.so*
|
||||
rm -f ${BUILDPATH}/libpaysages_rendering.so*
|
||||
|
||||
docs:
|
||||
doxygen Doxyfile
|
||||
|
||||
debug:
|
||||
make BUILDMODE=debug all
|
||||
+make BUILDMODE=debug all
|
||||
|
||||
release:
|
||||
make BUILDMODE=release all
|
||||
+make BUILDMODE=release all
|
||||
|
||||
tests: all
|
||||
LD_LIBRARY_PATH=${BUILDPATH} CK_DEFAULT_TIMEOUT=30 ${BUILDPATH}/paysages-tests
|
||||
|
@ -42,10 +61,10 @@ run_cli: all
|
|||
LD_LIBRARY_PATH=${BUILDPATH} ${RUNNER} ${BUILDPATH}/paysages-cli
|
||||
|
||||
run: all
|
||||
LD_LIBRARY_PATH=${BUILDPATH} ${RUNNER} ${BUILDPATH}/paysages-qt
|
||||
LD_LIBRARY_PATH=${BUILDPATH} ${RUNNER} ${BUILDPATH}/paysages-gui
|
||||
|
||||
profile: debug
|
||||
LD_LIBRARY_PATH=build/debug perf record -g fp ./build/debug/paysages-qt
|
||||
LD_LIBRARY_PATH=build/debug perf record -g fp ./build/debug/paysages-gui
|
||||
perf report -g
|
||||
|
||||
profile_cli: debug
|
||||
|
@ -56,7 +75,7 @@ install:release
|
|||
mkdir -p ${DESTDIR}/usr/bin
|
||||
mkdir -p ${DESTDIR}/usr/lib
|
||||
mkdir -p ${DESTDIR}/usr/share/paysages3d
|
||||
cp build/release/paysages-qt ${DESTDIR}/usr/bin/paysages3d
|
||||
cp build/release/paysages-gui ${DESTDIR}/usr/bin/paysages3d
|
||||
cp build/release/libpaysages_exploring.so ${DESTDIR}/usr/lib/
|
||||
cp build/release/libpaysages_rendering.so ${DESTDIR}/usr/lib/
|
||||
cp data/.paysages_data ${DESTDIR}/usr/share/paysages3d/
|
||||
|
|
|
@ -1,10 +0,0 @@
|
|||
include ../common_pre.mk
|
||||
|
||||
OBJPATH = ${BUILDPATH}/controlling
|
||||
RESULT = ${BUILDPATH}/paysages-cli
|
||||
SOURCES += $(wildcard *.c)
|
||||
HEADERS += $(wildcard *.h)
|
||||
|
||||
CC_LDFLAGS += -L${BUILDPATH} -lpaysages_rendering
|
||||
|
||||
include ../common_post.mk
|
25
src/controlling/controlling.pro
Normal file
25
src/controlling/controlling.pro
Normal file
|
@ -0,0 +1,25 @@
|
|||
TEMPLATE = app
|
||||
CONFIG += console
|
||||
CONFIG -= app_bundle
|
||||
CONFIG -= qt
|
||||
|
||||
TARGET = paysages-cli
|
||||
INCLUDEPATH += ..
|
||||
|
||||
CONFIG(debug) {
|
||||
DESTDIR = ../../build/debug/
|
||||
MAKEFILE = Makefile.debug
|
||||
} else {
|
||||
DESTDIR = ../../build/release/
|
||||
MAKEFILE = Makefile.release
|
||||
}
|
||||
|
||||
OBJECTS_DIR = $$DESTDIR/controlling/
|
||||
|
||||
release:DEFINES += NDEBUG
|
||||
|
||||
DEPENDPATH += ..
|
||||
linux-clang:LIBS += -L$$DESTDIR -lpaysages_rendering
|
||||
|
||||
SOURCES += main.c
|
||||
|
|
@ -1,26 +1,29 @@
|
|||
isEmpty(PROJECT_PATH) {
|
||||
PROJECT_PATH = ../..
|
||||
}
|
||||
|
||||
TEMPLATE = app
|
||||
CONFIG += qt
|
||||
|
||||
QT += core gui opengl
|
||||
DEPENDPATH += .
|
||||
INCLUDEPATH += .
|
||||
DESTDIR = $$PROJECT_PATH/build/$$BUILDMODE/
|
||||
|
||||
TARGET = paysages-gui
|
||||
INCLUDEPATH += ..
|
||||
|
||||
CONFIG(debug) {
|
||||
DESTDIR = ../../build/debug/
|
||||
MAKEFILE = Makefile.debug
|
||||
} else {
|
||||
DESTDIR = ../../build/release/
|
||||
MAKEFILE = Makefile.release
|
||||
}
|
||||
|
||||
OBJECTS_DIR = $$DESTDIR/editing/
|
||||
MOC_DIR = $$OBJECTS_DIR/moc/
|
||||
CONFIG -= release
|
||||
CONFIG += $$BUILDMODE
|
||||
INCLUDEPATH += $$PROJECT_PATH/src/
|
||||
|
||||
release:DEFINES += NDEBUG
|
||||
release:QMAKE_CXXFLAGS += -Wno-unused-variable -Wno-unused-parameter
|
||||
|
||||
unix:LIBS += -L$$DESTDIR -lpaysages_rendering -lpaysages_exploring -lGLU
|
||||
win32:LIBS += $$PROJECT_PATH/libpaysages.a -lDevIL -lILU -lILUT -lglib-2.0 -lgthread-2.0
|
||||
DEPENDPATH += ..
|
||||
linux-clang:LIBS += -L$$DESTDIR -lpaysages_rendering -lpaysages_exploring -lGLU
|
||||
win32:LIBS += ../../libpaysages.a -lDevIL -lILU -lILUT -lglib-2.0 -lgthread-2.0
|
||||
|
||||
TRANSLATIONS = $$PROJECT_PATH/data/i18n/paysages_fr.ts
|
||||
TRANSLATIONS = ../../data/i18n/paysages_fr.ts
|
||||
|
||||
HEADERS += \
|
||||
terrain/widgetheightmap.h \
|
|
@ -71,7 +71,11 @@ void MainTexturesForm::updateLayers()
|
|||
item->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled);
|
||||
ui->layersGrid->setItem(n - 1 - i, 1, item);
|
||||
|
||||
ui->layersGrid->setCellWidget(n - 1 - i, 2, new SmallMaterialPreview(ui->layersGrid, &layer->material));
|
||||
QWidget* widget = new SmallMaterialPreview(ui->layersGrid, &layer->material);
|
||||
//widget->setMinimumSize(50, 50);
|
||||
ui->layersGrid->setCellWidget(n - 1 - i, 2, widget);
|
||||
|
||||
ui->layersGrid->setRowHeight(n - 1 - i, 50);
|
||||
}
|
||||
|
||||
ui->preview_cumul->setEnabled(n > 0);
|
||||
|
|
|
@ -1,9 +0,0 @@
|
|||
include ../common_pre.mk
|
||||
|
||||
OBJPATH = ${BUILDPATH}/exploring
|
||||
RESULT = ${BUILDPATH}/libpaysages_exploring.so
|
||||
SOURCES += $(wildcard *.c)
|
||||
|
||||
CC_LDFLAGS += -shared
|
||||
|
||||
include ../common_post.mk
|
30
src/exploring/exploring.pro
Normal file
30
src/exploring/exploring.pro
Normal file
|
@ -0,0 +1,30 @@
|
|||
TEMPLATE = lib
|
||||
CONFIG += console
|
||||
CONFIG -= app_bundle
|
||||
CONFIG -= qt
|
||||
|
||||
TARGET = paysages_exploring
|
||||
INCLUDEPATH += ..
|
||||
|
||||
CONFIG(debug) {
|
||||
DESTDIR = ../../build/debug/
|
||||
MAKEFILE = Makefile.debug
|
||||
} else {
|
||||
DESTDIR = ../../build/release/
|
||||
MAKEFILE = Makefile.release
|
||||
}
|
||||
|
||||
OBJECTS_DIR = $$DESTDIR/exploring/
|
||||
|
||||
release:DEFINES += NDEBUG
|
||||
|
||||
SOURCES += main.c \
|
||||
terrain.c \
|
||||
sky.c \
|
||||
chunk.c
|
||||
|
||||
HEADERS += main.h \
|
||||
terrain.h \
|
||||
sky.h \
|
||||
chunk.h
|
||||
|
|
@ -1,17 +0,0 @@
|
|||
include ../common_pre.mk
|
||||
|
||||
OBJPATH = ${BUILDPATH}/rendering
|
||||
RESULT = ${BUILDPATH}/libpaysages_rendering.so
|
||||
SOURCES += $(wildcard *.c atmosphere/*.c clouds/*.c terrain/*.c textures/*.c water/*.c tools/*.c shared/*.c)
|
||||
|
||||
LIBS += glib-2.0 gthread-2.0 IL ILU
|
||||
CC_FLAGS += -DHAVE_GLIB=1
|
||||
CC_LDFLAGS += -shared
|
||||
|
||||
#CHECK_OPENCL = $(shell pkg-config --modversion --silence-errors OpenCL)
|
||||
#ifneq (,${CHECK_OPENCL})
|
||||
# LIBS += OpenCL
|
||||
# CC_FLAGS += -DHAVE_OPENCL=1
|
||||
#endif
|
||||
|
||||
include ../common_post.mk
|
|
@ -1,17 +1,30 @@
|
|||
#-------------------------------------------------
|
||||
#
|
||||
# Project created by QtCreator 2013-05-01T12:27:33
|
||||
#
|
||||
#-------------------------------------------------
|
||||
|
||||
QT -= core gui
|
||||
|
||||
TARGET = rendering
|
||||
TEMPLATE = lib
|
||||
CONFIG += console
|
||||
CONFIG -= app_bundle
|
||||
CONFIG -= qt
|
||||
|
||||
DEFINES += RENDERING_LIBRARY
|
||||
TARGET = paysages_rendering
|
||||
INCLUDEPATH += ..
|
||||
|
||||
SOURCES += \
|
||||
CONFIG(debug) {
|
||||
DESTDIR = ../../build/debug/
|
||||
MAKEFILE = Makefile.debug
|
||||
} else {
|
||||
DESTDIR = ../../build/release/
|
||||
MAKEFILE = Makefile.release
|
||||
}
|
||||
|
||||
OBJECTS_DIR = $$DESTDIR/rendering/
|
||||
|
||||
release:DEFINES += NDEBUG
|
||||
|
||||
linux-clang {
|
||||
CONFIG += link_pkgconfig
|
||||
PKGCONFIG += glib-2.0 gthread-2.0 IL ILU
|
||||
}
|
||||
DEFINES += HAVE_GLIB=1
|
||||
|
||||
SOURCES += main.c \
|
||||
zone.c \
|
||||
tools.c \
|
||||
system.c \
|
||||
|
@ -23,23 +36,23 @@ SOURCES += \
|
|||
noiseperlin.c \
|
||||
noisenaive.c \
|
||||
noise.c \
|
||||
main.c \
|
||||
layers.c \
|
||||
geoarea.c \
|
||||
camera.c \
|
||||
auto.c \
|
||||
atmosphere/atm_render.c \
|
||||
atmosphere/atm_raster.c \
|
||||
atmosphere/atm_preview.c \
|
||||
atmosphere/atm_presets.c \
|
||||
atmosphere/atm_definition.c \
|
||||
atmosphere/atm_bruneton.c \
|
||||
clouds/clo_tools.c \
|
||||
clouds/clo_walking.c \
|
||||
clouds/clo_rendering.c \
|
||||
clouds/clo_preview.c \
|
||||
clouds/clo_presets.c \
|
||||
clouds/clo_density.c \
|
||||
clouds/clo_definition.c \
|
||||
shared/preview.c \
|
||||
terrain/ter_render.c \
|
||||
terrain/ter_raster.c \
|
||||
terrain/ter_preview.c \
|
||||
terrain/ter_presets.c \
|
||||
|
@ -56,9 +69,11 @@ SOURCES += \
|
|||
tools/memory.c \
|
||||
tools/lighting.c \
|
||||
tools/euclid.c \
|
||||
tools/data.c \
|
||||
tools/curve.c \
|
||||
tools/color.c \
|
||||
tools/cache.c \
|
||||
tools/boundingbox.c \
|
||||
tools/array.c \
|
||||
water/wat_render.c \
|
||||
water/wat_raster.c \
|
||||
|
@ -82,15 +97,19 @@ HEADERS += \
|
|||
layers.h \
|
||||
geoarea.h \
|
||||
camera.h \
|
||||
auto.h \
|
||||
atmosphere/public.h \
|
||||
atmosphere/private.h \
|
||||
clouds/public.h \
|
||||
clouds/private.h \
|
||||
clouds/clo_walking.h \
|
||||
clouds/clo_preview.h \
|
||||
clouds/clo_density.h \
|
||||
shared/types.h \
|
||||
shared/preview.h \
|
||||
terrain/ter_raster.h \
|
||||
terrain/public.h \
|
||||
terrain/private.h \
|
||||
textures/tex_preview.h \
|
||||
textures/public.h \
|
||||
textures/private.h \
|
||||
tools/texture.h \
|
||||
|
@ -99,30 +118,12 @@ HEADERS += \
|
|||
tools/memory.h \
|
||||
tools/lighting.h \
|
||||
tools/euclid.h \
|
||||
tools/data.h \
|
||||
tools/curve.h \
|
||||
tools/color.h \
|
||||
tools/cache.h \
|
||||
tools/boundingbox.h \
|
||||
tools/array.h \
|
||||
water/public.h \
|
||||
water/private.h
|
||||
|
||||
symbian {
|
||||
MMP_RULES += EXPORTUNFROZEN
|
||||
TARGET.UID3 = 0xEC48CBFE
|
||||
TARGET.CAPABILITY =
|
||||
TARGET.EPOCALLOWDLLDATA = 1
|
||||
addFiles.sources = rendering.dll
|
||||
addFiles.path = !:/sys/bin
|
||||
DEPLOYMENT += addFiles
|
||||
}
|
||||
|
||||
unix:!symbian {
|
||||
maemo5 {
|
||||
target.path = /opt/usr/lib
|
||||
} else {
|
||||
target.path = /usr/lib
|
||||
}
|
||||
INSTALLS += target
|
||||
}
|
||||
|
||||
FORMS +=
|
||||
|
|
|
@ -1,11 +0,0 @@
|
|||
include ../common_pre.mk
|
||||
|
||||
OBJPATH = ${BUILDPATH}/testing
|
||||
RESULT = ${BUILDPATH}/paysages-tests
|
||||
SOURCES += $(wildcard *.c)
|
||||
HEADERS += $(wildcard *.h)
|
||||
|
||||
CC_LDFLAGS += -L${BUILDPATH} -lpaysages_rendering
|
||||
LIBS += check
|
||||
|
||||
include ../common_post.mk
|
41
src/testing/testing.pro
Normal file
41
src/testing/testing.pro
Normal file
|
@ -0,0 +1,41 @@
|
|||
TEMPLATE = app
|
||||
CONFIG += console
|
||||
CONFIG -= app_bundle
|
||||
CONFIG -= qt
|
||||
|
||||
TARGET = paysages-tests
|
||||
INCLUDEPATH += ..
|
||||
|
||||
CONFIG(debug) {
|
||||
DESTDIR = ../../build/debug/
|
||||
MAKEFILE = Makefile.debug
|
||||
} else {
|
||||
DESTDIR = ../../build/release/
|
||||
MAKEFILE = Makefile.release
|
||||
}
|
||||
|
||||
OBJECTS_DIR = $$DESTDIR/testing/
|
||||
|
||||
release:DEFINES += NDEBUG
|
||||
|
||||
linux-clang {
|
||||
CONFIG += link_pkgconfig
|
||||
PKGCONFIG += check
|
||||
}
|
||||
|
||||
DEPENDPATH += ..
|
||||
linux-clang:LIBS += -L$$DESTDIR -lpaysages_rendering
|
||||
|
||||
SOURCES += main.c \
|
||||
test_terrain_painting.c \
|
||||
test_render.c \
|
||||
test_pack.c \
|
||||
test_noise.c \
|
||||
test_euclid.c \
|
||||
test_clouds.c \
|
||||
test_camera.c \
|
||||
test_bruneton.c
|
||||
|
||||
HEADERS += \
|
||||
common.h
|
||||
|
Loading…
Reference in a new issue