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
......
cmake_minimum_required(VERSION 2.8)
project(CGoGN)
#cmake_policy(SET CMP0042 NEW) # rpath new policy
# Thanks to Etienne Schmitt for CMakeLists modifications
#SET ( CMAKE_VERBOSE_MAKEFILE 1 )
project(CGoGN)
SET ( CGoGN_ROOT_DIR ${CMAKE_SOURCE_DIR} )
SET ( CGoGN_SRC_DIR ${CMAKE_SOURCE_DIR}/CGoGN)
SET ( CMAKE_MODULE_PATH ${CGoGN_ROOT_DIR}/cmake_modules/ )
INCLUDE(${CGoGN_ROOT_DIR}/cmake_modules/functions.cmake)
# ====== 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()
#
# Available options
#
SET ( WITH_ASSIMP OFF CACHE BOOL "build CGoGN with Assimp" )
SET ( WITH_ZINRI OFF CACHE BOOL "build CGoGN with Zinri lib" )
SET ( WITH_QT ON CACHE BOOL "build CGoGN with Qt lib" )
SET ( DESIRED_QT_VERSION "4" CACHE STRING "4: QT4/ 5 not yet implemented" )
SET ( WITH_PYTHONQT ON CACHE BOOL "build PythonQt (for Schnapps)")
SET ( WITH_GLEWMX OFF CACHE BOOL "use multi-contex GLEW" )
SET ( USE_OGL_CORE_PROFILE OFF CACHE BOOL "use OpenGL 3.3 core profile (do not work on mac)" )
SET ( COMPILE_EXAMPLES OFF CACHE BOOL "compile examples" )
SET ( COMPILE_TUTOS OFF CACHE BOOL "compile tutorials" )
SET ( COMPILE_TESTS OFF CACHE BOOL "compile tests" )
SET ( COMPILE_BENCHES OFF CACHE BOOL "compile benches" )
SET ( COMPILE_SANDBOX OFF CACHE BOOL "compile all in sandbox" )
SET ( ASSERT_ACTIVED OFF CACHE BOOL "assertion activated")
SET ( ONELIB OFF CACHE BOOL "build CGoGN in one lib" )
IF (WIN32)
SET ( BUILD_SHARED_LIBS OFF CACHE BOOL "if used all library are build as shared type (.so/.dylib/.dll)" )
SET ( CMAKE_CONFIGURATION_TYPES Release Debug)
SET ( CMAKE_CONFIGURATION_TYPES "${CMAKE_CONFIGURATION_TYPES}" CACHE STRING "Only Release or Debug" FORCE)
ELSE (WIN32)
SET ( BUILD_SHARED_LIBS ON CACHE BOOL "if used all library are build as shared type (.so/.dylib/.dll)" )
ENDIF ()
# ======== Check Build Type =============
IF (NOT (${CMAKE_BUILD_TYPE} MATCHES "Debug|Release"))
IF (${CMAKE_CURRENT_BINARY_DIR} MATCHES "(.*)Debug|(.*)debug|(.*)DEBUG")
SET(CMAKE_BUILD_TYPE "Debug")
ELSE()
SET(CMAKE_BUILD_TYPE "Release")
ENDIF()
checkCpp11Support()
setBuildType()
SET(EXECUTABLE_OUTPUT_PATH ${CGoGN_ROOT_DIR}/bin/)
IF(WIN32)
SET(LIBRARY_OUTPUT_PATH ${CGoGN_ROOT_DIR}/lib)
ELSE()
SET(LIBRARY_OUTPUT_PATH ${CGoGN_ROOT_DIR}/lib/${CMAKE_BUILD_TYPE})
ENDIF()
#
# External Libraries (not included a third party libraries)
#
FIND_PACKAGE(OpenGL REQUIRED)
FIND_PACKAGE(ZLIB REQUIRED)
FIND_PACKAGE(GLEW REQUIRED)
IF (WITH_QT)
SET(QT_USE_QTCORE TRUE)
SET(QT_USE_QTOPENGL TRUE)
SET(QT_USE_QTSVG TRUE)
SET(QT_USE_QTXML TRUE )
FIND_PACKAGE(Qt REQUIRED)
ELSE (WITH_QT)
FIND_PACKAGE(DevIL REQUIRED)
ENDIF(WITH_QT)
IF (NOT WIN32)
FIND_PACKAGE(SuiteSparse REQUIRED)
ENDIF()
# for shared or not shared (default except on windows)
#
# COMPILER FLAGS
#
IF(NOT WIN32)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -fPIC -std=c++11")
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Woverride-init -fPIC")
# remove the 60000+ "no unused local typedefs" warnings with GCC4.8+
IF(CMAKE_COMPILER_IS_GNUCXX)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-local-typedefs")
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-unused-local-typedefs")
ENDIF()
ENDIF()
if(WIN32)
SET ( BUILD_SHARED_LIBS OFF CACHE BOOL "if used all library are build as shared type (.so/.dylib/.dll)" )
else()
SET ( BUILD_SHARED_LIBS ON CACHE BOOL "if used all library are build as shared type (.so/.dylib/.dll)" )
if(APPLE)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-deprecated -Wno-overloaded-virtual")
endif()
#
# COMPILE DEFINITIONS
#
add_definitions("-DCGOGN_ASSERT_BOOL=${ASSERT_ACTIVED}")
#IF(EXISTS "${CGoGN_ROOT_DIR}/ThirdParty/include/Assimp")
IF(EXISTS "${CGoGN_ROOT_DIR}/lib/${CMAKE_BUILD_TYPE}/*assimp*")
SET ( WITH_ASSIMP ON CACHE BOOL "build CGoGN with Assimp" )
ELSE()
SET ( WITH_ASSIMP OFF CACHE BOOL "build CGoGN with Assimp" )
IF(USE_OGL_CORE_PROFILE)
add_definitions("-DUSE_OGL_CORE_PROFILE=1")
ENDIF()
IF(EXISTS "${CGoGN_ROOT_DIR}/ThirdParty/include/Zinri")
SET ( WITH_ZINRI ON CACHE BOOL "build CGoGN with Zinri lib" )
ELSE()
SET ( WITH_ZINRI OFF CACHE BOOL "build CGoGN with Zinri lib" )
ENDIF()
add_definitions("-DGLM_FORCE_RADIANS")
SET ( WITH_QT ON CACHE BOOL "build CGoGN with Qt lib" )
SET ( DESIRED_QT_VERSION "4" CACHE STRING "4: QT4/ 5 not yet implemented" )
add_definitions("-DSHADERPATH=\"${CGoGN_ROOT_DIR}/lib/Shaders/\"")
SET ( COMPILE_EXAMPLES ON CACHE BOOL "compile examples" )
SET ( COMPILE_TUTOS ON CACHE BOOL "compile tutorials" )
SET ( COMPILE_TESTS ON CACHE BOOL "compile tests" )
SET ( COMPILE_BENCHES ON CACHE BOOL "compile benches" )
SET ( COMPILE_SANDBOX ON CACHE BOOL "compile all in sandbox" )
IF (WITH_ASSIMP)
add_definitions(-DWITH_ASSIMP)
ENDIF (WITH_ASSIMP)
IF (WITH_ZINRI)
add_definitions(-DWITH_ZINRI)
ENDIF (WITH_ZINRI)
#create one big lib
SET ( ONELIB OFF CACHE BOOL "build CGoGN in one lib" )
IF (WITH_GLEWMX)
ADD_DEFINITIONS(-DGLEW_MX)
ENDIF (WITH_GLEWMX)
SET ( WITH_GLEWMX OFF CACHE BOOL "use multi-contex GLEW" )
SET( USE_OGL_CORE_PROFILE OFF CACHE BOOL "use OpenGL 3.3 core profile (do not work on mac)" )
#
# ThirdParty
#
#add_subdirectory(ThirdParty)
INCLUDE_DIRECTORIES(${CGoGN_ROOT_DIR}/ThirdParty/include)
IF(WIN32)
SET ( CMAKE_PREFIX_PATH ${CGoGN_ROOT_DIR}/windows_dependencies CACHE STRING "path to dependencies" )
ENDIF(WIN32)
ADD_SUBDIRECTORY(ThirdParty/Tools)
IF (WITH_PYTHONQT)
ADD_SUBDIRECTORY(ThirdParty/PythonQt)
ENDIF (WITH_PYTHONQT)
ADD_SUBDIRECTORY(ThirdParty/OpenNL)
INCLUDE_DIRECTORIES(${CGoGN_ROOT_DIR}/ThirdParty/OpenNL/src)
ADD_SUBDIRECTORY(ThirdParty/tetgen)
INCLUDE_DIRECTORIES(${CGoGN_ROOT_DIR}/ThirdParty/tetgen)
IF (WITH_ZINRI)
ADD_SUBDIRECTORY(ThirdParty/Zinri)
INCLUDE_DIRECTORIES(${CGoGN_ROOT_DIR}/ThirdParty/Zinri)
ENDIF(WITH_ZINRI)
IF (WITH_ASSIMP)
ADD_SUBDIRECTORY(ThirdParty/Assimp)
INCLUDE_DIRECTORIES(${CGoGN_ROOT_DIR}/ThirdParty/Assimp/include/)
ENDIF (WITH_ASSIMP)
ADD_SUBDIRECTORY(ThirdParty/TinyXml2)
INCLUDE_DIRECTORIES(${CGoGN_ROOT_DIR}/ThirdParty/TinyXml2)
find_package(OpenGL REQUIRED)
find_package(ZLIB REQUIRED)
find_package(GLEW REQUIRED)
IF (WITH_QT)
ADD_SUBDIRECTORY(ThirdParty/libQGLViewer/QGLViewer)
INCLUDE_DIRECTORIES(${CGoGN_ROOT_DIR}/ThirdParty/libQGLViewer/)
ENDIF()
# MESSAGE HERE FOR MORE EASY USER READING
MESSAGE("Building type = " ${CMAKE_BUILD_TYPE} " (for change with cmake use -DCMAKE_BUILD_TYPE=Release|Debug)" )
IF (NOT WIN32)
ADD_SUBDIRECTORY(ThirdParty/libuuid)
INCLUDE_DIRECTORIES(${CGoGN_ROOT_DIR}/ThirdParty/libuuid)
ENDIF()
IF (DEFINED ASSERTON)
add_definitions(-DCGOGN_ASSERT_BOOL=${ASSERTON})
ELSE (DEFINED ASSERTON)
add_definitions(-DCGOGN_ASSERT_BOOL=false)
ENDIF (DEFINED ASSERTON)
IF (ONELIB)
file(WRITE ${CGoGN_SRC_DIR}/include/cgogn_onelib.h "1" )
......@@ -117,16 +170,24 @@ ELSE (WITH_GLEWMX)
ENDIF (WITH_GLEWMX)
IF(USE_OGL_CORE_PROFILE)
add_definitions(-DUSE_OGL_CORE_PROFILE=1)
ENDIF()
add_definitions(-DGLM_FORCE_RADIANS)
add_definitions(-DSHADERPATH="${CGoGN_ROOT_DIR}/lib/Shaders/")
#
# INCLUDES AND LIBS
#
SET (CGoGN_EXT_INCLUDES)
SET (CGoGN_EXT_LIBS)
IF (WITH_QT)
INCLUDE(${QT_USE_FILE})
ADD_DEFINITIONS(-DWITH_QT)
ADD_DEFINITIONS(${QT_DEFINITIONS})
LIST(APPEND CGoGN_EXT_INCLUDES ${QT_INCLUDE_DIR})
LIST(APPEND CGoGN_EXT_LIBS QGLViewer ${QT_LIBRARIES})
ELSE (WITH_QT)
LIST(APPEND CGoGN_EXT_INCLUDES ${IL_INCLUDE_DIR})
LIST(APPEND CGoGN_EXT_LIBS ${IL_LIBRARIES})
ENDIF (WITH_QT)
# define includes of external libs
SET (CGoGN_EXT_INCLUDES
LIST(INSERT CGoGN_EXT_INCLUDES 0
${CGoGN_ROOT_DIR}/ThirdParty/include
${OPENGL_INCLUDE_DIR}
${GLEW_INCLUDE_DIRS}
......@@ -134,99 +195,46 @@ SET (CGoGN_EXT_INCLUDES
)
# define libs for external libs
SET (CGoGN_EXT_LIBS
IF (WITH_ASSIMP)
LIST(APPEND CGoGN_EXT_LIBS assimp)
ENDIF (WITH_ASSIMP)
IF (WITH_ZINRI)
LIST(APPEND CGoGN_EXT_LIBS Zinri)
ENDIF (WITH_ZINRI)
LIST(APPEND CGoGN_EXT_LIBS
nl
tinyxml2
${OPENGL_LIBRARY}
${GLEW_LIBRARIES}
${ZLIB_LIBRARIES}
tinyxml2
)
# W32 specific libraries and includes
IF(WIN32)
SET (CGoGN_EXT_INCLUDES ${CGoGN_EXT_INCLUDES} ${CGoGN_ROOT_DIR}/windows_dependencies/include/suitesparse)
SET (CGoGN_EXT_LIBS ${CGoGN_EXT_LIBS}
INCLUDE_DIRECTORIES(${CGoGN_ROOT_DIR}/windows_dependencies/include/)
INCLUDE_DIRECTORIES(${CGoGN_ROOT_DIR}/windows_dependencies/include/suitesparse)
LIST(APPEND CGoGN_EXT_INCLUDES ${CGoGN_ROOT_DIR}/windows_dependencies/include/suitesparse)
LIST(APPEND CGoGN_EXT_LIBS
${CGoGN_ROOT_DIR}/windows_dependencies/lib/suitesparse.lib
${CGoGN_ROOT_DIR}/windows_dependencies/lib/metis.lib
${CGoGN_ROOT_DIR}/windows_dependencies/lib/liblapack.lib
${CGoGN_ROOT_DIR}/windows_dependencies/lib/libblas.lib )
ELSE(WIN32)
find_package(SuiteSparse REQUIRED)
SET (CGoGN_EXT_INCLUDES ${CGoGN_EXT_INCLUDES} ${SUITESPARSE_INCLUDE_DIRS})
SET (CGoGN_EXT_LIBS ${CGoGN_EXT_LIBS} ${SUITESPARSE_LIBRARIES} pthread)
LIST(APPEND CGoGN_EXT_INCLUDES ${SUITESPARSE_INCLUDE_DIRS})
LIST(APPEND CGoGN_EXT_LIBS ${SUITESPARSE_LIBRARIES} pthread)
ENDIF(WIN32)
#optionnal libs
IF (WITH_ASSIMP)
add_definitions(-DWITH_ASSIMP)
SET (CGoGN_EXT_LIBS ${CGoGN_EXT_LIBS} assimp)
# INSTALL (DIRECTORY ThirdParty/Assimp/include DESTINATION .)
ENDIF (WITH_ASSIMP)
IF (WITH_ZINRI)
add_definitions(-DWITH_ZINRI)
SET (CGoGN_EXT_LIBS ${CGoGN_EXT_LIBS} Zinri)
# INSTALL (DIRECTORY ThirdParty/Zinri/ DESTINATION include FILES_MATCHING PATTERN "*.h")
ENDIF (WITH_ZINRI)
IF (WITH_QT)
add_definitions(-DWITH_QT)
find_package(Qt REQUIRED)
SET(QT_USE_QTCORE TRUE)
SET(QT_USE_QTOPENGL TRUE)
SET(QT_USE_QTSVG TRUE)
SET(QT_USE_QTXML TRUE )
INCLUDE(${QT_USE_FILE})
ADD_DEFINITIONS(${QT_DEFINITIONS})
find_package(QGLViewer REQUIRED)
SET (CGoGN_EXT_INCLUDES ${CGoGN_EXT_INCLUDES} ${QT_INCLUDE_DIR} ${QGLVIEWER_INCLUDE_DIR} )
SET (CGoGN_EXT_LIBS ${QGLVIEWER_LIBRARIES} ${QT_LIBRARIES} ${CGoGN_EXT_LIBS})
ENDIF (WITH_QT)
IF (WITH_GLEWMX)
ADD_DEFINITIONS(-DGLEW_MX)
ENDIF (WITH_GLEWMX)
# qq definition specifiques pour mac
#IF(APPLE)
# SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DMAC_OSX")
# SET(CMAKE_OSX_ARCHITECTURES x86_64)
# SET (CGoGN_EXT_LIBS ${CGoGN_EXT_LIBS} "-framework Foundation -framework cocoa" )
#ENDIF(APPLE)
IF(WIN32)
set(CMAKE_CONFIGURATION_TYPES Release Debug)
set(CMAKE_CONFIGURATION_TYPES "${CMAKE_CONFIGURATION_TYPES}" CACHE STRING "Only Release or Debug" FORCE)
ELSE()
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -fPIC -std=c++11")
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Woverride-init -fPIC")
# remove the 60000+ "no unused local typedefs" warnings with GCC4.8+
if(CMAKE_COMPILER_IS_GNUCXX)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-local-typedefs")
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-unused-local-typedefs")
endif()
ENDIF()
if(APPLE)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-deprecated -Wno-overloaded-virtual")
endif()
IF(WIN32)
SET(LIBRARY_OUTPUT_PATH ${CGoGN_ROOT_DIR}/lib)
ELSE()
SET(LIBRARY_OUTPUT_PATH ${CGoGN_ROOT_DIR}/lib/${CMAKE_BUILD_TYPE})
ENDIF()
#LIST(REMOVE_DUPLICATES CGoGN_EXT_INCLUDES)
include_directories(
${CMAKE_CURRENT_BINARY_DIR}
${CGoGN_SRC_DIR}/include
${CGoGN_EXT_INCLUDES}
)
add_subdirectory(${CGoGN_SRC_DIR} CGoGN)
${CGoGN_EXT_INCLUDES} )
add_subdirectory(${CGoGN_SRC_DIR} CGoGN)
add_subdirectory(${CGoGN_ROOT_DIR}/Apps Apps)
......@@ -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