Commit 29b2672a authored by Thery Sylvain's avatar Thery Sylvain

update for compile on mac

parent 09585b63
...@@ -137,14 +137,11 @@ ENDIF (WITH_GLEWMX) ...@@ -137,14 +137,11 @@ ENDIF (WITH_GLEWMX)
# qq definition specifiques pour mac # qq definition specifiques pour mac
IF(APPLE) #IF(APPLE)
# attention a changer pour chercher la bonne version automatiquement # SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DMAC_OSX")
SET(CMAKE_OSX_SYSROOT "/Developer/SDKs/MacOSX10.6.sdk" CACHE STRING "developer SDK") # SET(CMAKE_OSX_ARCHITECTURES x86_64)
SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-undefined -Wl,dynamic_lookup") # SET (CGoGN_EXT_LIBS ${CGoGN_EXT_LIBS} "-framework Foundation -framework cocoa" )
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DMAC_OSX") #ENDIF(APPLE)
SET(CMAKE_OSX_ARCHITECTURES x86_64)
SET (CGoGN_EXT_LIBS ${CGoGN_EXT_LIBS} "-framework Foundation -framework cocoa" )
ENDIF(APPLE)
IF(WIN32) IF(WIN32)
add_subdirectory(Release) add_subdirectory(Release)
......
...@@ -3,6 +3,10 @@ QT4_WRAP_UI( PLUGIN_UIC_FILES ${PLUGIN_UI_FILES} ) ...@@ -3,6 +3,10 @@ QT4_WRAP_UI( PLUGIN_UIC_FILES ${PLUGIN_UI_FILES} )
QT4_WRAP_CPP( PLUGIN_MOC_FILES ${PLUGIN_QOBJECT_FILES} ) QT4_WRAP_CPP( PLUGIN_MOC_FILES ${PLUGIN_QOBJECT_FILES} )
IF(APPLE)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -L/usr/local/lib")
ENDIF(APPLE)
IF( ${CMAKE_BUILD_TYPE} STREQUAL Debug ) IF( ${CMAKE_BUILD_TYPE} STREQUAL Debug )
ADD_DEFINITIONS(-DDEBUG) ADD_DEFINITIONS(-DDEBUG)
......
#include "schnapps.h"
#include <QVBoxLayout> #include <QVBoxLayout>
#include <QSplitter> #include <QSplitter>
#include <QMessageBox> #include <QMessageBox>
...@@ -13,6 +11,9 @@ ...@@ -13,6 +11,9 @@
#include <QMouseEvent> #include <QMouseEvent>
#include <QWheelEvent> #include <QWheelEvent>
#include "mapHandler.h"
#include "schnapps.h"
#include "controlDock_cameraTab.h" #include "controlDock_cameraTab.h"
#include "controlDock_mapTab.h" #include "controlDock_mapTab.h"
#include "controlDock_pluginTab.h" #include "controlDock_pluginTab.h"
...@@ -23,7 +24,6 @@ ...@@ -23,7 +24,6 @@
#include "plugin.h" #include "plugin.h"
#include "plugin_interaction.h" #include "plugin_interaction.h"
#include "plugin_processing.h" #include "plugin_processing.h"
#include "mapHandler.h"
namespace CGoGN namespace CGoGN
{ {
...@@ -100,8 +100,7 @@ SCHNApps::SCHNApps(const QString& appPath, PythonQtObjectPtr& pythonContext, Pyt ...@@ -100,8 +100,7 @@ SCHNApps::SCHNApps(const QString& appPath, PythonQtObjectPtr& pythonContext, Pyt
connect(action_LoadPythonScript, SIGNAL(triggered()), this, SLOT(loadPythonScriptFromFileDialog())); connect(action_LoadPythonScript, SIGNAL(triggered()), this, SLOT(loadPythonScriptFromFileDialog()));
// create & setup central widget (views) // create & setup central widget (views)
// glewInit();
glewInit();
m_centralLayout = new QVBoxLayout(centralwidget); m_centralLayout = new QVBoxLayout(centralwidget);
......
...@@ -29,6 +29,7 @@ SET (BUILD_SHARED_LIBS OFF CACHE BOOL ...@@ -29,6 +29,7 @@ SET (BUILD_SHARED_LIBS OFF CACHE BOOL
SET (WITH_ASSIMP ON CACHE BOOL "build with Assimp") SET (WITH_ASSIMP ON CACHE BOOL "build with Assimp")
SET (WITH_ZINRI ON CACHE BOOL "build with Zinri libs") SET (WITH_ZINRI ON CACHE BOOL "build with Zinri libs")
SET (WITH_PYTHONQT ON CACHE BOOL "build PythonQt (for Schnapps)")
IF (APPLE) IF (APPLE)
SET(CMAKE_OSX_ARCHITECTURES x86_64) SET(CMAKE_OSX_ARCHITECTURES x86_64)
...@@ -38,8 +39,10 @@ ENDIF(APPLE) ...@@ -38,8 +39,10 @@ ENDIF(APPLE)
add_subdirectory(Tools Tools/build) add_subdirectory(Tools Tools/build)
add_subdirectory(PythonQt PythonQt/build) IF (WITH_PYTHONQT)
INSTALL (DIRECTORY PythonQt/src/ DESTINATION ${CGoGN_ROOT_DIR}/ThirdParty/include/PythonQt FILES_MATCHING PATTERN "*.h") add_subdirectory(PythonQt PythonQt/build)
INSTALL (DIRECTORY PythonQt/src/ DESTINATION ${CGoGN_ROOT_DIR}/ThirdParty/include/PythonQt FILES_MATCHING PATTERN "*.h")
ENDIF (WITH_PYTHONQT)
add_subdirectory(OpenNL OpenNL/build) add_subdirectory(OpenNL OpenNL/build)
INSTALL (DIRECTORY OpenNL/src/NL/ DESTINATION ${CGoGN_ROOT_DIR}/ThirdParty/include/NL FILES_MATCHING PATTERN "*.h") INSTALL (DIRECTORY OpenNL/src/NL/ DESTINATION ${CGoGN_ROOT_DIR}/ThirdParty/include/NL FILES_MATCHING PATTERN "*.h")
......
...@@ -42,6 +42,7 @@ ...@@ -42,6 +42,7 @@
*/ */
//---------------------------------------------------------------------------------- //----------------------------------------------------------------------------------
#include <iostream>
#include "PythonQtSystem.h" #include "PythonQtSystem.h"
#include "PythonQtInstanceWrapper.h" #include "PythonQtInstanceWrapper.h"
#include "PythonQtClassWrapper.h" #include "PythonQtClassWrapper.h"
...@@ -55,7 +56,6 @@ ...@@ -55,7 +56,6 @@
#include <QByteArray> #include <QByteArray>
#include <QStringList> #include <QStringList>
#include <QtDebug> #include <QtDebug>
#include <iostream>
class PythonQtClassInfo; class PythonQtClassInfo;
......
...@@ -74,6 +74,7 @@ ELSE(WIN32) ...@@ -74,6 +74,7 @@ ELSE(WIN32)
find_package(SuiteSparse REQUIRED) find_package(SuiteSparse REQUIRED)
SET (COMMON_INCLUDES ${COMMON_INCLUDES} ${SUITESPARSE_INCLUDE_DIRS}) SET (COMMON_INCLUDES ${COMMON_INCLUDES} ${SUITESPARSE_INCLUDE_DIRS})
SET (COMMON_LIBS ${COMMON_LIBS} ${SUITESPARSE_LIBRARIES}) SET (COMMON_LIBS ${COMMON_LIBS} ${SUITESPARSE_LIBRARIES})
ENDIF(WIN32) ENDIF(WIN32)
#optionnal libs #optionnal libs
...@@ -101,13 +102,8 @@ IF (WITH_QT) ...@@ -101,13 +102,8 @@ IF (WITH_QT)
SET (COMMON_LIBS ${COMMON_LIBS} ${QT_LIBRARIES} ${QGLVIEWER_LIBRARIES}) SET (COMMON_LIBS ${COMMON_LIBS} ${QT_LIBRARIES} ${QGLVIEWER_LIBRARIES})
ENDIF (WITH_QT) ENDIF (WITH_QT)
# qq definition specifiques pour mac
IF(APPLE) IF(APPLE)
# attention a changer pour chercher la bonne version automatiquement SET(CMAKE_CXX_LINK_FLAGS "${CMAKE_CXX_LINK_FLAGS} -L/usr/local/lib")
SET(CMAKE_OSX_SYSROOT "/Developer/SDKs/MacOSX10.6.sdk" CACHE STRING "developer SDK")
SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-undefined -Wl,dynamic_lookup")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DMAC_OSX")
SET(CMAKE_OSX_ARCHITECTURES x86_64)
ENDIF(APPLE) ENDIF(APPLE)
# qq definition specifiques pour windows # qq definition specifiques pour windows
...@@ -116,7 +112,7 @@ IF(WIN32) ...@@ -116,7 +112,7 @@ IF(WIN32)
set(CMAKE_CONFIGURATION_TYPES Release Debug) set(CMAKE_CONFIGURATION_TYPES Release Debug)
set(CMAKE_CONFIGURATION_TYPES "${CMAKE_CONFIGURATION_TYPES}" CACHE STRING "Only Release or Debug" FORCE) set(CMAKE_CONFIGURATION_TYPES "${CMAKE_CONFIGURATION_TYPES}" CACHE STRING "Only Release or Debug" FORCE)
ELSE(WIN32) ELSE(WIN32)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra ") SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -fPIC")
ENDIF(WIN32) ENDIF(WIN32)
SET(EXECUTABLE_OUTPUT_PATH ${CMAKE_SOURCE_DIR}/bin) SET(EXECUTABLE_OUTPUT_PATH ${CMAKE_SOURCE_DIR}/bin)
......
...@@ -25,6 +25,9 @@ ...@@ -25,6 +25,9 @@
#ifndef _CGoGN_SHADERMUTATOR_H_ #ifndef _CGoGN_SHADERMUTATOR_H_
#define _CGoGN_SHADERMUTATOR_H_ #define _CGoGN_SHADERMUTATOR_H_
#undef tolower
#undef toupper
#include "Utils/cgognStream.h" #include "Utils/cgognStream.h"
#include <boost/regex.hpp> #include <boost/regex.hpp>
#include <string> #include <string>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment