From 2d3cdd8f60f2b1b797a89011b36d772fba4bc83f Mon Sep 17 00:00:00 2001 From: Jeremy Hu Date: Fri, 13 Apr 2018 22:54:05 +0800 Subject: [PATCH] Add build docs for mac --- README.md | 17 ++--------------- docs/index.rst | 3 ++- dust3d.pro | 37 +++++++++++++++++++------------------ 3 files changed, 23 insertions(+), 34 deletions(-) diff --git a/README.md b/README.md index 233b8917..a834271f 100644 --- a/README.md +++ b/README.md @@ -1,16 +1,3 @@ -WIP... +WIP... COMMING SOON -Build --------- -Mac -``` -$ qmake -spec macx-xcode -``` - -Windows -``` -From Start Menu, Open Visual Studio 2017 Tools Command Prompt: -C:\Program Files\Microsoft Visual Studio\2017\Community>cd C:\Users\IEUser\Desktop\dust3d -C:\Users\IEUser\Desktop\dust3d>qmake DEFINES+=BOOST_INCLUDEDIR=C:\dev\boost_1_55_0\boost_1_55_0 DEFINES+=CGAL_DIR=C:\dev\CGAL-4.11.1 -C:\Users\IEUser\Desktop\dust3d>nmake -f Makefile.Release -``` \ No newline at end of file +http://dust3d.readthedocs.io/ \ No newline at end of file diff --git a/docs/index.rst b/docs/index.rst index c2c29d2e..b207f1cc 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -9,7 +9,8 @@ Welcome to dust3d's documentation! .. toctree:: :maxdepth: 2 :caption: Contents: - + + builds shortcuts Indices and tables diff --git a/dust3d.pro b/dust3d.pro index ca705656..77dee078 100644 --- a/dust3d.pro +++ b/dust3d.pro @@ -2,17 +2,6 @@ QT += core widgets opengl CONFIG += release RESOURCES += resources.qrc -BOOST_INCLUDEDIR = $$(BOOST_INCLUDEDIR) -CGAL_DIR = $$(CGAL_DIR) - -isEmpty(BOOST_INCLUDEDIR) { - error("No BOOST_INCLUDEDIR define found in enviroment variables") -} - -isEmpty(CGAL_DIR) { - error("No CGAL_DIR define found in enviroment variables") -} - HUMAN_VERSION = "0.0-alpha1" REPOSITORY_URL = "https://github.com/huxingyi/dust3d" ISSUES_URL = "https://github.com/huxingyi/dust3d/issues" @@ -97,6 +86,17 @@ SOURCES += src/main.cpp HEADERS += src/version.h win32 { + BOOST_INCLUDEDIR = $$(BOOST_INCLUDEDIR) + CGAL_DIR = $$(CGAL_DIR) + + isEmpty(BOOST_INCLUDEDIR) { + error("No BOOST_INCLUDEDIR define found in enviroment variables") + } + + isEmpty(CGAL_DIR) { + error("No CGAL_DIR define found in enviroment variables") + } + contains(QMAKE_TARGET.arch, x86_64) { MESHLITE_DIR = thirdparty/meshlite/meshlite_unstable_vc14_x64 } else { @@ -121,13 +121,14 @@ unix { GMP_LIBNAME = gmp MPFR_LIBNAME = mpfr CGAL_LIBNAME = cgal - CGAL_INCLUDEDIR = $$CGAL_DIR/include - CGAL_BUILDINCLUDEDIR = $$CGAL_DIR/build/include - CGAL_LIBDIR = $$CGAL_DIR/build/lib - GMP_INCLUDEDIR = $$CGAL_DIR/auxiliary/gmp/include - GMP_LIBDIR = $$CGAL_DIR/auxiliary/gmp/lib - MPFR_INCLUDEDIR = $$GMP_INCLUDEDIR - MPFR_LIBDIR = $$GMP_LIBDIR + BOOST_INCLUDEDIR = /usr/local/opt/boost/include + CGAL_INCLUDEDIR = /usr/local/opt/cgal/include + CGAL_BUILDINCLUDEDIR = /usr/local/opt/cgal/include + CGAL_LIBDIR = /usr/local/opt/cgal/lib + GMP_INCLUDEDIR = /usr/local/opt/gmp/include + GMP_LIBDIR = /usr/local/opt/gmp/lib + MPFR_INCLUDEDIR = /usr/local/opt/mpfr/include + MPFR_LIBDIR = /usr/local/opt/mpfr/lib } INCLUDEPATH += $$MESHLITE_DIR