diff --git a/example/example.pro b/example/example.pro index 8891a28..5cb5e81 100644 --- a/example/example.pro +++ b/example/example.pro @@ -2,9 +2,16 @@ TEMPLATE = app TARGET = opencsgexample CONFIG += opengl warn_on release -INCLUDEPATH += ../glew/include ../include - -LIBS += -L../lib -lopencsg -lglut -L../glew/lib -lGLEW +INCLUDEPATH += ../include +LIBS += -L../lib -lopencsg -lGLEW +macx { + INCLUDEPATH += /opt/local/include + LIBS += -framework GLUT -L/opt/local/lib +} +else { + INCLUDEPATH += ../glew/include + LIBS += -lglut -L../glew/lib +} HEADERS = displaylistPrimitive.h SOURCES = displaylistPrimitive.cpp main.cpp diff --git a/opencsg.pro b/opencsg.pro index b56e622..5cf2d6d 100644 --- a/opencsg.pro +++ b/opencsg.pro @@ -1,2 +1,2 @@ TEMPLATE = subdirs -SUBDIRS = src example +SUBDIRS = src diff --git a/src/src.pro b/src/src.pro index 4843a12..04d3f4d 100644 --- a/src/src.pro +++ b/src/src.pro @@ -1,10 +1,32 @@ TEMPLATE = lib TARGET = opencsg VERSION = 1.3.2 -DESTDIR = ../lib CONFIG += opengl warn_on release -INCLUDEPATH += ../include ../glew/include ../ +INCLUDEPATH += ../include ../ +CONFIG -= qt + +# Optionally specify deployment location using the +# OPENSCAD_LIBRARIES env. variable +OPENSCAD_LIBDIR = $$(OPENSCAD_LIBRARIES) + +!isEmpty(OPENSCAD_LIBDIR) { + message("Deploy") + INSTALLDIR = $$OPENSCAD_LIBDIR + INCLUDEPATH += $$OPENSCAD_LIBDIR/include + LIBS += -L$$OPENSCAD_LIBDIR/lib -lGLEW + CONFIG += absolute_library_soname + headers.files = ../include/opencsg.h + headers.path = $$INSTALLDIR/include + INSTALLS += target headers + target.path = $$INSTALLDIR/lib +} +else { + DESTDIR = ../lib + INCLUDEPATH += ../glew/include + INSTALLS += target + target.path = $$DESTDIR +} HEADERS = ../include/opencsg.h \ opencsgConfig.h \