Permalink
Browse files

Some more build system cleaning

  • Loading branch information...
1 parent b74bb39 commit 6aa1a6d4c8fab520d2951ccfddb141ea5825acc1 @kintel kintel committed Dec 15, 2011
Showing with 57 additions and 59 deletions.
  1. +7 −9 boost.pri
  2. +8 −11 cgal.pri
  3. +6 −0 common.pri
  4. +7 −13 glew.pri
  5. +7 −13 opencsg.pri
  6. +14 −5 openscad.pro
  7. +8 −8 tests/CMakeLists.txt
View
@@ -1,14 +1,12 @@
boost {
- isEmpty(OPENSCAD_LIBDIR) {
- # Optionally specify location of boost using the
- # BOOSTDIR env. variable
- BOOST_DIR = $$(BOOSTDIR)
- !isEmpty(BOOST_DIR) {
- QMAKE_INCDIR += $$BOOST_DIR
- message("boost location: $$BOOST_DIR")
- win32:QMAKE_LIBDIR += -L$$BOOST_DIR/lib
- }
+ # Optionally specify location of boost using the
+ # BOOSTDIR env. variable
+ BOOST_DIR = $$(BOOSTDIR)
+ !isEmpty(BOOST_DIR) {
+ QMAKE_INCDIR += $$BOOST_DIR
+ message("boost location: $$BOOST_DIR")
+ win32:QMAKE_LIBDIR += -L$$BOOST_DIR/lib
}
CONFIG(mingw-cross-env) {
View
@@ -1,16 +1,14 @@
cgal {
DEFINES += ENABLE_CGAL
- isEmpty(OPENSCAD_LIBDIR) {
- # Optionally specify location of CGAL using the
- # CGALDIR env. variable
- CGAL_DIR = $$(CGALDIR)
- !isEmpty(CGAL_DIR) {
- QMAKE_INCDIR += $$CGAL_DIR/include
- win32: QMAKE_INCDIR += $$CGAL_DIR/auxiliary/gmp/include
- QMAKE_LIBDIR += $$CGAL_DIR/lib
- message("CGAL location: $$CGAL_DIR")
- }
+ # Optionally specify location of CGAL using the
+ # CGALDIR env. variable
+ CGAL_DIR = $$(CGALDIR)
+ !isEmpty(CGAL_DIR) {
+ QMAKE_INCDIR += $$CGAL_DIR/include
+ win32: QMAKE_INCDIR += $$CGAL_DIR/auxiliary/gmp/include
+ QMAKE_LIBDIR += $$CGAL_DIR/lib
+ message("CGAL location: $$CGAL_DIR")
}
CONFIG(mingw-cross-env) {
@@ -27,5 +25,4 @@ cgal {
QMAKE_CXXFLAGS += -frounding-math
}
}
-
}
View
@@ -1,7 +1,13 @@
+OBJECTS_DIR = objects
+MOC_DIR = objects
+UI_DIR = objects
+RCC_DIR = objects
+
include(win32.pri)
include(flex.pri)
include(bison.pri)
include(cgal.pri)
include(opencsg.pri)
+include(glew.pri)
include(eigen2.pri)
include(boost.pri)
View
@@ -1,17 +1,11 @@
glew {
- isEmpty(OPENSCAD_LIBDIR) {
- # Optionally specify location of GLEW using the
- # GLEWDIR env. variable
- GLEW_DIR = $$(GLEWDIR)
- isEmpty(GLEW_DIR) {
- # Default to MacPorts on Mac OS X
- macx: GLEW_DIR = /opt/local
- }
- !isEmpty(GLEW_DIR) {
- QMAKE_INCDIR += $$GLEW_DIR/include
- QMAKE_LIBDIR += -L$$GLEW_DIR/lib
- message("GLEW location: $$GLEW_DIR")
- }
+ # Optionally specify location of GLEW using the
+ # GLEWDIR env. variable
+ GLEW_DIR = $$(GLEWDIR)
+ !isEmpty(GLEW_DIR) {
+ QMAKE_INCDIR += $$GLEW_DIR/include
+ QMAKE_LIBDIR += $$GLEW_DIR/lib
+ message("GLEW location: $$GLEW_DIR")
}
unix:LIBS += -lGLEW
View
@@ -1,20 +1,14 @@
opencsg {
DEFINES += ENABLE_OPENCSG
CONFIG += glew
- include(glew.pri)
- HEADERS += src/OpenCSGRenderer.h
- SOURCES += src/OpenCSGRenderer.cc
-
- isEmpty(OPENSCAD_LIBDIR) {
- # Optionally specify location of OpenCSG using the
- # OPENCSGDIR env. variable
- OPENCSG_DIR = $$(OPENCSGDIR)
- !isEmpty(OPENCSG_DIR) {
- QMAKE_INCDIR += $$OPENCSG_DIR/include
- QMAKE_LIBDIR += $$OPENCSG_DIR/lib
- message("OpenCSG location: $$OPENCSG_DIR")
- }
+ # Optionally specify location of OpenCSG using the
+ # OPENCSGDIR env. variable
+ OPENCSG_DIR = $$(OPENCSGDIR)
+ !isEmpty(OPENCSG_DIR) {
+ QMAKE_INCDIR += $$OPENCSG_DIR/include
+ QMAKE_LIBDIR += $$OPENCSG_DIR/lib
+ message("OpenCSG location: $$OPENCSG_DIR")
}
LIBS += -lopencsg
View
@@ -33,12 +33,7 @@ win32 {
debug: DEFINES += DEBUG
TEMPLATE = app
-RESOURCES = openscad.qrc
-OBJECTS_DIR = objects
-MOC_DIR = objects
-UI_DIR = objects
-RCC_DIR = objects
INCLUDEPATH += src
# Handle custom library location.
@@ -48,6 +43,13 @@ OPENSCAD_LIBDIR = $$(OPENSCAD_LIBRARIES)
QMAKE_INCDIR += $$OPENSCAD_LIBDIR/include
QMAKE_LIBDIR += $$OPENSCAD_LIBDIR/lib
}
+else {
+ macx {
+ # Default to MacPorts on Mac OS X
+ QMAKE_INCDIR = /opt/local/include
+ QMAKE_LIBDIR = /opt/local/lib
+ }
+}
macx {
# add CONFIG+=deploy to the qmake command-line to make a deployment build
@@ -108,6 +110,8 @@ win32 {
YACCSOURCES += src/parser.y
}
+RESOURCES = openscad.qrc
+
FORMS += src/MainWindow.ui \
src/Preferences.ui \
src/OpenCSGWarningDialog.ui
@@ -213,6 +217,11 @@ SOURCES += src/openscad.cc \
src/PolySetCache.cc \
src/PolySetEvaluator.cc
+opencsg {
+ HEADERS += src/OpenCSGRenderer.h
+ SOURCES += src/OpenCSGRenderer.cc
+}
+
cgal {
HEADERS += src/cgal.h \
src/cgalfwd.h \
View
@@ -64,8 +64,8 @@ endif()
#
# Boost
-if (NOT $ENV{MACOSX_DEPLOY_DIR} STREQUAL "")
- set(BOOST_ROOT "$ENV{MACOSX_DEPLOY_DIR}")
+if (NOT $ENV{OPENSCAD_LIBRARIES} STREQUAL "")
+ set(BOOST_ROOT "$ENV{OPENSCAD_LIBRARIES}")
endif()
if (NOT $ENV{BOOSTDIR} STREQUAL "")
@@ -151,8 +151,8 @@ include_directories(${EIGEN2_INCLUDE_DIR})
# OpenCSG
if (NOT $ENV{OPENCSGDIR} STREQUAL "")
set(OPENCSG_DIR "$ENV{OPENCSGDIR}")
-elseif (NOT $ENV{MACOSX_DEPLOY_DIR} STREQUAL "")
- set(OPENCSG_DIR "$ENV{MACOSX_DEPLOY_DIR}")
+elseif (NOT $ENV{OPENSCAD_LIBRARIES} STREQUAL "")
+ set(OPENCSG_DIR "$ENV{OPENSCAD_LIBRARIES}")
endif()
if (NOT OPENCSG_INCLUDE_DIR)
message(STATUS "OPENCSG_DIR: " ${OPENCSG_DIR})
@@ -175,8 +175,8 @@ include_directories(${OPENCSG_INCLUDE_DIR})
if (NOT $ENV{GLEWDIR} STREQUAL "")
set(GLEW_DIR "$ENV{GLEWDIR}")
-elseif (NOT $ENV{MACOSX_DEPLOY_DIR} STREQUAL "")
- set(GLEW_DIR "$ENV{MACOSX_DEPLOY_DIR}")
+elseif (NOT $ENV{OPENSCAD_LIBRARIES} STREQUAL "")
+ set(GLEW_DIR "$ENV{OPENSCAD_LIBRARIES}")
endif()
find_package(GLEW REQUIRED)
@@ -208,8 +208,8 @@ set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/parser_yacc.c PROPERTIES
if (NOT $ENV{CGALDIR} STREQUAL "")
set(CGAL_DIR "$ENV{CGALDIR}")
-elseif (NOT $ENV{MACOSX_DEPLOY_DIR} STREQUAL "")
- set(CGAL_DIR "$ENV{MACOSX_DEPLOY_DIR}/lib/CGAL")
+elseif (NOT $ENV{OPENSCAD_LIBRARIES} STREQUAL "")
+ set(CGAL_DIR "$ENV{OPENSCAD_LIBRARIES}/lib/CGAL")
set(CMAKE_MODULE_PATH "${CGAL_DIR}")
endif()
message(STATUS "CGAL_DIR: " ${CGAL_DIR})

0 comments on commit 6aa1a6d

Please sign in to comment.