mirror of https://github.com/vitalif/openscad
Improved Mac OS X deployment - hopefully this doesn't break builds on other platforms
git-svn-id: http://svn.clifford.at/openscad/trunk@529 b57f626f-c46c-0410-a088-ec61d464b74cstl_dim
parent
a35283f294
commit
f5b3b30e51
11
cgal.pri
11
cgal.pri
|
@ -1,7 +1,7 @@
|
||||||
cgal {
|
cgal {
|
||||||
DEFINES += ENABLE_CGAL
|
DEFINES += ENABLE_CGAL
|
||||||
LIBS += -lCGAL
|
|
||||||
|
|
||||||
|
!deploy {
|
||||||
# Optionally specify location of CGAL using the
|
# Optionally specify location of CGAL using the
|
||||||
# CGALDIR env. variable
|
# CGALDIR env. variable
|
||||||
CGAL_DIR = $$(CGALDIR)
|
CGAL_DIR = $$(CGALDIR)
|
||||||
|
@ -10,13 +10,8 @@ cgal {
|
||||||
LIBS += -L$$CGAL_DIR/lib
|
LIBS += -L$$CGAL_DIR/lib
|
||||||
message("CGAL location: $$CGAL_DIR")
|
message("CGAL location: $$CGAL_DIR")
|
||||||
}
|
}
|
||||||
macx {
|
|
||||||
# The -L/usr/lib is to force the linker to use system libraries over MacPort libraries
|
|
||||||
LIBS += -L/usr/lib -L/opt/local/lib /opt/local/lib/libgmp.a /opt/local/lib/libmpfr.a /opt/local/lib/libboost_thread-mt.a
|
|
||||||
}
|
}
|
||||||
else {
|
|
||||||
LIBS += -lmpfr
|
LIBS += -lCGAL -lmpfr -lgmp -lboost_thread
|
||||||
}
|
|
||||||
win32:LIBS += -lboost_thread -lgmp
|
|
||||||
QMAKE_CXXFLAGS += -frounding-math
|
QMAKE_CXXFLAGS += -frounding-math
|
||||||
}
|
}
|
||||||
|
|
|
@ -41,7 +41,7 @@ o MDI
|
||||||
o 3D View
|
o 3D View
|
||||||
- OpenGL 2.0 test: What, exactly, is needed from OpenGL 2.0? Can we use 1.x with extensions?
|
- OpenGL 2.0 test: What, exactly, is needed from OpenGL 2.0? Can we use 1.x with extensions?
|
||||||
- Improve mouse rotation
|
- Improve mouse rotation
|
||||||
- Add modifier key combos to handle pan on 1 mouse button systems
|
- Add modifier key combos to handle pan and zoom on 1 mouse button systems
|
||||||
- Show grid
|
- Show grid
|
||||||
- 4 x split view w/orthogonal cameras?
|
- 4 x split view w/orthogonal cameras?
|
||||||
- Quick highlighting of object under the cursor in the editor
|
- Quick highlighting of object under the cursor in the editor
|
||||||
|
@ -170,6 +170,8 @@ MISC
|
||||||
o Streamline the cmd-line interface a bit
|
o Streamline the cmd-line interface a bit
|
||||||
- Implicit output file format
|
- Implicit output file format
|
||||||
o Mac OS X:
|
o Mac OS X:
|
||||||
- universal binary -> fix cgal and opencsg
|
- 32-bit compatibility
|
||||||
|
o Build everything including i386 arch
|
||||||
|
|
||||||
o Write checklists for typical extension work (add new module, add new function)
|
o Write checklists for typical extension work (add new module, add new function)
|
||||||
-> make sure new test files are added
|
-> make sure new test files are added
|
||||||
|
|
|
@ -1,30 +1,60 @@
|
||||||
o Prerequisites (MacPorts):
|
NB! This is the Mac OS X deployment checklist.
|
||||||
- NB! CGAL requires gcc >= 4.2
|
See build-macosx.txt for how to build a development build of
|
||||||
- eigen
|
OpenSCAD for your system only without manually compiling all
|
||||||
- boost
|
dependencies.
|
||||||
- gmp
|
|
||||||
- mpfr
|
o MacPorts libs
|
||||||
- cmake
|
port install eigen
|
||||||
- Qt4
|
|
||||||
|
o Qt4
|
||||||
|
- Download and install the combined 32-bit and 64-bit build for 10.5-10.6 from here:
|
||||||
|
http://qt.nokia.com/downloads/qt-for-open-source-cpp-development-on-mac-os-x
|
||||||
|
|
||||||
|
o Build gmp
|
||||||
|
|
||||||
|
tar xjz gmp-5.0.1.tar.bz2
|
||||||
|
cd gmp-5.0.1
|
||||||
|
./configure --prefix=$PWD/../../deploy CFLAGS=-mmacosx-version-min=10.5 LDFLAGS=-mmacosx-version-min=10.5
|
||||||
|
make install
|
||||||
|
|
||||||
|
o Build mpfr
|
||||||
|
tar xjz mpfr-2.4.2.tar.bz2
|
||||||
|
cd mpfr-2.4.2
|
||||||
|
./configure --prefix=$PWD/../../deploy --with-gmp=$PWD/../../deploy CFLAGS=-mmacosx-version-min=10.5 LDFLAGS=-mmacosx-version-min=10.5
|
||||||
|
make install
|
||||||
|
|
||||||
|
o Build boost::thread
|
||||||
|
tar xjz boost_1_42_0.tar.bz2
|
||||||
|
cd boost_1_42_0
|
||||||
|
./bootstrap.sh --prefix=$PWD/../../deploy --with-libraries=thread
|
||||||
|
./bjam cflags="-mmacosx-version-min=10.5" linkflags="-mmacosx-version-min=10.5"
|
||||||
|
./bjam install
|
||||||
|
|
||||||
o Build CGAL >= 3.5
|
o Build CGAL >= 3.5
|
||||||
|
|
||||||
tar xzf CGAL-3.6.tar.gz
|
tar xzf CGAL-3.6.tar.gz
|
||||||
cd CGAL-3.6
|
cd CGAL-3.6
|
||||||
cmake -DCMAKE_INSTALL_PREFIX=$PWD/../install/CGAL-3.6 -DBUILD_SHARED_LIBS=FALSE
|
cmake -DCMAKE_INSTALL_PREFIX=$PWD/../../deploy -DBUILD_SHARED_LIBS=FALSE -DCMAKE_OSX_DEPLOYMENT_TARGET="10.5"
|
||||||
make -j4
|
make -j4
|
||||||
make install
|
make install
|
||||||
|
|
||||||
o Patch OpenCSG >= 1.3.0
|
o Patch & build GLEW
|
||||||
|
|
||||||
|
tar xzf glew-1.5.3.tar.gz
|
||||||
|
cd glew-1.5.3
|
||||||
|
patch -p1 < ../openscad/patches/glew-1.5.3-MacOSX.patch
|
||||||
|
mkdir ../../deploy/lib/pkgconfig
|
||||||
|
GLEW_DEST=$PWD/../../deploy make install
|
||||||
|
|
||||||
|
o Patch and build OpenCSG >= 1.3.0
|
||||||
|
|
||||||
|
FIXME: Update patch
|
||||||
tar xzf OpenCSG-1.3.0.tar.gz
|
tar xzf OpenCSG-1.3.0.tar.gz
|
||||||
cd OpenCSG-1.3.0
|
cd OpenCSG-1.3.0
|
||||||
patch -p1 < ../openscad/patches/OpenCSG-1.3.0-MacOSX-port.patch
|
patch -p1 < ../openscad/patches/OpenCSG-1.3.0-MacOSX-port.patch
|
||||||
|
MACOSX_DEPLOY_DIR=$PWD/../../deploy qmake -r
|
||||||
o Build OpenCSG
|
|
||||||
|
|
||||||
qmake -recursive
|
|
||||||
make
|
make
|
||||||
|
make install
|
||||||
|
|
||||||
o Build and Deploy OpenSCAD
|
o Build and Deploy OpenSCAD
|
||||||
|
|
||||||
|
|
20
opencsg.pri
20
opencsg.pri
|
@ -1,23 +1,21 @@
|
||||||
opencsg {
|
opencsg {
|
||||||
|
DEFINES += ENABLE_OPENCSG
|
||||||
|
CONFIG += glew
|
||||||
|
include(glew.pri)
|
||||||
|
|
||||||
HEADERS += src/render-opencsg.h
|
HEADERS += src/render-opencsg.h
|
||||||
SOURCES += src/render-opencsg.cc
|
SOURCES += src/render-opencsg.cc
|
||||||
|
|
||||||
DEFINES += ENABLE_OPENCSG
|
!deploy {
|
||||||
LIBS += -lopencsg
|
|
||||||
unix:LIBS += -lGLEW
|
|
||||||
win32:LIBS += -lglew32
|
|
||||||
|
|
||||||
# Optionally specify location of OpenCSG using the
|
# Optionally specify location of OpenCSG using the
|
||||||
# OPENCSGDIR env. variable
|
# OPENCSGDIR env. variable
|
||||||
OPENCSG_DIR = $$(OPENCSGDIR)
|
OPENCSG_DIR = $$(OPENCSGDIR)
|
||||||
!isEmpty(OPENCSG_DIR) {
|
!isEmpty(OPENCSG_DIR) {
|
||||||
INCLUDEPATH += $$OPENCSG_DIR/include
|
INCLUDEPATH += $$OPENCSG_DIR/include
|
||||||
LIBS += -L$$OPENCSG_DIR/lib
|
LIBS += -L$$OPENCSG_DIR/lib
|
||||||
message("OpenCSG location: $$CGAL_DIR")
|
message("OpenCSG location: $$OPENCSG_DIR")
|
||||||
}
|
|
||||||
macx {
|
|
||||||
# For glew
|
|
||||||
INCLUDEPATH += /opt/local/include
|
|
||||||
LIBS += -L/opt/local/lib
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
LIBS += -lopencsg
|
||||||
|
}
|
||||||
|
|
16
openscad.pro
16
openscad.pro
|
@ -10,6 +10,16 @@ RCC_DIR = objects
|
||||||
INCLUDEPATH += src
|
INCLUDEPATH += src
|
||||||
|
|
||||||
macx {
|
macx {
|
||||||
|
# add CONFIG+=deploy to the qmake command-line to make a deployment build
|
||||||
|
deploy {
|
||||||
|
message("Building deployment version")
|
||||||
|
DEPLOYDIR = $$(MACOSX_DEPLOY_DIR)
|
||||||
|
!isEmpty(DEPLOYDIR) {
|
||||||
|
INCLUDEPATH += $$DEPLOYDIR/include
|
||||||
|
LIBS += -L$$DEPLOYDIR/lib
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
TARGET = OpenSCAD
|
TARGET = OpenSCAD
|
||||||
ICON = icons/OpenSCAD.icns
|
ICON = icons/OpenSCAD.icns
|
||||||
QMAKE_INFO_PLIST = Info.plist
|
QMAKE_INFO_PLIST = Info.plist
|
||||||
|
@ -56,9 +66,9 @@ include(opencsg.pri)
|
||||||
include(eigen2.pri)
|
include(eigen2.pri)
|
||||||
|
|
||||||
# Standard include path for misc external libs
|
# Standard include path for misc external libs
|
||||||
macx {
|
#macx {
|
||||||
INCLUDEPATH += /opt/local/include
|
# INCLUDEPATH += /opt/local/include
|
||||||
}
|
#}
|
||||||
|
|
||||||
# QMAKE_CFLAGS += -pg
|
# QMAKE_CFLAGS += -pg
|
||||||
# QMAKE_CXXFLAGS += -pg
|
# QMAKE_CXXFLAGS += -pg
|
||||||
|
|
|
@ -5,6 +5,8 @@
|
||||||
# are present and that they are backwards compatible with at least 10.5.
|
# are present and that they are backwards compatible with at least 10.5.
|
||||||
# Run with an executable as parameter
|
# Run with an executable as parameter
|
||||||
#
|
#
|
||||||
|
# Author: Marius Kintel <marius@kintel.net>
|
||||||
|
#
|
||||||
|
|
||||||
import sys
|
import sys
|
||||||
import os
|
import os
|
||||||
|
|
|
@ -42,7 +42,7 @@ echo "Building openscad-$VERSION $CONFIGURATION..."
|
||||||
|
|
||||||
case $OS in
|
case $OS in
|
||||||
MACOSX)
|
MACOSX)
|
||||||
CONFIG=mdi
|
CONFIG=deploy
|
||||||
TARGET=
|
TARGET=
|
||||||
;;
|
;;
|
||||||
WIN)
|
WIN)
|
||||||
|
|
|
@ -1,3 +1,6 @@
|
||||||
|
export MACOSX_DEPLOY_DIR=$PWD/../libraries/deploy
|
||||||
|
export DYLD_LIBRARY_PATH=$MACOSX_DEPLOY_DIR/lib
|
||||||
|
|
||||||
export OPENCSGDIR=$PWD/../OpenCSG-1.3.0
|
export OPENCSGDIR=$PWD/../OpenCSG-1.3.0
|
||||||
export CGALDIR=$PWD/../install/CGAL-3.6
|
export CGALDIR=$PWD/../install/CGAL-3.6
|
||||||
export QCODEEDITDIR=$PWD/../qcodeedit-2.2.3/install
|
export QCODEEDITDIR=$PWD/../qcodeedit-2.2.3/install
|
||||||
|
|
Loading…
Reference in New Issue