diff options
-rw-r--r-- | eigen2.pri | 4 | ||||
-rw-r--r-- | openscad.pro | 4 | ||||
-rw-r--r-- | tests/CMakeLists.txt | 15 | ||||
-rw-r--r-- | tests/OffscreenContext.cc | 2 |
4 files changed, 22 insertions, 3 deletions
@@ -5,7 +5,9 @@ EIGEN2_DIR = $$(EIGEN2DIR) INCLUDEPATH += $$EIGEN2_DIR } else { - macx { + unix:freebsd-g++ { + INCLUDEPATH += /usr/local/include/eigen2 + } else macx { INCLUDEPATH += /opt/local/include/eigen2 } else { diff --git a/openscad.pro b/openscad.pro index 994a527..ff65162 100644 --- a/openscad.pro +++ b/openscad.pro @@ -25,6 +25,10 @@ VERSION_MONTH=$$member(VERSION_SPLIT, 1) VERSION_DAY=$$member(VERSION_SPLIT, 2) #configure lex / yacc +unix:freebsd-g++ { + QMAKE_LEX = /usr/local/bin/flex + QMAKE_YACC = /usr/local/bin/bison +} win32 { include(flex.pri) include(bison.pri) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 1a73254..40286dd 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -74,13 +74,20 @@ include(${QT_USE_FILE}) # Turn off Eigen SIMD optimization if(NOT ${CMAKE_SYSTEM_NAME} MATCHES "Darwin") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DEIGEN_DONT_ALIGN") + if(NOT ${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DEIGEN_DONT_ALIGN") + endif() endif() if (NOT EIGEN2_INCLUDE_DIR) find_path(EIGEN2_INCLUDE_DIR Eigen/Core PATHS ENV EIGEN2DIR /opt/local/include/eigen2 /usr/include/eigen2) + if (${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD") + find_path(EIGEN2_INCLUDE_DIR + Eigen/Core + PATHS ENV EIGEN2DIR /usr/local/include/eigen2 ) + endif() if (NOT EIGEN2_INCLUDE_DIR) message(FATAL_ERROR "Eigen2 not found") else() @@ -126,6 +133,12 @@ endif() # Flex/Bison find_package(BISON) + +if(${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD") + # FreeBSD has an old flex in /usr/bin and a new flex in /usr/local/bin + set(FLEX_EXECUTABLE /usr/local/bin/flex) +endif() + find_package(FLEX) # The COMPILE_FLAGS and forced C++ compiler is just to be compatible with qmake if (WIN32) diff --git a/tests/OffscreenContext.cc b/tests/OffscreenContext.cc index 727e771..7a3637c 100644 --- a/tests/OffscreenContext.cc +++ b/tests/OffscreenContext.cc @@ -1,4 +1,4 @@ -/* +/* Create an OpenGL context without creating an OpenGL Window. for Linux. |