SuperTuxKart 1.5 upstream source (from official release tarball)
This commit is contained in:
@@ -0,0 +1,44 @@
|
||||
# - Issue an error if the source tree is in or equal to the build tree
|
||||
#
|
||||
# include(RequireOutOfSourceBuild)
|
||||
#
|
||||
#
|
||||
# Original Author:
|
||||
# 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net>
|
||||
# http://academic.cleardefinition.com
|
||||
# Iowa State University HCI Graduate Program/VRAC
|
||||
#
|
||||
# Copyright Iowa State University 2009-2010.
|
||||
# Distributed under the Boost Software License, Version 1.0.
|
||||
# (See accompanying file ../LICENSE_1_0.txt or copy at
|
||||
# http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
get_filename_component(_src "${CMAKE_SOURCE_DIR}" ABSOLUTE)
|
||||
get_filename_component(_cur_src "${CMAKE_CURRENT_SOURCE_DIR}" ABSOLUTE)
|
||||
get_filename_component(_bin "${CMAKE_BINARY_DIR}" ABSOLUTE)
|
||||
|
||||
string(LENGTH "${_src}" _src_len)
|
||||
string(LENGTH "${_cur_src}" _cur_src_len)
|
||||
string(LENGTH "${_bin}" _bin_len)
|
||||
|
||||
set(_test)
|
||||
|
||||
if(NOT "${_bin_len}" GREATER "${_src_len}")
|
||||
list(APPEND _test _src)
|
||||
#message(STATUS "Checking ${_src}")
|
||||
endif()
|
||||
|
||||
if(NOT "${_bin_len}" GREATER "${_cur_src_len}")
|
||||
list(APPEND _test _cur_src)
|
||||
#message(STATUS "Checking ${_cur_src}")
|
||||
endif()
|
||||
|
||||
foreach(_var ${_test})
|
||||
string(SUBSTRING "${${_var}}" 0 ${_bin_len} _chopped)
|
||||
#message(STATUS "comparing ${_bin} and ${_chopped}")
|
||||
if("${_bin}" STREQUAL "${_chopped}")
|
||||
get_filename_component(_parent "${CMAKE_SOURCE_DIR}/.." ABSOLUTE)
|
||||
message(FATAL_ERROR
|
||||
"You must set a binary directory that is different from your source directory. You might consider ${CMAKE_SOURCE_DIR}/build or ${_parent}/build-${CMAKE_PROJECT_NAME}")
|
||||
endif()
|
||||
endforeach()
|
||||
@@ -0,0 +1,13 @@
|
||||
# - Autoinclude these policies automatically
|
||||
#
|
||||
# Original Author:
|
||||
# 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net>
|
||||
# http://academic.cleardefinition.com
|
||||
# Iowa State University HCI Graduate Program/VRAC
|
||||
#
|
||||
# Copyright Iowa State University 2009-2010.
|
||||
# Distributed under the Boost Software License, Version 1.0.
|
||||
# (See accompanying file ../LICENSE_1_0.txt or copy at
|
||||
# http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
include(RequireOutOfSourceBuild)
|
||||
@@ -0,0 +1,68 @@
|
||||
## FFTW can be compiled and subsequently linked against
|
||||
## various data types.
|
||||
## There is a single set of include files, and then muttiple libraries,
|
||||
## One for each type. I.e. libfftw.a-->double, libfftwf.a-->float
|
||||
|
||||
## The following logic belongs in the individual package
|
||||
## MARK_AS_ADVANCED(USE_FFTWD)
|
||||
## OPTION(USE_FFTWD "Use double precision FFTW if found" ON)
|
||||
## MARK_AS_ADVANCED(USE_FFTWF)
|
||||
## OPTION(USE_FFTWF "Use single precision FFTW if found" ON)
|
||||
|
||||
IF(USE_FFTWD OR USE_FFTWF)
|
||||
|
||||
SET(FFTW_INC_SEARCHPATH
|
||||
/sw/include
|
||||
/usr/include
|
||||
/usr/local/include
|
||||
/usr/include/fftw
|
||||
/usr/local/include/fftw
|
||||
)
|
||||
|
||||
FIND_PATH(FFTW_INCLUDE_PATH fftw3.h ${FFTW_INC_SEARCHPATH})
|
||||
|
||||
IF(FFTW_INCLUDE_PATH)
|
||||
SET(FFTW_INCLUDE ${FFTW_INCLUDE_PATH})
|
||||
ENDIF (FFTW_INCLUDE_PATH)
|
||||
|
||||
IF(FFTW_INCLUDE)
|
||||
INCLUDE_DIRECTORIES( ${FFTW_INCLUDE})
|
||||
ENDIF(FFTW_INCLUDE)
|
||||
|
||||
GET_FILENAME_COMPONENT(FFTW_INSTALL_BASE_PATH ${FFTW_INCLUDE_PATH} PATH)
|
||||
|
||||
SET(FFTW_LIB_SEARCHPATH
|
||||
${FFTW_INSTALL_BASE_PATH}/lib
|
||||
/usr/lib/fftw
|
||||
/usr/local/lib/fftw
|
||||
)
|
||||
|
||||
IF(USE_FFTWD)
|
||||
MARK_AS_ADVANCED(FFTWD_LIB)
|
||||
# OPTION(FFTWD_LIB "The full path to the fftw3 library (including the library)" )
|
||||
FIND_LIBRARY(FFTWD_LIB fftw3 ${FFTW_LIB_SEARCHPATH}) #Double Precision Lib
|
||||
FIND_LIBRARY(FFTWD_THREADS_LIB fftw3_threads ${FFTW_LIB_SEARCHPATH}) #Double Precision Lib only if compiled with threads support
|
||||
|
||||
IF(FFTWD_LIB)
|
||||
SET(FFTWD_FOUND 1)
|
||||
IF(FFTWD_THREADS_LIB)
|
||||
SET(FFTWD_LIB ${FFTWD_LIB} ${FFTWD_THREADS_LIB} )
|
||||
ENDIF(FFTWD_THREADS_LIB)
|
||||
ENDIF(FFTWD_LIB)
|
||||
ENDIF(USE_FFTWD)
|
||||
|
||||
IF(USE_FFTWF)
|
||||
MARK_AS_ADVANCED(FFTWF_LIB)
|
||||
# OPTION(FFTWF_LIB "The full path to the fftw3f library (including the library)" )
|
||||
FIND_LIBRARY(FFTWF_LIB fftw3f ${FFTW_LIB_SEARCHPATH}) #Single Precision Lib
|
||||
FIND_LIBRARY(FFTWF_THREADS_LIB fftw3f_threads ${FFTW_LIB_SEARCHPATH}) #Single Precision Lib only if compiled with threads support
|
||||
|
||||
IF(FFTWF_LIB)
|
||||
SET(FFTWF_FOUND 1)
|
||||
IF(FFTWF_THREADS_LIB)
|
||||
SET(FFTWF_LIB ${FFTWF_LIB} ${FFTWF_THREADS_LIB} )
|
||||
ENDIF(FFTWF_THREADS_LIB)
|
||||
ENDIF(FFTWF_LIB)
|
||||
ENDIF(USE_FFTWF)
|
||||
|
||||
ENDIF(USE_FFTWD OR USE_FFTWF)
|
||||
Reference in New Issue
Block a user