aboutsummaryrefslogtreecommitdiff
path: root/CMake
diff options
context:
space:
mode:
Diffstat (limited to 'CMake')
-rw-r--r--CMake/FindCBF.cmake31
-rw-r--r--CMake/FindCairo.cmake44
-rw-r--r--CMake/FindFDIP.cmake25
-rw-r--r--CMake/FindFFTW.cmake20
-rw-r--r--CMake/FindGDK.cmake51
-rw-r--r--CMake/FindGdkPixbuf2.cmake51
-rw-r--r--CMake/FindNBP.cmake24
-rw-r--r--CMake/FindPINKINDEXER.cmake24
-rw-r--r--CMake/FindXGANDALF.cmake24
-rw-r--r--CMake/GetGitRevisionDescription.cmake168
-rw-r--r--CMake/GetGitRevisionDescription.cmake.in41
-rw-r--r--CMake/LICENSE_1_0.txt25
12 files changed, 528 insertions, 0 deletions
diff --git a/CMake/FindCBF.cmake b/CMake/FindCBF.cmake
new file mode 100644
index 00000000..e51fd01a
--- /dev/null
+++ b/CMake/FindCBF.cmake
@@ -0,0 +1,31 @@
+# - Find CBF
+# Find the native CBF includes and library
+#
+# CBF_INCLUDES - where to find cbf.h
+# CBF_LIBRARIES - List of libraries when using CBF.
+# CBF_FOUND - True if CBF found.
+
+if (CBF_INCLUDES)
+ # Already in cache, be silent
+ set (CBF_FIND_QUIETLY TRUE)
+endif (CBF_INCLUDES)
+
+find_path (CBF_CBF_INCLUDES cbf/cbf.h)
+find_path (CBFLIB_CBF_INCLUDES cbflib/cbf.h)
+
+if (NOT CBF_CBF_INCLUDES MATCHES "NOTFOUND")
+ message(STATUS "Found cbf/cbf.h in ${CBF_CBF_INCLUDES}")
+ set(CBF_INCLUDES ${CBF_CBF_INCLUDES})
+ set(HAVE_CBF_CBF_H ON)
+elseif (NOT CBFLIB_CBF_INCLUDES MATCHES "NOTFOUND")
+ message(STATUS "Found cbflib/cbf.h in ${CBFLIB_CBF_INCLUDES}")
+ set(CBF_INCLUDES ${CBFLIB_CBF_INCLUDES})
+ set(HAVE_CBFLIB_CBF_H ON)
+endif (NOT CBF_CBF_INCLUDES MATCHES "NOTFOUND")
+
+find_library (CBF_LIBRARIES NAMES cbf)
+
+# handle the QUIETLY and REQUIRED arguments and set CBF_FOUND to TRUE if
+# all listed variables are TRUE
+include (FindPackageHandleStandardArgs)
+find_package_handle_standard_args (CBF DEFAULT_MSG CBF_LIBRARIES CBF_INCLUDES)
diff --git a/CMake/FindCairo.cmake b/CMake/FindCairo.cmake
new file mode 100644
index 00000000..046bb250
--- /dev/null
+++ b/CMake/FindCairo.cmake
@@ -0,0 +1,44 @@
+# - Try to find the cairo library
+# Once done this will define
+#
+# CAIRO_FOUND - system has cairo
+# CAIRO_INCLUDE_DIRS - the cairo include directory
+# CAIRO_LIBRARIES - Link these to use cairo
+#
+# Define CAIRO_MIN_VERSION for which version desired.
+#
+
+INCLUDE(FindPkgConfig)
+
+IF(Cairo_FIND_REQUIRED)
+ SET(_pkgconfig_REQUIRED "REQUIRED")
+ELSE(Cairo_FIND_REQUIRED)
+ SET(_pkgconfig_REQUIRED "")
+ENDIF(Cairo_FIND_REQUIRED)
+
+IF(CAIRO_MIN_VERSION)
+ PKG_SEARCH_MODULE(CAIRO ${_pkgconfig_REQUIRED} cairo>=${CAIRO_MIN_VERSION})
+ELSE(CAIRO_MIN_VERSION)
+ PKG_SEARCH_MODULE(CAIRO ${_pkgconfig_REQUIRED} cairo)
+ENDIF(CAIRO_MIN_VERSION)
+
+IF(NOT CAIRO_FOUND AND NOT PKG_CONFIG_FOUND)
+ FIND_PATH(CAIRO_INCLUDE_DIRS cairo.h)
+ FIND_LIBRARY(CAIRO_LIBRARIES cairo)
+
+ # Report results
+ IF(CAIRO_LIBRARIES AND CAIRO_INCLUDE_DIRS)
+ SET(CAIRO_FOUND 1)
+ IF(NOT Cairo_FIND_QUIETLY)
+ MESSAGE(STATUS "Found Cairo: ${CAIRO_LIBRARIES}")
+ ENDIF(NOT Cairo_FIND_QUIETLY)
+ ELSE(CAIRO_LIBRARIES AND CAIRO_INCLUDE_DIRS)
+ IF(Cairo_FIND_REQUIRED)
+ MESSAGE(SEND_ERROR "Could not find Cairo")
+ ELSE(Cairo_FIND_REQUIRED)
+ IF(NOT Cairo_FIND_QUIETLY)
+ MESSAGE(STATUS "Could not find Cairo")
+ ENDIF(NOT Cairo_FIND_QUIETLY)
+ ENDIF(Cairo_FIND_REQUIRED)
+ ENDIF(CAIRO_LIBRARIES AND CAIRO_INCLUDE_DIRS)
+ENDIF(NOT CAIRO_FOUND AND NOT PKG_CONFIG_FOUND)
diff --git a/CMake/FindFDIP.cmake b/CMake/FindFDIP.cmake
new file mode 100644
index 00000000..6db3b993
--- /dev/null
+++ b/CMake/FindFDIP.cmake
@@ -0,0 +1,25 @@
+# - Find FDIP
+# Find the native FDIP includes and library
+#
+# FDIP_INCLUDES - where to find streakFinder.h
+# FDIP_LIBRARIES - List of libraries when using FDIP.
+# FDIP_FOUND - True if FDIP found.
+
+if (FDIP_INCLUDES)
+ # Already in cache, be silent
+ set (FDIP_FIND_QUIETLY TRUE)
+endif (FDIP_INCLUDES)
+
+find_path (FDIP_INCLUDES streakFinder.h
+ PATHS
+ ${CMAKE_INSTALL_PREFIX}/include
+ PATH_SUFFIXES fastDiffractionImageProcessing)
+
+find_library (FDIP_LIBRARIES fastDiffractionImageProcessing
+ PATHS
+ ${CMAKE_INSTALL_PREFIX}/lib)
+
+# handle the QUIETLY and REQUIRED arguments and set FDIP_FOUND to TRUE if
+# all listed variables are TRUE
+include (FindPackageHandleStandardArgs)
+find_package_handle_standard_args (FDIP DEFAULT_MSG FDIP_LIBRARIES FDIP_INCLUDES)
diff --git a/CMake/FindFFTW.cmake b/CMake/FindFFTW.cmake
new file mode 100644
index 00000000..faccfda5
--- /dev/null
+++ b/CMake/FindFFTW.cmake
@@ -0,0 +1,20 @@
+# - Find FFTW
+# Find the native FFTW includes and library
+#
+# FFTW_INCLUDES - where to find fftw3.h
+# FFTW_LIBRARIES - List of libraries when using FFTW.
+# FFTW_FOUND - True if FFTW found.
+
+if (FFTW_INCLUDES)
+ # Already in cache, be silent
+ set (FFTW_FIND_QUIETLY TRUE)
+endif (FFTW_INCLUDES)
+
+find_path (FFTW_INCLUDES fftw3.h)
+
+find_library (FFTW_LIBRARIES NAMES fftw3)
+
+# handle the QUIETLY and REQUIRED arguments and set FFTW_FOUND to TRUE if
+# all listed variables are TRUE
+include (FindPackageHandleStandardArgs)
+find_package_handle_standard_args (FFTW DEFAULT_MSG FFTW_LIBRARIES FFTW_INCLUDES)
diff --git a/CMake/FindGDK.cmake b/CMake/FindGDK.cmake
new file mode 100644
index 00000000..5de42303
--- /dev/null
+++ b/CMake/FindGDK.cmake
@@ -0,0 +1,51 @@
+# - Try to find the GDK library
+# Once done this will define
+#
+# GDK_FOUND - system has gdk
+# GDK_INCLUDE_DIRS - the gdk include directory
+# GDK_LIBRARIES - Link these to use gdk
+#
+# Define GDK_MIN_VERSION for which version desired.
+#
+
+include(FindPkgConfig)
+
+if (GDK_FIND_REQUIRED)
+ set(_pkgconfig_REQUIRED "REQUIRED")
+else (GDK_FIND_REQUIRED)
+ set(_pkgconfig_REQUIRED "")
+endif (GDK_FIND_REQUIRED)
+
+if (GDK_MIN_VERSION)
+ pkg_search_module(GDK ${_pkgconfig_REQUIRED} gdk-2.0>=${GDK_MIN_VERSION})
+else (GDK_MIN_VERSION)
+ pkg_search_module(GDK ${_pkgconfig_REQUIRED} gdk-2.0)
+endif (GDK_MIN_VERSION)
+
+if (GDK_FOUND)
+ message(STATUS "Found GDK (using pkg-config): ${GDK_LIBRARIES}")
+endif (GDK_FOUND)
+
+# Backup option if we don't have pkg-config
+if (NOT GDK_FOUND AND NOT PKG_CONFIG_FOUND)
+
+ find_path(GDK_INCLUDE_DIRS gdk/gdk.h)
+ find_library(GDK_LIBRARIES gdk)
+
+ if (GDK_LIBRARIES AND GDK_INCLUDE_DIRS)
+ set(GDK_FOUND 1)
+ if (NOT GDK_FIND_QUIETLY)
+ message(STATUS "Found GDK_LIBRARIES}")
+ endif(NOT GDK_FIND_QUIETLY)
+ else (GDK_LIBRARIES AND GDK_INCLUDE_DIRS)
+ if (GDK_FIND_REQUIRED)
+ message(SEND_ERROR "Could not find GDK")
+ else (GDK_FIND_REQUIRED)
+ if (NOT GDK_FIND_QUIETLY)
+ message(STATUS "Could not find GDK")
+ endif (NOT GDK_FIND_QUIETLY)
+ endif (GDK_FIND_REQUIRED)
+ endif (GDK_LIBRARIES AND GDK_INCLUDE_DIRS)
+
+endif (NOT GDK_FOUND AND NOT PKG_CONFIG_FOUND)
+
diff --git a/CMake/FindGdkPixbuf2.cmake b/CMake/FindGdkPixbuf2.cmake
new file mode 100644
index 00000000..dea84f4e
--- /dev/null
+++ b/CMake/FindGdkPixbuf2.cmake
@@ -0,0 +1,51 @@
+# - Try to find the gdk-pixbuf-2.0 library
+# Once done this will define
+#
+# GDKPIXBUF_FOUND - system has gdk-pixbuf
+# GDKPIXBUF_INCLUDE_DIRS - the gdk-pixbuf include directory
+# GDKPIXBUF_LIBRARIES - Link these to use gdk-pixbuf
+#
+# Define GDKPIXBUF_MIN_VERSION for which version desired.
+#
+
+include(FindPkgConfig)
+
+if (GdkPixbuf2_FIND_REQUIRED)
+ set(_pkgconfig_REQUIRED "REQUIRED")
+else (GdkPixbuf2_FIND_REQUIRED)
+ set(_pkgconfig_REQUIRED "")
+endif (GdkPixbuf2_FIND_REQUIRED)
+
+if (GDKPIXBUF_MIN_VERSION)
+ pkg_search_module(GDKPIXBUF ${_pkgconfig_REQUIRED} gdk-pixbuf-2.0>=${GDKPIXBUF_MIN_VERSION})
+else (GDKPIXBUF_MIN_VERSION)
+ pkg_search_module(GDKPIXBUF ${_pkgconfig_REQUIRED} gdk-pixbuf-2.0)
+endif (GDKPIXBUF_MIN_VERSION)
+
+if (GDKPIXBUF_FOUND)
+ message(STATUS "Found GdkPixbuf2 (using pkg-config): ${GDKPIXBUF_LIBRARIES}")
+endif (GDKPIXBUF_FOUND)
+
+# Backup option if we don't have pkg-config
+if (NOT GDKPIXBUF_FOUND AND NOT PKG_CONFIG_FOUND)
+
+ find_path(GDKPIXBUF_INCLUDE_DIRS gdk-pixbuf/gdk-pixbuf.h)
+ find_library(GDKPIXBUF_LIBRARIES gdk-pixbuf)
+
+ if (GDKPIXBUF_LIBRARIES AND GDKPIXBUF_INCLUDE_DIRS)
+ set(GDKPIXBUF_FOUND 1)
+ if (NOT GdkPixbuf2_FIND_QUIETLY)
+ message(STATUS "Found GdkPixbuf2: ${GDKPIXBUF_LIBRARIES}")
+ endif(NOT GdkPixbuf2_FIND_QUIETLY)
+ else (GDKPIXBUF_LIBRARIES AND GDKPIXBUF_INCLUDE_DIRS)
+ if (GdkPixbuf2_FIND_REQUIRED)
+ message(SEND_ERROR "Could not find GdkPixbuf2")
+ else (GdkPixbuf2_FIND_REQUIRED)
+ if (NOT GdkPixbuf2_FIND_QUIETLY)
+ message(STATUS "Could not find GdkPixbuf2")
+ endif (NOT GdkPixbuf2_FIND_QUIETLY)
+ endif (GdkPixbuf2_FIND_REQUIRED)
+ endif (GDKPIXBUF_LIBRARIES AND GDKPIXBUF_INCLUDE_DIRS)
+
+endif (NOT GDKPIXBUF_FOUND AND NOT PKG_CONFIG_FOUND)
+
diff --git a/CMake/FindNBP.cmake b/CMake/FindNBP.cmake
new file mode 100644
index 00000000..052f16df
--- /dev/null
+++ b/CMake/FindNBP.cmake
@@ -0,0 +1,24 @@
+# - Find NBP - numericalBraggPrediction
+# Find the native NBP includes and library
+#
+# NBP_INCLUDES - where to find IndexerBase.h
+# NBP_LIBRARIES - List of libraries when using NBP.
+# NBP_FOUND - True if NBP found.
+
+if (NBP_INCLUDES)
+ # Already in cache, be silent
+ set (NBP_FIND_QUIETLY TRUE)
+endif (NBP_INCLUDES)
+
+find_path (NBP_INCLUDES numericalBraggPrediction/ProjectionCalculation.h
+ PATHS
+ ${CMAKE_INSTALL_PREFIX}/include)
+
+find_library (NBP_LIBRARIES numericalBraggPrediction
+ PATHS
+ ${CMAKE_INSTALL_PREFIX}/lib)
+
+# handle the QUIETLY and REQUIRED arguments and set NBP_FOUND to TRUE if
+# all listed variables are TRUE
+include (FindPackageHandleStandardArgs)
+find_package_handle_standard_args (NBP DEFAULT_MSG NBP_LIBRARIES NBP_INCLUDES)
diff --git a/CMake/FindPINKINDEXER.cmake b/CMake/FindPINKINDEXER.cmake
new file mode 100644
index 00000000..3c217ff9
--- /dev/null
+++ b/CMake/FindPINKINDEXER.cmake
@@ -0,0 +1,24 @@
+# - Find PINKINDEXER
+# Find the native PINKINDEXER includes and library
+#
+# PINKINDEXER_INCLUDES - where to find IndexerBase.h
+# PINKINDEXER_LIBRARIES - List of libraries when using PINKINDEXER.
+# PINKINDEXER_FOUND - True if PINKINDEXER found.
+
+if (PINKINDEXER_INCLUDES)
+ # Already in cache, be silent
+ set (PINKINDEXER_FIND_QUIETLY TRUE)
+endif (PINKINDEXER_INCLUDES)
+
+find_path (PINKINDEXER_INCLUDES pinkIndexer/PinkIndexer.h
+ PATHS
+ ${CMAKE_INSTALL_PREFIX}/include)
+
+find_library (PINKINDEXER_LIBRARIES pinkIndexer
+ PATHS
+ ${CMAKE_INSTALL_PREFIX}/lib)
+
+# handle the QUIETLY and REQUIRED arguments and set PINKINDEXER_FOUND to TRUE if
+# all listed variables are TRUE
+include (FindPackageHandleStandardArgs)
+find_package_handle_standard_args (PINKINDEXER DEFAULT_MSG PINKINDEXER_LIBRARIES PINKINDEXER_INCLUDES)
diff --git a/CMake/FindXGANDALF.cmake b/CMake/FindXGANDALF.cmake
new file mode 100644
index 00000000..8138da77
--- /dev/null
+++ b/CMake/FindXGANDALF.cmake
@@ -0,0 +1,24 @@
+# - Find XGANDALF
+# Find the native XGANDALF includes and library
+#
+# XGANDALF_INCLUDES - where to find IndexerBase.h
+# XGANDALF_LIBRARIES - List of libraries when using XGANDALF.
+# XGANDALF_FOUND - True if XGANDALF found.
+
+if (XGANDALF_INCLUDES)
+ # Already in cache, be silent
+ set (XGANDALF_FIND_QUIETLY TRUE)
+endif (XGANDALF_INCLUDES)
+
+find_path (XGANDALF_INCLUDES xgandalf/IndexerBase.h
+ PATHS
+ ${CMAKE_INSTALL_PREFIX}/include)
+
+find_library (XGANDALF_LIBRARIES xgandalf
+ PATHS
+ ${CMAKE_INSTALL_PREFIX}/lib)
+
+# handle the QUIETLY and REQUIRED arguments and set XGANDALF_FOUND to TRUE if
+# all listed variables are TRUE
+include (FindPackageHandleStandardArgs)
+find_package_handle_standard_args (XGANDALF DEFAULT_MSG XGANDALF_LIBRARIES XGANDALF_INCLUDES)
diff --git a/CMake/GetGitRevisionDescription.cmake b/CMake/GetGitRevisionDescription.cmake
new file mode 100644
index 00000000..8ab03bc5
--- /dev/null
+++ b/CMake/GetGitRevisionDescription.cmake
@@ -0,0 +1,168 @@
+# - Returns a version string from Git
+#
+# These functions force a re-configure on each git commit so that you can
+# trust the values of the variables in your build system.
+#
+# get_git_head_revision(<refspecvar> <hashvar> [<additional arguments to git describe> ...])
+#
+# Returns the refspec and sha hash of the current head revision
+#
+# git_describe(<var> [<additional arguments to git describe> ...])
+#
+# Returns the results of git describe on the source tree, and adjusting
+# the output so that it tests false if an error occurs.
+#
+# git_get_exact_tag(<var> [<additional arguments to git describe> ...])
+#
+# Returns the results of git describe --exact-match on the source tree,
+# and adjusting the output so that it tests false if there was no exact
+# matching tag.
+#
+# git_local_changes(<var>)
+#
+# Returns either "CLEAN" or "DIRTY" with respect to uncommitted changes.
+# Uses the return code of "git diff-index --quiet HEAD --".
+# Does not regard untracked files.
+#
+# Requires CMake 2.6 or newer (uses the 'function' command)
+#
+# 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)
+
+if(__get_git_revision_description)
+ return()
+endif()
+set(__get_git_revision_description YES)
+
+# We must run the following at "include" time, not at function call time,
+# to find the path to this module rather than the path to a calling list file
+get_filename_component(_gitdescmoddir ${CMAKE_CURRENT_LIST_FILE} PATH)
+
+function(get_git_head_revision _refspecvar _hashvar)
+ set(GIT_PARENT_DIR "${CMAKE_CURRENT_SOURCE_DIR}")
+ set(GIT_DIR "${GIT_PARENT_DIR}/.git")
+ while(NOT EXISTS "${GIT_DIR}") # .git dir not found, search parent directories
+ set(GIT_PREVIOUS_PARENT "${GIT_PARENT_DIR}")
+ get_filename_component(GIT_PARENT_DIR ${GIT_PARENT_DIR} PATH)
+ if(GIT_PARENT_DIR STREQUAL GIT_PREVIOUS_PARENT)
+ # We have reached the root directory, we are not in git
+ set(${_refspecvar} "GITDIR-NOTFOUND" PARENT_SCOPE)
+ set(${_hashvar} "GITDIR-NOTFOUND" PARENT_SCOPE)
+ return()
+ endif()
+ set(GIT_DIR "${GIT_PARENT_DIR}/.git")
+ endwhile()
+ # check if this is a submodule
+ if(NOT IS_DIRECTORY ${GIT_DIR})
+ file(READ ${GIT_DIR} submodule)
+ string(REGEX REPLACE "gitdir: (.*)\n$" "\\1" GIT_DIR_RELATIVE ${submodule})
+ get_filename_component(SUBMODULE_DIR ${GIT_DIR} PATH)
+ get_filename_component(GIT_DIR ${SUBMODULE_DIR}/${GIT_DIR_RELATIVE} ABSOLUTE)
+ endif()
+ set(GIT_DATA "${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/git-data")
+ if(NOT EXISTS "${GIT_DATA}")
+ file(MAKE_DIRECTORY "${GIT_DATA}")
+ endif()
+
+ if(NOT EXISTS "${GIT_DIR}/HEAD")
+ return()
+ endif()
+ set(HEAD_FILE "${GIT_DATA}/HEAD")
+ configure_file("${GIT_DIR}/HEAD" "${HEAD_FILE}" COPYONLY)
+
+ configure_file("${_gitdescmoddir}/GetGitRevisionDescription.cmake.in"
+ "${GIT_DATA}/grabRef.cmake"
+ @ONLY)
+ include("${GIT_DATA}/grabRef.cmake")
+
+ set(${_refspecvar} "${HEAD_REF}" PARENT_SCOPE)
+ set(${_hashvar} "${HEAD_HASH}" PARENT_SCOPE)
+endfunction()
+
+function(git_describe _var)
+ if(NOT GIT_FOUND)
+ find_package(Git QUIET)
+ endif()
+ get_git_head_revision(refspec hash)
+ if(NOT GIT_FOUND)
+ set(${_var} "GIT-NOTFOUND" PARENT_SCOPE)
+ return()
+ endif()
+ if(NOT hash)
+ set(${_var} "HEAD-HASH-NOTFOUND" PARENT_SCOPE)
+ return()
+ endif()
+
+ # TODO sanitize
+ #if((${ARGN}" MATCHES "&&") OR
+ # (ARGN MATCHES "||") OR
+ # (ARGN MATCHES "\\;"))
+ # message("Please report the following error to the project!")
+ # message(FATAL_ERROR "Looks like someone's doing something nefarious with git_describe! Passed arguments ${ARGN}")
+ #endif()
+
+ #message(STATUS "Arguments to execute_process: ${ARGN}")
+
+ execute_process(COMMAND
+ "${GIT_EXECUTABLE}"
+ describe
+ ${hash}
+ ${ARGN}
+ WORKING_DIRECTORY
+ "${CMAKE_CURRENT_SOURCE_DIR}"
+ RESULT_VARIABLE
+ res
+ OUTPUT_VARIABLE
+ out
+ ERROR_QUIET
+ OUTPUT_STRIP_TRAILING_WHITESPACE)
+ if(NOT res EQUAL 0)
+ set(out "${out}-${res}-NOTFOUND")
+ endif()
+
+ set(${_var} "${out}" PARENT_SCOPE)
+endfunction()
+
+function(git_get_exact_tag _var)
+ git_describe(out --exact-match ${ARGN})
+ set(${_var} "${out}" PARENT_SCOPE)
+endfunction()
+
+function(git_local_changes _var)
+ if(NOT GIT_FOUND)
+ find_package(Git QUIET)
+ endif()
+ get_git_head_revision(refspec hash)
+ if(NOT GIT_FOUND)
+ set(${_var} "GIT-NOTFOUND" PARENT_SCOPE)
+ return()
+ endif()
+ if(NOT hash)
+ set(${_var} "HEAD-HASH-NOTFOUND" PARENT_SCOPE)
+ return()
+ endif()
+
+ execute_process(COMMAND
+ "${GIT_EXECUTABLE}"
+ diff-index --quiet HEAD --
+ WORKING_DIRECTORY
+ "${CMAKE_CURRENT_SOURCE_DIR}"
+ RESULT_VARIABLE
+ res
+ OUTPUT_VARIABLE
+ out
+ ERROR_QUIET
+ OUTPUT_STRIP_TRAILING_WHITESPACE)
+ if(res EQUAL 0)
+ set(${_var} "CLEAN" PARENT_SCOPE)
+ else()
+ set(${_var} "DIRTY" PARENT_SCOPE)
+ endif()
+endfunction()
diff --git a/CMake/GetGitRevisionDescription.cmake.in b/CMake/GetGitRevisionDescription.cmake.in
new file mode 100644
index 00000000..6d8b708e
--- /dev/null
+++ b/CMake/GetGitRevisionDescription.cmake.in
@@ -0,0 +1,41 @@
+#
+# Internal file for GetGitRevisionDescription.cmake
+#
+# Requires CMake 2.6 or newer (uses the 'function' command)
+#
+# 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)
+
+set(HEAD_HASH)
+
+file(READ "@HEAD_FILE@" HEAD_CONTENTS LIMIT 1024)
+
+string(STRIP "${HEAD_CONTENTS}" HEAD_CONTENTS)
+if(HEAD_CONTENTS MATCHES "ref")
+ # named branch
+ string(REPLACE "ref: " "" HEAD_REF "${HEAD_CONTENTS}")
+ if(EXISTS "@GIT_DIR@/${HEAD_REF}")
+ configure_file("@GIT_DIR@/${HEAD_REF}" "@GIT_DATA@/head-ref" COPYONLY)
+ else()
+ configure_file("@GIT_DIR@/packed-refs" "@GIT_DATA@/packed-refs" COPYONLY)
+ file(READ "@GIT_DATA@/packed-refs" PACKED_REFS)
+ if(${PACKED_REFS} MATCHES "([0-9a-z]*) ${HEAD_REF}")
+ set(HEAD_HASH "${CMAKE_MATCH_1}")
+ endif()
+ endif()
+else()
+ # detached HEAD
+ configure_file("@GIT_DIR@/HEAD" "@GIT_DATA@/head-ref" COPYONLY)
+endif()
+
+if(NOT HEAD_HASH)
+ file(READ "@GIT_DATA@/head-ref" HEAD_HASH LIMIT 1024)
+ string(STRIP "${HEAD_HASH}" HEAD_HASH)
+endif()
diff --git a/CMake/LICENSE_1_0.txt b/CMake/LICENSE_1_0.txt
new file mode 100644
index 00000000..93f82505
--- /dev/null
+++ b/CMake/LICENSE_1_0.txt
@@ -0,0 +1,25 @@
+This license applies to GetGitRevisionDescription.cmake and GetGitRevisionDescription.cmake.in.
+
+Boost Software License - Version 1.0 - August 17th, 2003
+
+Permission is hereby granted, free of charge, to any person or organization
+obtaining a copy of the software and accompanying documentation covered by
+this license (the "Software") to use, reproduce, display, distribute,
+execute, and transmit the Software, and to prepare derivative works of the
+Software, and to permit third-parties to whom the Software is furnished to
+do so, all subject to the following:
+
+The copyright notices in the Software and this entire statement, including
+the above license grant, this restriction and the following disclaimer,
+must be included in all copies of the Software, in whole or in part, and
+all derivative works of the Software, unless such copies or derivative
+works are solely in the form of machine-executable object code generated by
+a source language processor.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
+SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
+FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
+ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+DEALINGS IN THE SOFTWARE.