From ef05550a53ef368f0651008a69f02666fa9a021a Mon Sep 17 00:00:00 2001 From: Tats Date: Fri, 6 Dec 2013 23:42:45 -0500 Subject: [PATCH] Fixed to make it work under OSX --- Mapper.h | 7 ++++++- Paint.h | 6 ++++++ Util.h | 4 ++++ libremapping.pro | 7 ++++++- 4 files changed, 22 insertions(+), 2 deletions(-) diff --git a/Mapper.h b/Mapper.h index b59fc2d..0ce24cc 100644 --- a/Mapper.h +++ b/Mapper.h @@ -24,8 +24,13 @@ #include -#include +#if __APPLE__ +#include +#else #include +#endif + +#include #include #include diff --git a/Paint.h b/Paint.h index 9c0640f..c16c054 100644 --- a/Paint.h +++ b/Paint.h @@ -25,7 +25,13 @@ #include #include #include + +#if __APPLE__ +#include +#else #include +#endif + #include /** diff --git a/Util.h b/Util.h index 893e9cf..4dbdd93 100644 --- a/Util.h +++ b/Util.h @@ -20,7 +20,11 @@ #ifndef UTIL_H_ #define UTIL_H_ +#if __APPLE__ +#include +#else #include +#endif #include "Shape.h" #include "Paint.h" diff --git a/libremapping.pro b/libremapping.pro index 7355232..9a71e25 100644 --- a/libremapping.pro +++ b/libremapping.pro @@ -3,10 +3,15 @@ TEMPLATE = app HEADERS = MainWindow.h Util.h MapperGLCanvas.h SourceGLCanvas.h DestinationGLCanvas.h Mapper.h Mapping.h Shape.h Paint.h MappingManager.h SOURCES = main.cpp MainWindow.cpp Util.cpp Mapper.cpp MapperGLCanvas.cpp SourceGLCanvas.cpp DestinationGLCanvas.cpp MappingManager.cpp QT += gui opengl -LIBS += -lglut -lGLU RESOURCES = libremapping.qrc docs.depends = $(HEADERS) $(SOURCES) docs.commands = (cat Doxyfile; echo "INPUT = $?") | doxygen - QMAKE_EXTRA_TARGETS += docs +# mac +macx:LIBS += -framework OpenGL -framework GLUT +macx:QMAKE_CXXFLAGS += -D__MACOSX_CORE__ + +# not mac +!macx:LIBS += -lglut -lGLU