Commit be827fb5 authored by Jan Möbius's avatar Jan Möbius
Browse files

dos2unix


git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@10876 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 5c4f4ab8
# -helper macro to add a "doc" target with CMake build system.
# and configure doxy.config.in to doxy.config
#
# target "doc" allows building the documentation with doxygen/dot on WIN32 and Linux
# Creates .chm windows help file if MS HTML help workshop
# (available from http://msdn.microsoft.com/workshop/author/htmlhelp)
# is installed with its DLLs in PATH.
#
#
# Please note, that the tools, e.g.:
# doxygen, dot, latex, dvips, makeindex, gswin32, etc.
# must be in path.
#
# Note about Visual Studio Projects:
# MSVS hast its own path environment which may differ from the shell.
# See "Menu Tools/Options/Projects/VC++ Directories" in VS 7.1
#
# author Jan Woetzel 2004-2006
# www.mip.informatik.uni-kiel.de/~jw
FIND_PACKAGE(Doxygen)
IF (DOXYGEN_FOUND)
# click+jump in Emacs and Visual Studio (for doxy.config) (jw)
IF (CMAKE_BUILD_TOOL MATCHES "(msdev|devenv)")
SET(DOXY_WARN_FORMAT "\"$file($line) : $text \"")
ELSE (CMAKE_BUILD_TOOL MATCHES "(msdev|devenv)")
SET(DOXY_WARN_FORMAT "\"$file:$line: $text \"")
ENDIF (CMAKE_BUILD_TOOL MATCHES "(msdev|devenv)")
# we need latex for doxygen because of the formulas
FIND_PACKAGE(LATEX)
IF (NOT LATEX_COMPILER)
MESSAGE(STATUS "latex command LATEX_COMPILER not found but usually required. You will probably get warnings and user inetraction on doxy run.")
ENDIF (NOT LATEX_COMPILER)
IF (NOT MAKEINDEX_COMPILER)
MESSAGE(STATUS "makeindex command MAKEINDEX_COMPILER not found but usually required.")
ENDIF (NOT MAKEINDEX_COMPILER)
IF (NOT DVIPS_CONVERTER)
MESSAGE(STATUS "dvips command DVIPS_CONVERTER not found but usually required.")
ENDIF (NOT DVIPS_CONVERTER)
# This macro generates a new doc target. acg_create_doc_target( targetName [directory with the doxy.config.in] [dependency])
# if no parameter is used except the target, a target of the given name will be created from the current source directories doxyfile and added as a dependency to the doc target
# The first additional parameter is used to specify a directory where the doxyfile will be used
# The second parameter defines a target, that will depend on the newly generated one. (Default is doc)
macro (acg_create_doc_target target)
set( DOC_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}" )
set( DOC_DEPENDENCY "doc")
# collect arguments
if ( ${ARGC} EQUAL 2)
set( DOC_DIRECTORY "${ARGV1}" )
elseif ( ${ARGC} EQUAL 3)
set( DOC_DIRECTORY "${ARGV1}" )
set( DOC_DEPENDENCY "${ARGV2}" )
elseif( $ARGC GREATER 3 )
set( DOC_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}" )
# failed as we do not know how to handle the parameters
MESSAGE(SEND_ERROR "Unknown parameter for acg_create_doc_target!")
endif()
# If there exists an doxy.config.in, we configure it.
IF (EXISTS "${DOC_DIRECTORY}/doxy.config.in")
#MESSAGE(STATUS "configured ${DOC_DIRECTORY}/doxy.config.in --> ${CMAKE_CURRENT_BINARY_DIR}/doxy.config")
CONFIGURE_FILE(${DOC_DIRECTORY}/doxy.config.in
${CMAKE_CURRENT_BINARY_DIR}/doxy.config
@ONLY )
# use (configured) doxy.config from (out of place) BUILD tree:
SET(DOXY_CONFIG "${CMAKE_CURRENT_BINARY_DIR}/doxy.config")
ELSE (EXISTS "${DOC_DIRECTORY}/doxy.config.in")
# use static hand-edited doxy.config from SOURCE tree:
SET(DOXY_CONFIG "${DOC_DIRECTORY}/doxy.config")
IF (EXISTS "${DOC_DIRECTORY}/doxy.config")
MESSAGE(STATUS "WARNING: using existing ${DOC_DIRECTORY}/doxy.config instead of configuring from doxy.config.in file.")
ELSE (EXISTS "${DOC_DIRECTORY}/doxy.config")
IF (EXISTS "${CMAKE_MODULE_PATH}/doxy.config.in")
# using template doxy.config.in
#MESSAGE(STATUS "configured ${CMAKE_CMAKE_MODULE_PATH}/doxy.config.in --> ${CMAKE_CURRENT_BINARY_DIR}/doxy.config")
CONFIGURE_FILE(${CMAKE_MODULE_PATH}/doxy.config.in
${CMAKE_CURRENT_BINARY_DIR}/doxy.config
@ONLY )
SET(DOXY_CONFIG "${CMAKE_CURRENT_BINARY_DIR}/doxy.config")
ELSE (EXISTS "${CMAKE_MODULE_PATH}/doxy.config.in")
# failed completely...
MESSAGE(SEND_ERROR "Please create ${DOC_DIRECTORY}/doxy.config.in (or doxy.config as fallback)")
ENDIF(EXISTS "${CMAKE_MODULE_PATH}/doxy.config.in")
ENDIF(EXISTS "${DOC_DIRECTORY}/doxy.config")
ENDIF(EXISTS "${DOC_DIRECTORY}/doxy.config.in")
ADD_CUSTOM_TARGET(${target} ${DOXYGEN_EXECUTABLE} ${DOXY_CONFIG})
add_dependencies( ${DOC_DEPENDENCY} ${target} )
# # Add winhelp target only once!
# GET_TARGET_PROPERTY(target_location winhelp EchoString)
# if ( NOT target_location STREQUAL "Building Windows Documentation" )
# ADD_CUSTOM_TARGET( winhelp )
# SET_TARGET_PROPERTIES( winhelp PROPERTIES EchoString "Building Windows Documentation" )
# endif()
# create a windows help .chm file using hhc.exe
# HTMLHelp DLL must be in path!
# fallback: use hhw.exe interactively
# IF (WIN32)
# FIND_PACKAGE(HTMLHelp)
# IF (HTML_HELP_COMPILER)
# SET (TMP "${CMAKE_CURRENT_BINARY_DIR}\\Doc\\html\\index.hhp")
# STRING(REGEX REPLACE "[/]" "\\\\" HHP_FILE ${TMP} )
# # MESSAGE(SEND_ERROR "DBG HHP_FILE=${HHP_FILE}")
# ADD_CUSTOM_TARGET(winhelp-${target} ${HTML_HELP_COMPILER} ${HHP_FILE})
# ADD_DEPENDENCIES (winhelp-${target} ${target})
#
# add_dependencies(winhelp winhelp-${target})
#
#
# IF (NOT TARGET_DOC_SKIP_INSTALL)
# # install windows help?
# # determine useful name for output file
# # should be project and version unique to allow installing
# # multiple projects into one global directory
# IF (EXISTS "${PROJECT_BINARY_DIR}/Doc/html/index.chm")
# IF (PROJECT_NAME)
# SET(OUT "${PROJECT_NAME}")
# ELSE (PROJECT_NAME)
# SET(OUT "Documentation") # default
# ENDIF(PROJECT_NAME)
# IF (${PROJECT_NAME}_VERSION_MAJOR)
# SET(OUT "${OUT}-${${PROJECT_NAME}_VERSION_MAJOR}")
# IF (${PROJECT_NAME}_VERSION_MINOR)
# SET(OUT "${OUT}.${${PROJECT_NAME}_VERSION_MINOR}")
# IF (${PROJECT_NAME}_VERSION_PATCH)
# SET(OUT "${OUT}.${${PROJECT_NAME}_VERSION_PATCH}")
# ENDIF(${PROJECT_NAME}_VERSION_PATCH)
# ENDIF(${PROJECT_NAME}_VERSION_MINOR)
# ENDIF(${PROJECT_NAME}_VERSION_MAJOR)
# # keep suffix
# SET(OUT "${OUT}.chm")
#
# #MESSAGE("DBG ${PROJECT_BINARY_DIR}/Doc/html/index.chm \n${OUT}")
# # create target used by install and package commands
# INSTALL(FILES "${PROJECT_BINARY_DIR}/Doc/html/index.chm"
# DESTINATION "doc"
# RENAME "${OUT}"
# )
# ENDIF(EXISTS "${PROJECT_BINARY_DIR}/Doc/html/index.chm")
# ENDIF(NOT TARGET_DOC_SKIP_INSTALL)
#
# ENDIF(HTML_HELP_COMPILER)
# # MESSAGE(SEND_ERROR "HTML_HELP_COMPILER=${HTML_HELP_COMPILER}")
# ENDIF (WIN32)
endmacro ()
ENDIF(DOXYGEN_FOUND)
# -helper macro to add a "doc" target with CMake build system.
# and configure doxy.config.in to doxy.config
#
# target "doc" allows building the documentation with doxygen/dot on WIN32 and Linux
# Creates .chm windows help file if MS HTML help workshop
# (available from http://msdn.microsoft.com/workshop/author/htmlhelp)
# is installed with its DLLs in PATH.
#
#
# Please note, that the tools, e.g.:
# doxygen, dot, latex, dvips, makeindex, gswin32, etc.
# must be in path.
#
# Note about Visual Studio Projects:
# MSVS hast its own path environment which may differ from the shell.
# See "Menu Tools/Options/Projects/VC++ Directories" in VS 7.1
#
# author Jan Woetzel 2004-2006
# www.mip.informatik.uni-kiel.de/~jw
FIND_PACKAGE(Doxygen)
IF (DOXYGEN_FOUND)
# click+jump in Emacs and Visual Studio (for doxy.config) (jw)
IF (CMAKE_BUILD_TOOL MATCHES "(msdev|devenv)")
SET(DOXY_WARN_FORMAT "\"$file($line) : $text \"")
ELSE (CMAKE_BUILD_TOOL MATCHES "(msdev|devenv)")
SET(DOXY_WARN_FORMAT "\"$file:$line: $text \"")
ENDIF (CMAKE_BUILD_TOOL MATCHES "(msdev|devenv)")
# we need latex for doxygen because of the formulas
FIND_PACKAGE(LATEX)
IF (NOT LATEX_COMPILER)
MESSAGE(STATUS "latex command LATEX_COMPILER not found but usually required. You will probably get warnings and user inetraction on doxy run.")
ENDIF (NOT LATEX_COMPILER)
IF (NOT MAKEINDEX_COMPILER)
MESSAGE(STATUS "makeindex command MAKEINDEX_COMPILER not found but usually required.")
ENDIF (NOT MAKEINDEX_COMPILER)
IF (NOT DVIPS_CONVERTER)
MESSAGE(STATUS "dvips command DVIPS_CONVERTER not found but usually required.")
ENDIF (NOT DVIPS_CONVERTER)
# This macro generates a new doc target. acg_create_doc_target( targetName [directory with the doxy.config.in] [dependency])
# if no parameter is used except the target, a target of the given name will be created from the current source directories doxyfile and added as a dependency to the doc target
# The first additional parameter is used to specify a directory where the doxyfile will be used
# The second parameter defines a target, that will depend on the newly generated one. (Default is doc)
macro (acg_create_doc_target target)
set( DOC_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}" )
set( DOC_DEPENDENCY "doc")
# collect arguments
if ( ${ARGC} EQUAL 2)
set( DOC_DIRECTORY "${ARGV1}" )
elseif ( ${ARGC} EQUAL 3)
set( DOC_DIRECTORY "${ARGV1}" )
set( DOC_DEPENDENCY "${ARGV2}" )
elseif( $ARGC GREATER 3 )
set( DOC_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}" )
# failed as we do not know how to handle the parameters
MESSAGE(SEND_ERROR "Unknown parameter for acg_create_doc_target!")
endif()
# If there exists an doxy.config.in, we configure it.
IF (EXISTS "${DOC_DIRECTORY}/doxy.config.in")
#MESSAGE(STATUS "configured ${DOC_DIRECTORY}/doxy.config.in --> ${CMAKE_CURRENT_BINARY_DIR}/doxy.config")
CONFIGURE_FILE(${DOC_DIRECTORY}/doxy.config.in
${CMAKE_CURRENT_BINARY_DIR}/doxy.config
@ONLY )
# use (configured) doxy.config from (out of place) BUILD tree:
SET(DOXY_CONFIG "${CMAKE_CURRENT_BINARY_DIR}/doxy.config")
ELSE (EXISTS "${DOC_DIRECTORY}/doxy.config.in")
# use static hand-edited doxy.config from SOURCE tree:
SET(DOXY_CONFIG "${DOC_DIRECTORY}/doxy.config")
IF (EXISTS "${DOC_DIRECTORY}/doxy.config")
MESSAGE(STATUS "WARNING: using existing ${DOC_DIRECTORY}/doxy.config instead of configuring from doxy.config.in file.")
ELSE (EXISTS "${DOC_DIRECTORY}/doxy.config")
IF (EXISTS "${CMAKE_MODULE_PATH}/doxy.config.in")
# using template doxy.config.in
#MESSAGE(STATUS "configured ${CMAKE_CMAKE_MODULE_PATH}/doxy.config.in --> ${CMAKE_CURRENT_BINARY_DIR}/doxy.config")
CONFIGURE_FILE(${CMAKE_MODULE_PATH}/doxy.config.in
${CMAKE_CURRENT_BINARY_DIR}/doxy.config
@ONLY )
SET(DOXY_CONFIG "${CMAKE_CURRENT_BINARY_DIR}/doxy.config")
ELSE (EXISTS "${CMAKE_MODULE_PATH}/doxy.config.in")
# failed completely...
MESSAGE(SEND_ERROR "Please create ${DOC_DIRECTORY}/doxy.config.in (or doxy.config as fallback)")
ENDIF(EXISTS "${CMAKE_MODULE_PATH}/doxy.config.in")
ENDIF(EXISTS "${DOC_DIRECTORY}/doxy.config")
ENDIF(EXISTS "${DOC_DIRECTORY}/doxy.config.in")
ADD_CUSTOM_TARGET(${target} ${DOXYGEN_EXECUTABLE} ${DOXY_CONFIG})
add_dependencies( ${DOC_DEPENDENCY} ${target} )
# # Add winhelp target only once!
# GET_TARGET_PROPERTY(target_location winhelp EchoString)
# if ( NOT target_location STREQUAL "Building Windows Documentation" )
# ADD_CUSTOM_TARGET( winhelp )
# SET_TARGET_PROPERTIES( winhelp PROPERTIES EchoString "Building Windows Documentation" )
# endif()
# create a windows help .chm file using hhc.exe
# HTMLHelp DLL must be in path!
# fallback: use hhw.exe interactively
# IF (WIN32)
# FIND_PACKAGE(HTMLHelp)
# IF (HTML_HELP_COMPILER)
# SET (TMP "${CMAKE_CURRENT_BINARY_DIR}\\Doc\\html\\index.hhp")
# STRING(REGEX REPLACE "[/]" "\\\\" HHP_FILE ${TMP} )
# # MESSAGE(SEND_ERROR "DBG HHP_FILE=${HHP_FILE}")
# ADD_CUSTOM_TARGET(winhelp-${target} ${HTML_HELP_COMPILER} ${HHP_FILE})
# ADD_DEPENDENCIES (winhelp-${target} ${target})
#
# add_dependencies(winhelp winhelp-${target})
#
#
# IF (NOT TARGET_DOC_SKIP_INSTALL)
# # install windows help?
# # determine useful name for output file
# # should be project and version unique to allow installing
# # multiple projects into one global directory
# IF (EXISTS "${PROJECT_BINARY_DIR}/Doc/html/index.chm")
# IF (PROJECT_NAME)
# SET(OUT "${PROJECT_NAME}")
# ELSE (PROJECT_NAME)
# SET(OUT "Documentation") # default
# ENDIF(PROJECT_NAME)
# IF (${PROJECT_NAME}_VERSION_MAJOR)
# SET(OUT "${OUT}-${${PROJECT_NAME}_VERSION_MAJOR}")
# IF (${PROJECT_NAME}_VERSION_MINOR)
# SET(OUT "${OUT}.${${PROJECT_NAME}_VERSION_MINOR}")
# IF (${PROJECT_NAME}_VERSION_PATCH)
# SET(OUT "${OUT}.${${PROJECT_NAME}_VERSION_PATCH}")
# ENDIF(${PROJECT_NAME}_VERSION_PATCH)
# ENDIF(${PROJECT_NAME}_VERSION_MINOR)
# ENDIF(${PROJECT_NAME}_VERSION_MAJOR)
# # keep suffix
# SET(OUT "${OUT}.chm")
#
# #MESSAGE("DBG ${PROJECT_BINARY_DIR}/Doc/html/index.chm \n${OUT}")
# # create target used by install and package commands
# INSTALL(FILES "${PROJECT_BINARY_DIR}/Doc/html/index.chm"
# DESTINATION "doc"
# RENAME "${OUT}"
# )
# ENDIF(EXISTS "${PROJECT_BINARY_DIR}/Doc/html/index.chm")
# ENDIF(NOT TARGET_DOC_SKIP_INSTALL)
#
# ENDIF(HTML_HELP_COMPILER)
# # MESSAGE(SEND_ERROR "HTML_HELP_COMPILER=${HTML_HELP_COMPILER}")
# ENDIF (WIN32)
endmacro ()
ENDIF(DOXYGEN_FOUND)
# - Find CGAL
# Find the CGAL autolinking headers.
#
# CGAL_INCLUDE_DIR - where to find CGAL.h, etc.
# CGAL_FOUND - True if CGAL found.
IF (CGAL_INCLUDE_DIR)
# Already in cache, be silent
SET(CGAL_FIND_QUIETLY TRUE)
ENDIF (CGAL_INCLUDE_DIR)
GET_FILENAME_COMPONENT(module_file_path ${CMAKE_CURRENT_LIST_FILE} PATH )
IF (NOT APPLE )
# Look for the header file.
FIND_PATH(CGAL_INCLUDE_DIR NAMES CGAL/auto_link/auto_link.h
PATHS ../../External/include
"C:/libs/CGAL-3.6/include"
"C:/Program Files/CGAL-3.5/include"
"C:/Programme/CGAL-3.5/include"
"C:/libs/CGAL-3.5/include"
"C:/Program Files/CGAL-3.4/include"
"C:/Programme/CGAL-3.4/include"
"C:/libs/CGAL-3.4/include"
${module_file_path}/../../../External/include)
ELSE( NOT APPLE)
# Look for the header file.
FIND_PATH(CGAL_INCLUDE_DIR NAMES CGAL/auto_link/auto_link.h
PATHS "/opt/local/include"
)
ENDIF( NOT APPLE )
MARK_AS_ADVANCED(CGAL_INCLUDE_DIR)
# Copy the results to the output variables.
IF(CGAL_INCLUDE_DIR )
SET(CGAL_FOUND 1)
SET(CGAL_INCLUDE_DIR ${CGAL_INCLUDE_DIR})
# Look for the taucs dir.
FIND_PATH(CGAL_TAUCS_DIR NAMES include/taucs.h
PATHS ${CGAL_INCLUDE_DIR}/../auxiliary/taucs)
IF(WIN32)
include(CGAL_GeneratorSpecificSettings)
find_path(CGAL_LIBRARY_DIR
NAMES "CGAL-${CGAL_TOOLSET}-mt.lib" "CGAL-${CGAL_TOOLSET}-mt-gd.lib"
PATHS "${CGAL_INCLUDE_DIR}/../lib"
DOC "Directory containing the CGAL library"
)
add_definitions (-DCGAL_AUTOLINK)
ELSEIF( APPLE)
find_path(CGAL_LIBRARY_DIR
NAMES "libCGAL.dylib"
PATHS "/opt/local/lib/"
DOC "Directory containing the CGAL library"
)
list ( APPEND CGAL_LIBRARIES CGAL CGAL_Core CGAL_ImageIO CGAL_PDB )
set (CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -frounding-math")
set (CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -frounding-math")
ELSE( WIN32 )
find_path(CGAL_LIBRARY_DIR
NAMES "libCGAL.so"
PATHS "/usr/lib/"
DOC "Directory containing the CGAL library"
)
list ( APPEND CGAL_LIBRARIES CGAL CGAL_Core CGAL_ImageIO CGAL_PDB CGAL_Qt4)
set (CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -frounding-math")
set (CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -frounding-math")
# This is needed to link correctly against lapack
add_definitions (-DCGAL_USE_F2C)
ENDIF(WIN32)
ELSE(CGAL_INCLUDE_DIR )
SET(CGAL_FOUND 0)
SET(CGAL_INCLUDE_DIR)
ENDIF(CGAL_INCLUDE_DIR )
# Report the results.
IF(NOT CGAL_FOUND)
SET(CGAL_DIR_MESSAGE
"CGAL was not found. Make sure CGAL_INCLUDE_DIR is set to the directories containing the include files for CGAL. .")
IF(CGAL_FIND_REQUIRED)
MESSAGE(FATAL_ERROR "${CGAL_DIR_MESSAGE}")
ELSEIF(NOT CGAL_FIND_QUIETLY)
MESSAGE(STATUS "${CGAL_DIR_MESSAGE}")
ELSE(NOT CGAL_FIND_QUIETLY)
ENDIF(CGAL_FIND_REQUIRED)
ELSE (NOT CGAL_FOUND)
IF(NOT CGAL_FIND_QUIETLY)
MESSAGE(STATUS "Looking for CGAL - found")
ENDIF(NOT CGAL_FIND_QUIETLY)
ENDIF(NOT CGAL_FOUND)
# - Find CGAL
# Find the CGAL autolinking headers.
#
# CGAL_INCLUDE_DIR - where to find CGAL.h, etc.
# CGAL_FOUND - True if CGAL found.
IF (CGAL_INCLUDE_DIR)
# Already in cache, be silent
SET(CGAL_FIND_QUIETLY TRUE)
ENDIF (CGAL_INCLUDE_DIR)
GET_FILENAME_COMPONENT(module_file_path ${CMAKE_CURRENT_LIST_FILE} PATH )
IF (NOT APPLE )
# Look for the header file.
FIND_PATH(CGAL_INCLUDE_DIR NAMES CGAL/auto_link/auto_link.h
PATHS ../../External/include
"C:/libs/CGAL-3.6/include"
"C:/Program Files/CGAL-3.5/include"
"C:/Programme/CGAL-3.5/include"
"C:/libs/CGAL-3.5/include"
"C:/Program Files/CGAL-3.4/include"
"C:/Programme/CGAL-3.4/include"
"C:/libs/CGAL-3.4/include"
${module_file_path}/../../../External/include)
ELSE( NOT APPLE)
# Look for the header file.
FIND_PATH(CGAL_INCLUDE_DIR NAMES CGAL/auto_link/auto_link.h
PATHS "/opt/local/include"
)
ENDIF( NOT APPLE )
MARK_AS_ADVANCED(CGAL_INCLUDE_DIR)
# Copy the results to the output variables.
IF(CGAL_INCLUDE_DIR )
SET(CGAL_FOUND 1)
SET(CGAL_INCLUDE_DIR ${CGAL_INCLUDE_DIR})
# Look for the taucs dir.
FIND_PATH(CGAL_TAUCS_DIR NAMES include/taucs.h
PATHS ${CGAL_INCLUDE_DIR}/../auxiliary/taucs)
IF(WIN32)
include(CGAL_GeneratorSpecificSettings)
find_path(CGAL_LIBRARY_DIR
NAMES "CGAL-${CGAL_TOOLSET}-mt.lib" "CGAL-${CGAL_TOOLSET}-mt-gd.lib"
PATHS "${CGAL_INCLUDE_DIR}/../lib"
DOC "Directory containing the CGAL library"
)
add_definitions (-DCGAL_AUTOLINK)
ELSEIF( APPLE)
find_path(CGAL_LIBRARY_DIR
NAMES "libCGAL.dylib"
PATHS "/opt/local/lib/"
DOC "Directory containing the CGAL library"
)
list ( APPEND CGAL_LIBRARIES CGAL CGAL_Core CGAL_ImageIO CGAL_PDB )
set (CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -frounding-math")
set (CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -frounding-math")
ELSE( WIN32 )
find_path(CGAL_LIBRARY_DIR
NAMES "libCGAL.so"
PATHS "/usr/lib/"
DOC "Directory containing the CGAL library"
)
list ( APPEND CGAL_LIBRARIES CGAL CGAL_Core CGAL_ImageIO CGAL_PDB CGAL_Qt4)
set (CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -frounding-math")
set (CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -frounding-math")
# This is needed to link correctly against lapack
add_definitions (-DCGAL_USE_F2C)
ENDIF(WIN32)
ELSE(CGAL_INCLUDE_DIR )
SET(CGAL_FOUND 0)
SET(CGAL_INCLUDE_DIR)
ENDIF(CGAL_INCLUDE_DIR )
# Report the results.
IF(NOT CGAL_FOUND)
SET(CGAL_DIR_MESSAGE
"CGAL was not found. Make sure CGAL_INCLUDE_DIR is set to the directories containing the include files for CGAL. .")
IF(CGAL_FIND_REQUIRED)
MESSAGE(FATAL_ERROR "${CGAL_DIR_MESSAGE}")
ELSEIF(NOT CGAL_FIND_QUIETLY)
MESSAGE(STATUS "${CGAL_DIR_MESSAGE}")
ELSE(NOT CGAL_FIND_QUIETLY)
ENDIF(CGAL_FIND_REQUIRED)
ELSE (NOT CGAL_FOUND)
IF(NOT CGAL_FIND_QUIETLY)
MESSAGE(STATUS "Looking for CGAL - found")
ENDIF(NOT CGAL_FIND_QUIETLY)
ENDIF(NOT CGAL_FOUND)
# - Locate FreeType library
# This module defines
# FREETYPE_LIBRARIES, the library to link against
# FREETYPE_FOUND, if false, do not try to link to FREETYPE
# FREETYPE_INCLUDE_DIRS, where to find headers.
# This is the concatenation of the paths:
# FREETYPE_INCLUDE_DIR_ft2build
# FREETYPE_INCLUDE_DIR_freetype2
#
# $FREETYPE_DIR is an environment variable that would
# correspond to the ./configure --prefix=$FREETYPE_DIR
# used in building FREETYPE.
#=============================================================================
# Copyright 2007-2009 Kitware, Inc.
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
#
# This software is distributed WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information.
#=============================================================================
# (To distributed this file outside of CMake, substitute the full
# License text for the above reference.)
# Created by Eric Wing.
# Modifications by Alexander Neundorf.
# This file has been renamed to "FindFreetype.cmake" instead of the correct
# "FindFreeType.cmake" in order to be compatible with the one from KDE4, Alex.
# Ugh, FreeType seems to use some #include trickery which
# makes this harder than it should be. It looks like they
# put ft2build.h in a common/easier-to-find location which
# then contains a #include to a more specific header in a
# more specific location (#include <freetype/config/ftheader.h>).
# Then from there, they need to set a bunch of #define's
# so you can do something like:
# #include FT_FREETYPE_H
# Unfortunately, using CMake's mechanisms like INCLUDE_DIRECTORIES()
# wants explicit full paths and this trickery doesn't work too well.
# I'm going to attempt to cut out the middleman and hope
# everything still works.
FIND_PATH(FREETYPE_INCLUDE_DIR_ft2build ft2build.h
HINTS
$ENV{FREETYPE_DIR}
PATH_SUFFIXES include
PATHS
/usr/local/X11R6/include
/usr/local/X11/include
/usr/X11/include
/sw/include
/opt/local/include
/usr/freeware/include
"C:/libs/freetype/include"
)
FIND_PATH(FREETYPE_INCLUDE_DIR_freetype2 freetype/config/ftheader.h
HINTS
$ENV{FREETYPE_DIR}/include/freetype2
PATHS
/usr/local/X11R6/include
/usr/local/X11/include
/usr/X11/include
/sw/include
/opt/local/include
/usr/freeware/include
"C:/libs/freetype/include"
PATH_SUFFIXES freetype2
)
FIND_LIBRARY(FREETYPE_LIBRARY
NAMES freetype libfreetype freetype219
HINTS
$ENV{FREETYPE_DIR}
PATH_SUFFIXES lib64 lib
PATHS
/usr/local/X11R6