Commit 1279207f authored by Sylvain Thery's avatar Sylvain Thery

SCHNApps compile with new structure

parent 800a66a3
......@@ -27,7 +27,7 @@
#include <string>
#include "Utils/cgognStream.h"
#include "TinyXml2/tinyxml2.h"
#include "tinyxml2.h"
namespace CGoGN
......
This diff is collapsed.
......@@ -14,6 +14,7 @@ SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -fPIC -std=c++11")
SET(CGoGN_ROOT_DIR ${CMAKE_SOURCE_DIR}/.. CACHE STRING "CGoGN root dir")
SET(CMAKE_MODULE_PATH ${CGoGN_ROOT_DIR}/cmake_modules/)
SET (CGoGN_SRC_DIR ${CGoGN_ROOT_DIR}/CGoGN)
SET( SLOT_DEBUG_MODE OFF CACHE BOOL "build with slot debugging mode" )
SET( USE_OGL_CORE_PROFILE OFF CACHE BOOL "use OpenGL 3.3 core profile (do not work on mac)" )
......@@ -24,7 +25,7 @@ find_package(OpenGL REQUIRED)
find_package(ZLIB REQUIRED)
find_package(GLEW REQUIRED)
find_package(Qt4 REQUIRED)
find_package(QGLViewer REQUIRED)
#find_package(QGLViewer REQUIRED)
find_package(PythonLibs 2.7 REQUIRED)
find_package(SuiteSparse REQUIRED)
#find_package(SuperLU REQUIRED)
......@@ -46,7 +47,7 @@ add_definitions(-DGLM_FORCE_RADIANS)
#MESSAGE HERE FOR MORE EASY READING (MESSAGE AT THE END)
MESSAGE("Build type = " ${CMAKE_BUILD_TYPE} " (for change -DCMAKE_BUILD_TYPE=Release|Debug)" )
file(STRINGS ${CGoGN_ROOT_DIR}/include/cgogn_onelib.h ONELIB_STR)
file(STRINGS ${CGoGN_SRC_DIR}/include/cgogn_onelib.h ONELIB_STR)
IF (ONELIB_STR EQUAL 1)
SET(CGoGN_LIBS cgogn)
ELSE()
......@@ -70,28 +71,28 @@ ENDIF()
# define includes of external libs
SET (EXT_INCLUDES
${CGoGN_ROOT_DIR}/ThirdParty/include
${CGoGN_ROOT_DIR}/ThirdParty/OpenNL/src
${OPENGL_INCLUDE_DIR}
${GLEW_INCLUDE_DIRS}
${ZLIB_INCLUDE_DIRS}
${QT_INCLUDE_DIR}
${QGLVIEWER_INCLUDE_DIR}
${CGoGN_ROOT_DIR}/ThirdParty/libQGLViewer/
${PYTHON_INCLUDE_DIRS}
${SUITESPARSE_INCLUDE_DIRS}
# ${SUPERLU_INCLUDE_DIRS}
${CGoGN_ROOT_DIR}/ThirdParty/TinyXml2
)
# define libs for external libs
SET (EXT_LIBS
PythonQt
nl
${QGLVIEWER_LIBRARIES}
QGLViewer
${OPENGL_LIBRARY}
${GLEW_LIBRARIES}
${ZLIB_LIBRARIES}
${QT_LIBRARIES}
${PYTHON_LIBRARIES}
${SUITESPARSE_LIBRARIES}
# ${SUPERLU_LIBRARIES}
tinyxml2
)
......@@ -113,11 +114,8 @@ if(APPLE)
endif()
if(CMAKE_COMPILER_IS_GNUCXX)
execute_process(COMMAND ${CMAKE_C_COMPILER} -dumpversion OUTPUT_VARIABLE GCC_VERSION)
if (GCC_VERSION VERSION_GREATER 4.8 OR GCC_VERSION VERSION_EQUAL 4.8)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-local-typedefs")
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-unused-local-typedefs")
endif(GCC_VERSION VERSION_GREATER 4.8 OR GCC_VERSION VERSION_EQUAL 4.8)
endif(CMAKE_COMPILER_IS_GNUCXX)
......@@ -167,7 +165,8 @@ link_directories( ${CGoGN_ROOT_DIR}/lib/${CMAKE_BUILD_TYPE} )
INCLUDE_DIRECTORIES(
${CGoGN_ROOT_DIR}/include
${CGoGN_SRC_DIR}/include
${CGoGN_ROOT_DIR}/ThirdParty/PythonQt/src/
${SCHNApps_ROOT_DIR}/include
${EXT_INCLUDES}
${CMAKE_CURRENT_SOURCE_DIR}
......
......@@ -4,10 +4,10 @@
#include "ui_schnapps.h"
#include "types.h"
#include "slot_debug.h"
#include "PythonQt/PythonQt.h"
#include "PythonQt/gui/PythonQtScriptingConsole.h"
#include "PythonQt.h"
#include "gui/PythonQtScriptingConsole.h"
#include "slot_debug.h"
class QVBoxLayout;
class QSplitter;
......
#include <QSplashScreen>
#include "schnapps.h"
#include <QFileInfo>
#include "PythonQt/PythonQt.h"
#include "PythonQt/gui/PythonQtScriptingConsole.h"
#include "PythonQt.h"
#include "gui/PythonQtScriptingConsole.h"
int main(int argc, char* argv[])
{
......
function(checkCpp11Support)
# ====== Check GCC VERSION FOR C++11 ======
if(CMAKE_COMPILER_IS_GNUCXX)
execute_process(COMMAND ${CMAKE_CXX_COMPILER} -dumpversion OUTPUT_VARIABLE GCC_VERSION)
if (GCC_VERSION VERSION_LESS 4.8)
message(FATAL_ERROR "Full support of C++11 needed. Therefore a gcc/g++ compiler with a version at least 4.8 is needed.")
endif()
endif()
# ====== Check CLANG VERSION FOR C++11 ======
if (APPLE)
execute_process(COMMAND ${CMAKE_CXX_COMPILER} -dumpversion OUTPUT_VARIABLE CLANG_VERSION)
if (CLANG_VERSION VERSION_LESS 3.1)
message(FATAL_ERROR "Full support of C++11 needed. Therefore a clang compiler with a version at least 3.1 is needed !!")
endif()
endif()
# ====== Check MSVC VERSION FOR C++11 ======
if(WIN32)
if(MSVC_VERSION LESS 1800)
message(FATAL_ERROR "Full support of C++11 needed. Therefore a microsoft compiler with a version at least 12 is needed.")
endif()
endif()
endfunction(checkCpp11Support)
function(setBuildType)
IF (NOT (${CMAKE_BUILD_TYPE} MATCHES "Debug|Release"))
IF (${CMAKE_CURRENT_BINARY_DIR} MATCHES "(.*)Debug|(.*)debug|(.*)DEBUG")
SET(CMAKE_BUILD_TYPE "Debug" PARENT_SCOPE)
ELSE()
SET(CMAKE_BUILD_TYPE "Release" PARENT_SCOPE)
ENDIF()
ENDIF()
endfunction(setBuildType)
macro(ToRelativePath outFiles fromDirectory inFiles)
unset(tmpFiles)
foreach(inFile ${inFiles})
file(RELATIVE_PATH outFile "${fromDirectory}" "${inFile}")
list(APPEND tmpFiles "${outFile}")
endforeach()
set(${outFiles} ${tmpFiles})
endmacro()
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