Squashed 'cmake/' changes from b0d0a58..cac13f1
cac13f1 Add CMakePackageConfigHelpers as a backported module from 2.8.10 44e17a5 Update help 92f9405 Add FindDirectShow from VRPN a93bf46 Update FindVRPN edf459d clean up some modules 0bf8b53 Update documentation/help 900ae37 Improvements to findcppdom bcdd5ed Adrienne timecode generator finder fc14864 IDLJ finder/script 5fa91d4 Finder for windows/platform SDK 835a160 Add module to find perl modules: pass them as components 7dc76c3 cleanup 38e2a0d Create a doc_open target to open html docs e8de008 Improved directx finding 787900c Conditionally use libuuid for VPR22 1c73e35 Add a helper error message to findcppcheck. 9e8b357 Generate, rather than enumerate, juggler lib names. d42ae48 Add another compiler flag for warnings. 911f522 Just a little cleanup. a466ea5 Update help 30af184 Add two new scripts written for VR Juggler 09ccc48 Update VR Juggler finders for 3.0.1 f9a5b86 VR JuggLua is no longer unreleased research software - ditch the scary warning. 1adb75e Update GetGitRevisionDescription to handle new submodules a little better. 187b7b2 Add new FindViewPoint d1ec683 Enhance FindOpenHaptics to handle 3.1 de68fc0 Restore some tabs that went missing feb11f6 Improve GHOST finder. b922e06 Update help 7ff9c53 Run cmake-bulk-decrufter. 0873f79 Merge branch 'jscasallas/master' e2ec7cd Add helpful comment about use as submodule 2a42dc5 Simplify FindQVRPN. 8ddcb84 Windows compatibility for the pull request just merged 4fcc618 Merge pull request #6 from phire/cmake-modules fa1ef4c Add additional versions of cppdom and gmtl. 7db0714 Regenerate help 39c0f2f Add find directinput d2e2a74 Update copyright year 5c05172 Update module help 5b62638 Rename to UseMarkdown and add rename feature f92055a Add markdown scripts (finding and targets) 00cefbe GetGitRevisionDescription: Search parent dirs for .git/ 0fb259a New module: FindQVRPN.cmake 9616f6e Find jccl and vrjuggler plugins, and split between debug and release 4856978 Set WIIUSE_RUNTIME_LIBRARY in Wiiuse even not on Windows d94b209 make FindWinHID work on MinGW. 4c110cb Fix copy-pasteo in findcppunit 8be460a fix doc typo 6a78da3 Handle other compilers better by using compiler ID a90f87b Use compiler behavior, not identity, to decide what warning flags to use f03d7a8 Properly check the various arguments to cppcheck rather than assume based on a few tests. d3ffd8a get git revision more robustly 1fb0e41 update ghost fake stl to simplify header 6fbe007 No more checking the stdc++ version for openhaptics db11bb9 make sure we actually link against HDU/HLU nested targets! a6580e9 remove unused variables in test file f4a26c5 update copyright 16a6266 fix dcubed nested target ca5cd7a mark luac item as advanced f131cbe actually use the jttk root dir specified 501dbb2 improve dcubed include dirs ae8764f improve splitting osg plugins into debug and release git-subtree-dir: cmake git-subtree-split: cac13f1c3225555cec9ae06a1ba47baa8c90442a
This commit is contained in:
@@ -22,7 +22,7 @@
|
||||
# need to call:
|
||||
# include(BoostTestTargets)
|
||||
#
|
||||
# For more information, see the documentation for individual modules, the
|
||||
# For more information, see the documentation for individual modules, the
|
||||
# cmake-modules github page, and/or the upstream CMake documentation at
|
||||
# http://www.cmake.org/cmake/help/cmake-2-8-docs.html
|
||||
#
|
||||
|
||||
@@ -31,7 +31,7 @@ function(_osgbundle_split_debug_versions releasevar debugvar)
|
||||
set(debug)
|
||||
foreach(fn ${ARGN})
|
||||
get_filename_component(name "${fn}" NAME_WE)
|
||||
if(${name} MATCHES "d$")
|
||||
if("${name}" MATCHES "d$")
|
||||
list(APPEND debug "${fn}")
|
||||
else()
|
||||
list(APPEND release "${fn}")
|
||||
@@ -75,9 +75,21 @@ endif()
|
||||
function(install_osg_plugins var)
|
||||
set(INSTALLEDPLUGINS)
|
||||
foreach(plugin ${OSGDB_PLUGINS_RELEASE} ${OSGWRAPPER_PLUGINS_RELEASE})
|
||||
install(FILES "${plugin}" DESTINATION "${OSG_PATH_TO_PLUGINS}")
|
||||
install(FILES "${plugin}"
|
||||
DESTINATION "${OSG_PATH_TO_PLUGINS}"
|
||||
CONFIGURATIONS Release RelWithDebInfo MinSizeRel)
|
||||
get_filename_component(name "${plugin}" NAME)
|
||||
list(APPEND INSTALLEDPLUGINS "${OSG_PATH_TO_PLUGINS}/${name}")
|
||||
endforeach()
|
||||
foreach(plugin ${OSGDB_PLUGINS_DEBUG} ${OSGWRAPPER_PLUGINS_DEBUG})
|
||||
install(FILES
|
||||
"${plugin}"
|
||||
DESTINATION
|
||||
"${OSG_PATH_TO_PLUGINS}"
|
||||
CONFIGURATIONS
|
||||
Debug)
|
||||
#get_filename_component(name "${plugin}" NAME)
|
||||
#list(APPEND INSTALLEDPLUGINS "${OSG_PATH_TO_PLUGINS}/${name}")
|
||||
endforeach()
|
||||
set(${var} ${INSTALLEDPLUGINS} PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
||||
@@ -35,8 +35,6 @@ int main(int argc, char* argv[]) {
|
||||
#if defined(__APPLE__)
|
||||
io_object_t _ioObject;
|
||||
IOHIDDeviceInterface122 **_interface;
|
||||
bool _gotdata;
|
||||
int _gotsize;
|
||||
unsigned char _buffer[512];
|
||||
IOReturn result = (*_interface)->setInterruptReportHandlerCallback(_interface,
|
||||
_buffer, 512,
|
||||
|
||||
@@ -165,7 +165,7 @@ function(create_dashboard_scripts)
|
||||
endif()
|
||||
|
||||
set(_msg)
|
||||
|
||||
|
||||
if(NOT DASHBOARDSCRIPT_BUILD_CONFIGURATION)
|
||||
set(DASHBOARDSCRIPT_BUILD_CONFIGURATION "RelWithDebInfo")
|
||||
endif()
|
||||
|
||||
@@ -97,7 +97,7 @@ macro(_launcher_system_settings)
|
||||
set(LAUNCHERS_GOT_GDB YES)
|
||||
if(GDB_HAS_RETURN_CHILD_RESULT)
|
||||
set(LAUNCHERS_GDB_ARG --return-child-result)
|
||||
endif()
|
||||
endif()
|
||||
else()
|
||||
set(LAUNCHERS_GOT_GDB)
|
||||
endif()
|
||||
|
||||
@@ -213,6 +213,7 @@ function(add_doxygen _doxyfile)
|
||||
else()
|
||||
add_custom_target(${DOC_TARGET} ALL)
|
||||
endif()
|
||||
|
||||
endif()
|
||||
|
||||
if(NOT IS_ABSOLUTE "${OUTPUT_DIRECTORY}")
|
||||
@@ -228,6 +229,28 @@ function(add_doxygen _doxyfile)
|
||||
"${OUTPUT_DIRECTORY}/html"
|
||||
"${OUTPUT_DIRECTORY}/latex")
|
||||
|
||||
if(NOT TARGET ${DOC_TARGET}_open)
|
||||
# Create a target to open the generated HTML file.
|
||||
if(WIN32)
|
||||
set(DOXYGEN_LAUNCHER_COMMAND start "Documentation")
|
||||
elseif(NOT APPLE)
|
||||
set(DOXYGEN_LAUNCHER_COMMAND xdg-open)
|
||||
endif()
|
||||
if(DOXYGEN_LAUNCHER_COMMAND)
|
||||
add_custom_target(${DOC_TARGET}_open
|
||||
COMMAND ${DOXYGEN_LAUNCHER_COMMAND} "${OUTPUT_DIRECTORY}/html/index.html")
|
||||
set_target_properties(${DOC_TARGET}_open
|
||||
PROPERTIES
|
||||
EXCLUDE_FROM_ALL
|
||||
TRUE)
|
||||
set_target_properties(${DOC_TARGET}_open
|
||||
PROPERTIES
|
||||
EXCLUDE_FROM_DEFAULT_BUILD
|
||||
TRUE)
|
||||
add_dependencies(${DOC_TARGET}_open ${DOC_TARGET})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
get_filename_component(_doxyfileabs "${_doxyfile}" ABSOLUTE)
|
||||
get_filename_component(INCLUDE_FILE "${_doxyfileabs}" NAME)
|
||||
get_filename_component(INCLUDE_PATH "${_doxyfileabs}" PATH)
|
||||
|
||||
@@ -31,8 +31,29 @@ macro(_enable_extra_compiler_warnings_flags)
|
||||
if(COMPILER_WARNINGS_EXTREME)
|
||||
set(_flags "${_flags} /Wall /wd4619 /wd4668 /wd4820 /wd4571 /wd4710")
|
||||
endif()
|
||||
elseif(CMAKE_COMPILER_IS_GNUCXX)
|
||||
set(_flags "-W -Wall")
|
||||
else()
|
||||
include(CheckCXXCompilerFlag)
|
||||
set(_flags)
|
||||
|
||||
check_cxx_compiler_flag(-W SUPPORTS_W_FLAG)
|
||||
if(SUPPORTS_W_FLAG)
|
||||
set(_flags "${_flags} -W")
|
||||
endif()
|
||||
|
||||
check_cxx_compiler_flag(-Wall SUPPORTS_WALL_FLAG)
|
||||
if(SUPPORTS_WALL_FLAG)
|
||||
set(_flags "${_flags} -Wall")
|
||||
endif()
|
||||
|
||||
check_cxx_compiler_flag(-Wextra SUPPORTS_WEXTRA_FLAG)
|
||||
if(SUPPORTS_WEXTRA_FLAG)
|
||||
set(_flags "${_flags} -Wextra")
|
||||
endif()
|
||||
|
||||
check_cxx_compiler_flag(-Weffc++ SUPPORTS_WEFFCXX_FLAG)
|
||||
if(SUPPORTS_WEFFCXX_FLAG)
|
||||
set(_flags "${_flags} -Weffc++")
|
||||
endif()
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
|
||||
@@ -54,7 +54,9 @@ function(add_file_copy_target _target _dest)
|
||||
get_filename_component(fullpath "${fn}" ABSOLUTE)
|
||||
get_filename_component(fn "${fn}" NAME)
|
||||
else()
|
||||
get_filename_component(fullpath "${CMAKE_CURRENT_SOURCE_DIR}/${fn}" ABSOLUTE)
|
||||
get_filename_component(fullpath
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/${fn}"
|
||||
ABSOLUTE)
|
||||
endif()
|
||||
|
||||
# Clean up output file name
|
||||
|
||||
202
FindAdrienne.cmake
Normal file
202
FindAdrienne.cmake
Normal file
@@ -0,0 +1,202 @@
|
||||
# - try to find Adrienne Electronics Corporation timecode card library
|
||||
#
|
||||
# SDK available from the manufacturer: http://www.adrielec.com/
|
||||
#
|
||||
# Cache Variables: (probably not for direct use in your scripts)
|
||||
# ADRIENNE_INCLUDE_DIR
|
||||
# ADRIENNE_LIBRARY
|
||||
# ADRIENNE_RUNTIME_LIBRARY
|
||||
# ADRIENNE_INCLUDE_FILE
|
||||
#
|
||||
# Variables you might use in your CMakeLists.txt:
|
||||
# ADRIENNE_FOUND
|
||||
# ADRIENNE_INCLUDE_DIRS
|
||||
# ADRIENNE_LIBRARIES
|
||||
# ADRIENNE_RUNTIME_LIBRARIES - the AEC_NTTC.dll file
|
||||
# ADRIENNE_RUNTIME_LIBRARY_DIRS
|
||||
#
|
||||
# ADRIENNE_INCLUDE_FILENAME - this is probably AEC_NTTC.h, but it might also
|
||||
# be AECINTTC.H.
|
||||
#
|
||||
# ADRIENNE_INCLUDE_HAS_EXTERN_C - Some (most) versions of the header already
|
||||
# wrap their definitions in extern "C" { }, but some do not.
|
||||
#
|
||||
# ADRIENNE_DEFINITIONS - defines a quoted ADRIENNE_INCLUDE_FILENAME as above,
|
||||
# so you can write a line like #include ADRIENNE_INCLUDE_FILENAME
|
||||
# Also defines ADRIENNE_BEFORE_INCLUDE and ADRIENNE_AFTER_INCLUDE to handle
|
||||
# adding extern "C" { and } if the header file doesn't do so itself.
|
||||
#
|
||||
# Variables that might be set by the user in the gui/command line to help
|
||||
# find the library:
|
||||
# ADRIENNE_ROOT_DIR - root of an Adrienne CD, disk, or extracted/copied contents
|
||||
# thereof.
|
||||
#
|
||||
# Requires these CMake modules:
|
||||
# FindPackageHandleStandardArgs (known included with CMake >=2.6.2)
|
||||
#
|
||||
# Original Author:
|
||||
# 2012 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net>
|
||||
# http://academic.cleardefinition.com
|
||||
# Iowa State University HCI Graduate Program/VRAC
|
||||
#
|
||||
# Copyright Iowa State University 2012.
|
||||
# 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)
|
||||
|
||||
# Apparently Windows only.
|
||||
if(WIN32 OR CYGWIN)
|
||||
set(ADRIENNE_ROOT_DIR
|
||||
"${ADRIENNE_ROOT_DIR}"
|
||||
CACHE
|
||||
PATH
|
||||
"Directory to search for Adrienne Electronics Timecode data - root of a software distribution or extracted download from http://www.adrielec.com/")
|
||||
|
||||
set(ADRIENNE_DEFINITIONS)
|
||||
|
||||
set(ADRIENNE_INCLUDE_SEARCH
|
||||
# from AecPCIeTC_8-12a: contains AEC_NTTC.h with extern "C" and three extra functions:
|
||||
# AEC_PCTC_OPEN_ALL, AEC_PCTC_CLOSE_ALL, AEC_PCTC_INITIALIZE_EVENT
|
||||
"SDK_SourceCode"
|
||||
|
||||
# from AecPci6_02_CD - called AECINTTC.H but otherwise essentially identical to earlier versions
|
||||
"TestPrograms_WithDLL/DLL_API_INFO"
|
||||
# A zipped development project contains essentially the same, named AEC_NTTC.h so we'll add this in case it's unzipped.
|
||||
"TestPrograms_WithDLL/ZippedDevelopmentProjects/AecMfc32_Rel504"
|
||||
|
||||
# from pc-ltc - called AECINTTC.H and lacks extern "C"
|
||||
"NT-CODE/C40-APP1"
|
||||
)
|
||||
set(ADRIENNE_HEADER_NAMES
|
||||
AEC_NTTC.H
|
||||
AEC_NTTC.h
|
||||
Aec_nttc.h
|
||||
AECINTTC.H)
|
||||
|
||||
set(ADRIENNE_LIB_SEARCH)
|
||||
set(ADRIENNE_DLL_SEARCH)
|
||||
|
||||
if(CMAKE_SIZEOF_VOID_P MATCHES "8")
|
||||
# 64 bit code - apparently initially packaged only in the
|
||||
# PCIe version of their software
|
||||
list(APPEND ADRIENNE_LIB_SEARCH
|
||||
# from AecPCIeTC_8-12a
|
||||
"64BitOS_files/DLL Versions")
|
||||
|
||||
list(APPEND ADRIENNE_DLL_SEARCH
|
||||
# from AecPCIeTC_8-12a
|
||||
"64BitOS_files/DLL Versions")
|
||||
else()
|
||||
# 32-bit code, much more prevalent.
|
||||
list(APPEND ADRIENNE_LIB_SEARCH
|
||||
# from AecPCIeTC_8-12a
|
||||
"32BitOS_files/DLLversions"
|
||||
|
||||
# from AecPci6_02_CD
|
||||
"TestPrograms_WithDLL/DLL_API_INFO"
|
||||
|
||||
# from pc-ltc
|
||||
"NT-CODE/DLL"
|
||||
)
|
||||
|
||||
list(APPEND ADRIENNE_DLL_SEARCH
|
||||
# from AecPCIeTC_8-12a
|
||||
"32BitOS_files/DLLversions"
|
||||
|
||||
# from AecPci6_02_CD
|
||||
"TestPrograms_WithDLL"
|
||||
|
||||
# from pc-ltc
|
||||
"NT-CODE/DLL")
|
||||
endif()
|
||||
|
||||
find_library(ADRIENNE_LIBRARY
|
||||
NAMES
|
||||
AEC_NTTC
|
||||
PATHS
|
||||
"${ADRIENNE_ROOT_DIR}"
|
||||
PATH_SUFFIXES
|
||||
${ADRIENNE_LIB_SEARCH})
|
||||
|
||||
find_path(ADRIENNE_INCLUDE_DIR
|
||||
NAMES
|
||||
${ADRIENNE_HEADER_NAMES}
|
||||
PATHS
|
||||
"${ADRIENNE_ROOT_DIR}"
|
||||
PATH_SUFFIXES
|
||||
${ADRIENNE_INCLUDE_SEARCH})
|
||||
|
||||
if(ADRIENNE_INCLUDE_DIR)
|
||||
find_file(ADRIENNE_INCLUDE_FILE
|
||||
NAMES
|
||||
${ADRIENNE_HEADER_NAMES}
|
||||
HINTS
|
||||
${ADRIENNE_INCLUDE_DIR})
|
||||
|
||||
# Get include filename
|
||||
get_filename_component(ADRIENNE_INCLUDE_FILENAME
|
||||
"${ADRIENNE_INCLUDE_FILE}"
|
||||
NAME)
|
||||
list(APPEND ADRIENNE_DEFINITIONS -DADRIENNE_INCLUDE_FILENAME="ADRIENNE_INCLUDE_FILENAME")
|
||||
|
||||
# Find out if it has extern "C" in it.
|
||||
file(STRINGS "${ADRIENNE_INCLUDE_FILE}" strings)
|
||||
set(ADRIENNE_INCLUDE_HAS_EXTERN_C OFF)
|
||||
foreach(_line ${strings})
|
||||
if("${_line}" STREQUAL "extern \"C\"")
|
||||
set(ADRIENNE_INCLUDE_HAS_EXTERN_C ON)
|
||||
break()
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
if(ADRIENNE_INCLUDE_HAS_EXTERN_C)
|
||||
list(APPEND ADRIENNE_DEFINITIONS -DADRIENNE_BEFORE_INCLUDE -DADRIENNE_AFTER_INCLUDE)
|
||||
else()
|
||||
list(APPEND ADRIENNE_DEFINITIONS "-DADRIENNE_BEFORE_INCLUDE=extern \"C\" {" "-DADRIENNE_AFTER_INCLUDE=}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
get_filename_component(_adrienne_libdir "${ADRIENNE_LIBRARY}" PATH)
|
||||
find_file(ADRIENNE_RUNTIME_LIBRARY
|
||||
NAMES
|
||||
AEC_NTTC.dll
|
||||
HINTS
|
||||
"${_adrienne_libdir}"
|
||||
"${_adrienne_libdir}/.."
|
||||
PATHS
|
||||
"${ADRIENNE_ROOT_DIR}"
|
||||
PATH_SUFFIXES
|
||||
${ADRIENNE_DLL_SEARCH})
|
||||
|
||||
|
||||
set(ADRIENNE_RUNTIME_LIBRARIES "${ADRIENNE_RUNTIME_LIBRARY}")
|
||||
get_filename_component(ADRIENNE_RUNTIME_LIBRARY_DIRS
|
||||
"${ADRIENNE_RUNTIME_LIBRARY}"
|
||||
PATH)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(Adrienne
|
||||
DEFAULT_MSG
|
||||
ADRIENNE_LIBRARY
|
||||
ADRIENNE_RUNTIME_LIBRARY
|
||||
ADRIENNE_INCLUDE_DIR
|
||||
ADRIENNE_INCLUDE_FILENAME)
|
||||
|
||||
if(ADRIENNE_FOUND)
|
||||
set(ADRIENNE_LIBRARIES "${ADRIENNE_LIBRARY}")
|
||||
set(ADRIENNE_INCLUDE_DIRS "${ADRIENNE_INCLUDE_DIR}")
|
||||
mark_as_advanced(ADRIENNE_ROOT_DIR)
|
||||
endif()
|
||||
|
||||
mark_as_advanced(
|
||||
ADRIENNE_LIBRARY
|
||||
ADRIENNE_RUNTIME_LIBRARY
|
||||
ADRIENNE_INCLUDE_DIR
|
||||
ADRIENNE_INCLUDE_FILE)
|
||||
else()
|
||||
set(ADRIENNE_FOUND OFF)
|
||||
set(ADRIENNE_SDK_IS_WINDOWS_ONLY NOTFOUND)
|
||||
find_package_handle_standard_args(Adrienne
|
||||
DEFAULT_MSG
|
||||
ADRIENNE_SDK_IS_WINDOWS_ONLY)
|
||||
endif()
|
||||
@@ -10,7 +10,7 @@
|
||||
# Useful configuration variables you might want to add to your cache:
|
||||
# CPPDOM_ROOT_DIR - A directory prefix to search
|
||||
# (a path that contains include/ as a subdirectory)
|
||||
# CPPDOM_ADDITIONAL_VERSIONS - Additional versions (outside of 0.7.8 to 1.0.0)
|
||||
# CPPDOM_ADDITIONAL_VERSIONS - Additional versions (outside of 0.7.8 to 1.2.0)
|
||||
# to use when constructing search names and paths
|
||||
#
|
||||
# This script will use Flagpoll, if found, to provide hints to the location
|
||||
@@ -26,11 +26,11 @@
|
||||
# and trigger an automatic re-run.
|
||||
#
|
||||
# Original Author:
|
||||
# 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net>
|
||||
# 2009-2012 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.
|
||||
# Copyright Iowa State University 2009-2012.
|
||||
# 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)
|
||||
@@ -41,6 +41,8 @@ set(_FP_PKG_NAME cppdom)
|
||||
|
||||
set(CPPDOM_VERSIONS
|
||||
${CPPDOM_ADDITIONAL_VERSIONS}
|
||||
1.3.0
|
||||
1.2.0
|
||||
1.1.2
|
||||
1.1.1
|
||||
1.1.0
|
||||
@@ -99,6 +101,28 @@ endif()
|
||||
|
||||
set(_ROOT_DIR "${CPPDOM_ROOT_DIR}")
|
||||
|
||||
if(CMAKE_SIZEOF_VOID_P MATCHES "8")
|
||||
set(_VRJ_LIBSUFFIXES lib64 lib)
|
||||
set(_VRJ_LIBDSUFFIXES
|
||||
debug
|
||||
lib64/x86_64/debug
|
||||
lib64/debug
|
||||
lib64
|
||||
lib/x86_64/debug
|
||||
lib/debug
|
||||
lib)
|
||||
set(_VRJ_LIBDSUFFIXES_ONLY
|
||||
debug
|
||||
lib64/x86_64/debug
|
||||
lib64/debug
|
||||
lib/x86_64/debug
|
||||
lib/debug)
|
||||
else()
|
||||
set(_VRJ_LIBSUFFIXES lib)
|
||||
set(_VRJ_LIBDSUFFIXES debug lib/i686/debug lib/debug lib)
|
||||
set(_VRJ_LIBDSUFFIXES_ONLY debug lib/i686/debug lib/debug)
|
||||
endif()
|
||||
|
||||
find_path(CPPDOM_INCLUDE_DIR
|
||||
${_HEADER}
|
||||
HINTS
|
||||
|
||||
@@ -184,6 +184,7 @@ if(DCUBED_FOUND)
|
||||
set(DCUBED_INCLUDE_DIRS
|
||||
"${DCUBED_CORE_INCLUDE_DIR}"
|
||||
"${DCUBED_CORE_INCLUDE_DIR}/if3"
|
||||
"${DCUBED_CORE_INCLUDE_DIR}/.."
|
||||
"${DCUBED_WRAPPER_INCLUDE_DIR}")
|
||||
mark_as_advanced(DCUBED_ROOT_DIR)
|
||||
endif()
|
||||
|
||||
180
FindDirectInput.cmake
Normal file
180
FindDirectInput.cmake
Normal file
@@ -0,0 +1,180 @@
|
||||
# - try to find DirectInput library (part of DirectX SDK)
|
||||
#
|
||||
# Cache Variables: (probably not for direct use in your scripts)
|
||||
# DIRECTINPUT_DXGUID_LIBRARY
|
||||
# DIRECTINPUT_DXERR_LIBRARY
|
||||
# DIRECTINPUT_DINPUT_LIBRARY
|
||||
# DIRECTINPUT_INCLUDE_DIR
|
||||
#
|
||||
# Non-cache variables you should use in your CMakeLists.txt:
|
||||
# DIRECTINPUT_LIBRARIES
|
||||
# DIRECTINPUT_INCLUDE_DIRS
|
||||
# DIRECTINPUT_FOUND - if this is not true, do not attempt to use this library
|
||||
#
|
||||
# Requires these CMake modules:
|
||||
# FindPackageHandleStandardArgs (known included with CMake >=2.6.2)
|
||||
#
|
||||
# Original Author:
|
||||
# 2011 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net>
|
||||
# http://academic.cleardefinition.com
|
||||
# Iowa State University HCI Graduate Program/VRAC
|
||||
#
|
||||
# Copyright Iowa State University 2011.
|
||||
# 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(DIRECTINPUT_ROOT_DIR
|
||||
"${DIRECTINPUT_ROOT_DIR}"
|
||||
CACHE
|
||||
PATH
|
||||
"Root directory to search for DirectX/DirectInput")
|
||||
|
||||
if(MSVC)
|
||||
file(TO_CMAKE_PATH "$ENV{ProgramFiles}" _PROG_FILES)
|
||||
file(TO_CMAKE_PATH "$ENV{ProgramFiles(x86)}" _PROG_FILES_X86)
|
||||
if(_PROG_FILES_X86)
|
||||
set(_PROG_FILES "${_PROG_FILES_X86}")
|
||||
endif()
|
||||
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||
set(_lib_suffixes lib/x64 lib)
|
||||
else()
|
||||
set(_lib_suffixes lib/x86 lib)
|
||||
endif()
|
||||
macro(_append_dxsdk_in_inclusive_range _low _high)
|
||||
if((NOT MSVC_VERSION LESS ${_low}) AND (NOT MSVC_VERSION GREATER ${_high}))
|
||||
list(APPEND DXSDK_DIRS ${ARGN})
|
||||
endif()
|
||||
endmacro()
|
||||
_append_dxsdk_in_inclusive_range(1500 1600 "${_PROG_FILES}/Microsoft DirectX SDK (June 2010)")
|
||||
_append_dxsdk_in_inclusive_range(1400 1600
|
||||
"${_PROG_FILES}/Microsoft DirectX SDK (February 2010)"
|
||||
"${_PROG_FILES}/Microsoft DirectX SDK (August 2009)"
|
||||
"${_PROG_FILES}/Microsoft DirectX SDK (March 2009)"
|
||||
"${_PROG_FILES}/Microsoft DirectX SDK (November 2008)"
|
||||
"${_PROG_FILES}/Microsoft DirectX SDK (August 2008)"
|
||||
"${_PROG_FILES}/Microsoft DirectX SDK (June 2008)"
|
||||
"${_PROG_FILES}/Microsoft DirectX SDK (March 2008)")
|
||||
_append_dxsdk_in_inclusive_range(1310 1500
|
||||
"${_PROG_FILES}/Microsoft DirectX SDK (November 2007)"
|
||||
"${_PROG_FILES}/Microsoft DirectX SDK (August 2007)"
|
||||
"${_PROG_FILES}/Microsoft DirectX SDK (June 2007)"
|
||||
"${_PROG_FILES}/Microsoft DirectX SDK (April 2007)"
|
||||
"${_PROG_FILES}/Microsoft DirectX SDK (February 2007)"
|
||||
"${_PROG_FILES}/Microsoft DirectX SDK (December 2006)"
|
||||
"${_PROG_FILES}/Microsoft DirectX SDK (October 2006)"
|
||||
"${_PROG_FILES}/Microsoft DirectX SDK (August 2006)"
|
||||
"${_PROG_FILES}/Microsoft DirectX SDK (June 2006)"
|
||||
"${_PROG_FILES}/Microsoft DirectX SDK (April 2006)"
|
||||
"${_PROG_FILES}/Microsoft DirectX SDK (February 2006)")
|
||||
|
||||
file(TO_CMAKE_PATH "$ENV{DXSDK_DIR}" ENV_DXSDK_DIR)
|
||||
if(ENV_DXSDK_DIR)
|
||||
list(APPEND DXSDK_DIRS ${ENV_DXSDK_DIR})
|
||||
endif()
|
||||
else()
|
||||
set(_lib_suffixes lib)
|
||||
set(DXSDK_DIRS /mingw)
|
||||
endif()
|
||||
|
||||
find_path(DIRECTINPUT_INCLUDE_DIR
|
||||
NAMES
|
||||
dinput.h
|
||||
PATHS
|
||||
${DXSDK_DIRS}
|
||||
HINTS
|
||||
"${DIRECTINPUT_ROOT_DIR}"
|
||||
PATH_SUFFIXES
|
||||
include)
|
||||
|
||||
find_library(DIRECTINPUT_DXGUID_LIBRARY
|
||||
NAMES
|
||||
dxguid
|
||||
PATHS
|
||||
${DXSDK_DIRS}
|
||||
HINTS
|
||||
"${DIRECTINPUT_ROOT_DIR}"
|
||||
PATH_SUFFIXES
|
||||
${_lib_suffixes})
|
||||
|
||||
if(DIRECTINPUT_DXGUID_LIBRARY)
|
||||
get_filename_component(_dinput_lib_dir
|
||||
${DIRECTINPUT_DXGUID_LIBRARY}
|
||||
PATH)
|
||||
endif()
|
||||
|
||||
find_library(DIRECTINPUT_DINPUT_LIBRARY
|
||||
NAMES
|
||||
dinput8
|
||||
dinput
|
||||
PATHS
|
||||
${DXSDK_DIRS}
|
||||
HINTS
|
||||
"${_dinput_lib_dir}"
|
||||
"${DIRECTINPUT_ROOT_DIR}"
|
||||
PATH_SUFFIXES
|
||||
${_lib_suffixes})
|
||||
|
||||
find_library(DIRECTINPUT_DXERR_LIBRARY
|
||||
NAMES
|
||||
dxerr
|
||||
dxerr9
|
||||
dxerr8
|
||||
PATHS
|
||||
${DXSDK_DIRS}
|
||||
HINTS
|
||||
"${_dinput_lib_dir}"
|
||||
"${DIRECTINPUT_ROOT_DIR}"
|
||||
PATH_SUFFIXES
|
||||
${_lib_suffixes})
|
||||
set(DIRECTINPUT_EXTRA_CHECK)
|
||||
if(DIRECTINPUT_INCLUDE_DIR)
|
||||
if(MSVC80)
|
||||
set(DXSDK_DEPRECATION_BUILD 1962)
|
||||
endif()
|
||||
|
||||
if(DXSDK_DEPRECATION_BUILD)
|
||||
include(CheckCSourceCompiles)
|
||||
set(_dinput_old_includes ${CMAKE_REQUIRED_INCLUDES})
|
||||
set(CMAKE_REQUIRED_INCLUDES "${DIRECTINPUT_INCLUDE_DIR}")
|
||||
check_c_source_compiles(
|
||||
"
|
||||
#include <dxsdkver.h>
|
||||
#if _DXSDK_BUILD_MAJOR >= ${DXSDK_DEPRECATION_BUILD}
|
||||
#error
|
||||
#else
|
||||
int main(int argc, char * argv[]) {
|
||||
return 0;
|
||||
}
|
||||
"
|
||||
DIRECTINPUT_SDK_SUPPORTS_COMPILER)
|
||||
set(DIRECTINPUT_EXTRA_CHECK DIRECTINPUT_SDK_SUPPORTS_COMPILER)
|
||||
set(CMAKE_REQUIRED_INCLUDES "${_dinput_old_includes}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(DirectInput
|
||||
DEFAULT_MSG
|
||||
DIRECTINPUT_DINPUT_LIBRARY
|
||||
DIRECTINPUT_DXGUID_LIBRARY
|
||||
DIRECTINPUT_DXERR_LIBRARY
|
||||
DIRECTINPUT_INCLUDE_DIR
|
||||
${DIRECTINPUT_EXTRA_CHECK})
|
||||
|
||||
if(DIRECTINPUT_FOUND)
|
||||
set(DIRECTINPUT_LIBRARIES
|
||||
"${DIRECTINPUT_DXGUID_LIBRARY}"
|
||||
"${DIRECTINPUT_DXERR_LIBRARY}"
|
||||
"${DIRECTINPUT_DINPUT_LIBRARY}")
|
||||
|
||||
set(DIRECTINPUT_INCLUDE_DIRS "${DIRECTINPUT_INCLUDE_DIR}")
|
||||
|
||||
mark_as_advanced(DIRECTINPUT_ROOT_DIR)
|
||||
endif()
|
||||
|
||||
mark_as_advanced(DIRECTINPUT_DINPUT_LIBRARY
|
||||
DIRECTINPUT_DXGUID_LIBRARY
|
||||
DIRECTINPUT_DXERR_LIBRARY
|
||||
DIRECTINPUT_INCLUDE_DIR)
|
||||
126
FindDirectShow.cmake
Normal file
126
FindDirectShow.cmake
Normal file
@@ -0,0 +1,126 @@
|
||||
# - Find Microsoft DirectShow sample files, library, and headers.
|
||||
#
|
||||
# DIRECTSHOW_INCLUDE_DIRS - where to find needed include file
|
||||
# DIRECTSHOW_BASECLASS_DIR- Directory containing the DirectShow baseclass sample code.
|
||||
# DIRECTSHOW_FOUND - True if DirectShow found.
|
||||
#
|
||||
# Requires these CMake modules:
|
||||
# FindPackageHandleStandardArgs (known included with CMake >=2.6.2)
|
||||
#
|
||||
# Initially in VRPN - Distributed under the Boost Software License, Version 1.0.
|
||||
#
|
||||
# Almost entirely re-written by:
|
||||
# 2012 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net>
|
||||
# http://academic.cleardefinition.com
|
||||
# Iowa State University HCI Graduate Program/VRAC
|
||||
#
|
||||
# Copyright Iowa State University 2012.
|
||||
# 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)
|
||||
|
||||
# Look for one of the sample files.
|
||||
|
||||
find_package(WindowsSDK)
|
||||
find_package(DirectX QUIET)
|
||||
|
||||
set(DIRECTSHOW_WINDOWSSDK_ROOT
|
||||
"${DIRECTSHOW_WINDOWSSDK_ROOT}"
|
||||
CACHE
|
||||
PATH
|
||||
"A specific Windows SDK to use for DirectShow.")
|
||||
|
||||
if(MSVC AND CMAKE_CL_64)
|
||||
set(DIRECTSHOW_LIB_SUBDIR /x64)
|
||||
else()
|
||||
set(DIRECTSHOW_LIB_SUBDIR)
|
||||
endif()
|
||||
|
||||
set(_acceptable_winsdk)
|
||||
if(WINDOWSSDK_FOUND)
|
||||
foreach(_sdkdir ${WINDOWSSDK_DIRS})
|
||||
if(EXISTS "${_sdkdir}/Samples/Multimedia/DirectShow/BaseClasses/streams.h"
|
||||
AND EXISTS "${_sdkdir}/Lib${DIRECTSHOW_LIB_SUBDIR}/strmiids.lib"
|
||||
AND EXISTS "${_sdkdir}/Include/DShow.h")
|
||||
list(APPEND _acceptable_winsdk "${_sdkdir}")
|
||||
endif()
|
||||
endforeach()
|
||||
endif()
|
||||
|
||||
find_path(DIRECTSHOW_BASECLASS_DIR
|
||||
NAMES
|
||||
streams.h
|
||||
HINTS
|
||||
"${DIRECTSHOW_WINDOWSSDK_ROOT}"
|
||||
PATHS
|
||||
${_acceptable_winsdk}
|
||||
PATH_SUFFIXES
|
||||
"Samples/Multimedia/DirectShow/BaseClasses")
|
||||
|
||||
find_path(DIRECTSHOW_WINDOWSSDK_INCLUDE_DIR
|
||||
NAMES
|
||||
DShow.h
|
||||
HINTS
|
||||
"${DIRECTSHOW_WINDOWSSDK_ROOT}"
|
||||
PATHS
|
||||
${_acceptable_winsdk}
|
||||
PATH_SUFFIXES
|
||||
"Include")
|
||||
|
||||
# This one we can grab from another SDK version.
|
||||
find_path(DIRECTSHOW_QEDIT_INCLUDE_DIR
|
||||
NAMES
|
||||
qedit.h
|
||||
HINTS
|
||||
"${DIRECTSHOW_WINDOWSSDK_ROOT}"
|
||||
PATHS
|
||||
${WINDOWSSDK_DIRS}
|
||||
PATH_SUFFIXES
|
||||
"Include")
|
||||
|
||||
find_library(DIRECTSHOW_STRMIIDS_LIBRARY
|
||||
NAMES
|
||||
strmiids
|
||||
HINTS
|
||||
"${DIRECTSHOW_WINDOWSSDK_ROOT}"
|
||||
PATHS
|
||||
${_acceptable_winsdk}
|
||||
PATH_SUFFIXES
|
||||
"Lib${DIRECTSHOW_LIB_SUBDIR}")
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(DirectShow
|
||||
DEFAULT_MSG
|
||||
DIRECTSHOW_BASECLASS_DIR
|
||||
DIRECTSHOW_WINDOWSSDK_INCLUDE_DIR
|
||||
DIRECTSHOW_QEDIT_INCLUDE_DIR
|
||||
DIRECTX_INCLUDE_DIR
|
||||
DIRECTX_FOUND
|
||||
DIRECTSHOW_STRMIIDS_LIBRARY)
|
||||
|
||||
if(DIRECTSHOW_FOUND)
|
||||
set(DIRECTSHOW_INCLUDE_DIRS
|
||||
# Baseclass must be before SDK so it gets the correct refclock.h
|
||||
"${DIRECTSHOW_BASECLASS_DIR}"
|
||||
"${DIRECTSHOW_WINDOWSSDK_INCLUDE_DIR}"
|
||||
"${DIRECTX_INCLUDE_DIR}"
|
||||
)
|
||||
if(EXISTS "${DIRECTSHOW_WINDOWSSDK_INCLUDE_DIR}/atl/atlbase.h")
|
||||
list(APPEND
|
||||
DIRECTSHOW_INCLUDE_DIRS
|
||||
"${DIRECTSHOW_WINDOWSSDK_INCLUDE_DIR}/atl")
|
||||
endif()
|
||||
if(NOT "${DIRECTSHOW_QEDIT_INCLUDE_DIR}" STREQUAL "${DIRECTSHOW_WINDOWSSDK_INCLUDE_DIR}")
|
||||
# QEdit include dir might be an older SDK, so put it last.
|
||||
list(APPEND DIRECTSHOW_INCLUDE_DIRS "${DIRECTSHOW_QEDIT_INCLUDE_DIR}")
|
||||
endif()
|
||||
|
||||
set(DIRECTSHOW_LIBRARIES "${DIRECTSHOW_STRMIIDS_LIBRARY}")
|
||||
|
||||
mark_as_advanced(DIRECTSHOW_WINDOWSSDK_ROOT)
|
||||
endif()
|
||||
|
||||
mark_as_advanced(DIRECTSHOW_BASECLASS_DIR
|
||||
DIRECTSHOW_WINDOWSSDK_INCLUDE_DIR
|
||||
DIRECTSHOW_QEDIT_INCLUDE_DIR
|
||||
DIRECTSHOW_STRMIIDS_LIBRARY)
|
||||
244
FindDirectX.cmake
Normal file
244
FindDirectX.cmake
Normal file
@@ -0,0 +1,244 @@
|
||||
# - try to find part of DirectX SDK
|
||||
#
|
||||
# Cache Variables: (probably not for direct use in your scripts)
|
||||
# DIRECTX_INCLUDE_DIR
|
||||
#
|
||||
# Variables you should use in your CMakeLists.txt:
|
||||
# DIRECTX_DXGUID_LIBRARY
|
||||
# DIRECTX_DXERR_LIBRARY
|
||||
# DIRECTX_DINPUT_LIBRARY
|
||||
# DIRECTX_DINPUT_INCLUDE_DIR
|
||||
# DIRECTX_D3D9_LIBRARY
|
||||
# DIRECTX_D3DXOF_LIBRARY
|
||||
# DIRECTX_D3DX9_LIBRARIES
|
||||
# DIRECTX_INCLUDE_DIRS
|
||||
# DIRECTX_FOUND - if this is not true, do not attempt to use this library
|
||||
#
|
||||
# Requires these CMake modules:
|
||||
# FindPackageHandleStandardArgs (known included with CMake >=2.6.2)
|
||||
# SelectLibraryConfigurations
|
||||
#
|
||||
# Original Author:
|
||||
# 2012 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net>
|
||||
# http://academic.cleardefinition.com
|
||||
# Iowa State University HCI Graduate Program/VRAC
|
||||
#
|
||||
# Copyright Iowa State University 2012.
|
||||
# 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(DIRECTX_ROOT_DIR
|
||||
"${DIRECTX_ROOT_DIR}"
|
||||
CACHE
|
||||
PATH
|
||||
"Root directory to search for DirectX")
|
||||
|
||||
if(MSVC)
|
||||
file(TO_CMAKE_PATH "$ENV{ProgramFiles}" _PROG_FILES)
|
||||
file(TO_CMAKE_PATH "$ENV{ProgramFiles(x86)}" _PROG_FILES_X86)
|
||||
if(_PROG_FILES_X86)
|
||||
set(_PROG_FILES "${_PROG_FILES_X86}")
|
||||
endif()
|
||||
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||
set(_lib_suffixes lib/x64 lib)
|
||||
else()
|
||||
set(_lib_suffixes lib/x86 lib)
|
||||
endif()
|
||||
macro(_append_dxsdk_in_inclusive_range _low _high)
|
||||
if((NOT MSVC_VERSION LESS ${_low}) AND (NOT MSVC_VERSION GREATER ${_high}))
|
||||
list(APPEND DXSDK_DIRS ${ARGN})
|
||||
endif()
|
||||
endmacro()
|
||||
_append_dxsdk_in_inclusive_range(1500 1600 "${_PROG_FILES}/Microsoft DirectX SDK (June 2010)")
|
||||
_append_dxsdk_in_inclusive_range(1400 1600
|
||||
"${_PROG_FILES}/Microsoft DirectX SDK (February 2010)"
|
||||
"${_PROG_FILES}/Microsoft DirectX SDK (August 2009)"
|
||||
"${_PROG_FILES}/Microsoft DirectX SDK (March 2009)"
|
||||
"${_PROG_FILES}/Microsoft DirectX SDK (November 2008)"
|
||||
"${_PROG_FILES}/Microsoft DirectX SDK (August 2008)"
|
||||
"${_PROG_FILES}/Microsoft DirectX SDK (June 2008)"
|
||||
"${_PROG_FILES}/Microsoft DirectX SDK (March 2008)")
|
||||
_append_dxsdk_in_inclusive_range(1310 1500
|
||||
"${_PROG_FILES}/Microsoft DirectX SDK (November 2007)"
|
||||
"${_PROG_FILES}/Microsoft DirectX SDK (August 2007)"
|
||||
"${_PROG_FILES}/Microsoft DirectX SDK (June 2007)"
|
||||
"${_PROG_FILES}/Microsoft DirectX SDK (April 2007)"
|
||||
"${_PROG_FILES}/Microsoft DirectX SDK (February 2007)"
|
||||
"${_PROG_FILES}/Microsoft DirectX SDK (December 2006)"
|
||||
"${_PROG_FILES}/Microsoft DirectX SDK (October 2006)"
|
||||
"${_PROG_FILES}/Microsoft DirectX SDK (August 2006)"
|
||||
"${_PROG_FILES}/Microsoft DirectX SDK (June 2006)"
|
||||
"${_PROG_FILES}/Microsoft DirectX SDK (April 2006)"
|
||||
"${_PROG_FILES}/Microsoft DirectX SDK (February 2006)")
|
||||
|
||||
file(TO_CMAKE_PATH "$ENV{DXSDK_DIR}" ENV_DXSDK_DIR)
|
||||
if(ENV_DXSDK_DIR)
|
||||
list(APPEND DXSDK_DIRS ${ENV_DXSDK_DIR})
|
||||
endif()
|
||||
else()
|
||||
set(_lib_suffixes lib)
|
||||
set(DXSDK_DIRS /mingw)
|
||||
endif()
|
||||
|
||||
find_path(DIRECTX_INCLUDE_DIR
|
||||
NAMES
|
||||
dxdiag.h
|
||||
dinput.h
|
||||
dxerr8.h
|
||||
PATHS
|
||||
${DXSDK_DIRS}
|
||||
HINTS
|
||||
"${DIRECTX_ROOT_DIR}"
|
||||
PATH_SUFFIXES
|
||||
include)
|
||||
find_path(DIRECTX_DINPUT_INCLUDE_DIR
|
||||
NAMES
|
||||
dinput.h
|
||||
PATHS
|
||||
${DXSDK_DIRS}
|
||||
HINTS
|
||||
"${DIRECTX_ROOT_DIR}"
|
||||
PATH_SUFFIXES
|
||||
include)
|
||||
|
||||
find_library(DIRECTX_DXGUID_LIBRARY
|
||||
NAMES
|
||||
dxguid
|
||||
PATHS
|
||||
${DXSDK_DIRS}
|
||||
HINTS
|
||||
"${DIRECTX_ROOT_DIR}"
|
||||
PATH_SUFFIXES
|
||||
${_lib_suffixes})
|
||||
|
||||
if(DIRECTX_DXGUID_LIBRARY)
|
||||
get_filename_component(_dxsdk_lib_dir ${DIRECTX_DXGUID_LIBRARY} PATH)
|
||||
endif()
|
||||
|
||||
find_library(DIRECTX_DINPUT_LIBRARY
|
||||
NAMES
|
||||
dinput8
|
||||
dinput
|
||||
PATHS
|
||||
${DXSDK_DIRS}
|
||||
HINTS
|
||||
"${_dxsdk_lib_dir}"
|
||||
"${DIRECTX_ROOT_DIR}"
|
||||
PATH_SUFFIXES
|
||||
${_lib_suffixes})
|
||||
|
||||
find_library(DIRECTX_DXERR_LIBRARY
|
||||
NAMES
|
||||
dxerr
|
||||
dxerr9
|
||||
dxerr8
|
||||
PATHS
|
||||
${DXSDK_DIRS}
|
||||
HINTS
|
||||
"${_dxsdk_lib_dir}"
|
||||
"${DIRECTX_ROOT_DIR}"
|
||||
PATH_SUFFIXES
|
||||
${_lib_suffixes})
|
||||
|
||||
find_library(DIRECTX_D3D9_LIBRARY
|
||||
NAMES
|
||||
d3d9
|
||||
PATHS
|
||||
${DXSDK_DIRS}
|
||||
HINTS
|
||||
"${_dxsdk_lib_dir}"
|
||||
"${DIRECTX_ROOT_DIR}"
|
||||
PATH_SUFFIXES
|
||||
${_lib_suffixes})
|
||||
|
||||
find_library(DIRECTX_D3DXOF_LIBRARY
|
||||
NAMES
|
||||
d3dxof
|
||||
PATHS
|
||||
${DXSDK_DIRS}
|
||||
HINTS
|
||||
"${_dxsdk_lib_dir}"
|
||||
"${DIRECTX_ROOT_DIR}"
|
||||
PATH_SUFFIXES
|
||||
${_lib_suffixes})
|
||||
|
||||
find_library(DIRECTX_D3DX9_LIBRARY_RELEASE
|
||||
NAMES
|
||||
d3dx9
|
||||
PATHS
|
||||
${DXSDK_DIRS}
|
||||
HINTS
|
||||
"${_dxsdk_lib_dir}"
|
||||
"${DIRECTX_ROOT_DIR}"
|
||||
PATH_SUFFIXES
|
||||
${_lib_suffixes})
|
||||
|
||||
find_library(DIRECTX_D3DX9_LIBRARY_DEBUG
|
||||
NAMES
|
||||
d3dx9d
|
||||
PATHS
|
||||
${DXSDK_DIRS}
|
||||
HINTS
|
||||
"${_dxsdk_lib_dir}"
|
||||
"${DIRECTX_ROOT_DIR}"
|
||||
PATH_SUFFIXES
|
||||
${_lib_suffixes})
|
||||
|
||||
include(SelectLibraryConfigurations)
|
||||
select_library_configurations(DIRECTX_D3DX9)
|
||||
|
||||
set(DIRECTX_EXTRA_CHECK)
|
||||
if(DIRECTX_INCLUDE_DIR)
|
||||
if(MSVC80)
|
||||
set(DXSDK_DEPRECATION_BUILD 1962)
|
||||
endif()
|
||||
|
||||
if(DXSDK_DEPRECATION_BUILD)
|
||||
include(CheckCSourceCompiles)
|
||||
set(_dinput_old_includes ${CMAKE_REQUIRED_INCLUDES})
|
||||
set(CMAKE_REQUIRED_INCLUDES "${DIRECTX_INCLUDE_DIR}")
|
||||
check_c_source_compiles("
|
||||
#include <dxsdkver.h>
|
||||
#if _DXSDK_BUILD_MAJOR >= ${DXSDK_DEPRECATION_BUILD}
|
||||
#error
|
||||
#else
|
||||
int main(int argc, char * argv[]) {
|
||||
return 0;
|
||||
}
|
||||
"
|
||||
DIRECTX_SDK_SUPPORTS_COMPILER)
|
||||
set(DIRECTX_EXTRA_CHECK DIRECTX_SDK_SUPPORTS_COMPILER)
|
||||
set(CMAKE_REQUIRED_INCLUDES "${_dinput_old_includes}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(DirectX
|
||||
DEFAULT_MSG
|
||||
DIRECTX_DXGUID_LIBRARY
|
||||
DIRECTX_DINPUT_LIBRARY
|
||||
DIRECTX_DXERR_LIBRARY
|
||||
DIRECTX_INCLUDE_DIR
|
||||
${DIRECTX_EXTRA_CHECK})
|
||||
|
||||
if(DIRECTX_FOUND)
|
||||
set(DIRECTX_LIBRARIES
|
||||
"${DIRECTX_DXGUID_LIBRARY}"
|
||||
"${DIRECTX_DXERR_LIBRARY}"
|
||||
"${DIRECTX_DINPUT_LIBRARY}")
|
||||
|
||||
set(DIRECTX_INCLUDE_DIRS "${DIRECTX_INCLUDE_DIR}")
|
||||
|
||||
mark_as_advanced(DIRECTX_ROOT_DIR)
|
||||
endif()
|
||||
|
||||
mark_as_advanced(DIRECTX_DINPUT_LIBRARY
|
||||
DIRECTX_DXGUID_LIBRARY
|
||||
DIRECTX_DXERR_LIBRARY
|
||||
DIRECTX_D3D9_LIBRARY
|
||||
DIRECTX_D3DXOF_LIBRARY
|
||||
DIRECTX_D3DX9_LIBRARY_RELEASE
|
||||
DIRECTX_D3DX9_LIBRARY_DEBUG
|
||||
DIRECTX_INCLUDE_DIR)
|
||||
@@ -36,17 +36,31 @@ find_program(GDB_COMMAND
|
||||
libexec)
|
||||
|
||||
if(GDB_COMMAND)
|
||||
execute_process(COMMAND gdb --version
|
||||
COMMAND head -n 1
|
||||
OUTPUT_VARIABLE GDB_VERSION
|
||||
execute_process(COMMAND
|
||||
gdb
|
||||
--version
|
||||
COMMAND
|
||||
head
|
||||
-n
|
||||
1
|
||||
OUTPUT_VARIABLE
|
||||
GDB_VERSION
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
string(REGEX REPLACE "[^0-9]*([0-9]+[0-9.]*).*" "\\1" GDB_VERSION "${GDB_VERSION}")
|
||||
string(REGEX
|
||||
REPLACE
|
||||
"[^0-9]*([0-9]+[0-9.]*).*"
|
||||
"\\1"
|
||||
GDB_VERSION
|
||||
"${GDB_VERSION}")
|
||||
endif()
|
||||
|
||||
# handle the QUIETLY and REQUIRED arguments and set xxx_FOUND to TRUE if
|
||||
# all listed variables are TRUE
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(GDB DEFAULT_MSG GDB_COMMAND GDB_VERSION)
|
||||
find_package_handle_standard_args(GDB
|
||||
DEFAULT_MSG
|
||||
GDB_COMMAND
|
||||
GDB_VERSION)
|
||||
|
||||
if(GDB_FOUND)
|
||||
mark_as_advanced(GDB_ROOT_DIR)
|
||||
|
||||
@@ -40,6 +40,7 @@ find_path(GHOST_INCLUDE_DIR
|
||||
|
||||
find_library(GHOST_LIBRARY
|
||||
GHOST40
|
||||
GHOST31
|
||||
PATHS
|
||||
${_dirs}
|
||||
HINTS
|
||||
@@ -47,20 +48,27 @@ find_library(GHOST_LIBRARY
|
||||
PATH_SUFFIXES
|
||||
lib)
|
||||
|
||||
if(MSVC_VERSION GREATER 1300)
|
||||
# .NET and newer: fake the STL headers
|
||||
get_filename_component(_moddir "${CMAKE_CURRENT_LIST_FILE}" PATH)
|
||||
set(GHOST_STL_INCLUDE_DIR "${_moddir}/ghost-fake-stl")
|
||||
if(MSVC)
|
||||
if(MSVC_VERSION GREATER 1300)
|
||||
# .NET and newer: fake the STL headers
|
||||
get_filename_component(_moddir "${CMAKE_CURRENT_LIST_FILE}" PATH)
|
||||
set(GHOST_STL_INCLUDE_DIR "${_moddir}/ghost-fake-stl")
|
||||
else()
|
||||
# 6.0 and earlier - use GHOST-provided STL
|
||||
find_path(GHOST_STL_INCLUDE_DIR
|
||||
vector.h
|
||||
PATHS
|
||||
${_dirs}
|
||||
HINTS
|
||||
"${GHOST_ROOT_DIR}"
|
||||
"${GHOST_INCLUDE_DIR}"
|
||||
PATH_SUFFIXES
|
||||
external/stl
|
||||
stl)
|
||||
endif()
|
||||
set(_deps_check GHOST_STL_INCLUDE_DIR)
|
||||
else()
|
||||
# 6.0 and earlier - use GHOST-provided STL
|
||||
find_path(GHOST_STL_INCLUDE_DIR
|
||||
vector.h
|
||||
PATHS
|
||||
${_dirs}
|
||||
HINTS
|
||||
"${GHOST_ROOT_DIR}"
|
||||
PATH_SUFFIXES
|
||||
external/stl)
|
||||
set(_deps_check)
|
||||
endif()
|
||||
|
||||
# handle the QUIETLY and REQUIRED arguments and set xxx_FOUND to TRUE if
|
||||
@@ -69,18 +77,14 @@ include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(GHOST
|
||||
DEFAULT_MSG
|
||||
GHOST_LIBRARY
|
||||
GHOST_STL_INCLUDE_DIR
|
||||
${_deps_check}
|
||||
GHOST_INCLUDE_DIR)
|
||||
|
||||
if(GHOST_FOUND)
|
||||
set(GHOST_LIBRARIES "${GHOST_LIBRARY}")
|
||||
set(GHOST_INCLUDE_DIRS
|
||||
"${GHOST_STL_INCLUDE_DIR}"
|
||||
"${GHOST_INCLUDE_DIR}")
|
||||
set(GHOST_INCLUDE_DIRS "${GHOST_INCLUDE_DIR}")
|
||||
|
||||
mark_as_advanced(GHOST_ROOT_DIR)
|
||||
endif()
|
||||
|
||||
mark_as_advanced(GHOST_LIBRARY
|
||||
GHOST_STL_INCLUDE_DIR
|
||||
GHOST_INCLUDE_DIR)
|
||||
mark_as_advanced(GHOST_LIBRARY GHOST_STL_INCLUDE_DIR GHOST_INCLUDE_DIR)
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
# Useful configuration variables you might want to add to your cache:
|
||||
# GMTL_ROOT_DIR - A directory prefix to search
|
||||
# (a path that contains include/ as a subdirectory)
|
||||
# GMTL_ADDITIONAL_VERSIONS - Additional versions (outside of 0.5.1 to 0.6.2)
|
||||
# GMTL_ADDITIONAL_VERSIONS - Additional versions (outside of 0.5.1 to 0.7.0)
|
||||
# to use when constructing search names and paths
|
||||
#
|
||||
# This script will use Flagpoll, if found, to provide hints to the location
|
||||
@@ -24,11 +24,11 @@
|
||||
# and trigger an automatic re-run.
|
||||
#
|
||||
# Original Author:
|
||||
# 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net>
|
||||
# 2009-2012 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.
|
||||
# Copyright Iowa State University 2009-2012.
|
||||
# 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)
|
||||
@@ -41,6 +41,7 @@ include(CheckVersion)
|
||||
|
||||
set(GMTL_VERSIONS
|
||||
${GMTL_ADDITIONAL_VERSIONS}
|
||||
0.7.0
|
||||
0.6.2
|
||||
0.6.1
|
||||
0.6.0
|
||||
|
||||
@@ -37,11 +37,15 @@
|
||||
# Brandon Newendorp <brandon@newendorp.com>
|
||||
|
||||
set(_HUMAN "Gadgeteer 2.0")
|
||||
set(_RELEASE_NAMES gadget-2_0 libgadget-2_0 gadget-2_0_0)
|
||||
set(_DEBUG_NAMES gadget_d-2_0 libgadget_d-2_0 gadget_d-2_0_0)
|
||||
set(_FP_PKG_NAME gadgeteer)
|
||||
set(_RELEASE_NAMES)
|
||||
set(_DEBUG_NAMES)
|
||||
foreach(VER 2_0 2_0_0 2_0_1 2_0_2)
|
||||
list(APPEND _RELEASE_NAMES gadget-${VER})
|
||||
list(APPEND _DEBUG_NAMES gadget_d-${VER})
|
||||
endforeach()
|
||||
set(_DIR gadgeteer-2.0)
|
||||
set(_HEADER gadget/gadgetConfig.h)
|
||||
set(_FP_PKG_NAME gadgeteer)
|
||||
|
||||
include(SelectLibraryConfigurations)
|
||||
include(CreateImportedTarget)
|
||||
|
||||
92
FindIDLJ.cmake
Normal file
92
FindIDLJ.cmake
Normal file
@@ -0,0 +1,92 @@
|
||||
# - try to find Java's IDLJ Interface Definition Language compiler.
|
||||
#
|
||||
# Ideally used with CMake 2.8.5 or newer for Java support using FindJava.cmake
|
||||
# and UseJava.cmake
|
||||
#
|
||||
# Variables:
|
||||
# Java_IDLJ_COMMAND, executable for idlj
|
||||
# IDLJ_FOUND, If false, do not try to use this
|
||||
#
|
||||
# Function:
|
||||
# java_idlj(varname idlfile [extra idlj args]) - Generates
|
||||
# the Java source files from the IDL file you indicate, and
|
||||
# appends filenames suitable to add to a add_jar() call to the
|
||||
# variable you specified.
|
||||
#
|
||||
# Because the files generated from an IDL file are not entirely predictable,
|
||||
# java_idlj runs idlj in the cmake step, rather than the build step, and triggers
|
||||
# a CMake re-run when an idl file is modified. Already up-to-date generated source
|
||||
# is not re-generated, however.
|
||||
#
|
||||
# Files are generated in a directory created specifically for
|
||||
# the particular IDL file and the particular call, in the build directory -
|
||||
# there should be no worries about overwriting files or picking up too much
|
||||
# with the wildcard.
|
||||
#
|
||||
# You may wish to add the IDL file to your list of sources if you want it
|
||||
# to appear in your IDE, but it is not necessary.
|
||||
#
|
||||
# Original Author:
|
||||
# 2012 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net>
|
||||
# http://academic.cleardefinition.com
|
||||
# Iowa State University HCI Graduate Program/VRAC
|
||||
#
|
||||
# Copyright Iowa State University 2012.
|
||||
# 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(NOT JAVA_FOUND)
|
||||
find_package(Java QUIET)
|
||||
endif()
|
||||
|
||||
if(JAVA_FOUND)
|
||||
get_filename_component(JAVA_BIN_DIR "${Java_JAVAC_EXECUTABLE}" PATH)
|
||||
find_program(Java_IDLJ_COMMAND
|
||||
idlj
|
||||
HINTS
|
||||
${JAVA_BIN_DIR}
|
||||
)
|
||||
endif()
|
||||
|
||||
# handle the QUIETLY and REQUIRED arguments and set xxx_FOUND to TRUE if
|
||||
# all listed variables are TRUE
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(IDLJ
|
||||
DEFAULT_MSG
|
||||
Java_IDLJ_COMMAND
|
||||
JAVA_FOUND)
|
||||
|
||||
if(IDLJ_FOUND)
|
||||
function(java_idlj _varname _idlfile)
|
||||
# Get some unique value we can use in a directory name
|
||||
# TODO would be better to somehow munge the full path relative to CMAKE_CURRENT_SOURCE_DIR
|
||||
# in case somebody has multiple idl files with the same name
|
||||
get_filename_component(_idl_name "${_idlfile}" NAME_WE)
|
||||
get_filename_component(_idl_abs "${_idlfile}" ABSOLUTE)
|
||||
|
||||
# Compute directory name and stamp filename
|
||||
set(outdir "${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/idlj/${_idl_name}.dir")
|
||||
set(stampfile "${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/idlj/${_idl_name}.stamp")
|
||||
|
||||
# Force re-cmake if idl file changes
|
||||
configure_file("${_idl_abs}" "${stampfile}" COPY_ONLY)
|
||||
|
||||
if((NOT EXISTS "${outdir}") OR ("${_idl_abs}" IS_NEWER_THAN "${outdir}"))
|
||||
file(REMOVE_RECURSE "${outdir}")
|
||||
message(STATUS "Processing ${_idlfile} with Java's idlj")
|
||||
execute_process(COMMAND
|
||||
"${Java_IDLJ_COMMAND}" -fclient -fallTIE -td "${outdir}" ${ARGN} "${_idlfile}"
|
||||
WORKING_DIRECTORY
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}")
|
||||
endif()
|
||||
file(GLOB_RECURSE _idl_output "${outdir}/*")
|
||||
|
||||
set(${_varname} ${_idl_output} PARENT_SCOPE)
|
||||
|
||||
# Clean up after ourselves on make clean
|
||||
set_property(DIRECTORY APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES "${outdir}" "${stampfile}")
|
||||
endfunction()
|
||||
endif()
|
||||
|
||||
mark_as_advanced(Java_IDLJ_COMMAND)
|
||||
@@ -37,11 +37,15 @@
|
||||
|
||||
|
||||
set(_HUMAN "JCCL 1.4")
|
||||
set(_RELEASE_NAMES jccl-1_4 libjccl-1_4 jccl-1_4_0)
|
||||
set(_DEBUG_NAMES jccl_d-1_4 libjccl_d-1_4 jccl_d-1_4_0)
|
||||
set(_FP_PKG_NAME jccl)
|
||||
set(_RELEASE_NAMES)
|
||||
set(_DEBUG_NAMES)
|
||||
foreach(VER 1_4 1_4_0 1_4_1 1_4_2)
|
||||
list(APPEND _RELEASE_NAMES ${_FP_PKG_NAME}-${VER})
|
||||
list(APPEND _DEBUG_NAMES ${_FP_PKG_NAME}_d-${VER})
|
||||
endforeach()
|
||||
set(_DIR jccl-1.4)
|
||||
set(_HEADER jccl/jcclConfig.h)
|
||||
set(_FP_PKG_NAME jccl)
|
||||
|
||||
include(SelectLibraryConfigurations)
|
||||
include(CreateImportedTarget)
|
||||
|
||||
@@ -144,13 +144,15 @@ elseif(UNIX)
|
||||
string(TOLOWER "${CMAKE_SYSTEM_NAME}" _sysname)
|
||||
file(TO_CMAKE_PATH "$ENV{JTTK_DEV_PATH}" _envloc)
|
||||
prefix_list_glob(_jttklibs
|
||||
"lib/${_sysname}_${BITS}${_compiler}/libJtTk*"
|
||||
"/lib/${_sysname}_${BITS}${_compiler}/libJtTk*"
|
||||
"${JTTK_ROOT_DIR}"
|
||||
"/usr/"
|
||||
"/usr/local/"
|
||||
"/usr/local/siemens/"
|
||||
"/usr/local/ugs/")
|
||||
prefix_list_glob(_jttklibs2
|
||||
"dev/lib/${_sysname}_${BITS}${_compiler}/libJtTk*"
|
||||
"/dev/lib/${_sysname}_${BITS}${_compiler}/libJtTk*"
|
||||
"${JTTK_ROOT_DIR}"
|
||||
"/usr/"
|
||||
"/usr/local/"
|
||||
"/usr/local/siemens/"
|
||||
|
||||
@@ -29,7 +29,7 @@ set(LIBUSB1_ROOT_DIR
|
||||
CACHE
|
||||
PATH
|
||||
"Root directory to search for libusb-1")
|
||||
|
||||
|
||||
if(WIN32)
|
||||
include(ProgramFilesGlob)
|
||||
program_files_fallback_glob(_dirs "LibUSB-Win32")
|
||||
@@ -42,7 +42,7 @@ if(WIN32)
|
||||
set(_lib_suffixes lib/msvc)
|
||||
elseif(COMPILER_IS_GNUCXX)
|
||||
set(_lib_suffixes lib/gcc)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
else()
|
||||
set(_lib_suffixes)
|
||||
@@ -81,11 +81,9 @@ find_package_handle_standard_args(Libusb1
|
||||
LIBUSB1_INCLUDE_DIR)
|
||||
|
||||
if(LIBUSB1_FOUND)
|
||||
set(LIBUSB1_LIBRARIES
|
||||
"${LIBUSB1_LIBRARY}")
|
||||
set(LIBUSB1_LIBRARIES "${LIBUSB1_LIBRARY}")
|
||||
|
||||
set(LIBUSB1_INCLUDE_DIRS
|
||||
"${LIBUSB1_INCLUDE_DIR}")
|
||||
set(LIBUSB1_INCLUDE_DIRS "${LIBUSB1_INCLUDE_DIR}")
|
||||
|
||||
mark_as_advanced(LIBUSB1_ROOT_DIR)
|
||||
endif()
|
||||
|
||||
@@ -65,9 +65,7 @@ mark_as_advanced(LYX_COMMAND)
|
||||
function(lyx_export _format _extension _outvar)
|
||||
set(_nowhere)
|
||||
set(_curdest _nowhere)
|
||||
set(_val_args
|
||||
EXTRA_DEPS
|
||||
INPUT)
|
||||
set(_val_args EXTRA_DEPS INPUT)
|
||||
set(_bool_args OUTPUT_TO_SOURCE_DIR)
|
||||
foreach(_arg ${_val_args} ${_bool_args})
|
||||
set(${_arg})
|
||||
@@ -99,7 +97,7 @@ function(lyx_export _format _extension _outvar)
|
||||
else()
|
||||
set(_outname "${CMAKE_CURRENT_SOURCE_DIR}/${_base}.${_extension}")
|
||||
endif()
|
||||
|
||||
|
||||
list(APPEND _out "${_outname}")
|
||||
if(LYX_COMMAND)
|
||||
add_custom_command(OUTPUT "${_outname}"
|
||||
|
||||
56
FindMarkdown.cmake
Normal file
56
FindMarkdown.cmake
Normal file
@@ -0,0 +1,56 @@
|
||||
# - try to find Markdown tool
|
||||
#
|
||||
# Cache Variables:
|
||||
# MARKDOWN_EXECUTABLE
|
||||
#
|
||||
# Non-cache variables you might use in your CMakeLists.txt:
|
||||
# MARKDOWN_FOUND
|
||||
#
|
||||
# Requires these CMake modules:
|
||||
# FindPackageHandleStandardArgs (known included with CMake >=2.6.2)
|
||||
#
|
||||
# Original Author:
|
||||
# 2011 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net>
|
||||
# http://academic.cleardefinition.com
|
||||
# Iowa State University HCI Graduate Program/VRAC
|
||||
#
|
||||
# Copyright Iowa State University 2011.
|
||||
# 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)
|
||||
|
||||
file(TO_CMAKE_PATH "${MARKDOWN_ROOT_DIR}" MARKDOWN_ROOT_DIR)
|
||||
set(MARKDOWN_ROOT_DIR
|
||||
"${MARKDOWN_ROOT_DIR}"
|
||||
CACHE
|
||||
PATH
|
||||
"Path to search for Markdown")
|
||||
|
||||
if(MARKDOWN_EXECUTABLE AND NOT EXISTS "${MARKDOWN_EXECUTABLE}")
|
||||
set(MARKDOWN_EXECUTABLE "notfound" CACHE PATH FORCE "")
|
||||
endif()
|
||||
|
||||
# If we have a custom path, look there first.
|
||||
if(MARKDOWN_ROOT_DIR)
|
||||
find_program(MARKDOWN_EXECUTABLE
|
||||
NAMES
|
||||
markdown
|
||||
PATHS
|
||||
"${MARKDOWN_ROOT_DIR}"
|
||||
PATH_SUFFIXES
|
||||
bin
|
||||
NO_DEFAULT_PATH)
|
||||
endif()
|
||||
|
||||
find_program(MARKDOWN_EXECUTABLE NAMES markdown)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(Markdown
|
||||
DEFAULT_MSG
|
||||
MARKDOWN_EXECUTABLE)
|
||||
|
||||
if(MARKDOWN_FOUND)
|
||||
mark_as_advanced(MARKDOWN_ROOT_DIR)
|
||||
endif()
|
||||
|
||||
mark_as_advanced(MARKDOWN_EXECUTABLE)
|
||||
@@ -73,7 +73,11 @@ else()
|
||||
otherlibs/_graphics/include)
|
||||
|
||||
# library linkdir suffixes appended to OPENCV_BASE_DIR
|
||||
set(OPENCV_LIBDIR_SUFFIXES lib lib64 OpenCV/lib otherlibs/_graphics/lib)
|
||||
set(OPENCV_LIBDIR_SUFFIXES
|
||||
lib
|
||||
lib64
|
||||
OpenCV/lib
|
||||
otherlibs/_graphics/lib)
|
||||
|
||||
|
||||
#
|
||||
|
||||
@@ -3,12 +3,16 @@
|
||||
# Cache Variables: (probably not for direct use in your scripts)
|
||||
# HDAPI_INCLUDE_DIR
|
||||
# HDAPI_LIBRARY
|
||||
# HDAPI_LIBRARY_RELEASE
|
||||
# HDAPI_LIBRARY_DEBUG
|
||||
# HDAPI_HDU_INCLUDE_DIR
|
||||
# HDAPI_HDU_LIBRARY
|
||||
# HDAPI_HDU_LIBRARY_RELEASE
|
||||
# HDAPI_HDU_LIBRARY_DEBUG
|
||||
# HLAPI_INCLUDE_DIR
|
||||
# HLAPI_LIBRARY
|
||||
# HLAPI_LIBRARY_RELEASE
|
||||
# HLAPI_LIBRARY_DEBUG
|
||||
# HLAPI_HLU_INCLUDE_DIR
|
||||
# HLAPI_HLU_LIBRARY
|
||||
# HLAPI_HLU_LIBRARY_RELEASE
|
||||
@@ -40,7 +44,7 @@
|
||||
# CMake 2.6.3 (uses "unset")
|
||||
#
|
||||
# Original Author:
|
||||
# 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net>
|
||||
# 2009-2012 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net>
|
||||
# http://academic.cleardefinition.com
|
||||
# Iowa State University HCI Graduate Program/VRAC
|
||||
#
|
||||
@@ -77,8 +81,20 @@ set(_libsearchdirs)
|
||||
set(OPENHAPTICS_ENVIRONMENT)
|
||||
set(OPENHAPTICS_RUNTIME_LIBRARY_DIRS)
|
||||
|
||||
set(_dirs)
|
||||
if(NOT "$ENV{OH_SDK_BASE}" STREQUAL "")
|
||||
list(APPEND _dirs "$ENV{OH_SDK_BASE}")
|
||||
elseif(NOT "$ENV{3DTOUCH_BASE}" STREQUAL "")
|
||||
list(APPEND _dirs "$ENV{3DTOUCH_BASE}")
|
||||
endif()
|
||||
if(WIN32)
|
||||
program_files_fallback_glob(_dirs "/Sensable/3DTouch*/")
|
||||
program_files_fallback_glob(_pfdirs "/Sensable/3DTouch*/")
|
||||
foreach(_OH_DEFAULT_LOCATION "C:/OpenHaptics/3.1" "C:/OpenHaptics/Academic/3.1")
|
||||
if(EXISTS "${_OH_DEFAULT_LOCATION}")
|
||||
list(APPEND _dirs "${_OH_DEFAULT_LOCATION}")
|
||||
endif()
|
||||
endforeach()
|
||||
set(_dirs "${_dirs};${_pfdirs}")
|
||||
if(MSVC60)
|
||||
set(_vc "vc6")
|
||||
elseif(MSVC70 OR MSVC71)
|
||||
@@ -160,12 +176,26 @@ find_path(HDAPI_INCLUDE_DIR
|
||||
HINTS
|
||||
${_incsearchdirs})
|
||||
|
||||
find_library(HDAPI_LIBRARY
|
||||
find_library(HDAPI_LIBRARY_RELEASE
|
||||
NAMES
|
||||
HD
|
||||
PATH_SUFFIXES
|
||||
ReleaseAcademicEdition
|
||||
Release
|
||||
HINTS
|
||||
${_libsearchdirs})
|
||||
|
||||
find_library(HDAPI_LIBRARY_DEBUG
|
||||
NAMES
|
||||
HD
|
||||
PATH_SUFFIXES
|
||||
DebugAcademicEdition
|
||||
Debug
|
||||
HINTS
|
||||
${_libsearchdirs})
|
||||
|
||||
select_library_configurations(HDAPI)
|
||||
|
||||
###
|
||||
# HDAPI: HDU
|
||||
###
|
||||
@@ -230,6 +260,7 @@ if(OPENHAPTICS_NESTED_TARGETS OR NOT HDAPI_HDU_LIBRARY)
|
||||
STRING
|
||||
"We will build the OpenHaptics HDU lib."
|
||||
FORCE)
|
||||
set(HDAPI_HDU_LIBRARIES ${HDAPI_HDU_LIBRARY})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
@@ -243,12 +274,25 @@ find_path(HLAPI_INCLUDE_DIR
|
||||
HINTS
|
||||
${_incsearchdirs})
|
||||
|
||||
find_library(HLAPI_LIBRARY
|
||||
find_library(HLAPI_LIBRARY_RELEASE
|
||||
NAMES
|
||||
HL
|
||||
PATH_SUFFIXES
|
||||
ReleaseAcademicEdition
|
||||
Release
|
||||
HINTS
|
||||
${_libsearchdirs})
|
||||
|
||||
find_library(HLAPI_LIBRARY_DEBUG
|
||||
NAMES
|
||||
HL
|
||||
PATH_SUFFIXES
|
||||
DebugAcademicEdition
|
||||
Debug
|
||||
HINTS
|
||||
${_libsearchdirs})
|
||||
|
||||
select_library_configurations(HLAPI)
|
||||
|
||||
###
|
||||
# HLAPI: HLU
|
||||
@@ -314,63 +358,10 @@ if(OPENHAPTICS_NESTED_TARGETS OR NOT HLAPI_HLU_LIBRARY)
|
||||
STRING
|
||||
"We will build the OpenHaptics HLU lib."
|
||||
FORCE)
|
||||
set(HLAPI_HLU_LIBRARIES ${HLAPI_HLU_LIBRARY})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
||||
###
|
||||
# Unix: check stdc++ version
|
||||
###
|
||||
|
||||
if(UNIX
|
||||
AND
|
||||
HDAPI_LIBRARY
|
||||
AND
|
||||
HDAPI_PHANToMIO_LIBRARY
|
||||
AND
|
||||
HDAPI_INCLUDE_DIR)
|
||||
find_file(OPENHAPTICS_LINKTEST_FILE
|
||||
FindOpenHaptics.cpp
|
||||
PATHS
|
||||
${CMAKE_MODULE_PATH})
|
||||
mark_as_advanced(OPENHAPTICS_LINKTEST_FILE)
|
||||
|
||||
try_compile(_result
|
||||
${CMAKE_CURRENT_BINARY_DIR}/FindOpenHaptics
|
||||
"${OPENHAPTICS_LINKTEST_FILE}"
|
||||
CMAKE_FLAGS
|
||||
"-DLINK_LIBRARIES=${HDAPI_LIBRARY}\;${HDAPI_PHANToMIO_LIBRARY} -DINCLUDE_DIRECTORIES=${HDAPI_INCLUDE_DIR}")
|
||||
if(NOT _result)
|
||||
set(OPENHAPTICS_LIBSTDCPP_DIR
|
||||
"${OPENHAPTICS_LIBSTDCPP_DIR}"
|
||||
CACHE
|
||||
PATH
|
||||
"The path to search for a libstdc++ with GLIBCXX_3.4.9 defined.")
|
||||
if(OPENHAPTICS_LIBSTDCPP_DIR)
|
||||
mark_as_advanced(OPENHAPTICS_LIBSTDCPP_DIR)
|
||||
endif()
|
||||
find_library(OPENHAPTICS_LIBSTDCPP_LIBRARY
|
||||
libstdc++
|
||||
PATHS
|
||||
${OPENHAPTICS_LIBSTDCPP_DIR}
|
||||
NO_DEFAULT_PATH)
|
||||
if(OPENHAPTICS_LIBSTDCPP_LIBRARY)
|
||||
mark_as_advanced(OPENHAPTICS_LIBSTDCPP_LIBRARY)
|
||||
endif()
|
||||
list(APPEND _deps_check OPENHAPTICS_LIBSTDCPP_LIBRARY)
|
||||
list(APPEND _deps_libs "${OPENHAPTICS_LIBSTDCPP_LIBRARY}")
|
||||
|
||||
get_filename_component(_stdcppdir
|
||||
"${OPENHAPTICS_LIBSTDCPP_LIBRARY}"
|
||||
PATH)
|
||||
list(APPEND
|
||||
OPENHAPTICS_ENVIRONMENT
|
||||
"LD_LIBRARY_PATH=${_stdcppdir}:$LD_LIBRARY_PATH")
|
||||
list(APPEND OPENHAPTICS_RUNTIME_LIBRARY_DIRS "${_stdcppdir}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
||||
###
|
||||
# Add dependencies: Libraries
|
||||
###
|
||||
@@ -448,10 +439,12 @@ if(OPENHAPTICS_FOUND)
|
||||
set(OPENHAPTICS_LIBRARY_DIRS)
|
||||
foreach(_lib
|
||||
${_deps_check}
|
||||
HDAPI_LIBRARY
|
||||
HDAPI_LIBRARY_RELEASE
|
||||
HDAPI_LIBRARY_DEBUG
|
||||
HDAPI_HDU_LIBRARY_RELEASE
|
||||
HDAPI_HDU_LIBRARY_DEBUG
|
||||
HLAPI_LIBRARY
|
||||
HLAPI_LIBRARY_RELEASE
|
||||
HLAPI_LIBRARY_DEBUG
|
||||
HLAPI_HLU_LIBRARY_RELEASE
|
||||
HLAPI_HLU_LIBRARY_DEBUG)
|
||||
get_filename_component(_libdir ${${_lib}} PATH)
|
||||
@@ -475,12 +468,14 @@ if(OPENHAPTICS_FOUND)
|
||||
endif()
|
||||
|
||||
mark_as_advanced(HDAPI_INCLUDE_DIR
|
||||
HDAPI_LIBRARY
|
||||
HDAPI_LIBRARY_RELEASE
|
||||
HDAPI_LIBRARY_DEBUG
|
||||
HDAPI_HDU_INCLUDE_DIR
|
||||
HDAPI_HDU_LIBRARY_RELEASE
|
||||
HDAPI_HDU_LIBRARY_DEBUG
|
||||
HLAPI_INCLUDE_DIR
|
||||
HLAPI_LIBRARY
|
||||
HLAPI_LIBRARY_RELEASE
|
||||
HLAPI_LIBRARY_DEBUG
|
||||
HLAPI_HLU_INCLUDE_DIR
|
||||
HLAPI_HLU_LIBRARY_RELEASE
|
||||
HLAPI_HLU_LIBRARY_DEBUG)
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
/**
|
||||
* \file FindOpenHaptics.cpp
|
||||
* \brief C++ source file used by CMake module FindOpenHaptics.cmake
|
||||
*
|
||||
* \author
|
||||
* Ryan Pavlik, 2009-2010
|
||||
* <rpavlik@iastate.edu>
|
||||
* http://academic.cleardefinition.com/
|
||||
*
|
||||
* Used to check stdc++ version
|
||||
*
|
||||
*/
|
||||
|
||||
#include <HD/hd.h>
|
||||
|
||||
int main(int argc, char* argv[]) {
|
||||
return 0;
|
||||
}
|
||||
153
FindPerformer.cmake
Normal file
153
FindPerformer.cmake
Normal file
@@ -0,0 +1,153 @@
|
||||
# - try to find the OpenGL Performer library
|
||||
#
|
||||
# Users may optionally supply:
|
||||
# PERFORMER_ROOT_DIR - a prefix to start searching.
|
||||
#
|
||||
# Cache Variables: (probably not for direct use in your scripts)
|
||||
# PERFORMER_INCLUDE_DIR
|
||||
# PERFORMER_LIBRARY
|
||||
# PERFORMER_PFUI_LIBRARY - doesn't get included in PERFORMER_LIBRARIES
|
||||
# PERFORMER_PFDU_UTIL_LIBRARY - doesn't get included in PERFORMER_LIBRARIES
|
||||
# PERFORMER_PFV_LIBRARY - doesn't get included in PERFORMER_LIBRARIES
|
||||
#
|
||||
# Non-cache variables you might use in your CMakeLists.txt:
|
||||
# PERFORMER_FOUND
|
||||
# PERFORMER_INCLUDE_DIRS
|
||||
# PERFORMER_LIBRARIES
|
||||
# PERFORMER_RUNTIME_LIBRARY_DIRS
|
||||
#
|
||||
# Requires these CMake modules:
|
||||
# FindPackageHandleStandardArgs (known included with CMake >=2.6.2)
|
||||
#
|
||||
# Original Author:
|
||||
# 2012 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net>
|
||||
# http://academic.cleardefinition.com
|
||||
# Iowa State University HCI Graduate Program/VRAC
|
||||
#
|
||||
# Copyright Iowa State University 2012.
|
||||
# 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(PERFORMER_ROOT_DIR
|
||||
"${PERFORMER_ROOT_DIR}"
|
||||
CACHE
|
||||
PATH
|
||||
"Path to search for OpenGL Performer library")
|
||||
|
||||
|
||||
find_path(PERFORMER_INCLUDE_DIR
|
||||
NAMES
|
||||
pf.h
|
||||
HINTS
|
||||
"${PERFORMER_ROOT_DIR}"
|
||||
PATH_SUFFIXES
|
||||
include
|
||||
include/Performer
|
||||
Performer
|
||||
PATHS
|
||||
$ENV{PFROOT})
|
||||
mark_as_advanced(PERFORMER_INCLUDE_DIR)
|
||||
|
||||
if(WIN32)
|
||||
set(_pf_libnameprefix lib)
|
||||
find_library(PERFORMER_PFDU_UTIL_LIBRARY
|
||||
NAMES
|
||||
libpfdu-util
|
||||
HINTS
|
||||
"${PERFORMER_ROOT_DIR}"
|
||||
PATH_SUFFIXES
|
||||
lib
|
||||
PATHS
|
||||
$ENV{PFROOT})
|
||||
else()
|
||||
set(_pf_libnameprefix)
|
||||
find_library(PERFORMER_PFDU_LIBRARY
|
||||
NAMES
|
||||
pfdu
|
||||
HINTS
|
||||
"${PERFORMER_ROOT_DIR}"
|
||||
PATH_SUFFIXES
|
||||
lib
|
||||
PATHS
|
||||
$ENV{PFROOT})
|
||||
find_library(PERFORMER_PFUTIL_LIBRARY
|
||||
NAMES
|
||||
pfutil
|
||||
HINTS
|
||||
"${PERFORMER_ROOT_DIR}"
|
||||
PATH_SUFFIXES
|
||||
lib
|
||||
PATHS
|
||||
$ENV{PFROOT})
|
||||
if(PERFORMER_PFDU_LIBRARY AND PERFORMER_PFUTIL_LIBRARY)
|
||||
set(PERFORMER_PFDU_UTIL_LIBRARY
|
||||
${PERFORMER_PFDU_LIBRARY}
|
||||
${PERFORMER_PFUTIL_LIBRARY})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
find_library(PERFORMER_LIBRARY
|
||||
NAMES
|
||||
${_pf_libnameprefix}pf
|
||||
HINTS
|
||||
"${PERFORMER_ROOT_DIR}"
|
||||
PATH_SUFFIXES
|
||||
lib
|
||||
PATHS
|
||||
$ENV{PFROOT})
|
||||
find_library(PERFORMER_PFUI_LIBRARY
|
||||
NAMES
|
||||
${_pf_libnameprefix}pfui
|
||||
HINTS
|
||||
"${PERFORMER_ROOT_DIR}"
|
||||
PATH_SUFFIXES
|
||||
lib
|
||||
PATHS
|
||||
$ENV{PFROOT})
|
||||
find_library(PERFORMER_PFV_LIBRARY
|
||||
NAMES
|
||||
${_pf_libnameprefix}pfv
|
||||
HINTS
|
||||
"${PERFORMER_ROOT_DIR}"
|
||||
PATH_SUFFIXES
|
||||
lib
|
||||
PATHS
|
||||
$ENV{PFROOT})
|
||||
|
||||
###
|
||||
# Prereq: OpenGL
|
||||
###
|
||||
|
||||
find_package(OpenGL QUIET)
|
||||
|
||||
# handle the QUIETLY and REQUIRED arguments and set xxx_FOUND to TRUE if
|
||||
# all listed variables are TRUE
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(Performer
|
||||
DEFAULT_MSG
|
||||
PERFORMER_LIBRARY
|
||||
PERFORMER_PFUI_LIBRARY
|
||||
PERFORMER_PFV_LIBRARY
|
||||
PERFORMER_PFDU_UTIL_LIBRARY
|
||||
PERFORMER_INCLUDE_DIR
|
||||
OPENGL_FOUND)
|
||||
|
||||
if(PERFORMER_FOUND)
|
||||
set(PERFORMER_INCLUDE_DIRS
|
||||
"${OPENGL_INCLUDE_DIR}"
|
||||
"${PERFORMER_INCLUDE_DIR}")
|
||||
if(PERFORMER_INCLUDE_DIR MATCHES ".*Performer.*")
|
||||
list(APPEND PERFORMER_INCLUDE_DIRS "${PERFORMER_INCLUDE_DIR}/..")
|
||||
endif()
|
||||
set(PERFORMER_LIBRARIES "${OPENGL_LIBRARY}" "${PERFORMER_LIBRARY}")
|
||||
mark_as_advanced(PERFORMER_ROOT_DIR)
|
||||
endif()
|
||||
|
||||
mark_as_advanced(PERFORMER_LIBRARY
|
||||
PERFORMER_PFUI_LIBRARY
|
||||
PERFORMER_PFV_LIBRARY
|
||||
PERFORMER_PFDU_LIBRARY
|
||||
PERFORMER_PFUTIL_LIBRARY
|
||||
PERFORMER_PFDU_UTIL_LIBRARY
|
||||
PERFORMER_INCLUDE_DIR)
|
||||
78
FindPerlModules.cmake
Normal file
78
FindPerlModules.cmake
Normal file
@@ -0,0 +1,78 @@
|
||||
# - try to find perl modules, passed as COMPONENTS
|
||||
#
|
||||
# Non-cache variable you might use in your CMakeLists.txt:
|
||||
# PERLMODULES_FOUND
|
||||
#
|
||||
# Requires these CMake modules:
|
||||
# FindPackageHandleStandardArgs (known included with CMake >=2.6.2)
|
||||
#
|
||||
# Original Author:
|
||||
# 2012 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net>
|
||||
# http://academic.cleardefinition.com
|
||||
# Iowa State University HCI Graduate Program/VRAC
|
||||
#
|
||||
# Copyright Iowa State University 2012.
|
||||
# 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(NOT PERL_FOUND)
|
||||
find_package(Perl QUIET)
|
||||
endif()
|
||||
|
||||
set(_deps_check)
|
||||
if(PERL_FOUND)
|
||||
foreach(module ${PerlModules_FIND_COMPONENTS})
|
||||
string(REPLACE "::" "/" modfilename "${module}.pm")
|
||||
string(REPLACE "::" "_" modvarname "PERLMODULES_${module}_MODULE")
|
||||
string(TOUPPER "${modvarname}" modvarname)
|
||||
list(APPEND _deps_check ${modvarname})
|
||||
if(NOT ${modvarname})
|
||||
if(NOT PerlModules_FIND_QUIETLY)
|
||||
message(STATUS "Checking for perl module ${module}")
|
||||
endif()
|
||||
execute_process(COMMAND
|
||||
"${PERL_EXECUTABLE}"
|
||||
"-e"
|
||||
"use ${module}; print \$INC{\"${modfilename}\"}"
|
||||
RESULT_VARIABLE result_code
|
||||
OUTPUT_VARIABLE filename
|
||||
ERROR_VARIABLE error_info
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
if(result_code EQUAL 0)
|
||||
if(NOT PerlModules_FIND_QUIETLY)
|
||||
message(STATUS
|
||||
"Checking for perl module ${module} - found at ${filename}")
|
||||
endif()
|
||||
set(${modvarname}
|
||||
"${filename}"
|
||||
CACHE
|
||||
FILEPATH
|
||||
"Location found for module ${module}"
|
||||
FORCE)
|
||||
mark_as_advanced(${modvarname})
|
||||
else()
|
||||
if(NOT PerlModules_FIND_QUIETLY)
|
||||
message(STATUS "Checking for perl module ${module} - failed")
|
||||
endif()
|
||||
set(${modvarname}
|
||||
"NOTFOUND"
|
||||
CACHE
|
||||
FILEPATH
|
||||
"No location found for module ${module}"
|
||||
FORCE)
|
||||
file(APPEND
|
||||
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
|
||||
"Determining if the Perl module ${module} exists failed with the following error output:\n"
|
||||
"${error_info}\n\n")
|
||||
endif()
|
||||
endif()
|
||||
endforeach()
|
||||
endif()
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(PerlModules
|
||||
DEFAULT_MSG
|
||||
PERL_FOUND
|
||||
${_deps_check})
|
||||
|
||||
81
FindQVRPN.cmake
Normal file
81
FindQVRPN.cmake
Normal file
@@ -0,0 +1,81 @@
|
||||
# - try to find QVRPN library
|
||||
#
|
||||
# Of course, you may also just choose to make QVRPN a submodule of your
|
||||
# project itself.
|
||||
#
|
||||
# Cache Variables:
|
||||
# QVRPN_LIBRARY
|
||||
# QVRPN_INCLUDE_DIR
|
||||
#
|
||||
# Non-cache variables you might use in your CMakeLists.txt:
|
||||
# QVRPN_FOUND
|
||||
# QVRPN_LIBRARIES
|
||||
# QVRPN_INCLUDE_DIRS
|
||||
#
|
||||
# QVRPN_ROOT_DIR is searched preferentially for these files
|
||||
#
|
||||
# Requires these CMake modules:
|
||||
# FindPackageHandleStandardArgs (known included with CMake >=2.6.2)
|
||||
#
|
||||
# Refactored from FindVRPN.cmake by:
|
||||
# Juan Sebastian Casallas <casallas@iastate.edu>
|
||||
#
|
||||
# FindVRPN.cmake 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-2012.
|
||||
# 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(QVRPN_ROOT_DIR
|
||||
"${QVRPN_ROOT_DIR}"
|
||||
CACHE
|
||||
PATH
|
||||
"Root directory to search for QVRPN")
|
||||
|
||||
if(CMAKE_SIZEOF_VOID_P MATCHES "8")
|
||||
set(_LIBSUFFIXES /lib64 /lib)
|
||||
else()
|
||||
set(_LIBSUFFIXES /lib)
|
||||
endif()
|
||||
|
||||
###
|
||||
# Configure QVRPN
|
||||
###
|
||||
|
||||
find_path(QVRPN_INCLUDE_DIR
|
||||
NAMES
|
||||
vrpn_QMainloopContainer.h
|
||||
PATH_SUFFIXES
|
||||
include
|
||||
include/qvrpn
|
||||
HINTS
|
||||
"${QVRPN_ROOT_DIR}")
|
||||
|
||||
find_library(QVRPN_LIBRARY
|
||||
NAMES
|
||||
qvrpn
|
||||
PATH_SUFFIXES
|
||||
${_libsuffixes}
|
||||
HINTS
|
||||
"${QVRPN_ROOT_DIR}")
|
||||
|
||||
# handle the QUIETLY and REQUIRED arguments and set xxx_FOUND to TRUE if
|
||||
# all listed variables are TRUE
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(QVRPN
|
||||
DEFAULT_MSG
|
||||
QVRPN_LIBRARY
|
||||
QVRPN_INCLUDE_DIR)
|
||||
|
||||
if(QVRPN_FOUND)
|
||||
set(QVRPN_INCLUDE_DIRS "${QVRPN_INCLUDE_DIR}")
|
||||
set(QVRPN_LIBRARIES "${QVRPN_LIBRARY}")
|
||||
|
||||
mark_as_advanced(QVRPN_ROOT_DIR)
|
||||
endif()
|
||||
|
||||
mark_as_advanced(QVRPN_LIBRARY QVRPN_INCLUDE_DIR)
|
||||
@@ -37,11 +37,15 @@
|
||||
|
||||
|
||||
set(_HUMAN "Sonix 1.4")
|
||||
set(_RELEASE_NAMES sonix-1_4 libsonix-1_4 sonix-1_4_0)
|
||||
set(_DEBUG_NAMES sonix_d-1_4 libsonix_d-1_4 sonix_d-1_4_0)
|
||||
set(_FP_PKG_NAME sonix)
|
||||
set(_RELEASE_NAMES)
|
||||
set(_DEBUG_NAMES)
|
||||
foreach(VER 1_4 1_4_0 1_4_1 1_4_2)
|
||||
list(APPEND _RELEASE_NAMES ${_FP_PKG_NAME}-${VER})
|
||||
list(APPEND _DEBUG_NAMES ${_FP_PKG_NAME}_d-${VER})
|
||||
endforeach()
|
||||
set(_DIR sonix-1.4)
|
||||
set(_HEADER snx/sonix.h)
|
||||
set(_FP_PKG_NAME sonix)
|
||||
|
||||
include(SelectLibraryConfigurations)
|
||||
include(CreateImportedTarget)
|
||||
|
||||
@@ -70,7 +70,4 @@ endif()
|
||||
# handle the QUIETLY and REQUIRED arguments and set xxx_FOUND to TRUE if
|
||||
# all listed variables are TRUE
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(TR1
|
||||
DEFAULT_MSG
|
||||
PLATFORM
|
||||
${_check})
|
||||
find_package_handle_standard_args(TR1 DEFAULT_MSG PLATFORM ${_check})
|
||||
|
||||
@@ -37,11 +37,15 @@
|
||||
|
||||
|
||||
set(_HUMAN "Tweek 1.4")
|
||||
set(_RELEASE_NAMES tweek-1_4 libtweek-1_4 tweek-1_4_0)
|
||||
set(_DEBUG_NAMES tweek_d-1_4 libtweek_d-1_4 tweek_d-1_4_0)
|
||||
set(_FP_PKG_NAME sonix)
|
||||
set(_RELEASE_NAMES)
|
||||
set(_DEBUG_NAMES)
|
||||
foreach(VER 1_4 1_4_0 1_4_1 1_4_2)
|
||||
list(APPEND _RELEASE_NAMES ${_FP_PKG_NAME}-${VER})
|
||||
list(APPEND _DEBUG_NAMES ${_FP_PKG_NAME}_d-${VER})
|
||||
endforeach()
|
||||
set(_DIR tweek-1.4)
|
||||
set(_HEADER tweek/tweek.h)
|
||||
set(_FP_PKG_NAME tweek)
|
||||
|
||||
include(SelectLibraryConfigurations)
|
||||
include(CreateImportedTarget)
|
||||
|
||||
@@ -40,11 +40,15 @@
|
||||
# Brandon Newendorp <brandon@newendorp.com>
|
||||
|
||||
set(_HUMAN "VPR 2.2")
|
||||
set(_RELEASE_NAMES vpr-2_2 libvpr-2_2 vpr-2_2_0)
|
||||
set(_DEBUG_NAMES vpr_d-2_2 libvpr_d-2_2 vpr_d-2_2_0)
|
||||
set(_FP_PKG_NAME vpr)
|
||||
set(_RELEASE_NAMES)
|
||||
set(_DEBUG_NAMES)
|
||||
foreach(VER 2_2 2_2_0 2_2_1 2_2_2)
|
||||
list(APPEND _RELEASE_NAMES ${_FP_PKG_NAME}-${VER})
|
||||
list(APPEND _DEBUG_NAMES ${_FP_PKG_NAME}_d-${VER})
|
||||
endforeach()
|
||||
set(_DIR vpr-2.2)
|
||||
set(_HEADER vpr/vpr.h)
|
||||
set(_FP_PKG_NAME vpr)
|
||||
|
||||
include(SelectLibraryConfigurations)
|
||||
include(CreateImportedTarget)
|
||||
@@ -193,8 +197,9 @@ if(UNIX AND NOT WIN32)
|
||||
if(NOT APPLE)
|
||||
find_library(VPR22_libuuid_LIBRARY NAMES uuid)
|
||||
mark_as_advanced(VPR22_libuuid_LIBRARY)
|
||||
list(APPEND _deps_check VPR22_libuuid_LIBRARY)
|
||||
list(APPEND _deps_libs ${VPR22_libuuid_LIBRARY})
|
||||
if(VPR22_libuuid_LIBRARY)
|
||||
list(APPEND _deps_libs ${VPR22_libuuid_LIBRARY})
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
||||
@@ -45,11 +45,15 @@
|
||||
|
||||
|
||||
set(_HUMAN "VR Juggler 3.0 Core")
|
||||
set(_RELEASE_NAMES vrj-3_0 libvrj-3_0 vrj-3_0_0)
|
||||
set(_DEBUG_NAMES vrj_d-3_0 libvrj_d-3_0 vrj_d-3_0_0)
|
||||
set(_FP_PKG_NAME vrjuggler)
|
||||
set(_RELEASE_NAMES)
|
||||
set(_DEBUG_NAMES)
|
||||
foreach(VER 3_0 3_0_0 3_0_1 3_0_2)
|
||||
list(APPEND _RELEASE_NAMES vrj-${VER})
|
||||
list(APPEND _DEBUG_NAMES vrj_d-${VER})
|
||||
endforeach()
|
||||
set(_DIR vrjuggler-3.0)
|
||||
set(_HEADER vrj/Kernel/Kernel.h)
|
||||
set(_FP_PKG_NAME vrjuggler)
|
||||
|
||||
include(SelectLibraryConfigurations)
|
||||
include(CreateImportedTarget)
|
||||
|
||||
@@ -38,10 +38,14 @@
|
||||
|
||||
|
||||
set(_HUMAN "VR Juggler 3.0 OpenGL Core")
|
||||
set(_RELEASE_NAMES vrj_ogl-3_0 libvrj_ogl-3_0 vrj_ogl-3_0_0)
|
||||
set(_DEBUG_NAMES vrj_ogl_d-3_0 libvrj_ogl_d-3_0 vrj_ogl_d-3_0_0)
|
||||
set(_DIR vrjuggler-3.0)
|
||||
set(_FP_PKG_NAME vrjuggler-opengl)
|
||||
set(_RELEASE_NAMES)
|
||||
set(_DEBUG_NAMES)
|
||||
foreach(VER 3_0 3_0_0 3_0_1 3_0_2)
|
||||
list(APPEND _RELEASE_NAMES vrj_ogl-${VER})
|
||||
list(APPEND _DEBUG_NAMES vrj_ogl_d-${VER})
|
||||
endforeach()
|
||||
set(_DIR vrjuggler-3.0)
|
||||
|
||||
include(SelectLibraryConfigurations)
|
||||
include(CreateImportedTarget)
|
||||
|
||||
@@ -171,7 +171,10 @@ endif()
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(VRJuggler
|
||||
DEFAULT_MSG VRJUGGLER_VERSION VRJUGGLER_LIBRARIES VRJUGGLER_FOUND)
|
||||
DEFAULT_MSG
|
||||
VRJUGGLER_VERSION
|
||||
VRJUGGLER_LIBRARIES
|
||||
VRJUGGLER_FOUND)
|
||||
|
||||
if(VRJUGGLER_FOUND)
|
||||
mark_as_advanced(VRJUGGLER_ROOT_DIR)
|
||||
|
||||
@@ -334,6 +334,20 @@ if(VRJUGGLER30_FOUND)
|
||||
list(APPEND _plugin_dirs "${_libdir}/sonix-1.4/plugins/dbg")
|
||||
list(APPEND _plugin_dirs "${_libdir}/sonix-1.4/plugins/opt")
|
||||
endif()
|
||||
|
||||
# Find directories of JCCL plugins
|
||||
if(EXISTS "${_libdir}/jccl/plugins")
|
||||
list(APPEND _plugin_dirs "${_libdir}/jccl/plugins")
|
||||
elseif(EXISTS "${_libdir}/jccl-1.4/plugins")
|
||||
list(APPEND _plugin_dirs "${_libdir}/jccl-1.4/plugins")
|
||||
endif()
|
||||
|
||||
# Find directories of VR Juggler plugins
|
||||
if(EXISTS "${_libdir}/vrjuggler/plugins")
|
||||
list(APPEND _plugin_dirs "${_libdir}/vrjuggler/plugins")
|
||||
elseif(EXISTS "${_libdir}/vrjuggler-3.0/plugins")
|
||||
list(APPEND _plugin_dirs "${_libdir}/vrjuggler-3.0/plugins")
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
# Grab the actual plugins
|
||||
@@ -341,7 +355,13 @@ if(VRJUGGLER30_FOUND)
|
||||
if(EXISTS "${_libdir}")
|
||||
list(APPEND VRJUGGLER30_RUNTIME_LIBRARY_DIRS "${_libdir}")
|
||||
file(GLOB _plugins "${_libdir}/*${CMAKE_SHARED_LIBRARY_SUFFIX}")
|
||||
list(APPEND VRJUGGLER30_BUNDLE_PLUGINS ${_plugins})
|
||||
foreach(_plugin ${_plugins})
|
||||
if("${_plugin}" MATCHES "_d${CMAKE_SHARED_LIBRARY_SUFFIX}")
|
||||
list(APPEND VRJUGGLER30_BUNDLE_PLUGINS_DEBUG ${_plugin})
|
||||
else()
|
||||
list(APPEND VRJUGGLER30_BUNDLE_PLUGINS ${_plugin})
|
||||
endif()
|
||||
endforeach()
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
@@ -391,19 +411,23 @@ function(install_vrjuggler30_data_files prefix)
|
||||
install(FILES "${base}/calibration.table" DESTINATION "${DEST}")
|
||||
endfunction()
|
||||
|
||||
function(install_vrjuggler30_plugins prefix varForFilenames)
|
||||
set(DEST "${prefix}")
|
||||
|
||||
set(out)
|
||||
foreach(plugin ${VRJUGGLER30_BUNDLE_PLUGINS})
|
||||
macro(_vrjuggler30_plugin_install _VAR)
|
||||
foreach(plugin ${${_VAR}})
|
||||
get_filename_component(full "${plugin}" ABSOLUTE)
|
||||
file(RELATIVE_PATH relloc "${VRJUGGLER30_VJ_BASE_DIR}" "${full}")
|
||||
set(filedest "${DEST}/${relloc}")
|
||||
get_filename_component(path "${filedest}" PATH)
|
||||
list(APPEND out "${filedest}")
|
||||
install(FILES "${full}" DESTINATION "${path}")
|
||||
install(FILES "${full}" DESTINATION "${path}" ${ARGN})
|
||||
endforeach()
|
||||
endmacro()
|
||||
|
||||
function(install_vrjuggler30_plugins prefix varForFilenames)
|
||||
set(DEST "${prefix}")
|
||||
|
||||
set(out)
|
||||
_vrjuggler30_plugin_install(VRJUGGLER30_BUNDLE_PLUGINS)
|
||||
_vrjuggler30_plugin_install(VRJUGGLER30_BUNDLE_PLUGINS_DEBUG CONFIGURATIONS DEBUG)
|
||||
set(${varForFilenames} ${out} PARENT_SCOPE)
|
||||
|
||||
endfunction()
|
||||
|
||||
@@ -7,8 +7,10 @@
|
||||
#
|
||||
# Non-cache variables you might use in your CMakeLists.txt:
|
||||
# VRPN_FOUND
|
||||
# VRPN_SERVER_LIBRARIES
|
||||
# VRPN_LIBRARIES
|
||||
# VRPN_SERVER_LIBRARIES - server libraries
|
||||
# VRPN_LIBRARIES - client libraries
|
||||
# VRPN_CLIENT_DEFINITIONS - definitions if you only use the client library
|
||||
# VRPN_DEFINITIONS - Client-only definition if all we found was the client library.
|
||||
# VRPN_INCLUDE_DIRS
|
||||
#
|
||||
# VRPN_ROOT_DIR is searched preferentially for these files
|
||||
@@ -17,11 +19,11 @@
|
||||
# FindPackageHandleStandardArgs (known included with CMake >=2.6.2)
|
||||
#
|
||||
# Original Author:
|
||||
# 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net>
|
||||
# 2009-2012 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.
|
||||
# Copyright Iowa State University 2009-2012.
|
||||
# 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)
|
||||
@@ -116,9 +118,19 @@ if(VRPN_FOUND)
|
||||
set(VRPN_LIBRARIES "${VRPN_LIBRARY}" ${_deps_libs})
|
||||
set(VRPN_SERVER_LIBRARIES "${VRPN_SERVER_LIBRARY}" ${_deps_libs})
|
||||
|
||||
if(VRPN_LIBRARY)
|
||||
set(VRPN_CLIENT_DEFINITIONS -DVRPN_CLIENT_ONLY)
|
||||
else()
|
||||
unset(VRPN_CLIENT_DEFINITIONS)
|
||||
endif()
|
||||
|
||||
if(VRPN_LIBRARY AND NOT VRPN_SERVER_LIBRARY)
|
||||
set(VRPN_DEFINITIONS -DVRPN_CLIENT_ONLY)
|
||||
else()
|
||||
unset(VRPN_DEFINITIONS)
|
||||
endif()
|
||||
|
||||
mark_as_advanced(VRPN_ROOT_DIR)
|
||||
endif()
|
||||
|
||||
mark_as_advanced(VRPN_LIBRARY
|
||||
VRPN_SERVER_LIBRARY
|
||||
VRPN_INCLUDE_DIR)
|
||||
mark_as_advanced(VRPN_LIBRARY VRPN_SERVER_LIBRARY VRPN_INCLUDE_DIR)
|
||||
|
||||
94
FindViewPoint.cmake
Normal file
94
FindViewPoint.cmake
Normal file
@@ -0,0 +1,94 @@
|
||||
# - try to find Arrington Research ViewPoint EyeTracker SDK
|
||||
#
|
||||
# Cache Variables: (probably not for direct use in your scripts)
|
||||
# VIEWPOINT_INCLUDE_DIR
|
||||
# VIEWPOINT_LIBRARY
|
||||
# VIEWPOINT_RUNTIME_LIBRARY
|
||||
#
|
||||
# Non-cache variables you might use in your CMakeLists.txt:
|
||||
# VIEWPOINT_FOUND
|
||||
# VIEWPOINT_INCLUDE_DIRS
|
||||
# VIEWPOINT_LIBRARIES
|
||||
# VIEWPOINT_RUNTIME_LIBRARIES - aka the dll for installing
|
||||
# VIEWPOINT_RUNTIME_LIBRARY_DIRS
|
||||
#
|
||||
# Requires these CMake modules:
|
||||
# FindPackageHandleStandardArgs (known included with CMake >=2.6.2)
|
||||
#
|
||||
# Original Author:
|
||||
# 2012 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net>
|
||||
# http://academic.cleardefinition.com
|
||||
# Iowa State University HCI Graduate Program/VRAC
|
||||
#
|
||||
# Copyright Iowa State University 2012.
|
||||
# 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(VIEWPOINT_ROOT_DIR
|
||||
"${VIEWPOINT_ROOT_DIR}"
|
||||
CACHE
|
||||
PATH
|
||||
"Directory to search for Arrington Research ViewPoint EyeTracker SDK")
|
||||
|
||||
if(CMAKE_SIZEOF_VOID_P MATCHES "8")
|
||||
set(_LIBSUFFIXES /lib64 /lib)
|
||||
else()
|
||||
set(_LIBSUFFIXES /lib)
|
||||
endif()
|
||||
|
||||
find_library(VIEWPOINT_LIBRARY
|
||||
NAMES
|
||||
VPX_InterApp
|
||||
PATHS
|
||||
"${VIEWPOINT_ROOT_DIR}"
|
||||
PATH_SUFFIXES
|
||||
"${_LIBSUFFIXES}")
|
||||
|
||||
get_filename_component(_libdir "${VIEWPOINT_LIBRARY}" PATH)
|
||||
|
||||
find_path(VIEWPOINT_INCLUDE_DIR
|
||||
NAMES
|
||||
vpx.h
|
||||
HINTS
|
||||
"${_libdir}"
|
||||
PATHS
|
||||
"${VIEWPOINT_ROOT_DIR}"
|
||||
PATH_SUFFIXES
|
||||
include/)
|
||||
|
||||
set(_deps_check)
|
||||
if(WIN32)
|
||||
find_file(VIEWPOINT_RUNTIME_LIBRARY
|
||||
NAMES
|
||||
VPX_InterApp.dll
|
||||
HINTS
|
||||
"${_libdir}")
|
||||
|
||||
set(VIEWPOINT_RUNTIME_LIBRARIES "${VIEWPOINT_RUNTIME_LIBRARY}")
|
||||
get_filename_component(VIEWPOINT_RUNTIME_LIBRARY_DIRS
|
||||
"${VIEWPOINT_RUNTIME_LIBRARY}"
|
||||
PATH)
|
||||
list(APPEND _deps_check VIEWPOINT_RUNTIME_LIBRARY)
|
||||
else()
|
||||
get_filename_component(VIEWPOINT_RUNTIME_LIBRARY_DIRS
|
||||
"${VIEWPOINT_LIBRARY}"
|
||||
PATH)
|
||||
endif()
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(ViewPoint
|
||||
DEFAULT_MSG
|
||||
VIEWPOINT_LIBRARY
|
||||
VIEWPOINT_INCLUDE_DIR
|
||||
${_deps_check})
|
||||
|
||||
if(VIEWPOINT_FOUND)
|
||||
set(VIEWPOINT_LIBRARIES "${VIEWPOINT_LIBRARY}")
|
||||
set(VIEWPOINT_INCLUDE_DIRS "${VIEWPOINT_INCLUDE_DIR}")
|
||||
mark_as_advanced(VIEWPOINT_ROOT_DIR)
|
||||
endif()
|
||||
|
||||
mark_as_advanced(VIEWPOINT_INCLUDE_DIR
|
||||
VIEWPOINT_LIBRARY
|
||||
VIEWPOINT_RUNTIME_LIBRARY)
|
||||
@@ -74,6 +74,8 @@ if(WIN32)
|
||||
PATH)
|
||||
list(APPEND _deps_check WIIUSE_RUNTIME_LIBRARY)
|
||||
else()
|
||||
set(WIIUSE_RUNTIME_LIBRARY "${WIIUSE_LIBRARY}")
|
||||
set(WIIUSE_RUNTIME_LIBRARIES "${WIIUSE_RUNTIME_LIBRARY}")
|
||||
get_filename_component(WIIUSE_RUNTIME_LIBRARY_DIRS
|
||||
"${WIIUSE_LIBRARY}"
|
||||
PATH)
|
||||
|
||||
163
FindWinHID.cmake
163
FindWinHID.cmake
@@ -31,9 +31,10 @@ if(NOT WIN32)
|
||||
WIN32)
|
||||
return()
|
||||
endif()
|
||||
|
||||
if( (NOT WINHID_ROOT_DIR) AND (NOT ENV{DDKROOT} STREQUAL "") )
|
||||
set(WINHID_ROOT_DIR "$ENV{DDKROOT}")
|
||||
if(MSVC)
|
||||
if( (NOT WINHID_ROOT_DIR) AND (NOT ENV{DDKROOT} STREQUAL "") )
|
||||
set(WINHID_ROOT_DIR "$ENV{DDKROOT}")
|
||||
endif()
|
||||
endif()
|
||||
set(WINHID_ROOT_DIR
|
||||
"${WINHID_ROOT_DIR}"
|
||||
@@ -47,81 +48,109 @@ else()
|
||||
set(_arch i386)
|
||||
endif()
|
||||
|
||||
include(PrefixListGlob)
|
||||
include(CleanDirectoryList)
|
||||
prefix_list_glob(_prefixed "*/" "$ENV{SYSTEMDRIVE}/WinDDK/" "c:/WinDDK/")
|
||||
clean_directory_list(_prefixed)
|
||||
if(MSVC)
|
||||
include(PrefixListGlob)
|
||||
include(CleanDirectoryList)
|
||||
prefix_list_glob(_prefixed
|
||||
"*/"
|
||||
"$ENV{SYSTEMDRIVE}/WinDDK/"
|
||||
"c:/WinDDK/")
|
||||
clean_directory_list(_prefixed)
|
||||
find_library(WINHID_LIBRARY
|
||||
NAMES
|
||||
hid
|
||||
libhid
|
||||
HINTS
|
||||
"${WINHID_ROOT_DIR}"
|
||||
${_prefixed}
|
||||
PATH_SUFFIXES
|
||||
"lib/w2k/${_arch}" # Win2k min requirement
|
||||
"lib/wxp/${_arch}" # WinXP min requirement
|
||||
"lib/wnet/${_arch}" # Win Server 2003 min requirement
|
||||
"lib/wlh/${_arch}" # Win Vista ("Long Horn") min requirement
|
||||
"lib/win7/${_arch}" # Win 7 min requirement
|
||||
)
|
||||
# Might want to look close to the library first for the includes.
|
||||
get_filename_component(_libdir "${WINHID_LIBRARY}" PATH)
|
||||
get_filename_component(_basedir "${_libdir}/../../.." ABSOLUTE)
|
||||
|
||||
find_library(WINHID_LIBRARY
|
||||
NAMES
|
||||
hid
|
||||
HINTS
|
||||
"${WINHID_ROOT_DIR}"
|
||||
${_prefixed}
|
||||
PATH_SUFFIXES
|
||||
"lib/w2k/${_arch}" # Win2k min requirement
|
||||
"lib/wxp/${_arch}" # WinXP min requirement
|
||||
"lib/wnet/${_arch}" # Win Server 2003 min requirement
|
||||
"lib/wlh/${_arch}" # Win Vista ("Long Horn") min requirement
|
||||
"lib/win7/${_arch}" # Win 7 min requirement
|
||||
)
|
||||
|
||||
# Might want to look close to the library first for the includes.
|
||||
get_filename_component(_libdir "${WINHID_LIBRARY}" PATH)
|
||||
get_filename_component(_basedir "${_libdir}/../../.." ABSOLUTE)
|
||||
|
||||
find_path(WINHID_INCLUDE_DIR
|
||||
NAMES
|
||||
hidsdi.h
|
||||
HINTS
|
||||
"${_basedir}"
|
||||
PATHS
|
||||
"${WINHID_ROOT_DIR}"
|
||||
PATH_SUFFIXES
|
||||
inc/api
|
||||
inc/w2k
|
||||
inc/wxp
|
||||
inc/wnet)
|
||||
|
||||
find_path(WINHID_CRT_INCLUDE_DIR # otherwise you get weird compile errors
|
||||
NAMES
|
||||
stdio.h
|
||||
HINTS
|
||||
"${_basedir}"
|
||||
PATHS
|
||||
"${WINHID_ROOT_DIR}"
|
||||
PATH_SUFFIXES
|
||||
inc/crt
|
||||
NO_DEFAULT_PATH)
|
||||
find_path(WINHID_CRT_INCLUDE_DIR # otherwise you get weird compile errors
|
||||
NAMES
|
||||
stdio.h
|
||||
HINTS
|
||||
"${_basedir}"
|
||||
PATHS
|
||||
"${WINHID_ROOT_DIR}"
|
||||
PATH_SUFFIXES
|
||||
inc/crt
|
||||
NO_DEFAULT_PATH)
|
||||
find_path(WINHID_INCLUDE_DIR
|
||||
NAMES
|
||||
hidsdi.h
|
||||
HINTS
|
||||
"${_basedir}"
|
||||
PATHS
|
||||
"${WINHID_ROOT_DIR}"
|
||||
PATH_SUFFIXES
|
||||
inc/ddk
|
||||
inc/api
|
||||
inc/w2k
|
||||
inc/wxp
|
||||
inc/wnet)
|
||||
else()
|
||||
find_library(WINHID_LIBRARY
|
||||
NAMES
|
||||
libhid
|
||||
HINTS
|
||||
"${WINHID_ROOT_DIR}"
|
||||
/mingw
|
||||
PATH_SUFFIXES
|
||||
lib
|
||||
lib/w32api)
|
||||
find_path(WINHID_INCLUDE_DIR
|
||||
NAMES
|
||||
hidsdi.h
|
||||
PATHS
|
||||
"${WINHID_ROOT_DIR}"
|
||||
/mingw
|
||||
PATH_SUFFIXES
|
||||
include/w32api/ddk
|
||||
include/ddk
|
||||
ddk)
|
||||
endif()
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(WinHID
|
||||
DEFAULT_MSG
|
||||
WINHID_LIBRARY
|
||||
WINHID_INCLUDE_DIR
|
||||
WINHID_CRT_INCLUDE_DIR)
|
||||
WINHID_INCLUDE_DIR)
|
||||
|
||||
if(WINHID_FOUND)
|
||||
set(_winreq "Unknown")
|
||||
if(WINHID_LIBRARY MATCHES "lib/w2k")
|
||||
set(_winreq "Windows 2000")
|
||||
elseif(WINHID_LIBRARY MATCHES "lib/wxp")
|
||||
set(_winreq "Windows XP")
|
||||
elseif(WINHID_LIBRARY MATCHES "lib/wnet")
|
||||
set(_winreq "Windows Server 2003")
|
||||
elseif(WINHID_LIBRARY MATCHES "lib/wlh")
|
||||
set(_winreq "Windows Vista")
|
||||
elseif(WINHID_LIBRARY MATCHES "lib/win7")
|
||||
set(_winreq "Windows 7")
|
||||
endif()
|
||||
if(NOT "${WINHID_MIN_WINDOWS_VER}" STREQUAL "${_winreq}")
|
||||
if(NOT WinHID_FIND_QUIETLY)
|
||||
message(STATUS "Linking against WINHID_LIBRARY will enforce this minimum version: ${_winreq}")
|
||||
if(MSVC)
|
||||
set(_winreq "Unknown")
|
||||
if(WINHID_LIBRARY MATCHES "lib/w2k")
|
||||
set(_winreq "Windows 2000")
|
||||
elseif(WINHID_LIBRARY MATCHES "lib/wxp")
|
||||
set(_winreq "Windows XP")
|
||||
elseif(WINHID_LIBRARY MATCHES "lib/wnet")
|
||||
set(_winreq "Windows Server 2003")
|
||||
elseif(WINHID_LIBRARY MATCHES "lib/wlh")
|
||||
set(_winreq "Windows Vista")
|
||||
elseif(WINHID_LIBRARY MATCHES "lib/win7")
|
||||
set(_winreq "Windows 7")
|
||||
endif()
|
||||
if(NOT "${WINHID_MIN_WINDOWS_VER}" STREQUAL "${_winreq}")
|
||||
if(NOT WinHID_FIND_QUIETLY)
|
||||
message(STATUS
|
||||
"Linking against WINHID_LIBRARY will enforce this minimum version: ${_winreq}")
|
||||
endif()
|
||||
set(WINHID_MIN_WINDOWS_VER "${_winreq}" CACHE INTERNAL "" FORCE)
|
||||
endif()
|
||||
set(WINHID_MIN_WINDOWS_VER "${_winreq}" CACHE INTERNAL "" FORCE)
|
||||
endif()
|
||||
set(WINHID_LIBRARIES "${WINHID_LIBRARY}")
|
||||
set(WINHID_INCLUDE_DIRS "${WINHID_CRT_INCLUDE_DIR}" "${WINHID_INCLUDE_DIR}")
|
||||
set(WINHID_INCLUDE_DIRS
|
||||
"${WINHID_CRT_INCLUDE_DIR}"
|
||||
"${WINHID_INCLUDE_DIR}")
|
||||
mark_as_advanced(WINHID_ROOT_DIR)
|
||||
endif()
|
||||
|
||||
|
||||
163
FindWindowsSDK.cmake
Normal file
163
FindWindowsSDK.cmake
Normal file
@@ -0,0 +1,163 @@
|
||||
# - Find the Windows SDK aka Platform SDK
|
||||
#
|
||||
# Variables:
|
||||
# WINDOWSSDK_FOUND - if any version of the windows or platform SDK was found that is usable with the current version of visual studio
|
||||
# WINDOWSSDK_LATEST_DIR
|
||||
# WINDOWSSDK_LATEST_NAME
|
||||
# WINDOWSSDK_FOUND_PREFERENCE - if we found an entry indicating a "preferred" SDK listed for this visual studio version
|
||||
# WINDOWSSDK_PREFERRED_DIR
|
||||
# WINDOWSSDK_PREFERRED_NAME
|
||||
#
|
||||
# WINDOWSSDK_DIRS - contains no duplicates, ordered most recent first.
|
||||
# WINDOWSSDK_PREFERRED_FIRST_DIRS - contains no duplicates, ordered with preferred first, followed by the rest in descending recency
|
||||
#
|
||||
# Functions:
|
||||
# windowssdk_name_lookup(<directory> <output variable>) - Find the name corresponding with the SDK directory you pass in, or
|
||||
# NOTFOUND if not recognized. Your directory must be one of WINDOWSSDK_DIRS for this to work.
|
||||
#
|
||||
# Requires these CMake modules:
|
||||
# FindPackageHandleStandardArgs (known included with CMake >=2.6.2)
|
||||
#
|
||||
# Original Author:
|
||||
# 2012 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net>
|
||||
# http://academic.cleardefinition.com
|
||||
# Iowa State University HCI Graduate Program/VRAC
|
||||
#
|
||||
# Copyright Iowa State University 2012.
|
||||
# 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(_preferred_sdk_dirs)
|
||||
set(_win_sdk_dirs)
|
||||
set(_win_sdk_versanddirs)
|
||||
if(MSVC_VERSION GREATER 1310) # Newer than VS .NET/VS Toolkit 2003
|
||||
|
||||
# Environment variable for SDK dir
|
||||
if(EXISTS "$ENV{WindowsSDKDir}" AND (NOT "$ENV{WindowsSDKDir}" STREQUAL ""))
|
||||
message(STATUS "Got $ENV{WindowsSDKDir} - Windows/Platform SDK directories: ${_win_sdk_dirs}")
|
||||
list(APPEND _preferred_sdk_dirs "$ENV{WindowsSDKDir}")
|
||||
endif()
|
||||
|
||||
if(MSVC_VERSION LESS 1600)
|
||||
# Per-user current Windows SDK for VS2005/2008
|
||||
get_filename_component(_sdkdir
|
||||
"[HKEY_CURRENT_USER\\Software\\Microsoft\\Microsoft SDKs\\Windows;CurrentInstallFolder]"
|
||||
ABSOLUTE)
|
||||
if(EXISTS "${_sdkdir}")
|
||||
list(APPEND _preferred_sdk_dirs "${_sdkdir}")
|
||||
endif()
|
||||
|
||||
# System-wide current Windows SDK for VS2005/2008
|
||||
get_filename_component(_sdkdir
|
||||
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Microsoft SDKs\\Windows;CurrentInstallFolder]"
|
||||
ABSOLUTE)
|
||||
if(EXISTS "${_sdkdir}")
|
||||
list(APPEND _preferred_sdk_dirs "${_sdkdir}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
foreach(_winsdkver v8.0A v7.1 v7.0A v6.1 v6.0A v6.0)
|
||||
get_filename_component(_sdkdir
|
||||
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Microsoft SDKs\\Windows\\${_winsdkver};InstallationFolder]"
|
||||
ABSOLUTE)
|
||||
if(EXISTS "${_sdkdir}")
|
||||
list(APPEND _win_sdk_dirs "${_sdkdir}")
|
||||
list(APPEND
|
||||
_win_sdk_versanddirs
|
||||
"Windows SDK ${_winsdkver}"
|
||||
"${_sdkdir}")
|
||||
endif()
|
||||
endforeach()
|
||||
endif()
|
||||
if(MSVC_VERSION GREATER 1200)
|
||||
foreach(_platformsdkinfo
|
||||
"D2FF9F89-8AA2-4373-8A31-C838BF4DBBE1_Microsoft Platform SDK for Windows Server 2003 R2"
|
||||
"8F9E5EF3-A9A5-491B-A889-C58EFFECE8B3_Microsoft Platform SDK for Windows Server 2003 SP1")
|
||||
string(SUBSTRING "${_platformsdkinfo}" 0 36 _platformsdkguid)
|
||||
string(SUBSTRING "${_platformsdkinfo}" 37 -1 _platformsdkname)
|
||||
get_filename_component(_sdkdir
|
||||
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\MicrosoftSDK\\InstalledSDKs\\${_platformsdkguid};Install Dir]"
|
||||
ABSOLUTE)
|
||||
if(EXISTS "${_sdkdir}")
|
||||
list(APPEND _win_sdk_dirs "${_sdkdir}")
|
||||
list(APPEND _win_sdk_versanddirs "${_platformsdkname}" "${_sdkdir}")
|
||||
endif()
|
||||
|
||||
get_filename_component(_sdkdir
|
||||
"[HKEY_CURRENT_USER\\Software\\Microsoft\\MicrosoftSDK\\InstalledSDKs\\${_platformsdkguid};Install Dir]"
|
||||
ABSOLUTE)
|
||||
if(EXISTS "${_sdkdir}")
|
||||
list(APPEND _win_sdk_dirs "${_sdkdir}")
|
||||
list(APPEND _win_sdk_versanddirs "${_platformsdkname}" "${_sdkdir}")
|
||||
endif()
|
||||
endforeach()
|
||||
endif()
|
||||
|
||||
set(_win_sdk_versanddirs
|
||||
"${_win_sdk_versanddirs}"
|
||||
CACHE
|
||||
INTERNAL
|
||||
"mapping between windows sdk version locations and names"
|
||||
FORCE)
|
||||
|
||||
function(windowssdk_name_lookup _dir _outvar)
|
||||
list(FIND _win_sdk_versanddirs "${_dir}" _diridx)
|
||||
math(EXPR _nameidx "${_diridx} - 1")
|
||||
if(${_nameidx} GREATER -1)
|
||||
list(GET _win_sdk_versanddirs ${_nameidx} _sdkname)
|
||||
else()
|
||||
set(_sdkname "NOTFOUND")
|
||||
endif()
|
||||
set(${_outvar} "${_sdkname}" PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
||||
if(_win_sdk_dirs)
|
||||
# Remove duplicates
|
||||
list(REMOVE_DUPLICATES _win_sdk_dirs)
|
||||
list(GET _win_sdk_dirs 0 WINDOWSSDK_LATEST_DIR)
|
||||
windowssdk_name_lookup("${WINDOWSSDK_LATEST_DIR}"
|
||||
WINDOWSSDK_LATEST_NAME)
|
||||
set(WINDOWSSDK_DIRS ${_win_sdk_dirs})
|
||||
endif()
|
||||
if(_preferred_sdk_dirs)
|
||||
list(GET _preferred_sdk_dirs 0 WINDOWSSDK_PREFERRED_DIR)
|
||||
windowssdk_name_lookup("${WINDOWSSDK_LATEST_DIR}"
|
||||
WINDOWSSDK_PREFERRED_NAME)
|
||||
set(WINDOWSSDK_PREFERRED_FIRST_DIRS
|
||||
${_preferred_sdk_dirs}
|
||||
${_win_sdk_dirs})
|
||||
list(REMOVE_DUPLICATES WINDOWSSDK_PREFERRED_FIRST_DIRS)
|
||||
set(WINDOWSSDK_FOUND_PREFERENCE ON)
|
||||
|
||||
# In case a preferred dir was found that isn't found otherwise
|
||||
#set(WINDOWSSDK_DIRS ${WINDOWSSDK_DIRS} ${WINDOWSSDK_PREFERRED_FIRST_DIRS})
|
||||
#list(REMOVE_DUPLICATES WINDOWSSDK_DIRS)
|
||||
else()
|
||||
set(WINDOWSSDK_PREFERRED_DIR "${WINDOWSSDK_LATEST_DIR}")
|
||||
set(WINDOWSSDK_PREFERRED_NAME "${WINDOWSSDK_LATEST_NAME}")
|
||||
set(WINDOWSSDK_PREFERRED_FIRST_DIRS ${WINDOWSSDK_DIRS})
|
||||
set(WINDOWSSDK_FOUND_PREFERENCE OFF)
|
||||
endif()
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(WindowsSDK
|
||||
"No compatible version of the Windows SDK or Platform SDK found."
|
||||
WINDOWSSDK_DIRS)
|
||||
|
||||
if(WINDOWSSDK_FOUND)
|
||||
if(NOT _winsdk_remembered_dirs STREQUAL WINDOWSSDK_DIRS)
|
||||
set(_winsdk_remembered_dirs
|
||||
"${WINDOWSSDK_DIRS}"
|
||||
CACHE
|
||||
INTERNAL
|
||||
""
|
||||
FORCE)
|
||||
if(NOT WindowsSDK_FIND_QUIETLY)
|
||||
foreach(_sdkdir ${WINDOWSSDK_DIRS})
|
||||
windowssdk_name_lookup("${_sdkdir}" _sdkname)
|
||||
message(STATUS " - Found ${_sdkname} at ${_sdkdir}")
|
||||
endforeach()
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
@@ -39,6 +39,10 @@ set(CPPCHECK_ROOT_DIR
|
||||
set(_oldappbundlesetting ${CMAKE_FIND_APPBUNDLE})
|
||||
set(CMAKE_FIND_APPBUNDLE NEVER)
|
||||
|
||||
if(CPPCHECK_EXECUTABLE AND NOT EXISTS "${CPPCHECK_EXECUTABLE}")
|
||||
set(CPPCHECK_EXECUTABLE "notfound" CACHE PATH FORCE "")
|
||||
endif()
|
||||
|
||||
# If we have a custom path, look there first.
|
||||
if(CPPCHECK_ROOT_DIR)
|
||||
find_program(CPPCHECK_EXECUTABLE
|
||||
@@ -57,37 +61,61 @@ find_program(CPPCHECK_EXECUTABLE NAMES cppcheck)
|
||||
# Restore original setting for appbundle finding
|
||||
set(CMAKE_FIND_APPBUNDLE ${_oldappbundlesetting})
|
||||
|
||||
# Find out where our test file is
|
||||
get_filename_component(_cppcheckmoddir ${CMAKE_CURRENT_LIST_FILE} PATH)
|
||||
set(_cppcheckdummyfile "${_cppcheckmoddir}/Findcppcheck.cpp")
|
||||
if(NOT EXISTS "${_cppcheckdummyfile}")
|
||||
message(FATAL_ERROR
|
||||
"Missing file ${_cppcheckdummyfile} - should be alongside Findcppcheck.cmake, can be found at https://github.com/rpavlik/cmake-modules")
|
||||
endif()
|
||||
|
||||
function(_cppcheck_test_arg _resultvar _arg)
|
||||
if(NOT CPPCHECK_EXECUTABLE)
|
||||
set(${_resultvar} NO)
|
||||
return()
|
||||
endif()
|
||||
execute_process(COMMAND
|
||||
"${CPPCHECK_EXECUTABLE}"
|
||||
"${_arg}"
|
||||
"--quiet"
|
||||
"${_cppcheckdummyfile}"
|
||||
RESULT_VARIABLE
|
||||
_cppcheck_result
|
||||
OUTPUT_QUIET
|
||||
ERROR_QUIET)
|
||||
if("${_cppcheck_result}" EQUAL 0)
|
||||
set(${_resultvar} YES PARENT_SCOPE)
|
||||
else()
|
||||
set(${_resultvar} NO PARENT_SCOPE)
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
function(_cppcheck_set_arg_var _argvar _arg)
|
||||
if("${${_argvar}}" STREQUAL "")
|
||||
_cppcheck_test_arg(_cppcheck_arg "${_arg}")
|
||||
if(_cppcheck_arg)
|
||||
set(${_argvar} "${_arg}" PARENT_SCOPE)
|
||||
endif()
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
if(CPPCHECK_EXECUTABLE)
|
||||
# Find out where our test file is
|
||||
get_filename_component(_cppcheckmoddir ${CMAKE_CURRENT_LIST_FILE} PATH)
|
||||
set(_cppcheckdummyfile "${_cppcheckmoddir}/Findcppcheck.cpp")
|
||||
|
||||
# Check for the two types of command line arguments by just trying them
|
||||
execute_process(COMMAND
|
||||
"${CPPCHECK_EXECUTABLE}"
|
||||
"--enable=style"
|
||||
"--quiet"
|
||||
"${_cppcheckdummyfile}"
|
||||
RESULT_VARIABLE
|
||||
_cppcheck_new_result
|
||||
OUTPUT_QUIET
|
||||
ERROR_QUIET)
|
||||
execute_process(COMMAND
|
||||
"${CPPCHECK_EXECUTABLE}"
|
||||
"--style"
|
||||
"--quiet"
|
||||
"${_cppcheckdummyfile}"
|
||||
RESULT_VARIABLE
|
||||
_cppcheck_old_result
|
||||
OUTPUT_QUIET
|
||||
ERROR_QUIET)
|
||||
if("${_cppcheck_new_result}" EQUAL 0)
|
||||
# New arguments
|
||||
set(CPPCHECK_UNUSEDFUNC_ARG "--enable=unusedFunctions")
|
||||
set(CPPCHECK_POSSIBLEERROR_ARG "--enable=possibleError")
|
||||
set(CPPCHECK_STYLE_ARG "--enable=style")
|
||||
set(CPPCHECK_QUIET_ARG "--quiet")
|
||||
set(CPPCHECK_INCLUDEPATH_ARG "-I")
|
||||
_cppcheck_set_arg_var(CPPCHECK_STYLE_ARG "--enable=style")
|
||||
_cppcheck_set_arg_var(CPPCHECK_STYLE_ARG "--style")
|
||||
if("${CPPCHECK_STYLE_ARG}" STREQUAL "--enable=style")
|
||||
|
||||
_cppcheck_set_arg_var(CPPCHECK_UNUSEDFUNC_ARG
|
||||
"--enable=unusedFunctions")
|
||||
_cppcheck_set_arg_var(CPPCHECK_INFORMATION_ARG "--enable=information")
|
||||
_cppcheck_set_arg_var(CPPCHECK_MISSINGINCLUDE_ARG
|
||||
"--enable=missingInclude")
|
||||
_cppcheck_set_arg_var(CPPCHECK_POSIX_ARG "--enable=posix")
|
||||
_cppcheck_set_arg_var(CPPCHECK_POSSIBLEERROR_ARG
|
||||
"--enable=possibleError")
|
||||
_cppcheck_set_arg_var(CPPCHECK_POSSIBLEERROR_ARG "--enable=all")
|
||||
|
||||
if(MSVC)
|
||||
set(CPPCHECK_TEMPLATE_ARG --template vs)
|
||||
set(CPPCHECK_FAIL_REGULAR_EXPRESSION "[(]error[)]")
|
||||
@@ -97,19 +125,14 @@ if(CPPCHECK_EXECUTABLE)
|
||||
set(CPPCHECK_FAIL_REGULAR_EXPRESSION " error: ")
|
||||
set(CPPCHECK_WARN_REGULAR_EXPRESSION " style: ")
|
||||
else()
|
||||
message(STATUS
|
||||
"Warning: FindCppcheck doesn't know how to format error messages for your compiler!")
|
||||
set(CPPCHECK_TEMPLATE_ARG --template gcc)
|
||||
set(CPPCHECK_FAIL_REGULAR_EXPRESSION " error: ")
|
||||
set(CPPCHECK_WARN_REGULAR_EXPRESSION " style: ")
|
||||
endif()
|
||||
elseif("${_cppcheck_old_result}" EQUAL 0)
|
||||
elseif("${CPPCHECK_STYLE_ARG}" STREQUAL "--style")
|
||||
# Old arguments
|
||||
set(CPPCHECK_UNUSEDFUNC_ARG "--unused-functions")
|
||||
set(CPPCHECK_POSSIBLEERROR_ARG "--all")
|
||||
set(CPPCHECK_STYLE_ARG "--style")
|
||||
set(CPPCHECK_QUIET_ARG "--quiet")
|
||||
set(CPPCHECK_INCLUDEPATH_ARG "-I")
|
||||
_cppcheck_set_arg_var(CPPCHECK_UNUSEDFUNC_ARG "--unused-functions")
|
||||
_cppcheck_set_arg_var(CPPCHECK_POSSIBLEERROR_ARG "--all")
|
||||
set(CPPCHECK_FAIL_REGULAR_EXPRESSION "error:")
|
||||
set(CPPCHECK_WARN_REGULAR_EXPRESSION "[(]style[)]")
|
||||
else()
|
||||
@@ -118,6 +141,8 @@ if(CPPCHECK_EXECUTABLE)
|
||||
"WARNING: Can't detect whether CPPCHECK wants new or old-style arguments!")
|
||||
endif()
|
||||
|
||||
set(CPPCHECK_QUIET_ARG "--quiet")
|
||||
set(CPPCHECK_INCLUDEPATH_ARG "-I")
|
||||
|
||||
endif()
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@ include(SelectLibraryConfigurations)
|
||||
select_library_configurations(CPPUNIT)
|
||||
|
||||
# Might want to look close to the library first for the includes.
|
||||
get_filename_component(_libdir "${MYSIMPLEPACKAGE_LIBRARY}" PATH)
|
||||
get_filename_component(_libdir "${CPPUNIT_LIBRARY_RELEASE}" PATH)
|
||||
|
||||
find_path(CPPUNIT_INCLUDE_DIR
|
||||
NAMES
|
||||
|
||||
@@ -23,19 +23,27 @@ find_package(CUDA QUIET)
|
||||
file(TO_CMAKE_PATH "${CUDA_SDK_ROOT_DIR}/C/common" CUTIL_ROOT_DIR)
|
||||
|
||||
if(NOT EXISTS "${CUTIL_ROOT_DIR}/src/cutil.cpp")
|
||||
set(CUDA_SDK_ROOT_DIR SDKDIR-NOTFOUND CACHE PATH "NVIDIA GPU Computing SDK dir" FORCE)
|
||||
set(CUDA_SDK_ROOT_DIR
|
||||
SDKDIR-NOTFOUND
|
||||
CACHE
|
||||
PATH
|
||||
"NVIDIA GPU Computing SDK dir"
|
||||
FORCE)
|
||||
endif()
|
||||
|
||||
# handle the QUIETLY and REQUIRED arguments and set xxx_FOUND to TRUE if
|
||||
# all listed variables are TRUE
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(cutil DEFAULT_MSG CUDA_SDK_ROOT_DIR CUDA_FOUND)
|
||||
find_package_handle_standard_args(cutil
|
||||
DEFAULT_MSG
|
||||
CUDA_SDK_ROOT_DIR
|
||||
CUDA_FOUND)
|
||||
|
||||
if(CUTIL_FOUND)
|
||||
if(CUTIL_FOUND)
|
||||
get_filename_component(_moddir "${CMAKE_CURRENT_LIST_FILE}" PATH)
|
||||
add_subdirectory("${_moddir}/nested_targets/cutil")
|
||||
|
||||
|
||||
|
||||
|
||||
function(install_cutil dest)
|
||||
install(TARGETS cutil
|
||||
RUNTIME DESTINATION "${dest}"
|
||||
|
||||
@@ -106,11 +106,9 @@ function(get_compiler_info_string _var)
|
||||
set(_verstring "gcc${_gccver}")
|
||||
|
||||
else()
|
||||
# Some other compiler we don't handle yet.
|
||||
message(STATUS
|
||||
"WARNING: Not GCC or MSVC, so we invented a messy compiler info string")
|
||||
# Some other compiler we don't handle in more detail yet.
|
||||
string(REGEX REPLACE " " "_" _verstring "${CMAKE_GENERATOR}")
|
||||
set(_verstring "generator:${_verstring}")
|
||||
set(_verstring "${CMAKE_CXX_COMPILER_ID}:generator:${_verstring}")
|
||||
endif()
|
||||
|
||||
# Return _verstring
|
||||
|
||||
@@ -3,16 +3,16 @@
|
||||
# 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> [<additonal arguments to git describe> ...])
|
||||
# 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> [<additonal arguments to git describe> ...])
|
||||
# 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> [<additonal arguments to git describe> ...])
|
||||
# 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
|
||||
@@ -40,21 +40,33 @@ set(__get_git_revision_description YES)
|
||||
get_filename_component(_gitdescmoddir ${CMAKE_CURRENT_LIST_FILE} PATH)
|
||||
|
||||
function(get_git_head_revision _refspecvar _hashvar)
|
||||
set(GIT_DIR "${CMAKE_SOURCE_DIR}/.git")
|
||||
if(NOT EXISTS "${GIT_DIR}")
|
||||
# not in git
|
||||
set(${_refspecvar} "GITDIR-NOTFOUND" PARENT_SCOPE)
|
||||
set(${_hashvar} "GITDIR-NOTFOUND" PARENT_SCOPE)
|
||||
return()
|
||||
endif()
|
||||
set(GIT_PARENT_DIR "${CMAKE_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()
|
||||
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)
|
||||
configure_file("${_gitdescmoddir}/GetGitRevisionDescription.cmake.in"
|
||||
"${GIT_DATA}/grabRef.cmake"
|
||||
@ONLY)
|
||||
include("${GIT_DATA}/grabRef.cmake")
|
||||
|
||||
set(${_refspecvar} "${HEAD_REF}" PARENT_SCOPE)
|
||||
@@ -67,11 +79,11 @@ function(git_describe _var)
|
||||
endif()
|
||||
get_git_head_revision(refspec hash)
|
||||
if(NOT GIT_FOUND)
|
||||
set(${_var} "GIT-NOTFOUND" PARENT_SCOPE)
|
||||
set(${_var} "GIT-NOTFOUND" PARENT_SCOPE)
|
||||
return()
|
||||
endif()
|
||||
if(NOT hash)
|
||||
set(${_var} "HEAD-HASH-NOTFOUND" PARENT_SCOPE)
|
||||
set(${_var} "HEAD-HASH-NOTFOUND" PARENT_SCOPE)
|
||||
return()
|
||||
endif()
|
||||
|
||||
@@ -85,10 +97,17 @@ function(git_describe _var)
|
||||
|
||||
#message(STATUS "Arguments to execute_process: ${ARGN}")
|
||||
|
||||
execute_process(COMMAND "${GIT_EXECUTABLE}" describe ${hash} ${ARGN}
|
||||
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
|
||||
RESULT_VARIABLE res
|
||||
OUTPUT_VARIABLE out
|
||||
execute_process(COMMAND
|
||||
"${GIT_EXECUTABLE}"
|
||||
describe
|
||||
${hash}
|
||||
${ARGN}
|
||||
WORKING_DIRECTORY
|
||||
"${CMAKE_SOURCE_DIR}"
|
||||
RESULT_VARIABLE
|
||||
res
|
||||
OUTPUT_VARIABLE
|
||||
out
|
||||
ERROR_QUIET
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
if(NOT res EQUAL 0)
|
||||
|
||||
@@ -13,18 +13,26 @@
|
||||
# (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}")
|
||||
|
||||
configure_file("@GIT_DIR@/${HEAD_REF}" "@GIT_DATA@/head-ref" COPYONLY)
|
||||
if(EXISTS "@GIT_DIR@/${HEAD_REF}")
|
||||
configure_file("@GIT_DIR@/${HEAD_REF}" "@GIT_DATA@/head-ref" COPYONLY)
|
||||
elseif(EXISTS "@GIT_DIR@/logs/${HEAD_REF}")
|
||||
configure_file("@GIT_DIR@/logs/${HEAD_REF}" "@GIT_DATA@/head-ref" COPYONLY)
|
||||
set(HEAD_HASH "${HEAD_REF}")
|
||||
endif()
|
||||
else()
|
||||
# detached HEAD
|
||||
configure_file("@GIT_DIR@/HEAD" "@GIT_DATA@/head-ref" COPYONLY)
|
||||
endif()
|
||||
|
||||
file(READ "@GIT_DATA@/head-ref" HEAD_HASH LIMIT 1024)
|
||||
string(STRIP "${HEAD_HASH}" HEAD_HASH)
|
||||
if(NOT HEAD_HASH)
|
||||
file(READ "@GIT_DATA@/head-ref" HEAD_HASH LIMIT 1024)
|
||||
string(STRIP "${HEAD_HASH}" HEAD_HASH)
|
||||
endif()
|
||||
|
||||
@@ -40,15 +40,15 @@ function(add_lua_target _target _dest)
|
||||
if(NOT LUA_TARGET_LUAC_EXECUTABLE)
|
||||
if(TARGET luac)
|
||||
set(LUA_TARGET_LUAC_EXECUTABLE luac)
|
||||
mark_as_advanced(LUA_TARGET_LUAC_EXECUTABLE)
|
||||
else()
|
||||
find_program(LUA_TARGET_LUAC_EXECUTABLE
|
||||
NAMES
|
||||
luac)
|
||||
find_program(LUA_TARGET_LUAC_EXECUTABLE NAMES luac)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(NOT LUA_TARGET_LUAC_EXECUTABLE)
|
||||
message(FATAL_ERROR "Can't find luac: please give LUA_TARGET_LUAC_EXECUTABLE a useful value - currently ${LUA_TARGET_LUAC_EXECUTABLE}")
|
||||
message(FATAL_ERROR
|
||||
"Can't find luac: please give LUA_TARGET_LUAC_EXECUTABLE a useful value - currently ${LUA_TARGET_LUAC_EXECUTABLE}")
|
||||
endif()
|
||||
mark_as_advanced(LUA_TARGET_LUAC_EXECUTABLE)
|
||||
|
||||
@@ -60,7 +60,9 @@ function(add_lua_target _target _dest)
|
||||
get_filename_component(fullpath "${fn}" ABSOLUTE)
|
||||
get_filename_component(fn "${fn}" NAME)
|
||||
else()
|
||||
get_filename_component(fullpath "${CMAKE_CURRENT_SOURCE_DIR}/${fn}" ABSOLUTE)
|
||||
get_filename_component(fullpath
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/${fn}"
|
||||
ABSOLUTE)
|
||||
endif()
|
||||
|
||||
# Clean up output file name
|
||||
@@ -88,7 +90,11 @@ function(add_lua_target _target _dest)
|
||||
SOURCES ${SOURCES}
|
||||
DEPENDS ${ALLFILES})
|
||||
if(TARGET "${LUA_TARGET_LUAC_EXECUTABLE}")
|
||||
get_property(_luac_imported TARGET "${LUA_TARGET_LUAC_EXECUTABLE}" PROPERTY IMPORTED)
|
||||
get_property(_luac_imported
|
||||
TARGET
|
||||
"${LUA_TARGET_LUAC_EXECUTABLE}"
|
||||
PROPERTY
|
||||
IMPORTED)
|
||||
if(NOT _luac_imported)
|
||||
add_dependencies(${_target} ${LUA_TARGET_LUAC_EXECUTABLE})
|
||||
endif()
|
||||
|
||||
@@ -21,7 +21,7 @@ function(option_requires name desc)
|
||||
list(REMOVE_AT args ${_off_found})
|
||||
set(OFF_BY_DEFAULT true)
|
||||
endif()
|
||||
|
||||
|
||||
set(found)
|
||||
set(missing)
|
||||
foreach(var ${args})
|
||||
@@ -31,22 +31,23 @@ function(option_requires name desc)
|
||||
list(APPEND missing ${var})
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
|
||||
if(NOT missing)
|
||||
set(OK TRUE)
|
||||
else()
|
||||
set(OK FALSE)
|
||||
endif()
|
||||
|
||||
|
||||
set(default ${OK})
|
||||
if(OFF_BY_DEFAULT)
|
||||
set(default OFF)
|
||||
endif()
|
||||
|
||||
|
||||
option(${name} "${desc}" ${default})
|
||||
|
||||
|
||||
if(${name} AND (NOT OK))
|
||||
message(FATAL_ERROR "${name} enabled but these dependencies were not valid: ${missing}")
|
||||
message(FATAL_ERROR
|
||||
"${name} enabled but these dependencies were not valid: ${missing}")
|
||||
endif()
|
||||
|
||||
endfunction()
|
||||
|
||||
@@ -72,7 +72,7 @@ Licenses
|
||||
|
||||
The modules that I wrote myself are all subject to this license:
|
||||
|
||||
> Copyright Iowa State University 2009-2010
|
||||
> Copyright Iowa State University 2009-2012
|
||||
>
|
||||
> Distributed under the Boost Software License, Version 1.0.
|
||||
>
|
||||
|
||||
116
UseMarkdown.cmake
Normal file
116
UseMarkdown.cmake
Normal file
@@ -0,0 +1,116 @@
|
||||
# - Convert markdown source files to HTML as a custom target
|
||||
#
|
||||
# include(UseMarkdown)
|
||||
# add_markdown_target(<target_name> <directory to copy to> <markdownfile> [<markdownfile>...] [RENAME <newname>])
|
||||
# Relative paths for the destination directory are considered with
|
||||
# with respect to CMAKE_CURRENT_BINARY_DIR. The RENAME argument is only
|
||||
# valid with a single markdown file as input.
|
||||
#
|
||||
#
|
||||
# install_markdown_target(<target_name> [extra arguments to INSTALL(FILES ...) ])
|
||||
#
|
||||
#
|
||||
# Requires CMake 2.6 or newer (uses the 'function' command)
|
||||
#
|
||||
# Original Author:
|
||||
# 2011 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net>
|
||||
# http://academic.cleardefinition.com
|
||||
# Iowa State University HCI Graduate Program/VRAC
|
||||
#
|
||||
# Copyright Iowa State University 2011-2012.
|
||||
# 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(__add_markdown_target)
|
||||
return()
|
||||
endif()
|
||||
set(__add_markdown_target YES)
|
||||
|
||||
define_property(TARGET
|
||||
PROPERTY
|
||||
MARKDOWN_TARGET_OUTPUTS
|
||||
BRIEF_DOCS
|
||||
"Markdown target outputs"
|
||||
FULL_DOCS
|
||||
"Output files of a target created by add_markdown_target")
|
||||
|
||||
function(add_markdown_target _target _dest)
|
||||
|
||||
if(NOT ARGN)
|
||||
message(WARNING
|
||||
"In add_markdown_target call for target ${_target}, no source files were specified!")
|
||||
return()
|
||||
endif()
|
||||
|
||||
find_package(Markdown QUIET)
|
||||
if(NOT MARKDOWN_EXECUTABLE)
|
||||
message(FATAL_ERROR "Can't find a markdown conversion tool!")
|
||||
endif()
|
||||
|
||||
set(NEW_NAME)
|
||||
list(FIND ARGN "RENAME" _renameloc)
|
||||
if(_renameloc GREATER -1)
|
||||
list(LENGTH ARGN _len)
|
||||
if(NOT _len EQUAL 3)
|
||||
message(FATAL_ERROR
|
||||
"Specifying RENAME requires 1 input file and 1 output name!")
|
||||
endif()
|
||||
list(GET ARGN 2 NEW_NAME)
|
||||
list(GET ARGN 0 ARGN)
|
||||
endif()
|
||||
|
||||
set(ALLFILES)
|
||||
set(SOURCES)
|
||||
foreach(fn ${ARGN})
|
||||
# Produce an absolute path to the input file
|
||||
if(IS_ABSOLUTE "${fn}")
|
||||
get_filename_component(fullpath "${fn}" ABSOLUTE)
|
||||
get_filename_component(fn "${fn}" NAME)
|
||||
else()
|
||||
get_filename_component(fullpath
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/${fn}"
|
||||
ABSOLUTE)
|
||||
endif()
|
||||
get_filename_component(fn_noext "${fn}" NAME_WE)
|
||||
|
||||
# Clean up output file name
|
||||
if(NEW_NAME)
|
||||
get_filename_component(absout "${_dest}/${NEW_NAME}" ABSOLUTE)
|
||||
else()
|
||||
get_filename_component(absout "${_dest}/${fn_noext}.html" ABSOLUTE)
|
||||
endif()
|
||||
|
||||
add_custom_command(OUTPUT "${absout}"
|
||||
COMMAND
|
||||
${CMAKE_COMMAND}
|
||||
ARGS -E make_directory "${_dest}"
|
||||
COMMAND
|
||||
${MARKDOWN_EXECUTABLE}
|
||||
ARGS "${fullpath}" > "${absout}"
|
||||
MAIN_DEPENDENCY "${fullpath}"
|
||||
VERBATIM
|
||||
COMMENT "Converting Markdown ${fn} to HTML in ${absout}...")
|
||||
list(APPEND SOURCES "${fullpath}")
|
||||
list(APPEND ALLFILES "${absout}")
|
||||
endforeach()
|
||||
|
||||
# Custom target depending on all the file copy commands
|
||||
add_custom_target(${_target}
|
||||
ALL
|
||||
SOURCES ${SOURCES}
|
||||
DEPENDS ${ALLFILES})
|
||||
set_property(TARGET ${_target} PROPERTY MARKDOWN_TARGET_OUTPUTS "${ALLFILES}")
|
||||
endfunction()
|
||||
|
||||
function(install_markdown_target _target)
|
||||
get_target_property(_mtoutputs ${_target} MARKDOWN_TARGET_OUTPUTS)
|
||||
if(NOT _mtoutputs)
|
||||
message(WARNING
|
||||
"install_markdown_target called on a target not created with add_markdown_target!")
|
||||
return()
|
||||
endif()
|
||||
|
||||
# Forward the call to install
|
||||
install(FILES ${_mtoutputs} ${ARGN})
|
||||
endfunction()
|
||||
254
cmake-2.8.10-modules/CMakePackageConfigHelpers.cmake
Normal file
254
cmake-2.8.10-modules/CMakePackageConfigHelpers.cmake
Normal file
@@ -0,0 +1,254 @@
|
||||
# - CONFIGURE_PACKAGE_CONFIG_FILE(), WRITE_BASIC_PACKAGE_VERSION_FILE()
|
||||
#
|
||||
# CONFIGURE_PACKAGE_CONFIG_FILE(<input> <output> INSTALL_DESTINATION <path>
|
||||
# [PATH_VARS <var1> <var2> ... <varN>]
|
||||
# [NO_SET_AND_CHECK_MACRO]
|
||||
# [NO_CHECK_REQUIRED_COMPONENTS_MACRO])
|
||||
#
|
||||
# CONFIGURE_PACKAGE_CONFIG_FILE() should be used instead of the plain
|
||||
# configure_file() command when creating the <Name>Config.cmake or <Name>-config.cmake
|
||||
# file for installing a project or library. It helps making the resulting package
|
||||
# relocatable by avoiding hardcoded paths in the installed Config.cmake file.
|
||||
#
|
||||
# In a FooConfig.cmake file there may be code like this to make the
|
||||
# install destinations know to the using project:
|
||||
# set(FOO_INCLUDE_DIR "@CMAKE_INSTALL_FULL_INCLUDEDIR@" )
|
||||
# set(FOO_DATA_DIR "@CMAKE_INSTALL_PREFIX@/@RELATIVE_DATA_INSTALL_DIR@" )
|
||||
# set(FOO_ICONS_DIR "@CMAKE_INSTALL_PREFIX@/share/icons" )
|
||||
# ...logic to determine installedPrefix from the own location...
|
||||
# set(FOO_CONFIG_DIR "${installedPrefix}/@CONFIG_INSTALL_DIR@" )
|
||||
# All 4 options shown above are not sufficient, since the first 3 hardcode
|
||||
# the absolute directory locations, and the 4th case works only if the logic
|
||||
# to determine the installedPrefix is correct, and if CONFIG_INSTALL_DIR contains
|
||||
# a relative path, which in general cannot be guaranteed.
|
||||
# This has the effect that the resulting FooConfig.cmake file would work poorly
|
||||
# under Windows and OSX, where users are used to choose the install location
|
||||
# of a binary package at install time, independent from how CMAKE_INSTALL_PREFIX
|
||||
# was set at build/cmake time.
|
||||
#
|
||||
# Using CONFIGURE_PACKAGE_CONFIG_FILE() helps. If used correctly, it makes the
|
||||
# resulting FooConfig.cmake file relocatable.
|
||||
# Usage:
|
||||
# 1. write a FooConfig.cmake.in file as you are used to
|
||||
# 2. insert a line containing only the string "@PACKAGE_INIT@"
|
||||
# 3. instead of set(FOO_DIR "@SOME_INSTALL_DIR@"), use set(FOO_DIR "@PACKAGE_SOME_INSTALL_DIR@")
|
||||
# (this must be after the @PACKAGE_INIT@ line)
|
||||
# 4. instead of using the normal configure_file(), use CONFIGURE_PACKAGE_CONFIG_FILE()
|
||||
#
|
||||
# The <input> and <output> arguments are the input and output file, the same way
|
||||
# as in configure_file().
|
||||
#
|
||||
# The <path> given to INSTALL_DESTINATION must be the destination where the FooConfig.cmake
|
||||
# file will be installed to. This can either be a relative or absolute path, both work.
|
||||
#
|
||||
# The variables <var1> to <varN> given as PATH_VARS are the variables which contain
|
||||
# install destinations. For each of them the macro will create a helper variable
|
||||
# PACKAGE_<var...>. These helper variables must be used
|
||||
# in the FooConfig.cmake.in file for setting the installed location. They are calculated
|
||||
# by CONFIGURE_PACKAGE_CONFIG_FILE() so that they are always relative to the
|
||||
# installed location of the package. This works both for relative and also for absolute locations.
|
||||
# For absolute locations it works only if the absolute location is a subdirectory
|
||||
# of CMAKE_INSTALL_PREFIX.
|
||||
#
|
||||
# By default configure_package_config_file() also generates two helper macros,
|
||||
# set_and_check() and check_required_components() into the FooConfig.cmake file.
|
||||
#
|
||||
# set_and_check() should be used instead of the normal set()
|
||||
# command for setting directories and file locations. Additionally to setting the
|
||||
# variable it also checks that the referenced file or directory actually exists
|
||||
# and fails with a FATAL_ERROR otherwise. This makes sure that the created
|
||||
# FooConfig.cmake file does not contain wrong references.
|
||||
# When using the NO_SET_AND_CHECK_MACRO, this macro is not generated into the
|
||||
# FooConfig.cmake file.
|
||||
#
|
||||
# check_required_components(<package_name>) should be called at the end of the
|
||||
# FooConfig.cmake file if the package supports components.
|
||||
# This macro checks whether all requested, non-optional components have been found,
|
||||
# and if this is not the case, sets the Foo_FOUND variable to FALSE, so that the package
|
||||
# is considered to be not found.
|
||||
# It does that by testing the Foo_<Component>_FOUND variables for all requested
|
||||
# required components.
|
||||
# When using the NO_CHECK_REQUIRED_COMPONENTS option, this macro is not generated
|
||||
# into the FooConfig.cmake file.
|
||||
#
|
||||
# For an example see below the documentation for WRITE_BASIC_PACKAGE_VERSION_FILE().
|
||||
#
|
||||
#
|
||||
# WRITE_BASIC_PACKAGE_VERSION_FILE( filename VERSION major.minor.patch COMPATIBILITY (AnyNewerVersion|SameMajorVersion|ExactVersion) )
|
||||
#
|
||||
# Writes a file for use as <package>ConfigVersion.cmake file to <filename>.
|
||||
# See the documentation of find_package() for details on this.
|
||||
# filename is the output filename, it should be in the build tree.
|
||||
# major.minor.patch is the version number of the project to be installed
|
||||
# The COMPATIBILITY mode AnyNewerVersion means that the installed package version
|
||||
# will be considered compatible if it is newer or exactly the same as the requested version.
|
||||
# This mode should be used for packages which are fully backward compatible,
|
||||
# also across major versions.
|
||||
# If SameMajorVersion is used instead, then the behaviour differs from AnyNewerVersion
|
||||
# in that the major version number must be the same as requested, e.g. version 2.0 will
|
||||
# not be considered compatible if 1.0 is requested.
|
||||
# This mode should be used for packages which guarantee backward compatibility within the
|
||||
# same major version.
|
||||
# If ExactVersion is used, then the package is only considered compatible if the requested
|
||||
# version matches exactly its own version number (not considering the tweak version).
|
||||
# For example, version 1.2.3 of a package is only considered compatible to requested version 1.2.3.
|
||||
# This mode is for packages without compatibility guarantees.
|
||||
# If your project has more elaborated version matching rules, you will need to write your
|
||||
# own custom ConfigVersion.cmake file instead of using this macro.
|
||||
#
|
||||
# Internally, this macro executes configure_file() to create the resulting
|
||||
# version file. Depending on the COMPATIBLITY, either the file
|
||||
# BasicConfigVersion-SameMajorVersion.cmake.in or BasicConfigVersion-AnyNewerVersion.cmake.in
|
||||
# is used. Please note that these two files are internal to CMake and you should
|
||||
# not call configure_file() on them yourself, but they can be used as starting
|
||||
# point to create more sophisticted custom ConfigVersion.cmake files.
|
||||
#
|
||||
#
|
||||
# Example using both configure_package_config_file() and write_basic_package_version_file():
|
||||
# CMakeLists.txt:
|
||||
# set(INCLUDE_INSTALL_DIR include/ ... CACHE )
|
||||
# set(LIB_INSTALL_DIR lib/ ... CACHE )
|
||||
# set(SYSCONFIG_INSTALL_DIR etc/foo/ ... CACHE )
|
||||
# ...
|
||||
# include(CMakePackageConfigHelpers)
|
||||
# configure_package_config_file(FooConfig.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/FooConfig.cmake
|
||||
# INSTALL_DESTINATION ${LIB_INSTALL_DIR}/Foo/cmake
|
||||
# PATH_VARS INCLUDE_INSTALL_DIR SYSCONFIG_INSTALL_DIR)
|
||||
# write_basic_package_version_file(${CMAKE_CURRENT_BINARY_DIR}/FooConfigVersion.cmake
|
||||
# VERSION 1.2.3
|
||||
# COMPATIBILITY SameMajorVersion )
|
||||
# install(FILES ${CMAKE_CURRENT_BINARY_DIR}/FooConfig.cmake ${CMAKE_CURRENT_BINARY_DIR}/FooConfigVersion.cmake
|
||||
# DESTINATION ${LIB_INSTALL_DIR}/Foo/cmake )
|
||||
#
|
||||
# With a FooConfig.cmake.in:
|
||||
# set(FOO_VERSION x.y.z)
|
||||
# ...
|
||||
# @PACKAGE_INIT@
|
||||
# ...
|
||||
# set_and_check(FOO_INCLUDE_DIR "@PACKAGE_INCLUDE_INSTALL_DIR@")
|
||||
# set_and_check(FOO_SYSCONFIG_DIR "@PACKAGE_SYSCONFIG_INSTALL_DIR@")
|
||||
#
|
||||
# check_required_components(Foo)
|
||||
|
||||
|
||||
#=============================================================================
|
||||
# Copyright 2012 Alexander Neundorf <neundorf@kde.org>
|
||||
#
|
||||
# Distributed under the OSI-approved BSD License (the "License");
|
||||
# see below.
|
||||
#
|
||||
# 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.
|
||||
#=============================================================================
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions
|
||||
# are met:
|
||||
#
|
||||
# * Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
#
|
||||
# * Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in the
|
||||
# documentation and/or other materials provided with the distribution.
|
||||
#
|
||||
# * Neither the names of Kitware, Inc., the Insight Software Consortium,
|
||||
# nor the names of their contributors may be used to endorse or promote
|
||||
# products derived from this software without specific prior written
|
||||
# permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
# HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#=============================================================================
|
||||
|
||||
include(CMakeParseArguments)
|
||||
|
||||
include(WriteBasicConfigVersionFile)
|
||||
|
||||
macro(WRITE_BASIC_PACKAGE_VERSION_FILE)
|
||||
write_basic_config_version_file(${ARGN})
|
||||
endmacro()
|
||||
|
||||
|
||||
function(CONFIGURE_PACKAGE_CONFIG_FILE _inputFile _outputFile)
|
||||
set(options NO_SET_AND_CHECK_MACRO NO_CHECK_REQUIRED_COMPONENTS_MACRO)
|
||||
set(oneValueArgs INSTALL_DESTINATION )
|
||||
set(multiValueArgs PATH_VARS )
|
||||
|
||||
cmake_parse_arguments(CCF "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
|
||||
|
||||
if(CCF_UNPARSED_ARGUMENTS)
|
||||
message(FATAL_ERROR "Unknown keywords given to CONFIGURE_PACKAGE_CONFIG_FILE(): \"${CCF_UNPARSED_ARGUMENTS}\"")
|
||||
endif()
|
||||
|
||||
if(NOT CCF_INSTALL_DESTINATION)
|
||||
message(FATAL_ERROR "No INSTALL_DESTINATION given to CONFIGURE_PACKAGE_CONFIG_FILE()")
|
||||
endif()
|
||||
|
||||
if(IS_ABSOLUTE "${CCF_INSTALL_DESTINATION}")
|
||||
set(absInstallDir "${CCF_INSTALL_DESTINATION}")
|
||||
else()
|
||||
set(absInstallDir "${CMAKE_INSTALL_PREFIX}/${CCF_INSTALL_DESTINATION}")
|
||||
endif()
|
||||
file(RELATIVE_PATH PACKAGE_RELATIVE_PATH "${absInstallDir}" "${CMAKE_INSTALL_PREFIX}" )
|
||||
|
||||
foreach(var ${CCF_PATH_VARS})
|
||||
if(NOT DEFINED ${var})
|
||||
message(FATAL_ERROR "Variable ${var} does not exist")
|
||||
else()
|
||||
if(IS_ABSOLUTE "${${var}}")
|
||||
string(REPLACE "${CMAKE_INSTALL_PREFIX}" "\${PACKAGE_PREFIX_DIR}"
|
||||
PACKAGE_${var} "${${var}}")
|
||||
else()
|
||||
set(PACKAGE_${var} "\${PACKAGE_PREFIX_DIR}/${${var}}")
|
||||
endif()
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
set(PACKAGE_INIT "
|
||||
####### Expanded from @PACKAGE_INIT@ by configure_package_config_file() #######
|
||||
get_filename_component(PACKAGE_PREFIX_DIR \"\${CMAKE_CURRENT_LIST_DIR}/${PACKAGE_RELATIVE_PATH}\" ABSOLUTE)
|
||||
")
|
||||
|
||||
if(NOT CCF_NO_SET_AND_CHECK_MACRO)
|
||||
set(PACKAGE_INIT "${PACKAGE_INIT}
|
||||
macro(set_and_check _var _file)
|
||||
set(\${_var} \"\${_file}\")
|
||||
if(NOT EXISTS \"\${_file}\")
|
||||
message(FATAL_ERROR \"File or directory \${_file} referenced by variable \${_var} does not exist !\")
|
||||
endif()
|
||||
endmacro()
|
||||
")
|
||||
endif()
|
||||
|
||||
|
||||
if(NOT CCF_NO_CHECK_REQUIRED_COMPONENTS_MACRO)
|
||||
set(PACKAGE_INIT "${PACKAGE_INIT}
|
||||
macro(check_required_components _NAME)
|
||||
foreach(comp \${\${_NAME}_FIND_COMPONENTS})
|
||||
if(NOT \${_NAME}_\${comp}_FOUND)
|
||||
if(\${_NAME}_FIND_REQUIRED_\${comp})
|
||||
set(\${_NAME}_FOUND FALSE)
|
||||
endif()
|
||||
endif()
|
||||
endforeach()
|
||||
endmacro()
|
||||
")
|
||||
endif()
|
||||
|
||||
set(PACKAGE_INIT "${PACKAGE_INIT}
|
||||
####################################################################################")
|
||||
|
||||
configure_file("${_inputFile}" "${_outputFile}" @ONLY)
|
||||
|
||||
endfunction()
|
||||
@@ -1,4 +1,4 @@
|
||||
/** @file list.h
|
||||
/** @file
|
||||
@brief Fake header to allow GHOST 4.09 use with MSVC 2005
|
||||
|
||||
@date 2010
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/** @file list.h
|
||||
/** @file
|
||||
@brief Fake header to allow GHOST 4.09 use with MSVC 2005
|
||||
|
||||
@date 2010
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/** @file set.h
|
||||
/** @file
|
||||
@brief Fake header to allow GHOST 4.09 use with MSVC 2005
|
||||
|
||||
@date 2010
|
||||
@@ -14,4 +14,6 @@
|
||||
#pragma once
|
||||
|
||||
#include <set>
|
||||
using std::set;
|
||||
#include <functional>
|
||||
using std::set;
|
||||
using std::less;
|
||||
@@ -1,4 +1,4 @@
|
||||
/** @file vector.h
|
||||
/** @file
|
||||
@brief Fake header to allow GHOST 4.09 use with MSVC 2005
|
||||
|
||||
@date 2010
|
||||
|
||||
237
module-help.html
237
module-help.html
File diff suppressed because one or more lines are too long
503
module-help.txt
503
module-help.txt
@@ -1,4 +1,4 @@
|
||||
cmake version 2.8.3
|
||||
cmake version 2.8.6
|
||||
------------------------------------------------------------------------------
|
||||
Introduction
|
||||
|
||||
@@ -645,6 +645,71 @@ a few.
|
||||
Boost Software License, Version 1.0. (See accompanying file
|
||||
LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
FindAdrienne
|
||||
try to find Adrienne Electronics Corporation timecode card library
|
||||
|
||||
|
||||
|
||||
SDK available from the manufacturer: http://www.adrielec.com/
|
||||
|
||||
Cache Variables: (probably not for direct use in your scripts)
|
||||
|
||||
ADRIENNE_INCLUDE_DIR
|
||||
ADRIENNE_LIBRARY
|
||||
ADRIENNE_RUNTIME_LIBRARY
|
||||
ADRIENNE_INCLUDE_FILE
|
||||
|
||||
|
||||
|
||||
Variables you might use in your CMakeLists.txt:
|
||||
|
||||
ADRIENNE_FOUND
|
||||
ADRIENNE_INCLUDE_DIRS
|
||||
ADRIENNE_LIBRARIES
|
||||
ADRIENNE_RUNTIME_LIBRARIES - the AEC_NTTC.dll file
|
||||
ADRIENNE_RUNTIME_LIBRARY_DIRS
|
||||
|
||||
|
||||
|
||||
ADRIENNE_INCLUDE_FILENAME - this is probably AEC_NTTC.h, but it might also
|
||||
be AECINTTC.H.
|
||||
|
||||
|
||||
|
||||
ADRIENNE_INCLUDE_HAS_EXTERN_C - Some (most) versions of the header already
|
||||
wrap their definitions in extern "C" { }, but some do not.
|
||||
|
||||
|
||||
|
||||
ADRIENNE_DEFINITIONS - defines a quoted ADRIENNE_INCLUDE_FILENAME as above,
|
||||
so you can write a line like #include ADRIENNE_INCLUDE_FILENAME
|
||||
Also defines ADRIENNE_BEFORE_INCLUDE and ADRIENNE_AFTER_INCLUDE to handle
|
||||
adding extern "C" { and } if the header file doesn't do so itself.
|
||||
|
||||
|
||||
|
||||
Variables that might be set by the user in the gui/command line to
|
||||
help find the library:
|
||||
|
||||
ADRIENNE_ROOT_DIR - root of an Adrienne CD, disk, or extracted/copied contents
|
||||
thereof.
|
||||
|
||||
|
||||
|
||||
Requires these CMake modules:
|
||||
|
||||
FindPackageHandleStandardArgs (known included with CMake >=2.6.2)
|
||||
|
||||
|
||||
|
||||
Original Author: 2012 Ryan Pavlik <rpavlik@iastate.edu>
|
||||
<abiryan@ryand.net> http://academic.cleardefinition.com Iowa State
|
||||
University HCI Graduate Program/VRAC
|
||||
|
||||
Copyright Iowa State University 2012. 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)
|
||||
|
||||
FindBluez
|
||||
try to find Bluez
|
||||
|
||||
@@ -696,7 +761,7 @@ a few.
|
||||
|
||||
CPPDOM_ROOT_DIR - A directory prefix to search
|
||||
(a path that contains include/ as a subdirectory)
|
||||
CPPDOM_ADDITIONAL_VERSIONS - Additional versions (outside of 0.7.8 to 1.0.0)
|
||||
CPPDOM_ADDITIONAL_VERSIONS - Additional versions (outside of 0.7.8 to 1.2.0)
|
||||
to use when constructing search names and paths
|
||||
|
||||
|
||||
@@ -713,11 +778,11 @@ a few.
|
||||
change this environment variable, because it cannot auto-detect this
|
||||
change and trigger an automatic re-run.
|
||||
|
||||
Original Author: 2009-2010 Ryan Pavlik <rpavlik@iastate.edu>
|
||||
Original Author: 2009-2012 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
|
||||
Copyright Iowa State University 2009-2012. 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)
|
||||
|
||||
@@ -752,6 +817,110 @@ a few.
|
||||
Boost Software License, Version 1.0. (See accompanying file
|
||||
LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
FindDirectInput
|
||||
try to find DirectInput library (part of DirectX SDK)
|
||||
|
||||
|
||||
|
||||
Cache Variables: (probably not for direct use in your scripts)
|
||||
|
||||
DIRECTINPUT_DXGUID_LIBRARY
|
||||
DIRECTINPUT_DXERR_LIBRARY
|
||||
DIRECTINPUT_DINPUT_LIBRARY
|
||||
DIRECTINPUT_INCLUDE_DIR
|
||||
|
||||
|
||||
|
||||
Non-cache variables you should use in your CMakeLists.txt:
|
||||
|
||||
DIRECTINPUT_LIBRARIES
|
||||
DIRECTINPUT_INCLUDE_DIRS
|
||||
DIRECTINPUT_FOUND - if this is not true, do not attempt to use this library
|
||||
|
||||
|
||||
|
||||
Requires these CMake modules:
|
||||
|
||||
FindPackageHandleStandardArgs (known included with CMake >=2.6.2)
|
||||
|
||||
|
||||
|
||||
Original Author: 2011 Ryan Pavlik <rpavlik@iastate.edu>
|
||||
<abiryan@ryand.net> http://academic.cleardefinition.com Iowa State
|
||||
University HCI Graduate Program/VRAC
|
||||
|
||||
Copyright Iowa State University 2011. 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)
|
||||
|
||||
FindDirectShow
|
||||
Find Microsoft DirectShow sample files, library, and headers.
|
||||
|
||||
|
||||
|
||||
DIRECTSHOW_INCLUDE_DIRS - where to find needed include file
|
||||
DIRECTSHOW_BASECLASS_DIR- Directory containing the DirectShow baseclass sample code.
|
||||
DIRECTSHOW_FOUND - True if DirectShow found.
|
||||
|
||||
|
||||
|
||||
Requires these CMake modules:
|
||||
|
||||
FindPackageHandleStandardArgs (known included with CMake >=2.6.2)
|
||||
|
||||
|
||||
|
||||
Initially in VRPN - Distributed under the Boost Software License,
|
||||
Version 1.0.
|
||||
|
||||
Almost entirely re-written by: 2012 Ryan Pavlik <rpavlik@iastate.edu>
|
||||
<abiryan@ryand.net> http://academic.cleardefinition.com Iowa State
|
||||
University HCI Graduate Program/VRAC
|
||||
|
||||
Copyright Iowa State University 2012. 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)
|
||||
|
||||
FindDirectX
|
||||
try to find part of DirectX SDK
|
||||
|
||||
|
||||
|
||||
Cache Variables: (probably not for direct use in your scripts)
|
||||
|
||||
DIRECTX_INCLUDE_DIR
|
||||
|
||||
|
||||
|
||||
Variables you should use in your CMakeLists.txt:
|
||||
|
||||
DIRECTX_DXGUID_LIBRARY
|
||||
DIRECTX_DXERR_LIBRARY
|
||||
DIRECTX_DINPUT_LIBRARY
|
||||
DIRECTX_DINPUT_INCLUDE_DIR
|
||||
DIRECTX_D3D9_LIBRARY
|
||||
DIRECTX_D3DXOF_LIBRARY
|
||||
DIRECTX_D3DX9_LIBRARIES
|
||||
DIRECTX_INCLUDE_DIRS
|
||||
DIRECTX_FOUND - if this is not true, do not attempt to use this library
|
||||
|
||||
|
||||
|
||||
Requires these CMake modules:
|
||||
|
||||
FindPackageHandleStandardArgs (known included with CMake >=2.6.2)
|
||||
SelectLibraryConfigurations
|
||||
|
||||
|
||||
|
||||
Original Author: 2012 Ryan Pavlik <rpavlik@iastate.edu>
|
||||
<abiryan@ryand.net> http://academic.cleardefinition.com Iowa State
|
||||
University HCI Graduate Program/VRAC
|
||||
|
||||
Copyright Iowa State University 2012. 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)
|
||||
|
||||
FindFlagpoll
|
||||
try to find Flagpoll application, and offer package-finding services
|
||||
|
||||
@@ -913,7 +1082,7 @@ a few.
|
||||
|
||||
GMTL_ROOT_DIR - A directory prefix to search
|
||||
(a path that contains include/ as a subdirectory)
|
||||
GMTL_ADDITIONAL_VERSIONS - Additional versions (outside of 0.5.1 to 0.6.2)
|
||||
GMTL_ADDITIONAL_VERSIONS - Additional versions (outside of 0.5.1 to 0.7.0)
|
||||
to use when constructing search names and paths
|
||||
|
||||
|
||||
@@ -930,11 +1099,11 @@ a few.
|
||||
change this environment variable, because it cannot auto-detect this
|
||||
change and trigger an automatic re-run.
|
||||
|
||||
Original Author: 2009-2010 Ryan Pavlik <rpavlik@iastate.edu>
|
||||
Original Author: 2009-2012 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
|
||||
Copyright Iowa State University 2009-2012. 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)
|
||||
|
||||
@@ -1139,6 +1308,51 @@ a few.
|
||||
Boost Software License, Version 1.0. (See accompanying file
|
||||
LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
FindIDLJ
|
||||
try to find Java's IDLJ Interface Definition Language compiler.
|
||||
|
||||
|
||||
|
||||
Ideally used with CMake 2.8.5 or newer for Java support using
|
||||
FindJava.cmake and UseJava.cmake
|
||||
|
||||
Variables:
|
||||
|
||||
Java_IDLJ_COMMAND, executable for idlj
|
||||
IDLJ_FOUND, If false, do not try to use this
|
||||
|
||||
|
||||
|
||||
Function:
|
||||
|
||||
java_idlj(varname idlfile [extra idlj args]) - Generates
|
||||
the Java source files from the IDL file you indicate, and
|
||||
appends filenames suitable to add to a add_jar() call to the
|
||||
variable you specified.
|
||||
|
||||
|
||||
|
||||
Because the files generated from an IDL file are not entirely
|
||||
predictable, java_idlj runs idlj in the cmake step, rather than the
|
||||
build step, and triggers a CMake re-run when an idl file is modified.
|
||||
Already up-to-date generated source is not re-generated, however.
|
||||
|
||||
Files are generated in a directory created specifically for the
|
||||
particular IDL file and the particular call, in the build directory -
|
||||
there should be no worries about overwriting files or picking up too
|
||||
much with the wildcard.
|
||||
|
||||
You may wish to add the IDL file to your list of sources if you want
|
||||
it to appear in your IDE, but it is not necessary.
|
||||
|
||||
Original Author: 2012 Ryan Pavlik <rpavlik@iastate.edu>
|
||||
<abiryan@ryand.net> http://academic.cleardefinition.com Iowa State
|
||||
University HCI Graduate Program/VRAC
|
||||
|
||||
Copyright Iowa State University 2012. 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)
|
||||
|
||||
FindJCCL12
|
||||
try to find JCCL 1.2 library
|
||||
|
||||
@@ -1451,6 +1665,37 @@ a few.
|
||||
Boost Software License, Version 1.0. (See accompanying file
|
||||
LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
FindMarkdown
|
||||
try to find Markdown tool
|
||||
|
||||
|
||||
|
||||
Cache Variables:
|
||||
|
||||
MARKDOWN_EXECUTABLE
|
||||
|
||||
|
||||
|
||||
Non-cache variables you might use in your CMakeLists.txt:
|
||||
|
||||
MARKDOWN_FOUND
|
||||
|
||||
|
||||
|
||||
Requires these CMake modules:
|
||||
|
||||
FindPackageHandleStandardArgs (known included with CMake >=2.6.2)
|
||||
|
||||
|
||||
|
||||
Original Author: 2011 Ryan Pavlik <rpavlik@iastate.edu>
|
||||
<abiryan@ryand.net> http://academic.cleardefinition.com Iowa State
|
||||
University HCI Graduate Program/VRAC
|
||||
|
||||
Copyright Iowa State University 2011. 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)
|
||||
|
||||
FindOpenCV
|
||||
------------------------------
|
||||
|
||||
@@ -1493,12 +1738,16 @@ a few.
|
||||
|
||||
HDAPI_INCLUDE_DIR
|
||||
HDAPI_LIBRARY
|
||||
HDAPI_LIBRARY_RELEASE
|
||||
HDAPI_LIBRARY_DEBUG
|
||||
HDAPI_HDU_INCLUDE_DIR
|
||||
HDAPI_HDU_LIBRARY
|
||||
HDAPI_HDU_LIBRARY_RELEASE
|
||||
HDAPI_HDU_LIBRARY_DEBUG
|
||||
HLAPI_INCLUDE_DIR
|
||||
HLAPI_LIBRARY
|
||||
HLAPI_LIBRARY_RELEASE
|
||||
HLAPI_LIBRARY_DEBUG
|
||||
HLAPI_HLU_INCLUDE_DIR
|
||||
HLAPI_HLU_LIBRARY
|
||||
HLAPI_HLU_LIBRARY_RELEASE
|
||||
@@ -1537,7 +1786,7 @@ a few.
|
||||
|
||||
|
||||
|
||||
Original Author: 2009-2010 Ryan Pavlik <rpavlik@iastate.edu>
|
||||
Original Author: 2009-2012 Ryan Pavlik <rpavlik@iastate.edu>
|
||||
<abiryan@ryand.net> http://academic.cleardefinition.com Iowa State
|
||||
University HCI Graduate Program/VRAC
|
||||
|
||||
@@ -1581,6 +1830,118 @@ a few.
|
||||
Boost Software License, Version 1.0. (See accompanying file
|
||||
LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
FindPerformer
|
||||
try to find the OpenGL Performer library
|
||||
|
||||
|
||||
|
||||
Users may optionally supply:
|
||||
|
||||
PERFORMER_ROOT_DIR - a prefix to start searching.
|
||||
|
||||
|
||||
|
||||
Cache Variables: (probably not for direct use in your scripts)
|
||||
|
||||
PERFORMER_INCLUDE_DIR
|
||||
PERFORMER_LIBRARY
|
||||
PERFORMER_PFUI_LIBRARY - doesn't get included in PERFORMER_LIBRARIES
|
||||
PERFORMER_PFDU_UTIL_LIBRARY - doesn't get included in PERFORMER_LIBRARIES
|
||||
PERFORMER_PFV_LIBRARY - doesn't get included in PERFORMER_LIBRARIES
|
||||
|
||||
|
||||
|
||||
Non-cache variables you might use in your CMakeLists.txt:
|
||||
|
||||
PERFORMER_FOUND
|
||||
PERFORMER_INCLUDE_DIRS
|
||||
PERFORMER_LIBRARIES
|
||||
PERFORMER_RUNTIME_LIBRARY_DIRS
|
||||
|
||||
|
||||
|
||||
Requires these CMake modules:
|
||||
|
||||
FindPackageHandleStandardArgs (known included with CMake >=2.6.2)
|
||||
|
||||
|
||||
|
||||
Original Author: 2012 Ryan Pavlik <rpavlik@iastate.edu>
|
||||
<abiryan@ryand.net> http://academic.cleardefinition.com Iowa State
|
||||
University HCI Graduate Program/VRAC
|
||||
|
||||
Copyright Iowa State University 2012. 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)
|
||||
|
||||
FindPerlModules
|
||||
try to find perl modules, passed as COMPONENTS
|
||||
|
||||
|
||||
|
||||
Non-cache variable you might use in your CMakeLists.txt:
|
||||
|
||||
PERLMODULES_FOUND
|
||||
|
||||
|
||||
|
||||
Requires these CMake modules:
|
||||
|
||||
FindPackageHandleStandardArgs (known included with CMake >=2.6.2)
|
||||
|
||||
|
||||
|
||||
Original Author: 2012 Ryan Pavlik <rpavlik@iastate.edu>
|
||||
<abiryan@ryand.net> http://academic.cleardefinition.com Iowa State
|
||||
University HCI Graduate Program/VRAC
|
||||
|
||||
Copyright Iowa State University 2012. 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)
|
||||
|
||||
FindQVRPN
|
||||
try to find QVRPN library
|
||||
|
||||
|
||||
|
||||
Of course, you may also just choose to make QVRPN a submodule of your
|
||||
project itself.
|
||||
|
||||
Cache Variables:
|
||||
|
||||
QVRPN_LIBRARY
|
||||
QVRPN_INCLUDE_DIR
|
||||
|
||||
|
||||
|
||||
Non-cache variables you might use in your CMakeLists.txt:
|
||||
|
||||
QVRPN_FOUND
|
||||
QVRPN_LIBRARIES
|
||||
QVRPN_INCLUDE_DIRS
|
||||
|
||||
|
||||
|
||||
QVRPN_ROOT_DIR is searched preferentially for these files
|
||||
|
||||
Requires these CMake modules:
|
||||
|
||||
FindPackageHandleStandardArgs (known included with CMake >=2.6.2)
|
||||
|
||||
|
||||
|
||||
Refactored from FindVRPN.cmake by: Juan Sebastian Casallas
|
||||
<casallas@iastate.edu>
|
||||
|
||||
FindVRPN.cmake 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-2012. 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)
|
||||
|
||||
FindSonix12
|
||||
try to find Sonix 1.2 library
|
||||
|
||||
@@ -2416,8 +2777,10 @@ a few.
|
||||
Non-cache variables you might use in your CMakeLists.txt:
|
||||
|
||||
VRPN_FOUND
|
||||
VRPN_SERVER_LIBRARIES
|
||||
VRPN_LIBRARIES
|
||||
VRPN_SERVER_LIBRARIES - server libraries
|
||||
VRPN_LIBRARIES - client libraries
|
||||
VRPN_CLIENT_DEFINITIONS - definitions if you only use the client library
|
||||
VRPN_DEFINITIONS - Client-only definition if all we found was the client library.
|
||||
VRPN_INCLUDE_DIRS
|
||||
|
||||
|
||||
@@ -2430,14 +2793,51 @@ a few.
|
||||
|
||||
|
||||
|
||||
Original Author: 2009-2010 Ryan Pavlik <rpavlik@iastate.edu>
|
||||
Original Author: 2009-2012 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
|
||||
Copyright Iowa State University 2009-2012. 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)
|
||||
|
||||
FindViewPoint
|
||||
try to find Arrington Research ViewPoint EyeTracker SDK
|
||||
|
||||
|
||||
|
||||
Cache Variables: (probably not for direct use in your scripts)
|
||||
|
||||
VIEWPOINT_INCLUDE_DIR
|
||||
VIEWPOINT_LIBRARY
|
||||
VIEWPOINT_RUNTIME_LIBRARY
|
||||
|
||||
|
||||
|
||||
Non-cache variables you might use in your CMakeLists.txt:
|
||||
|
||||
VIEWPOINT_FOUND
|
||||
VIEWPOINT_INCLUDE_DIRS
|
||||
VIEWPOINT_LIBRARIES
|
||||
VIEWPOINT_RUNTIME_LIBRARIES - aka the dll for installing
|
||||
VIEWPOINT_RUNTIME_LIBRARY_DIRS
|
||||
|
||||
|
||||
|
||||
Requires these CMake modules:
|
||||
|
||||
FindPackageHandleStandardArgs (known included with CMake >=2.6.2)
|
||||
|
||||
|
||||
|
||||
Original Author: 2012 Ryan Pavlik <rpavlik@iastate.edu>
|
||||
<abiryan@ryand.net> http://academic.cleardefinition.com Iowa State
|
||||
University HCI Graduate Program/VRAC
|
||||
|
||||
Copyright Iowa State University 2012. 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)
|
||||
|
||||
FindVirtuoseAPI
|
||||
try to find Haption VirtuoseAPI library and include files
|
||||
|
||||
@@ -2578,6 +2978,48 @@ a few.
|
||||
Boost Software License, Version 1.0. (See accompanying file
|
||||
LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
FindWindowsSDK
|
||||
Find the Windows SDK aka Platform SDK
|
||||
|
||||
|
||||
|
||||
Variables:
|
||||
|
||||
WINDOWSSDK_FOUND - if any version of the windows or platform SDK was found that is usable with the current version of visual studio
|
||||
WINDOWSSDK_LATEST_DIR
|
||||
WINDOWSSDK_LATEST_NAME
|
||||
WINDOWSSDK_FOUND_PREFERENCE - if we found an entry indicating a "preferred" SDK listed for this visual studio version
|
||||
WINDOWSSDK_PREFERRED_DIR
|
||||
WINDOWSSDK_PREFERRED_NAME
|
||||
|
||||
|
||||
|
||||
WINDOWSSDK_DIRS - contains no duplicates, ordered most recent first.
|
||||
WINDOWSSDK_PREFERRED_FIRST_DIRS - contains no duplicates, ordered with preferred first, followed by the rest in descending recency
|
||||
|
||||
|
||||
|
||||
Functions:
|
||||
|
||||
windowssdk_name_lookup(<directory> <output variable>) - Find the name corresponding with the SDK directory you pass in, or
|
||||
NOTFOUND if not recognized. Your directory must be one of WINDOWSSDK_DIRS for this to work.
|
||||
|
||||
|
||||
|
||||
Requires these CMake modules:
|
||||
|
||||
FindPackageHandleStandardArgs (known included with CMake >=2.6.2)
|
||||
|
||||
|
||||
|
||||
Original Author: 2012 Ryan Pavlik <rpavlik@iastate.edu>
|
||||
<abiryan@ryand.net> http://academic.cleardefinition.com Iowa State
|
||||
University HCI Graduate Program/VRAC
|
||||
|
||||
Copyright Iowa State University 2012. 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)
|
||||
|
||||
Findargp
|
||||
try to find the argp library/component of glibc
|
||||
|
||||
@@ -3002,20 +3444,20 @@ a few.
|
||||
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> [<additonal arguments to git describe> ...])
|
||||
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> [<additonal arguments to git describe> ...])
|
||||
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> [<additonal arguments to git describe> ...])
|
||||
git_get_exact_tag(<var> [<additional arguments to git describe> ...])
|
||||
|
||||
|
||||
|
||||
@@ -3463,6 +3905,37 @@ a few.
|
||||
Boost Software License, Version 1.0. (See accompanying file
|
||||
LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
UseMarkdown
|
||||
Convert markdown source files to HTML as a custom target
|
||||
|
||||
|
||||
|
||||
include(UseMarkdown)
|
||||
add_markdown_target(<target_name> <directory to copy to> <markdownfile> [<markdownfile>...] [RENAME <newname>])
|
||||
Relative paths for the destination directory are considered with
|
||||
with respect to CMAKE_CURRENT_BINARY_DIR. The RENAME argument is only
|
||||
valid with a single markdown file as input.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
install_markdown_target(<target_name> [extra arguments to INSTALL(FILES ...) ])
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Requires CMake 2.6 or newer (uses the 'function' command)
|
||||
|
||||
Original Author: 2011 Ryan Pavlik <rpavlik@iastate.edu>
|
||||
<abiryan@ryand.net> http://academic.cleardefinition.com Iowa State
|
||||
University HCI Graduate Program/VRAC
|
||||
|
||||
Copyright Iowa State University 2011-2012. 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)
|
||||
|
||||
UseTR1
|
||||
Use settings to enable access to C++ TR1
|
||||
|
||||
|
||||
@@ -26,7 +26,6 @@ foreach(filename ansi.hxx
|
||||
ehlc_timer.hxx
|
||||
face.cpp
|
||||
face.hxx
|
||||
files.txt
|
||||
frustum.cpp
|
||||
frustum.hxx
|
||||
hldeb.hxx
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
# Original Author:
|
||||
# 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net>
|
||||
# 2009-2012 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.
|
||||
# Copyright Iowa State University 2009-2012.
|
||||
# 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)
|
||||
|
||||
add_proprietary_license("VR JuggLua"
|
||||
"Based in part on VR JuggLua, Copyright 2010 Iowa State University. This version of VR JuggLua is unreleased research software - NOT FOR REDISTRIBUTION.")
|
||||
add_redistribution_warning("This version of VR JuggLua is unreleased research software - NOT FOR REDISTRIBUTION.")
|
||||
add_permissive_license("VR JuggLua"
|
||||
"Based in part on VR JuggLua, Copyright 2010-2012 Iowa State University. VR JuggLua is distributed under the Boost Software License, Version 1.0. See copy at http://www.boost.org/LICENSE_1_0.txt"
|
||||
"<https://github.com/vance-group/vr-jugglua>")
|
||||
include("package-licensing/VRJuggler")
|
||||
include("package-licensing/OpenSceneGraph")
|
||||
include("package-licensing/Lua")
|
||||
|
||||
Reference in New Issue
Block a user