-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
36 changed files
with
2,226 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
|
||
include(CheckIncludeFile) | ||
include(CheckIncludeFiles) | ||
include(CheckSymbolExists) | ||
include(CheckFunctionExists) | ||
include(CheckLibraryExists) | ||
include(CheckTypeSize) | ||
include(CheckCSourceCompiles) | ||
include(CheckIncludeFileCXX) | ||
include(CheckCXXSourceCompiles) | ||
|
||
check_include_file(GL/gl.h HAVE_GL_GL_H) | ||
|
||
# i/o streams | ||
check_include_file_cxx(istream HAVE_ISTREAM) | ||
check_include_file_cxx(ostream HAVE_OSTREAM) | ||
check_include_file_cxx(fstream HAVE_FSTREAM) | ||
check_include_file_cxx(sstream HAVE_SSTREAM) | ||
check_include_file_cxx(ios HAVE_IOS) | ||
check_include_file_cxx(iostream HAVE_IOSTREAM) | ||
check_include_file_cxx(iomanip HAVE_IOMANIP) | ||
|
||
include(TestForANSIStreamHeaders) | ||
IF(NOT CMAKE_NO_ANSI_STREAM_HEADERS) | ||
SET(HAVE_STD_IOSTREAM 1) | ||
SET(USE_STD_IOSTREAM 1) | ||
ENDIF(NOT CMAKE_NO_ANSI_STREAM_HEADERS) | ||
|
||
include(TestForSTDNamespace) | ||
IF(NOT CMAKE_NO_ANSI_STRING_STREAM) | ||
SET(HAVE_NAMESPACES 1) | ||
ENDIF(NOT CMAKE_NO_ANSI_STRING_STREAM) | ||
|
||
SET(HAVE_QGLFORMAT_EQ_OP 1) | ||
SET(HAVE_QGLFORMAT_SETOVERLAY 1) | ||
SET(HAVE_QGLWIDGET_SETAUTOBUFFERSWAP 1) | ||
SET(HAVE_QT_KEYPAD_DEFINE 1) | ||
SET(HAVE_QWIDGET_SHOWFULLSCREEN 1) | ||
|
||
|
||
file(WRITE ${CMAKE_BINARY_DIR}/backtrace.cpp | ||
"#include <cstddef>\n" | ||
"#include <execinfo.h>\n\n" | ||
"int main() {\n" | ||
" void *callstack[128];\n" | ||
" size_t nMaxFrames = sizeof(callstack) / sizeof(callstack[0]);\n" | ||
" size_t nFrames = backtrace(callstack, nMaxFrames);\n" | ||
" char **symbols = backtrace_symbols(callstack, nFrames);\n" | ||
" return 0;\n" | ||
"}" | ||
) | ||
|
||
try_compile( | ||
RESULT_VAR | ||
${CMAKE_BINARY_DIR} | ||
SOURCES | ||
${CMAKE_BINARY_DIR}/backtrace.cpp | ||
) | ||
|
||
SET(HAVE_BACKTRACE_SYMBOLS ${RESULT_VAR}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
# Try to find Coin3D Doc | ||
# If found, this will define | ||
# | ||
# COIN3D_DOC_FOUND - we have access to Coin3D doc, either locally | ||
# or on the net | ||
# COIN3D_DOC_TAGFILE - full name of the tag file | ||
# COIN3D_DOC_PATH - path to html Coin3D doc | ||
|
||
SET( COIN3D_DOC_FOUND "NO" ) | ||
|
||
IF (COIN3D_FOUND) | ||
IF (WIN32) | ||
IF (CYGWIN) | ||
# Not yet implemented | ||
ELSE (CYGWIN) | ||
# Not yet implemented | ||
ENDIF (CYGWIN) | ||
ELSE (WIN32) | ||
IF(APPLE) | ||
# Not yet implemented | ||
ELSE(APPLE) | ||
# Unix systems | ||
find_path(COIN3D_DOC_PATH index.html | ||
/usr/share/doc/libcoin80-doc/html | ||
/usr/share/doc/coin/html | ||
/usr/share/doc/Coin/html | ||
) | ||
IF( EXISTS ${COIN3D_DOC_PATH}) | ||
message(STATUS "Coin3D doc is installed") | ||
find_file(COIN3D_DOC_TAGFILE NAMES coin.tag Coin.tag | ||
PATHS ${COIN3D_DOC_PATH} | ||
) | ||
IF( EXISTS ${COIN3D_DOC_TAGFILE}) | ||
SET( COIN3D_DOC_FOUND "YES" | ||
) | ||
ELSE( EXISTS ${COIN3D_DOC_TAGFILE}) | ||
find_file(COIN3D_DOC_TAGFILE_GZ NAMES coin.tag.gz Coin.tag.gz | ||
PATHS ${COIN3D_DOC_PATH} | ||
) | ||
IF( EXISTS ${COIN3D_DOC_TAGFILE_GZ}) | ||
message(STATUS " Found ${COIN3D_DOC_TAGFILE_GZ}") | ||
message(STATUS " You should uncompress this file if you want to use it for source doc generation") | ||
ENDIF( EXISTS ${COIN3D_DOC_TAGFILE_GZ}) | ||
|
||
ENDIF( EXISTS ${COIN3D_DOC_TAGFILE}) | ||
|
||
ELSE( EXISTS ${COIN3D_DOC_PATH}) | ||
#fallback: tries to use online coin doc | ||
message(STATUS "Coin3D doc is not installed") | ||
SET(COIN3D_DOC_PATH | ||
http://doc.coin3d.org/Coin | ||
) | ||
find_file(COIN3D_DOC_TAGFILE coin.tag | ||
${CMAKE_BINARY_DIR}/src/Doc | ||
) | ||
IF( EXISTS ${COIN3D_DOC_TAGFILE}) | ||
SET( COIN3D_DOC_FOUND "YES" ) | ||
ENDIF( EXISTS ${COIN3D_DOC_TAGFILE}) | ||
ENDIF( EXISTS ${COIN3D_DOC_PATH}) | ||
ENDIF(APPLE) | ||
ENDIF(WIN32) | ||
ENDIF(COIN3D_FOUND) | ||
|
||
if(COIN3D_DOC_FOUND) | ||
message(STATUS " Tag file: ${COIN3D_DOC_TAGFILE}") | ||
message(STATUS " Location: ${COIN3D_DOC_PATH}") | ||
endif(COIN3D_DOC_FOUND) | ||
|
||
# export for others | ||
SET( COIN3D_DOC_FOUND "${COIN3D_DOC_FOUND}" CACHE BOOL "Coin3d documentation available") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
# - Try to find Eigen3 lib | ||
# | ||
# This module supports requiring a minimum version, e.g. you can do | ||
# find_package(Eigen3 3.1.2) | ||
# to require version 3.1.2 or newer of Eigen3. | ||
# | ||
# Once done this will define | ||
# | ||
# EIGEN3_FOUND - system has eigen lib with correct version | ||
# EIGEN3_INCLUDE_DIR - the eigen include directory | ||
# EIGEN3_VERSION - eigen version | ||
|
||
# Copyright (c) 2006, 2007 Montel Laurent, <montel@kde.org> | ||
# Copyright (c) 2008, 2009 Gael Guennebaud, <g.gael@free.fr> | ||
# Copyright (c) 2009 Benoit Jacob <jacob.benoit.1@gmail.com> | ||
# Redistribution and use is allowed according to the terms of the 2-clause BSD license. | ||
|
||
if(NOT Eigen3_FIND_VERSION) | ||
set(Eigen3_FIND_VERSION_MAJOR 3) | ||
set(Eigen3_FIND_VERSION_MINOR 0) | ||
set(Eigen3_FIND_VERSION_PATCH 0) | ||
set(Eigen3_FIND_VERSION "${Eigen3_FIND_VERSION_MAJOR}.${Eigen3_FIND_VERSION_MINOR}.${Eigen3_FIND_VERSION_PATCH}") | ||
endif(NOT Eigen3_FIND_VERSION) | ||
|
||
macro(_eigen3_check_version) | ||
file(READ "${EIGEN3_INCLUDE_DIR}/Eigen/src/Core/util/Macros.h" _eigen3_version_header) | ||
|
||
string(REGEX MATCH "define[ \t]+EIGEN_WORLD_VERSION[ \t]+([0-9]+)" _eigen3_world_version_match "${_eigen3_version_header}") | ||
set(EIGEN3_WORLD_VERSION "${CMAKE_MATCH_1}") | ||
string(REGEX MATCH "define[ \t]+EIGEN_MAJOR_VERSION[ \t]+([0-9]+)" _eigen3_major_version_match "${_eigen3_version_header}") | ||
set(EIGEN3_MAJOR_VERSION "${CMAKE_MATCH_1}") | ||
string(REGEX MATCH "define[ \t]+EIGEN_MINOR_VERSION[ \t]+([0-9]+)" _eigen3_minor_version_match "${_eigen3_version_header}") | ||
set(EIGEN3_MINOR_VERSION "${CMAKE_MATCH_1}") | ||
|
||
set(EIGEN3_VERSION ${EIGEN3_WORLD_VERSION}.${EIGEN3_MAJOR_VERSION}.${EIGEN3_MINOR_VERSION}) | ||
if(${EIGEN3_VERSION} VERSION_LESS ${Eigen3_FIND_VERSION}) | ||
set(EIGEN3_VERSION_OK FALSE) | ||
message(STATUS "Eigen3 version ${EIGEN3_VERSION} found in ${EIGEN3_INCLUDE_DIR}, " | ||
"but at least version ${Eigen3_FIND_VERSION} is required") | ||
else(${EIGEN3_VERSION} VERSION_LESS ${Eigen3_FIND_VERSION}) | ||
set(EIGEN3_VERSION_OK TRUE) | ||
endif(${EIGEN3_VERSION} VERSION_LESS ${Eigen3_FIND_VERSION}) | ||
endmacro(_eigen3_check_version) | ||
|
||
if (EIGEN3_INCLUDE_DIR) | ||
# in cache already | ||
_eigen3_check_version() | ||
set(EIGEN3_FOUND ${EIGEN3_VERSION_OK}) | ||
else (EIGEN3_INCLUDE_DIR) | ||
|
||
find_path(EIGEN3_INCLUDE_DIR NAMES signature_of_eigen3_matrix_library | ||
PATHS | ||
${CMAKE_INSTALL_PREFIX}/include | ||
${KDE4_INCLUDE_DIR} | ||
PATH_SUFFIXES eigen3 eigen | ||
) | ||
|
||
if(EIGEN3_INCLUDE_DIR) | ||
_eigen3_check_version() | ||
endif(EIGEN3_INCLUDE_DIR) | ||
include(FindPackageHandleStandardArgs) | ||
find_package_handle_standard_args(Eigen3 REQUIRED_VARS EIGEN3_INCLUDE_DIR EIGEN3_VERSION_OK VERSION_VAR EIGEN3_VERSION) | ||
mark_as_advanced(EIGEN3_INCLUDE_DIR) | ||
|
||
endif(EIGEN3_INCLUDE_DIR) |
Oops, something went wrong.