leocad/leocad.pro

328 lines
8.7 KiB
Prolog
Raw Normal View History

2021-07-06 02:00:41 +02:00
QT += core gui widgets opengl network xml concurrent
2021-01-08 19:35:52 +01:00
QT *= printsupport
2013-08-09 06:57:18 +02:00
TEMPLATE = app
2021-01-08 19:35:52 +01:00
lessThan(QT_MAJOR_VERSION, 5) {
2021-01-08 19:57:39 +01:00
error("LeoCAD requires Qt5.4 or later.")
}
equals(QT_MAJOR_VERSION, 5):lessThan(QT_MINOR_VERSION, 4) {
error("LeoCAD requires Qt5.4 or later.")
2013-08-09 06:57:18 +02:00
}
2021-07-06 02:00:41 +02:00
greaterThan(QT_MAJOR_VERSION, 5) {
QT += openglwidgets
win32-msvc* {
QMAKE_CXXFLAGS += /std:c++17
}
}
2021-01-08 19:35:52 +01:00
qtHaveModule(gamepad) {
QT += gamepad
DEFINES += LC_ENABLE_GAMEPAD
}
2013-08-09 06:57:18 +02:00
INCLUDEPATH += qt common
2021-02-01 02:32:38 +01:00
CONFIG += precompile_header incremental c++11 force_debug_info
2019-02-24 23:38:58 +01:00
win32 {
2020-04-18 19:20:20 +02:00
RC_ICONS = resources/leocad.ico
2021-06-06 01:41:42 +02:00
VERSION = 21.6.0.0
2020-04-18 19:20:20 +02:00
QMAKE_TARGET_COMPANY = LeoCAD Software
QMAKE_TARGET_DESCRIPTION = LeoCAD
QMAKE_TARGET_COPYRIGHT = "Copyright (C) LeoCAD.org"
QMAKE_TARGET_PRODUCT = LeoCAD
RC_CODEPAGE = 1252
RC_LANG = 0x0409
2019-02-24 23:38:58 +01:00
LIBS += -lwininet
}
win32-msvc* {
2021-01-13 20:11:31 +01:00
QMAKE_CXXFLAGS_WARN_ON += /W4 -wd4100
QMAKE_CXXFLAGS *= /MP
PRECOMPILED_HEADER = common/lc_global.h
2021-01-08 19:35:52 +01:00
PRECOMPILED_SOURCE = common/lc_global.cpp
2013-08-09 06:57:18 +02:00
DEFINES += _CRT_SECURE_NO_WARNINGS _CRT_SECURE_NO_DEPRECATE=1 _CRT_NONSTDC_NO_WARNINGS=1
2021-01-08 19:35:52 +01:00
INCLUDEPATH += $$[QT_INSTALL_HEADERS]/QtZlib
2013-08-09 06:57:18 +02:00
QMAKE_LFLAGS += /INCREMENTAL
2019-02-24 23:38:58 +01:00
LIBS += -ladvapi32 -lshell32 -lopengl32 -luser32
2013-08-09 06:57:18 +02:00
} else {
2015-10-04 20:42:58 +02:00
PRECOMPILED_HEADER = common/lc_global.h
2014-04-14 05:20:16 +02:00
LIBS += -lz
QMAKE_CXXFLAGS_WARN_ON += -Wno-unused-parameter
}
2014-09-16 01:41:46 +02:00
isEmpty(QMAKE_LRELEASE) {
win32:QMAKE_LRELEASE = $$[QT_INSTALL_BINS]\\lrelease.exe
else:QMAKE_LRELEASE = $$[QT_INSTALL_BINS]/lrelease
unix {
!exists($$QMAKE_LRELEASE) { QMAKE_LRELEASE = lrelease-qt4 }
} else {
!exists($$QMAKE_LRELEASE) { QMAKE_LRELEASE = lrelease }
}
}
TRAVIS_TAG = $$(TRAVIS_TAG)
TRAVIS_COMMIT = $$(TRAVIS_COMMIT)
!isEmpty(TRAVIS_COMMIT) {
isEmpty(TRAVIS_TAG) {
DEFINES += "LC_CONTINUOUS_BUILD=$$system(git rev-parse --short HEAD)"
}
}
APPVEYOR_REPO_TAG = $$(APPVEYOR_REPO_TAG)
APPVEYOR_REPO_COMMIT = $$(APPVEYOR_REPO_COMMIT)
!isEmpty(APPVEYOR_REPO_COMMIT) {
isEmpty(APPVEYOR_REPO_TAG) {
DEFINES += "LC_CONTINUOUS_BUILD=$$system(git rev-parse --short HEAD)"
2020-04-18 19:20:20 +02:00
VERSION = 0.0.0.1
QMAKE_TARGET_DESCRIPTION = "LeoCAD Continuous Build $$system(git rev-parse --short HEAD)"
}
}
TSFILES = resources/leocad_fr.ts resources/leocad_pt.ts resources/leocad_de.ts resources/leocad_uk.ts resources/leocad_cs.ts resources/leocad_es.ts
2014-09-21 03:31:01 +02:00
lrelease.input = TSFILES
2014-09-16 03:40:56 +02:00
lrelease.output = ${QMAKE_FILE_PATH}/${QMAKE_FILE_BASE}.qm
lrelease.commands = $$QMAKE_LRELEASE -silent ${QMAKE_FILE_IN} -qm ${QMAKE_FILE_PATH}/${QMAKE_FILE_BASE}.qm
2014-09-16 01:41:46 +02:00
lrelease.CONFIG += no_link target_predeps
QMAKE_EXTRA_COMPILERS += lrelease
2015-09-19 20:44:23 +02:00
system($$QMAKE_LRELEASE -silent $$TSFILES)
2013-08-09 06:57:18 +02:00
unix:!macx {
TARGET = leocad
} else {
TARGET = LeoCAD
}
CONFIG(debug, debug|release) {
DESTDIR = build/debug
} else {
DESTDIR = build/release
}
2013-08-09 06:57:18 +02:00
OBJECTS_DIR = $$DESTDIR/.obj
MOC_DIR = $$DESTDIR/.moc
RCC_DIR = $$DESTDIR/.qrc
UI_DIR = $$DESTDIR/.ui
unix:!macx {
isEmpty(INSTALL_PREFIX):INSTALL_PREFIX = /usr
isEmpty(BIN_DIR):BIN_DIR = $$INSTALL_PREFIX/bin
isEmpty(DOCS_DIR):DOCS_DIR = $$INSTALL_PREFIX/share/doc/leocad
isEmpty(ICON_DIR):ICON_DIR = $$INSTALL_PREFIX/share/icons
2013-08-09 06:57:18 +02:00
isEmpty(MAN_DIR):MAN_DIR = $$INSTALL_PREFIX/share/man/man1
isEmpty(DESKTOP_DIR):DESKTOP_DIR = $$INSTALL_PREFIX/share/applications
isEmpty(MIME_DIR):MIME_DIR = $$INSTALL_PREFIX/share/mime/packages
2020-04-18 19:20:20 +02:00
isEmpty(APPDATA_DIR):APPDATA_DIR = $$INSTALL_PREFIX/share/metainfo
2013-08-09 06:57:18 +02:00
target.path = $$BIN_DIR
docs.path = $$DOCS_DIR
docs.files = docs/README.md docs/CREDITS.txt docs/COPYING.txt
2013-08-09 06:57:18 +02:00
man.path = $$MAN_DIR
2017-01-12 13:53:32 +01:00
man.files = docs/leocad.1
2013-08-09 06:57:18 +02:00
desktop.path = $$DESKTOP_DIR
desktop.files = qt/leocad.desktop
icons.path = $$ICON_DIR/hicolor
icons.files += tools/icon/128x128
icons.files += tools/icon/16x16
icons.files += tools/icon/24x24
icons.files += tools/icon/256x256
icons.files += tools/icon/32x32
icons.files += tools/icon/48x48
icons.files += tools/icon/512x512
icons.files += tools/icon/64x64
icons.files += tools/icon/scalable
2013-08-09 06:57:18 +02:00
mime.path = $$MIME_DIR
mime.files = qt/leocad.xml
2019-05-11 21:37:50 +02:00
appdata.path = $$APPDATA_DIR
appdata.files = tools/setup/leocad.appdata.xml
2021-01-24 12:53:02 +01:00
INSTALLS += target docs man desktop icons mime appdata
2013-08-09 06:57:18 +02:00
!isEmpty(DISABLE_UPDATE_CHECK) {
DEFINES += LC_DISABLE_UPDATE_CHECK=$$DISABLE_UPDATE_CHECK
}
!isEmpty(LDRAW_LIBRARY_PATH) {
DEFINES += LC_LDRAW_LIBRARY_PATH=\\\"$$LDRAW_LIBRARY_PATH\\\"
}
2013-08-09 06:57:18 +02:00
}
macx {
ICON = resources/leocad.icns
QMAKE_INFO_PLIST = qt/Info.plist
2013-08-11 03:30:34 +02:00
document_icon.files += $$_PRO_FILE_PWD_/resources/leocad_document.icns
document_icon.path = Contents/Resources
2013-08-10 06:03:29 +02:00
library.files += $$_PRO_FILE_PWD_/library.bin
2013-08-09 06:57:18 +02:00
library.path = Contents/Resources
2020-09-14 01:37:04 +02:00
povray.files += $$_PRO_FILE_PWD_/povray
2020-04-18 19:20:20 +02:00
povray.path = Contents/MacOS
2013-08-09 06:57:18 +02:00
2020-04-18 19:20:20 +02:00
QMAKE_BUNDLE_DATA += document_icon library povray
DEFINES += LC_DISABLE_UPDATE_CHECK=1
2013-08-09 06:57:18 +02:00
}
2020-12-25 19:43:22 +01:00
SOURCES += \
common/texfont.cpp \
common/project.cpp \
common/pieceinf.cpp \
common/piece.cpp \
common/object.cpp \
common/minifig.cpp \
common/light.cpp \
common/lc_application.cpp \
common/lc_bricklink.cpp \
common/lc_category.cpp \
2021-01-07 02:45:38 +01:00
common/lc_collapsiblewidget.cpp \
common/lc_colors.cpp \
common/lc_commands.cpp \
common/lc_context.cpp \
2021-01-24 12:53:02 +01:00
common/lc_edgecolordialog.cpp \
common/lc_file.cpp \
2021-01-31 00:37:17 +01:00
common/lc_findreplacewidget.cpp \
common/lc_glextensions.cpp \
common/lc_http.cpp \
2021-01-06 03:48:12 +01:00
common/lc_instructions.cpp \
2020-12-20 20:24:50 +01:00
common/lc_instructionsdialog.cpp \
common/lc_library.cpp \
common/lc_lxf.cpp \
common/lc_mainwindow.cpp \
common/lc_mesh.cpp \
common/lc_meshloader.cpp \
2020-12-20 20:24:50 +01:00
common/lc_minifigdialog.cpp \
common/lc_model.cpp \
2021-01-07 19:46:57 +01:00
common/lc_pagesetupdialog.cpp \
2020-12-20 20:24:50 +01:00
common/lc_partselectionwidget.cpp \
common/lc_previewwidget.cpp \
common/lc_profile.cpp \
common/lc_scene.cpp \
common/lc_shortcuts.cpp \
common/lc_stringcache.cpp \
common/lc_synth.cpp \
common/lc_texture.cpp \
2020-12-20 20:24:50 +01:00
common/lc_timelinewidget.cpp \
2020-12-25 19:43:22 +01:00
common/lc_view.cpp \
2021-06-20 22:24:59 +02:00
common/lc_viewmanipulator.cpp \
2020-12-20 20:24:50 +01:00
common/lc_viewsphere.cpp \
common/lc_viewwidget.cpp \
common/lc_zipfile.cpp \
common/image.cpp \
common/group.cpp \
common/camera.cpp \
2020-12-20 20:24:50 +01:00
qt/system.cpp \
qt/qtmain.cpp \
qt/lc_qarraydialog.cpp \
qt/lc_qgroupdialog.cpp \
qt/lc_qaboutdialog.cpp \
qt/lc_qeditgroupsdialog.cpp \
qt/lc_qselectdialog.cpp \
qt/lc_qpropertiesdialog.cpp \
qt/lc_qhtmldialog.cpp \
qt/lc_qpreferencesdialog.cpp \
qt/lc_qcategorydialog.cpp \
qt/lc_qimagedialog.cpp \
qt/lc_qupdatedialog.cpp \
qt/lc_qutils.cpp \
qt/lc_qpropertiestree.cpp \
qt/lc_qcolorpicker.cpp \
qt/lc_qcolorlist.cpp \
qt/lc_qmodellistdialog.cpp \
qt/lc_renderdialog.cpp \
qt/lc_setsdatabasedialog.cpp \
common/lc_partpalettedialog.cpp
2013-08-09 06:57:18 +02:00
HEADERS += \
common/texfont.h \
common/project.h \
common/pieceinf.h \
common/piece.h \
common/object.h \
common/minifig.h \
common/light.h \
common/lc_application.h \
common/lc_array.h \
common/lc_bricklink.h \
common/lc_category.h \
2021-01-07 02:45:38 +01:00
common/lc_collapsiblewidget.h \
common/lc_colors.h \
common/lc_commands.h \
common/lc_context.h \
2021-01-24 12:53:02 +01:00
common/lc_edgecolordialog.h \
common/lc_file.h \
2021-01-31 00:37:17 +01:00
common/lc_findreplacewidget.h \
common/lc_glextensions.h \
common/lc_global.h \
common/lc_http.h \
2021-01-06 03:48:12 +01:00
common/lc_instructions.h \
2020-12-20 20:24:50 +01:00
common/lc_instructionsdialog.h \
common/lc_library.h \
common/lc_lxf.h \
common/lc_mainwindow.h \
common/lc_math.h \
common/lc_mesh.h \
common/lc_meshloader.h \
2020-12-20 20:24:50 +01:00
common/lc_minifigdialog.h \
common/lc_model.h \
2021-01-07 19:46:57 +01:00
common/lc_pagesetupdialog.h \
2020-12-20 20:24:50 +01:00
common/lc_previewwidget.h \
common/lc_profile.h \
common/lc_scene.h \
common/lc_shortcuts.h \
common/lc_stringcache.h \
common/lc_synth.h \
common/lc_texture.h \
2020-12-25 19:43:22 +01:00
common/lc_view.h \
2021-06-20 22:24:59 +02:00
common/lc_viewmanipulator.h \
common/lc_viewsphere.h \
2020-12-20 20:24:50 +01:00
common/lc_viewwidget.h \
common/lc_zipfile.h \
2020-12-20 20:24:50 +01:00
common/lc_partselectionwidget.h \
common/lc_timelinewidget.h \
common/image.h \
common/group.h \
common/camera.h \
qt/lc_qarraydialog.h \
qt/lc_qgroupdialog.h \
qt/lc_qaboutdialog.h \
qt/lc_qeditgroupsdialog.h \
qt/lc_qselectdialog.h \
qt/lc_qpropertiesdialog.h \
qt/lc_qhtmldialog.h \
qt/lc_qpreferencesdialog.h \
qt/lc_qcategorydialog.h \
qt/lc_qimagedialog.h \
qt/lc_qupdatedialog.h \
qt/lc_qutils.h \
qt/lc_qpropertiestree.h \
qt/lc_qcolorpicker.h \
qt/lc_qcolorlist.h \
qt/lc_qmodellistdialog.h \
qt/lc_renderdialog.h \
qt/lc_setsdatabasedialog.h \
common/lc_partpalettedialog.h
2020-06-01 03:46:36 +02:00
FORMS += \
qt/lc_qarraydialog.ui \
qt/lc_qgroupdialog.ui \
qt/lc_qaboutdialog.ui \
qt/lc_qeditgroupsdialog.ui \
qt/lc_qselectdialog.ui \
qt/lc_qpropertiesdialog.ui \
qt/lc_qhtmldialog.ui \
qt/lc_qpreferencesdialog.ui \
qt/lc_qcategorydialog.ui \
qt/lc_qimagedialog.ui \
qt/lc_qupdatedialog.ui \
qt/lc_qmodellistdialog.ui \
qt/lc_renderdialog.ui \
qt/lc_setsdatabasedialog.ui \
2020-12-20 20:24:50 +01:00
common/lc_minifigdialog.ui \
2021-01-07 19:46:57 +01:00
common/lc_pagesetupdialog.ui \
common/lc_partpalettedialog.ui
2021-01-24 12:53:02 +01:00
OTHER_FILES +=
2020-07-25 22:21:22 +02:00
RESOURCES += leocad.qrc resources/stylesheet/stylesheet.qrc
2014-09-21 03:31:01 +02:00
2019-03-19 02:24:45 +01:00
!win32 {
TRANSLATIONS = resources/leocad_pt.ts resources/leocad_fr.ts resources/leocad_de.ts resources/leocad_uk.ts resources/leocad_cs.ts resources/leocad_es.ts
2014-12-31 02:25:43 +01:00
}