From d420cb1db25e6c39f49349081ad4c519124d2d01 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Del=20Pino?= <stephane.delpino44@gmail.com> Date: Sun, 11 Mar 2018 01:47:05 +0100 Subject: [PATCH] git subrepo clone git@github.com:rpavlik/cmake-modules.git cmake/cmake-modules subrepo: subdir: "cmake/cmake-modules" merged: "ad436ee7" upstream: origin: "git@github.com:rpavlik/cmake-modules.git" branch: "master" commit: "ad436ee7" git-subrepo: version: "0.3.1" origin: "git@github.com:ingydotnet/git-subrepo.git" commit: "a7ee886" --- cmake/cmake-modules/.gitattributes | 10 + cmake/cmake-modules/.gitrepo | 11 + cmake/cmake-modules/AboutTheseModules.cmake | 34 + cmake/cmake-modules/BoostTestTargets.cmake | 258 ++ cmake/cmake-modules/BoostTestTargetsDynamic.h | 9 + .../cmake-modules/BoostTestTargetsIncluded.h | 7 + cmake/cmake-modules/BoostTestTargetsStatic.h | 7 + cmake/cmake-modules/BundleOSGPlugins.cmake | 95 + cmake/cmake-modules/BundleOSGRuntime.cmake | 118 + cmake/cmake-modules/BundleVRJ22Runtime.cmake | 99 + cmake/cmake-modules/BundleVRJ30Runtime.cmake | 96 + cmake/cmake-modules/CheckMacHIDAPI.cmake | 73 + cmake/cmake-modules/CheckMacHIDAPI.cpp | 45 + cmake/cmake-modules/CheckVersion.cmake | 47 + cmake/cmake-modules/CleanDirectoryList.cmake | 48 + cmake/cmake-modules/CleanLibraryList.cmake | 72 + .../CompatibilityVersionFile-BASIC.cmake.in | 19 + .../CompatibilityVersionFile-CXX_ABI.cmake.in | 29 + ...mpatibilityVersionFile-CXX_LAYOUT.cmake.in | 16 + .../CompatibilityVersionFile-C_ABI.cmake.in | 16 + cmake/cmake-modules/CopyImportedTarget.cmake | 32 + .../CopyResourcesToBuildTree.cmake | 83 + cmake/cmake-modules/CppcheckTargets.cmake | 241 + .../CreateDashboardScripts.cmake | 205 + .../cmake-modules/CreateImportedTarget.cmake | 64 + cmake/cmake-modules/CreateLaunchers.cmake | 349 ++ cmake/cmake-modules/DashboardScript.cmake.in | 122 + cmake/cmake-modules/DoxygenTargets.cmake | 357 ++ .../cmake-modules/DoxygenTargets.doxyfile.in | 23 + .../EnableExtraCompilerWarnings.cmake | 88 + cmake/cmake-modules/EnableProfiling.cmake | 56 + cmake/cmake-modules/FileCopyTargets.cmake | 103 + cmake/cmake-modules/FindALUT.cmake | 136 + cmake/cmake-modules/FindAdrienne.cmake | 202 + cmake/cmake-modules/FindBluez.cmake | 77 + cmake/cmake-modules/FindCPPDOM.cmake | 216 + cmake/cmake-modules/FindColibriApi.cmake | 120 + cmake/cmake-modules/FindDCubed.cmake | 192 + cmake/cmake-modules/FindDirectShow.cmake | 204 + cmake/cmake-modules/FindDirectX.cmake | 322 ++ cmake/cmake-modules/FindFlagpoll.cmake | 151 + cmake/cmake-modules/FindGDB.cmake | 74 + cmake/cmake-modules/FindGHOST.cmake | 90 + cmake/cmake-modules/FindGLEW.cmake | 132 + cmake/cmake-modules/FindGLUI.cmake | 136 + cmake/cmake-modules/FindGLUT.cmake | 132 + cmake/cmake-modules/FindGMTL.cmake | 111 + cmake/cmake-modules/FindGPM.cmake | 43 + cmake/cmake-modules/FindGadgeteer12.cmake | 186 + cmake/cmake-modules/FindGadgeteer20.cmake | 187 + cmake/cmake-modules/FindGlove5DT.cmake | 203 + cmake/cmake-modules/FindHIDAPI.cmake | 46 + cmake/cmake-modules/FindIDLJ.cmake | 92 + cmake/cmake-modules/FindInterSense.cmake | 108 + cmake/cmake-modules/FindJCCL12.cmake | 152 + cmake/cmake-modules/FindJCCL14.cmake | 153 + cmake/cmake-modules/FindJsonCpp.cmake | 392 ++ cmake/cmake-modules/FindJtTk.cmake | 455 ++ .../cmake-modules/FindJtTk.stampkey.cmake.in | 42 + cmake/cmake-modules/FindLAPACKLibs.cmake | 91 + cmake/cmake-modules/FindLibFreespace.cmake | 78 + cmake/cmake-modules/FindLibusb1.cmake | 96 + cmake/cmake-modules/FindLuabind.cmake | 73 + cmake/cmake-modules/FindLyX.cmake | 144 + cmake/cmake-modules/FindMacHID.cmake | 66 + cmake/cmake-modules/FindMarkdown.cmake | 56 + cmake/cmake-modules/FindOVR.cmake | 219 + cmake/cmake-modules/FindOpenCV1.cmake | 245 + cmake/cmake-modules/FindOpenHaptics.cmake | 481 ++ cmake/cmake-modules/FindParasolid.cmake | 305 ++ cmake/cmake-modules/FindPerformer.cmake | 153 + cmake/cmake-modules/FindPerlModules.cmake | 78 + cmake/cmake-modules/FindQVRPN.cmake | 81 + cmake/cmake-modules/FindSDL2.cmake | 249 + cmake/cmake-modules/FindSonix12.cmake | 162 + cmake/cmake-modules/FindSonix14.cmake | 163 + cmake/cmake-modules/FindTR1.cmake | 73 + cmake/cmake-modules/FindTooN.cmake | 68 + cmake/cmake-modules/FindTooNtag.cmake | 84 + cmake/cmake-modules/FindTweek12.cmake | 153 + cmake/cmake-modules/FindTweek14.cmake | 154 + cmake/cmake-modules/FindVPR20.cmake | 276 ++ cmake/cmake-modules/FindVPR22.cmake | 232 + cmake/cmake-modules/FindVPS.cmake | 304 ++ cmake/cmake-modules/FindVRJ22.cmake | 210 + cmake/cmake-modules/FindVRJ30.cmake | 216 + cmake/cmake-modules/FindVRJOGL22.cmake | 161 + cmake/cmake-modules/FindVRJOGL30.cmake | 162 + cmake/cmake-modules/FindVRJuggler.cmake | 198 + cmake/cmake-modules/FindVRJuggler22.cmake | 503 ++ cmake/cmake-modules/FindVRJuggler30.cmake | 531 +++ cmake/cmake-modules/FindVRPN.cmake | 156 + cmake/cmake-modules/FindViewPoint.cmake | 94 + cmake/cmake-modules/FindVirtuoseAPI.cmake | 93 + cmake/cmake-modules/FindVirtuoseVPP.cmake | 49 + cmake/cmake-modules/FindWayland.cmake | 45 + cmake/cmake-modules/FindWiiSCAAT.cmake | 79 + cmake/cmake-modules/FindWiiUse.cmake | 99 + cmake/cmake-modules/FindWinHID.cmake | 288 ++ cmake/cmake-modules/FindWindowsSDK.cmake | 627 +++ cmake/cmake-modules/FindXrandr.cmake | 78 + cmake/cmake-modules/Findargp.cmake | 81 + cmake/cmake-modules/Findcppcheck.cmake | 173 + cmake/cmake-modules/Findcppcheck.cpp | 16 + cmake/cmake-modules/Findcppunit.cmake | 75 + cmake/cmake-modules/Findcutil.cmake | 56 + cmake/cmake-modules/Finddb2pdf.cmake | 73 + cmake/cmake-modules/FindosgLua.cmake | 71 + cmake/cmake-modules/Findquatlib.cmake | 104 + cmake/cmake-modules/Findudev.cmake | 77 + .../GenerateCompatibilityVersionFile.cmake | 83 + cmake/cmake-modules/GetCPUDetails.cmake | 201 + .../cmake-modules/GetCompilerInfoString.cmake | 179 + cmake/cmake-modules/GetDefineString.cmake | 58 + cmake/cmake-modules/GetDefineString.cpp.in | 10 + cmake/cmake-modules/GetDirectoryList.cmake | 49 + cmake/cmake-modules/GetFileList.cmake | 45 + .../GetForceIncludeDefinitions.cmake | 44 + .../GetGitRevisionDescription.cmake | 168 + .../GetGitRevisionDescription.cmake.in | 41 + cmake/cmake-modules/GetMSVCVersion.cmake | 127 + cmake/cmake-modules/GetSubprojectStatus.cmake | 31 + cmake/cmake-modules/InstallDebugSymbols.cmake | 85 + cmake/cmake-modules/LICENSE_1_0.txt | 23 + cmake/cmake-modules/Licensing.cmake | 133 + cmake/cmake-modules/ListCombinations.cmake | 53 + cmake/cmake-modules/ListFilter.cmake | 50 + cmake/cmake-modules/LuaTargets.cmake | 108 + .../MSVCMultipleProcessCompile.cmake | 31 + cmake/cmake-modules/MSVCStaticRuntime.cmake | 33 + cmake/cmake-modules/MSVCVerboseLinking.cmake | 48 + .../MapImportedReleaseVariants.cmake | 21 + .../cmake-modules/MinGWSearchPathExtras.cmake | 94 + cmake/cmake-modules/OptionRequires.cmake | 53 + cmake/cmake-modules/PlatformDefinitions.cmake | 45 + cmake/cmake-modules/PrefixListGlob.cmake | 36 + cmake/cmake-modules/ProgramFilesGlob.cmake | 85 + cmake/cmake-modules/README.markdown | 107 + cmake/cmake-modules/ResetConfigurations.cmake | 31 + .../SearchProgramFilesForOpenSceneGraph.cmake | 66 + cmake/cmake-modules/SetDefaultBuildType.cmake | 31 + cmake/cmake-modules/SplitLibraryList.cmake | 40 + .../StampSourcesWithVersion.cmake | 180 + .../StampSourcesWithVersion.sed.in | 13 + cmake/cmake-modules/StashMapConfig.cmake | 86 + cmake/cmake-modules/TCHARWorkaround.cmake | 38 + .../cmake-modules/UseBackportedModules.cmake | 114 + cmake/cmake-modules/UseFolders.cmake | 34 + cmake/cmake-modules/UseMarkdown.cmake | 116 + cmake/cmake-modules/UseTR1.cmake | 28 + cmake/cmake-modules/WarningDev.cmake | 24 + .../SelectLibraryConfigurations.cmake | 108 + .../osg/FindOpenSceneGraph.cmake | 273 ++ .../osg/FindOpenThreads.cmake | 150 + .../cmake-2.8.0-modules/osg/Findosg.cmake | 81 + .../osg/FindosgAnimation.cmake | 78 + .../cmake-2.8.0-modules/osg/FindosgDB.cmake | 78 + .../cmake-2.8.0-modules/osg/FindosgFX.cmake | 78 + .../cmake-2.8.0-modules/osg/FindosgGA.cmake | 78 + .../osg/FindosgIntrospection.cmake | 78 + .../osg/FindosgManipulator.cmake | 78 + .../osg/FindosgParticle.cmake | 78 + .../osg/FindosgProducer.cmake | 78 + .../osg/FindosgShadow.cmake | 78 + .../cmake-2.8.0-modules/osg/FindosgSim.cmake | 78 + .../osg/FindosgTerrain.cmake | 78 + .../cmake-2.8.0-modules/osg/FindosgText.cmake | 78 + .../cmake-2.8.0-modules/osg/FindosgUtil.cmake | 78 + .../osg/FindosgViewer.cmake | 78 + .../osg/FindosgVolume.cmake | 78 + .../osg/FindosgWidget.cmake | 78 + .../osg/Findosg_functions.cmake | 132 + .../patchctestbug10149/CTest.cmake | 363 ++ .../patchctestbug10149/CTestScriptMode.cmake | 51 + .../patchctestbug10149/CTestTargets.cmake | 131 + .../CMakePackageConfigHelpers.cmake | 358 ++ .../CMakeParseArguments.cmake | 187 + .../FixWinInstallPrefix.cmake | 78 + .../cmake-2.8.3-modules/autoinclude.cmake | 13 + .../ImproveEclipseGCCErrors.cmake | 19 + .../cmake-2.8.4-modules/autoinclude.cmake | 13 + .../cmake-2.8.4-modules/boost/FindBoost.cmake | 1171 +++++ .../cmake-3.2.0-modules/FindGit.cmake | 106 + .../WriteCompilerDetectionHeader.cmake | 692 +++ .../RequireOutOfSourceBuild.cmake | 44 + .../cmake-4.0.0-modules/autoinclude.cmake | 13 + .../from-ITK-3.18.0/FindFFTW.cmake | 68 + cmake/cmake-modules/export-to-directory.sh | 22 + cmake/cmake-modules/ghost-fake-stl/alloc.h | 14 + cmake/cmake-modules/ghost-fake-stl/hash_map.h | 28 + cmake/cmake-modules/ghost-fake-stl/iostream.h | 20 + cmake/cmake-modules/ghost-fake-stl/list.h | 20 + cmake/cmake-modules/ghost-fake-stl/pair.h | 17 + cmake/cmake-modules/ghost-fake-stl/set.h | 19 + cmake/cmake-modules/ghost-fake-stl/vector.h | 20 + .../launcher-templates/genericlauncher.cmd.in | 14 + .../launcher-templates/genericlauncher.sh.in | 18 + .../launcher-templates/launcher.env.cmd.in | 1 + .../launcher-templates/launcher.env.sh.in | 1 + .../perconfig.vcproj.user.in | 28 + .../perconfig.vcxproj.user.in | 7 + .../launcher-templates/targetlauncher.cmd.in | 8 + .../launcher-templates/targetlauncher.sh.in | 16 + .../launcher-templates/vcproj.user.in | 10 + .../launcher-templates/vcxproj.user.in | 4 + .../module-docs/AllModuleDependencies.dot | 72 + .../module-docs/AllModuleDependencies.jpg | Bin 0 -> 15485 bytes .../module-docs/AllModuleDependencies.pdf | Bin 0 -> 22413 bytes .../module-docs/AllModuleDependencies.png | Bin 0 -> 34317 bytes ...e-FindMyPackage-UsingImportedTargets.cmake | 193 + .../module-docs/Example-FindMyPackage.cmake | 189 + .../Example-FindMySimplePackage.cmake | 101 + cmake/cmake-modules/module-help.html | 1818 ++++++++ cmake/cmake-modules/module-help.txt | 4042 +++++++++++++++++ .../nested_targets/DCubed/CMakeLists.txt | 31 + .../DCubed/d3ew_p/CMakeLists.txt | 41 + .../DCubed/d3ew_scene/CMakeLists.txt | 68 + .../nested_targets/OpenHaptics/CMakeLists.txt | 95 + .../nested_targets/Parasolid/CMakeLists.txt | 73 + .../nested_targets/cutil/CMakeLists.txt | 41 + .../package-licensing/Boost.cmake | 13 + .../package-licensing/Eigen.cmake | 13 + .../package-licensing/FLTK.cmake | 14 + .../cmake-modules/package-licensing/Lua.cmake | 14 + .../package-licensing/LuaBind.cmake | 15 + .../OpenHapticsAcademicEdition.cmake | 15 + .../package-licensing/OpenSceneGraph.cmake | 13 + .../PhysicalModelingUtils.cmake | 13 + .../package-licensing/Qt-LGPL.cmake | 13 + .../cmake-modules/package-licensing/VPS.cmake | 15 + .../package-licensing/VRJuggLua.cmake | 19 + .../package-licensing/VRJuggler.cmake | 15 + .../package-licensing/VirtuoseAPI.cmake | 14 + .../package-licensing/osgLua.cmake | 16 + .../package/fixupbundle.cmake.in | 56 + .../macosx/VRJuggler22BundleInfo.plist.in | 38 + .../macosx/VRJuggler30BundleInfo.plist.in | 38 + cmake/cmake-modules/update-help.sh | 7 + .../workarounds/mac-alut-framework/AL/alut.h | 1 + .../cmake-modules/workarounds/mac-gl/GL/gl.h | 1 + .../workarounds/mac-gl/GL/glui.h | 1 + .../workarounds/mac-gl/GL/glut.h | 1 + .../workarounds/mac-openal/AL/al.h | 1 + .../workarounds/mac-openal/AL/alc.h | 1 + cmake/cmake-modules/workarounds/tchar/tchar.h | 2 + 245 files changed, 31106 insertions(+) create mode 100644 cmake/cmake-modules/.gitattributes create mode 100644 cmake/cmake-modules/.gitrepo create mode 100644 cmake/cmake-modules/AboutTheseModules.cmake create mode 100644 cmake/cmake-modules/BoostTestTargets.cmake create mode 100644 cmake/cmake-modules/BoostTestTargetsDynamic.h create mode 100644 cmake/cmake-modules/BoostTestTargetsIncluded.h create mode 100644 cmake/cmake-modules/BoostTestTargetsStatic.h create mode 100644 cmake/cmake-modules/BundleOSGPlugins.cmake create mode 100644 cmake/cmake-modules/BundleOSGRuntime.cmake create mode 100644 cmake/cmake-modules/BundleVRJ22Runtime.cmake create mode 100644 cmake/cmake-modules/BundleVRJ30Runtime.cmake create mode 100644 cmake/cmake-modules/CheckMacHIDAPI.cmake create mode 100644 cmake/cmake-modules/CheckMacHIDAPI.cpp create mode 100644 cmake/cmake-modules/CheckVersion.cmake create mode 100644 cmake/cmake-modules/CleanDirectoryList.cmake create mode 100644 cmake/cmake-modules/CleanLibraryList.cmake create mode 100644 cmake/cmake-modules/CompatibilityVersionFile-BASIC.cmake.in create mode 100644 cmake/cmake-modules/CompatibilityVersionFile-CXX_ABI.cmake.in create mode 100644 cmake/cmake-modules/CompatibilityVersionFile-CXX_LAYOUT.cmake.in create mode 100644 cmake/cmake-modules/CompatibilityVersionFile-C_ABI.cmake.in create mode 100644 cmake/cmake-modules/CopyImportedTarget.cmake create mode 100644 cmake/cmake-modules/CopyResourcesToBuildTree.cmake create mode 100644 cmake/cmake-modules/CppcheckTargets.cmake create mode 100644 cmake/cmake-modules/CreateDashboardScripts.cmake create mode 100644 cmake/cmake-modules/CreateImportedTarget.cmake create mode 100644 cmake/cmake-modules/CreateLaunchers.cmake create mode 100644 cmake/cmake-modules/DashboardScript.cmake.in create mode 100644 cmake/cmake-modules/DoxygenTargets.cmake create mode 100644 cmake/cmake-modules/DoxygenTargets.doxyfile.in create mode 100644 cmake/cmake-modules/EnableExtraCompilerWarnings.cmake create mode 100644 cmake/cmake-modules/EnableProfiling.cmake create mode 100644 cmake/cmake-modules/FileCopyTargets.cmake create mode 100644 cmake/cmake-modules/FindALUT.cmake create mode 100644 cmake/cmake-modules/FindAdrienne.cmake create mode 100644 cmake/cmake-modules/FindBluez.cmake create mode 100644 cmake/cmake-modules/FindCPPDOM.cmake create mode 100644 cmake/cmake-modules/FindColibriApi.cmake create mode 100644 cmake/cmake-modules/FindDCubed.cmake create mode 100644 cmake/cmake-modules/FindDirectShow.cmake create mode 100644 cmake/cmake-modules/FindDirectX.cmake create mode 100644 cmake/cmake-modules/FindFlagpoll.cmake create mode 100644 cmake/cmake-modules/FindGDB.cmake create mode 100644 cmake/cmake-modules/FindGHOST.cmake create mode 100644 cmake/cmake-modules/FindGLEW.cmake create mode 100644 cmake/cmake-modules/FindGLUI.cmake create mode 100644 cmake/cmake-modules/FindGLUT.cmake create mode 100644 cmake/cmake-modules/FindGMTL.cmake create mode 100644 cmake/cmake-modules/FindGPM.cmake create mode 100644 cmake/cmake-modules/FindGadgeteer12.cmake create mode 100644 cmake/cmake-modules/FindGadgeteer20.cmake create mode 100644 cmake/cmake-modules/FindGlove5DT.cmake create mode 100644 cmake/cmake-modules/FindHIDAPI.cmake create mode 100644 cmake/cmake-modules/FindIDLJ.cmake create mode 100644 cmake/cmake-modules/FindInterSense.cmake create mode 100644 cmake/cmake-modules/FindJCCL12.cmake create mode 100644 cmake/cmake-modules/FindJCCL14.cmake create mode 100644 cmake/cmake-modules/FindJsonCpp.cmake create mode 100644 cmake/cmake-modules/FindJtTk.cmake create mode 100644 cmake/cmake-modules/FindJtTk.stampkey.cmake.in create mode 100644 cmake/cmake-modules/FindLAPACKLibs.cmake create mode 100644 cmake/cmake-modules/FindLibFreespace.cmake create mode 100644 cmake/cmake-modules/FindLibusb1.cmake create mode 100644 cmake/cmake-modules/FindLuabind.cmake create mode 100644 cmake/cmake-modules/FindLyX.cmake create mode 100644 cmake/cmake-modules/FindMacHID.cmake create mode 100644 cmake/cmake-modules/FindMarkdown.cmake create mode 100644 cmake/cmake-modules/FindOVR.cmake create mode 100644 cmake/cmake-modules/FindOpenCV1.cmake create mode 100644 cmake/cmake-modules/FindOpenHaptics.cmake create mode 100644 cmake/cmake-modules/FindParasolid.cmake create mode 100644 cmake/cmake-modules/FindPerformer.cmake create mode 100644 cmake/cmake-modules/FindPerlModules.cmake create mode 100644 cmake/cmake-modules/FindQVRPN.cmake create mode 100644 cmake/cmake-modules/FindSDL2.cmake create mode 100644 cmake/cmake-modules/FindSonix12.cmake create mode 100644 cmake/cmake-modules/FindSonix14.cmake create mode 100644 cmake/cmake-modules/FindTR1.cmake create mode 100644 cmake/cmake-modules/FindTooN.cmake create mode 100644 cmake/cmake-modules/FindTooNtag.cmake create mode 100644 cmake/cmake-modules/FindTweek12.cmake create mode 100644 cmake/cmake-modules/FindTweek14.cmake create mode 100644 cmake/cmake-modules/FindVPR20.cmake create mode 100644 cmake/cmake-modules/FindVPR22.cmake create mode 100644 cmake/cmake-modules/FindVPS.cmake create mode 100644 cmake/cmake-modules/FindVRJ22.cmake create mode 100644 cmake/cmake-modules/FindVRJ30.cmake create mode 100644 cmake/cmake-modules/FindVRJOGL22.cmake create mode 100644 cmake/cmake-modules/FindVRJOGL30.cmake create mode 100644 cmake/cmake-modules/FindVRJuggler.cmake create mode 100644 cmake/cmake-modules/FindVRJuggler22.cmake create mode 100644 cmake/cmake-modules/FindVRJuggler30.cmake create mode 100644 cmake/cmake-modules/FindVRPN.cmake create mode 100644 cmake/cmake-modules/FindViewPoint.cmake create mode 100644 cmake/cmake-modules/FindVirtuoseAPI.cmake create mode 100644 cmake/cmake-modules/FindVirtuoseVPP.cmake create mode 100644 cmake/cmake-modules/FindWayland.cmake create mode 100644 cmake/cmake-modules/FindWiiSCAAT.cmake create mode 100644 cmake/cmake-modules/FindWiiUse.cmake create mode 100644 cmake/cmake-modules/FindWinHID.cmake create mode 100644 cmake/cmake-modules/FindWindowsSDK.cmake create mode 100644 cmake/cmake-modules/FindXrandr.cmake create mode 100644 cmake/cmake-modules/Findargp.cmake create mode 100644 cmake/cmake-modules/Findcppcheck.cmake create mode 100644 cmake/cmake-modules/Findcppcheck.cpp create mode 100644 cmake/cmake-modules/Findcppunit.cmake create mode 100644 cmake/cmake-modules/Findcutil.cmake create mode 100644 cmake/cmake-modules/Finddb2pdf.cmake create mode 100644 cmake/cmake-modules/FindosgLua.cmake create mode 100644 cmake/cmake-modules/Findquatlib.cmake create mode 100644 cmake/cmake-modules/Findudev.cmake create mode 100644 cmake/cmake-modules/GenerateCompatibilityVersionFile.cmake create mode 100644 cmake/cmake-modules/GetCPUDetails.cmake create mode 100644 cmake/cmake-modules/GetCompilerInfoString.cmake create mode 100644 cmake/cmake-modules/GetDefineString.cmake create mode 100644 cmake/cmake-modules/GetDefineString.cpp.in create mode 100644 cmake/cmake-modules/GetDirectoryList.cmake create mode 100644 cmake/cmake-modules/GetFileList.cmake create mode 100644 cmake/cmake-modules/GetForceIncludeDefinitions.cmake create mode 100644 cmake/cmake-modules/GetGitRevisionDescription.cmake create mode 100644 cmake/cmake-modules/GetGitRevisionDescription.cmake.in create mode 100644 cmake/cmake-modules/GetMSVCVersion.cmake create mode 100644 cmake/cmake-modules/GetSubprojectStatus.cmake create mode 100644 cmake/cmake-modules/InstallDebugSymbols.cmake create mode 100644 cmake/cmake-modules/LICENSE_1_0.txt create mode 100644 cmake/cmake-modules/Licensing.cmake create mode 100644 cmake/cmake-modules/ListCombinations.cmake create mode 100644 cmake/cmake-modules/ListFilter.cmake create mode 100644 cmake/cmake-modules/LuaTargets.cmake create mode 100644 cmake/cmake-modules/MSVCMultipleProcessCompile.cmake create mode 100644 cmake/cmake-modules/MSVCStaticRuntime.cmake create mode 100644 cmake/cmake-modules/MSVCVerboseLinking.cmake create mode 100644 cmake/cmake-modules/MapImportedReleaseVariants.cmake create mode 100644 cmake/cmake-modules/MinGWSearchPathExtras.cmake create mode 100644 cmake/cmake-modules/OptionRequires.cmake create mode 100644 cmake/cmake-modules/PlatformDefinitions.cmake create mode 100644 cmake/cmake-modules/PrefixListGlob.cmake create mode 100644 cmake/cmake-modules/ProgramFilesGlob.cmake create mode 100644 cmake/cmake-modules/README.markdown create mode 100644 cmake/cmake-modules/ResetConfigurations.cmake create mode 100644 cmake/cmake-modules/SearchProgramFilesForOpenSceneGraph.cmake create mode 100644 cmake/cmake-modules/SetDefaultBuildType.cmake create mode 100644 cmake/cmake-modules/SplitLibraryList.cmake create mode 100644 cmake/cmake-modules/StampSourcesWithVersion.cmake create mode 100644 cmake/cmake-modules/StampSourcesWithVersion.sed.in create mode 100644 cmake/cmake-modules/StashMapConfig.cmake create mode 100644 cmake/cmake-modules/TCHARWorkaround.cmake create mode 100644 cmake/cmake-modules/UseBackportedModules.cmake create mode 100644 cmake/cmake-modules/UseFolders.cmake create mode 100644 cmake/cmake-modules/UseMarkdown.cmake create mode 100644 cmake/cmake-modules/UseTR1.cmake create mode 100644 cmake/cmake-modules/WarningDev.cmake create mode 100644 cmake/cmake-modules/cmake-2.8.0-modules/features/SelectLibraryConfigurations.cmake create mode 100644 cmake/cmake-modules/cmake-2.8.0-modules/osg/FindOpenSceneGraph.cmake create mode 100644 cmake/cmake-modules/cmake-2.8.0-modules/osg/FindOpenThreads.cmake create mode 100644 cmake/cmake-modules/cmake-2.8.0-modules/osg/Findosg.cmake create mode 100644 cmake/cmake-modules/cmake-2.8.0-modules/osg/FindosgAnimation.cmake create mode 100644 cmake/cmake-modules/cmake-2.8.0-modules/osg/FindosgDB.cmake create mode 100644 cmake/cmake-modules/cmake-2.8.0-modules/osg/FindosgFX.cmake create mode 100644 cmake/cmake-modules/cmake-2.8.0-modules/osg/FindosgGA.cmake create mode 100644 cmake/cmake-modules/cmake-2.8.0-modules/osg/FindosgIntrospection.cmake create mode 100644 cmake/cmake-modules/cmake-2.8.0-modules/osg/FindosgManipulator.cmake create mode 100644 cmake/cmake-modules/cmake-2.8.0-modules/osg/FindosgParticle.cmake create mode 100644 cmake/cmake-modules/cmake-2.8.0-modules/osg/FindosgProducer.cmake create mode 100644 cmake/cmake-modules/cmake-2.8.0-modules/osg/FindosgShadow.cmake create mode 100644 cmake/cmake-modules/cmake-2.8.0-modules/osg/FindosgSim.cmake create mode 100644 cmake/cmake-modules/cmake-2.8.0-modules/osg/FindosgTerrain.cmake create mode 100644 cmake/cmake-modules/cmake-2.8.0-modules/osg/FindosgText.cmake create mode 100644 cmake/cmake-modules/cmake-2.8.0-modules/osg/FindosgUtil.cmake create mode 100644 cmake/cmake-modules/cmake-2.8.0-modules/osg/FindosgViewer.cmake create mode 100644 cmake/cmake-modules/cmake-2.8.0-modules/osg/FindosgVolume.cmake create mode 100644 cmake/cmake-modules/cmake-2.8.0-modules/osg/FindosgWidget.cmake create mode 100644 cmake/cmake-modules/cmake-2.8.0-modules/osg/Findosg_functions.cmake create mode 100644 cmake/cmake-modules/cmake-2.8.1-modules/patchctestbug10149/CTest.cmake create mode 100644 cmake/cmake-modules/cmake-2.8.1-modules/patchctestbug10149/CTestScriptMode.cmake create mode 100644 cmake/cmake-modules/cmake-2.8.1-modules/patchctestbug10149/CTestTargets.cmake create mode 100644 cmake/cmake-modules/cmake-2.8.12-modules/CMakePackageConfigHelpers.cmake create mode 100644 cmake/cmake-modules/cmake-2.8.12-modules/CMakeParseArguments.cmake create mode 100644 cmake/cmake-modules/cmake-2.8.3-modules/FixWinInstallPrefix.cmake create mode 100644 cmake/cmake-modules/cmake-2.8.3-modules/autoinclude.cmake create mode 100644 cmake/cmake-modules/cmake-2.8.4-modules/ImproveEclipseGCCErrors.cmake create mode 100644 cmake/cmake-modules/cmake-2.8.4-modules/autoinclude.cmake create mode 100644 cmake/cmake-modules/cmake-2.8.4-modules/boost/FindBoost.cmake create mode 100644 cmake/cmake-modules/cmake-3.2.0-modules/FindGit.cmake create mode 100644 cmake/cmake-modules/cmake-3.3.0-modules/WriteCompilerDetectionHeader.cmake create mode 100644 cmake/cmake-modules/cmake-4.0.0-modules/RequireOutOfSourceBuild.cmake create mode 100644 cmake/cmake-modules/cmake-4.0.0-modules/autoinclude.cmake create mode 100644 cmake/cmake-modules/cmake-4.0.0-modules/from-ITK-3.18.0/FindFFTW.cmake create mode 100755 cmake/cmake-modules/export-to-directory.sh create mode 100644 cmake/cmake-modules/ghost-fake-stl/alloc.h create mode 100644 cmake/cmake-modules/ghost-fake-stl/hash_map.h create mode 100644 cmake/cmake-modules/ghost-fake-stl/iostream.h create mode 100644 cmake/cmake-modules/ghost-fake-stl/list.h create mode 100644 cmake/cmake-modules/ghost-fake-stl/pair.h create mode 100644 cmake/cmake-modules/ghost-fake-stl/set.h create mode 100644 cmake/cmake-modules/ghost-fake-stl/vector.h create mode 100644 cmake/cmake-modules/launcher-templates/genericlauncher.cmd.in create mode 100644 cmake/cmake-modules/launcher-templates/genericlauncher.sh.in create mode 100644 cmake/cmake-modules/launcher-templates/launcher.env.cmd.in create mode 100644 cmake/cmake-modules/launcher-templates/launcher.env.sh.in create mode 100644 cmake/cmake-modules/launcher-templates/perconfig.vcproj.user.in create mode 100644 cmake/cmake-modules/launcher-templates/perconfig.vcxproj.user.in create mode 100644 cmake/cmake-modules/launcher-templates/targetlauncher.cmd.in create mode 100644 cmake/cmake-modules/launcher-templates/targetlauncher.sh.in create mode 100644 cmake/cmake-modules/launcher-templates/vcproj.user.in create mode 100644 cmake/cmake-modules/launcher-templates/vcxproj.user.in create mode 100644 cmake/cmake-modules/module-docs/AllModuleDependencies.dot create mode 100644 cmake/cmake-modules/module-docs/AllModuleDependencies.jpg create mode 100644 cmake/cmake-modules/module-docs/AllModuleDependencies.pdf create mode 100644 cmake/cmake-modules/module-docs/AllModuleDependencies.png create mode 100644 cmake/cmake-modules/module-docs/Example-FindMyPackage-UsingImportedTargets.cmake create mode 100644 cmake/cmake-modules/module-docs/Example-FindMyPackage.cmake create mode 100644 cmake/cmake-modules/module-docs/Example-FindMySimplePackage.cmake create mode 100644 cmake/cmake-modules/module-help.html create mode 100644 cmake/cmake-modules/module-help.txt create mode 100644 cmake/cmake-modules/nested_targets/DCubed/CMakeLists.txt create mode 100644 cmake/cmake-modules/nested_targets/DCubed/d3ew_p/CMakeLists.txt create mode 100644 cmake/cmake-modules/nested_targets/DCubed/d3ew_scene/CMakeLists.txt create mode 100644 cmake/cmake-modules/nested_targets/OpenHaptics/CMakeLists.txt create mode 100644 cmake/cmake-modules/nested_targets/Parasolid/CMakeLists.txt create mode 100644 cmake/cmake-modules/nested_targets/cutil/CMakeLists.txt create mode 100644 cmake/cmake-modules/package-licensing/Boost.cmake create mode 100644 cmake/cmake-modules/package-licensing/Eigen.cmake create mode 100644 cmake/cmake-modules/package-licensing/FLTK.cmake create mode 100644 cmake/cmake-modules/package-licensing/Lua.cmake create mode 100644 cmake/cmake-modules/package-licensing/LuaBind.cmake create mode 100644 cmake/cmake-modules/package-licensing/OpenHapticsAcademicEdition.cmake create mode 100644 cmake/cmake-modules/package-licensing/OpenSceneGraph.cmake create mode 100644 cmake/cmake-modules/package-licensing/PhysicalModelingUtils.cmake create mode 100644 cmake/cmake-modules/package-licensing/Qt-LGPL.cmake create mode 100644 cmake/cmake-modules/package-licensing/VPS.cmake create mode 100644 cmake/cmake-modules/package-licensing/VRJuggLua.cmake create mode 100644 cmake/cmake-modules/package-licensing/VRJuggler.cmake create mode 100644 cmake/cmake-modules/package-licensing/VirtuoseAPI.cmake create mode 100644 cmake/cmake-modules/package-licensing/osgLua.cmake create mode 100644 cmake/cmake-modules/package/fixupbundle.cmake.in create mode 100644 cmake/cmake-modules/package/macosx/VRJuggler22BundleInfo.plist.in create mode 100644 cmake/cmake-modules/package/macosx/VRJuggler30BundleInfo.plist.in create mode 100755 cmake/cmake-modules/update-help.sh create mode 100644 cmake/cmake-modules/workarounds/mac-alut-framework/AL/alut.h create mode 100644 cmake/cmake-modules/workarounds/mac-gl/GL/gl.h create mode 100644 cmake/cmake-modules/workarounds/mac-gl/GL/glui.h create mode 100644 cmake/cmake-modules/workarounds/mac-gl/GL/glut.h create mode 100644 cmake/cmake-modules/workarounds/mac-openal/AL/al.h create mode 100644 cmake/cmake-modules/workarounds/mac-openal/AL/alc.h create mode 100644 cmake/cmake-modules/workarounds/tchar/tchar.h diff --git a/cmake/cmake-modules/.gitattributes b/cmake/cmake-modules/.gitattributes new file mode 100644 index 000000000..c20db92e9 --- /dev/null +++ b/cmake/cmake-modules/.gitattributes @@ -0,0 +1,10 @@ +# Auto detect text files and perform LF normalization +* text=auto + +*.sh text eol=lf + +# cmake launcher templates +*.sh.in text eol=lf +*.cmd.in text eol=crlf +*vcproj.user.in text eol=crlf +*vcxproj.user.in text eol=crlf diff --git a/cmake/cmake-modules/.gitrepo b/cmake/cmake-modules/.gitrepo new file mode 100644 index 000000000..dacab8fd5 --- /dev/null +++ b/cmake/cmake-modules/.gitrepo @@ -0,0 +1,11 @@ +; DO NOT EDIT (unless you know what you are doing) +; +; This subdirectory is a git "subrepo", and this file is maintained by the +; git-subrepo command. See https://github.com/git-commands/git-subrepo#readme +; +[subrepo] + remote = git@github.com:rpavlik/cmake-modules.git + branch = master + commit = ad436ee7be33ca291a59866a173b777b0e2d81ce + parent = 77fcd70d9c9ddcb48779eb96990e2bbef1cc9904 + cmdver = 0.3.1 diff --git a/cmake/cmake-modules/AboutTheseModules.cmake b/cmake/cmake-modules/AboutTheseModules.cmake new file mode 100644 index 000000000..72082b1cf --- /dev/null +++ b/cmake/cmake-modules/AboutTheseModules.cmake @@ -0,0 +1,34 @@ +# - Dummy module containing information about these modules for the HELP file +# This file documents a snapshot of the cmake-modules available from +# http://github.com/rpavlik/cmake-modules/ +# The latest version of these modules can always be found there. +# Additionally, you can find instructions on how to integrate these modules +# into your own project either in the README.markdown file in this directory, +# or on the GitHub page listed above (scroll to the bottom to see the README +# rendered attractively). +# +# In short: Modules of the form "FindSomeName.cmake" are considered to be +# "find modules", and are intended to be used indirectly by calling find_package, +# not by calling include. Thus, you'll want to do something like: +# find_package(SomeName) +# They define a number of variables allowing you to use whatever software +# they search for, such as include directories and libraries. A few also +# define some functions for your use. +# +# All other modules provide functionality, either immediately upon including +# them, or by defining functions that perform some task of varying utility +# that you can use any time after including them. Note that if a module +# has the filename, for example, cmake/BoostTestTargets.cmake, you only +# need to call: +# include(BoostTestTargets) +# +# 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 +# +# +# Copyright Iowa State University 2009-2010. +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE_1_0.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) + diff --git a/cmake/cmake-modules/BoostTestTargets.cmake b/cmake/cmake-modules/BoostTestTargets.cmake new file mode 100644 index 000000000..31b3ae677 --- /dev/null +++ b/cmake/cmake-modules/BoostTestTargets.cmake @@ -0,0 +1,258 @@ +# - Add tests using boost::test +# +# Add this line to your test files in place of including a basic boost test header: +# #include <BoostTestTargetConfig.h> +# +# If you cannot do that and must use the included form for a given test, +# include the line +# // OVERRIDE_BOOST_TEST_INCLUDED_WARNING +# in the same file with the boost test include. +# +# include(BoostTestTargets) +# add_boost_test(<testdriver_name> SOURCES <source1> [<more sources...>] +# [FAIL_REGULAR_EXPRESSION <additional fail regex>] +# [LAUNCHER <generic launcher script>] +# [LIBRARIES <library> [<library>...]] +# [RESOURCES <resource> [<resource>...]] +# [TESTS <testcasename> [<testcasename>...]]) +# +# If for some reason you need access to the executable target created, +# it can be found in ${${testdriver_name}_TARGET_NAME} as specified when +# you called add_boost_test +# +# Requires CMake 2.6 or newer (uses the 'function' command) +# +# Requires: +# GetForceIncludeDefinitions +# CopyResourcesToBuildTree +# +# Original Author: +# 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> +# http://academic.cleardefinition.com +# Iowa State University HCI Graduate Program/VRAC +# +# Copyright Iowa State University 2009-2010. +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE_1_0.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) + +if(__add_boost_test) + return() +endif() +set(__add_boost_test YES) + +set(BOOST_TEST_TARGET_PREFIX "boosttest") + +if(NOT Boost_FOUND) + find_package(Boost 1.34.0 QUIET) +endif() +if("${Boost_VERSION}0" LESS "1034000") + set(_shared_msg + "NOTE: boost::test-based targets and tests cannot " + "be added: boost >= 1.34.0 required but not found. " + "(found: '${Boost_VERSION}'; want >=103400) ") + if(BUILD_TESTING) + message(FATAL_ERROR + ${_shared_msg} + "You may disable BUILD_TESTING to continue without the " + "tests.") + else() + message(STATUS + ${_shared_msg} + "BUILD_TESTING disabled, so continuing anyway.") + endif() +endif() + +include(GetForceIncludeDefinitions) +include(CopyResourcesToBuildTree) + +if(Boost_FOUND AND NOT "${Boost_VERSION}0" LESS "1034000") + set(_boosttesttargets_libs) + set(_boostConfig "BoostTestTargetsIncluded.h") + if(NOT Boost_UNIT_TEST_FRAMEWORK_LIBRARY) + find_package(Boost 1.34.0 QUIET COMPONENTS unit_test_framework) + endif() + if(Boost_UNIT_TEST_FRAMEWORK_LIBRARY) + set(_boosttesttargets_libs "${Boost_UNIT_TEST_FRAMEWORK_LIBRARY}") + if(Boost_USE_STATIC_LIBS) + set(_boostConfig "BoostTestTargetsStatic.h") + else() + if(NOT APPLE) + set(_boostConfig "BoostTestTargetsDynamic.h") + endif() + endif() + endif() + get_filename_component(_moddir ${CMAKE_CURRENT_LIST_FILE} PATH) + configure_file("${_moddir}/${_boostConfig}" + "${CMAKE_CURRENT_BINARY_DIR}/BoostTestTargetConfig.h" + COPYONLY) + include_directories("${CMAKE_CURRENT_BINARY_DIR}") +endif() + +function(add_boost_test _name) + if(NOT BUILD_TESTING) + return() + endif() + + # parse arguments + set(_nowhere) + set(_curdest _nowhere) + set(_val_args + SOURCES + FAIL_REGULAR_EXPRESSION + LAUNCHER + LIBRARIES + RESOURCES + TESTS) + set(_bool_args + USE_COMPILED_LIBRARY) + foreach(_arg ${_val_args} ${_bool_args}) + set(${_arg}) + endforeach() + foreach(_element ${ARGN}) + list(FIND _val_args "${_element}" _val_arg_find) + list(FIND _bool_args "${_element}" _bool_arg_find) + if("${_val_arg_find}" GREATER "-1") + set(_curdest "${_element}") + elseif("${_bool_arg_find}" GREATER "-1") + set("${_element}" ON) + set(_curdest _nowhere) + else() + list(APPEND ${_curdest} "${_element}") + endif() + endforeach() + + if(_nowhere) + message(FATAL_ERROR "Syntax error in use of add_boost_test!") + endif() + + if(NOT SOURCES) + message(FATAL_ERROR + "Syntax error in use of add_boost_test: at least one source file required!") + endif() + + if(Boost_FOUND AND NOT "${Boost_VERSION}0" LESS "1034000") + + include_directories(${Boost_INCLUDE_DIRS}) + + set(includeType) + foreach(src ${SOURCES}) + file(READ ${src} thefile) + if("${thefile}" MATCHES ".*BoostTestTargetConfig.h.*") + set(includeType CONFIGURED) + set(includeFileLoc ${src}) + break() + elseif("${thefile}" MATCHES ".*boost/test/included/unit_test.hpp.*") + set(includeType INCLUDED) + set(includeFileLoc ${src}) + set(_boosttesttargets_libs) # clear this out - linking would be a bad idea + if(NOT + "${thefile}" + MATCHES + ".*OVERRIDE_BOOST_TEST_INCLUDED_WARNING.*") + message("Please replace the include line in ${src} with this alternate include line instead:") + message(" \#include <BoostTestTargetConfig.h>") + message("Once you've saved your changes, re-run CMake. (See BoostTestTargets.cmake for more info)") + endif() + break() + endif() + endforeach() + + if(NOT _boostTestTargetsNagged${_name} STREQUAL "${includeType}") + if("${includeType}" STREQUAL "CONFIGURED") + message(STATUS + "Test '${_name}' uses the CMake-configurable form of the boost test framework - congrats! (Including File: ${includeFileLoc})") + elseif("${includeType}" STREQUAL "INCLUDED") + message("In test '${_name}': ${includeFileLoc} uses the 'included' form of the boost unit test framework.") + else() + message("In test '${_name}': Didn't detect the CMake-configurable boost test include.") + message("Please replace your existing boost test include in that test with the following:") + message(" \#include <BoostTestTargetConfig.h>") + message("Once you've saved your changes, re-run CMake. (See BoostTestTargets.cmake for more info)") + endif() + endif() + set(_boostTestTargetsNagged${_name} + "${includeType}" + CACHE + INTERNAL + "" + FORCE) + + + if(RESOURCES) + list(APPEND SOURCES ${RESOURCES}) + endif() + + # Generate a unique target name, using the relative binary dir + # and provided name. (transform all / into _ and remove all other + # non-alphabet characters) + file(RELATIVE_PATH + targetpath + "${CMAKE_BINARY_DIR}" + "${CMAKE_CURRENT_BINARY_DIR}") + string(REGEX REPLACE "[^A-Za-z/_]" "" targetpath "${targetpath}") + string(REPLACE "/" "_" targetpath "${targetpath}") + + set(_target_name ${BOOST_TEST_TARGET_PREFIX}-${targetpath}-${_name}) + set(${_name}_TARGET_NAME "${_target_name}" PARENT_SCOPE) + + # Build the test. + add_executable(${_target_name} ${SOURCES}) + + list(APPEND LIBRARIES ${_boosttesttargets_libs}) + + if(LIBRARIES) + target_link_libraries(${_target_name} ${LIBRARIES}) + endif() + + if(RESOURCES) + set_property(TARGET ${_target_name} PROPERTY RESOURCE ${RESOURCES}) + copy_resources_to_build_tree(${_target_name}) + endif() + + if(NOT Boost_TEST_FLAGS) +# set(Boost_TEST_FLAGS --catch_system_error=yes --output_format=XML) + set(Boost_TEST_FLAGS --catch_system_error=yes) + endif() + + # TODO: Figure out why only recent boost handles individual test running properly + + if(LAUNCHER) + set(_test_command ${LAUNCHER} "\$<TARGET_FILE:${_target_name}>") + else() + set(_test_command ${_target_name}) + endif() + + if(TESTS AND ( "${Boost_VERSION}" VERSION_GREATER "103799" )) + foreach(_test ${TESTS}) + add_test( + ${_name}-${_test} + ${_test_command} --run_test=${_test} ${Boost_TEST_FLAGS} + ) + if(FAIL_REGULAR_EXPRESSION) + set_tests_properties(${_name}-${_test} + PROPERTIES + FAIL_REGULAR_EXPRESSION + "${FAIL_REGULAR_EXPRESSION}") + endif() + endforeach() + else() + add_test( + ${_name}-boost_test + ${_test_command} ${Boost_TEST_FLAGS} + ) + if(FAIL_REGULAR_EXPRESSION) + set_tests_properties(${_name}-boost_test + PROPERTIES + FAIL_REGULAR_EXPRESSION + "${FAIL_REGULAR_EXPRESSION}") + endif() + endif() + + # CppCheck the test if we can. + if(COMMAND add_cppcheck) + add_cppcheck(${_target_name} STYLE UNUSED_FUNCTIONS) + endif() + + endif() +endfunction() diff --git a/cmake/cmake-modules/BoostTestTargetsDynamic.h b/cmake/cmake-modules/BoostTestTargetsDynamic.h new file mode 100644 index 000000000..ae1f38e74 --- /dev/null +++ b/cmake/cmake-modules/BoostTestTargetsDynamic.h @@ -0,0 +1,9 @@ +// Small header computed by CMake to set up boost test. +// include AFTER #define BOOST_TEST_MODULE whatever +// but before any other boost test includes. + +// Using the Boost UTF dynamic library + +#define BOOST_TEST_DYN_LINK +#include <boost/test/unit_test.hpp> + diff --git a/cmake/cmake-modules/BoostTestTargetsIncluded.h b/cmake/cmake-modules/BoostTestTargetsIncluded.h new file mode 100644 index 000000000..253133ce2 --- /dev/null +++ b/cmake/cmake-modules/BoostTestTargetsIncluded.h @@ -0,0 +1,7 @@ +// Small header computed by CMake to set up boost test. +// include AFTER #define BOOST_TEST_MODULE whatever +// but before any other boost test includes. + +// Using the Boost UTF included framework + +#include <boost/test/included/unit_test.hpp> diff --git a/cmake/cmake-modules/BoostTestTargetsStatic.h b/cmake/cmake-modules/BoostTestTargetsStatic.h new file mode 100644 index 000000000..dd3cddae1 --- /dev/null +++ b/cmake/cmake-modules/BoostTestTargetsStatic.h @@ -0,0 +1,7 @@ +// Small header computed by CMake to set up boost test. +// include AFTER #define BOOST_TEST_MODULE whatever +// but before any other boost test includes. + +// Using the Boost UTF static library + +#include <boost/test/unit_test.hpp> diff --git a/cmake/cmake-modules/BundleOSGPlugins.cmake b/cmake/cmake-modules/BundleOSGPlugins.cmake new file mode 100644 index 000000000..ef491d877 --- /dev/null +++ b/cmake/cmake-modules/BundleOSGPlugins.cmake @@ -0,0 +1,95 @@ +# - Provide access to the OpenSceneGraph runtime files for bundling in +# an installation or package. +# +# Sets these variables: +# - OSGDB_PLUGINS_RELEASE +# - OSGDB_PLUGINS_DEBUG +# - OSGWRAPPER_PLUGINS_RELEASE +# - OSGWRAPPER_PLUGINS_DEBUG +# - OSG_RUNTIME_LIBRARY_DIR +# - OSG_PATH_TO_PLUGINS +# +# Creates this function: +# - install_osg_plugins( {varNameForOutputFilenames} ) +# +# Requires these CMake modules: +# no additional modules required +# +# Original Author: +# 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> +# http://academic.cleardefinition.com +# Iowa State University HCI Graduate Program/VRAC +# +# Copyright Iowa State University 2009-2010. +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE_1_0.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) + + +function(_osgbundle_split_debug_versions releasevar debugvar) + set(release) + set(debug) + foreach(fn ${ARGN}) + get_filename_component(name "${fn}" NAME_WE) + if("${name}" MATCHES "d$") + list(APPEND debug "${fn}") + else() + list(APPEND release "${fn}") + endif() + endforeach() + set(${releasevar} ${release} PARENT_SCOPE) + set(${debugvar} ${debug} PARENT_SCOPE) +endfunction() + +function(_osgbundle_find_plugins varprefix filenameprefix) + file(GLOB + all + "${OSG_RUNTIME_LIBRARY_DIR}/osgPlugins-${OPENSCENEGRAPH_VERSION}/${filenameprefix}*${CMAKE_SHARED_LIBRARY_SUFFIX}") + _osgbundle_split_debug_versions(${varprefix}_PLUGINS_RELEASE + ${varprefix}_PLUGINS_DEBUG + ${all}) + set(${varprefix}_PLUGINS_RELEASE + "${${varprefix}_PLUGINS_RELEASE}" + PARENT_SCOPE) + set(${varprefix}_PLUGINS_DEBUG + "${${varprefix}_PLUGINS_DEBUG}" + PARENT_SCOPE) +endfunction() + +if(OPENSCENEGRAPH_FOUND) + if(WIN32) + get_filename_component(_osglibdir "${OSG_LIBRARY}" PATH) + get_filename_component(_osgroot "${_osglibdir}/.." ABSOLUTE) + set(OSG_RUNTIME_LIBRARY_DIR "${_osgroot}/bin") + set(OSG_PATH_TO_PLUGINS "bin/osgPlugins-${OPENSCENEGRAPH_VERSION}/") + else() + get_filename_component(_osglibdir "${OSG_LIBRARY}" PATH) + set(OSG_RUNTIME_LIBRARY_DIR "${_osglibdir}") + set(OSG_PATH_TO_PLUGINS "lib/osgPlugins-${OPENSCENEGRAPH_VERSION}/") + endif() + # Find the osgDB plugins + _osgbundle_find_plugins(OSGDB osgdb) + _osgbundle_find_plugins(OSGWRAPPER osgwrapper) +endif() + +function(install_osg_plugins var) + set(INSTALLEDPLUGINS) + foreach(plugin ${OSGDB_PLUGINS_RELEASE} ${OSGWRAPPER_PLUGINS_RELEASE}) + 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() diff --git a/cmake/cmake-modules/BundleOSGRuntime.cmake b/cmake/cmake-modules/BundleOSGRuntime.cmake new file mode 100644 index 000000000..8d119261b --- /dev/null +++ b/cmake/cmake-modules/BundleOSGRuntime.cmake @@ -0,0 +1,118 @@ +# - Include the OpenSceneGraph runtime files in an installation or built package. +# +# OSGRUNTIME_BUNDLE - Set to "yes" to enable this behavior +# OSGRUNTIME_zlib1dll - Must be set to the location of zlib1.dll on Windows +# OSGRUNTIME_zlib1ddll - Can be set to the location of zlib1d.dll (debug) on Windows. +# If set, will be installed. +# +# Requires these CMake modules: +# no additional modules required +# +# Original Author: +# 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> +# http://academic.cleardefinition.com +# Iowa State University HCI Graduate Program/VRAC +# +# Copyright Iowa State University 2009-2010. +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE_1_0.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) + +function(_osgbundle_split_debug_versions releasevar debugvar) + set(release) + set(debug) + foreach(fn ${ARGN}) + get_filename_component(name "${fn}" NAME_WE) + if(${name} MATCHES "d$") + list(APPEND debug "${fn}") + else() + list(APPEND release "${fn}") + endif() + endforeach() + set(${releasevar} ${release} PARENT_SCOPE) + set(${debugvar} ${debug} PARENT_SCOPE) +endfunction() + +function(_osgbundle_find_plugins varprefix filenameprefix) + file(GLOB + all + "${OSG_RUNTIME_LIBRARY_DIR}/osgPlugins-${OPENSCENEGRAPH_VERSION}/${filenameprefix}*${CMAKE_SHARED_LIBRARY_SUFFIX}") + _osgbundle_split_debug_versions(${varprefix}_PLUGINS_RELEASE + ${varprefix}_PLUGINS_DEBUG + ${all}) +endfunction() + +if(OPENSCENEGRAPH_FOUND) + if(WIN32) + get_filename_component(_osglibdir "${OSG_LIBRARY}" PATH) + get_filename_component(_osgroot "${_osglibdir}/.." ABSOLUTE) + set(OSG_RUNTIME_LIBRARY_DIR "${_osgroot}/bin") + find_file(OSGBUNDLE_zlib1dll + zlib1.dll + PATHS + "${_osgroot}/bin" + "${_osgroot}/lib") + find_file(OSGBUNDLE_zlib1ddll + zlib1d.dll + PATHS + "${_osgroot}/bin" + "${_osgroot}/lib") + mark_as_advanced(OSGBUNDLE_zlib1dll OSGBUNDLE_zlib1ddll) + set(_osgbundle_required OSGBUNDLE_zlib1dll) + set(_osgbundle_platformOK on) + else() + get_filename_component(_osglibdir "${OSG_LIBRARY}" PATH) + set(OSG_RUNTIME_LIBRARY_DIR "${_osglibdir}") + set(_osgbundle_platformOK on) + endif() + + # Find the osgDB plugins + + _osgbundle_find_plugins(OSGDB osgdb) + _osgbundle_find_plugins(OSGWRAPPER osgwrapper) +endif() + + + +if(_osgbundle_platformOK) + set(_osgbundle_caninstall on) + foreach(_var ${_osgbundle_required}) + if(NOT ${_var}) + # If we are missing a single required file, cut out now. + set(_osgbundle_caninstall off) + option(OSGRUNTIME_BUNDLE + "Install a local copy of the OpenSceneGraph runtime files with the project." + off) + endif() + endforeach() + if(_osgbundle_caninstall) + option(OSGRUNTIME_BUNDLE + "Install a local copy of the OpenSceneGraph runtime files with the project." + on) + endif() +endif() + +mark_as_advanced(OSGRUNTIME_BUNDLE) + +if(OSGRUNTIME_BUNDLE AND OPENSCENEGRAPH_FOUND AND _osgbundle_caninstall) + if(WIN32) + set(DESTINATION bin) + install(FILES "${OSGBUNDLE_zlib1dll}" + DESTINATION ${DESTINATION}) + + if(OSGBUNDLE_zlib1ddll) + install(FILES "${OSGBUNDLE_zlib1ddll}" + DESTINATION ${DESTINATION}) + endif() + + else() + set(DESTINATION lib) + endif() + + install(DIRECTORY "${_osgroot}/bin/" "${_osgroot}/lib/" + DESTINATION ${DESTINATION} + FILES_MATCHING + + # Runtime files + PATTERN "*${CMAKE_SHARED_LIBRARY_SUFFIX}") +endif() diff --git a/cmake/cmake-modules/BundleVRJ22Runtime.cmake b/cmake/cmake-modules/BundleVRJ22Runtime.cmake new file mode 100644 index 000000000..9198d2598 --- /dev/null +++ b/cmake/cmake-modules/BundleVRJ22Runtime.cmake @@ -0,0 +1,99 @@ +# - Include the VR Juggler runtime files in an installation or built package. +# +# VRJUGGLERRUNTIME_BUNDLE +# VRJUGGLERRUNTIME_BUNDLE_DEBUG - set to yes to include debug dll's as well +# +# Requires these CMake modules: +# FindVRJuggler22 and its dependencies +# +# Original Author: +# 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> +# http://academic.cleardefinition.com +# Iowa State University HCI Graduate Program/VRAC +# +# Copyright Iowa State University 2009-2010. +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE_1_0.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) + +if(WIN32) + option(VRJUGGLERRUNTIME_BUNDLE + "Install a local copy of the VR Juggler runtime files with the project." + on) + option(VRJUGGLERRUNTIME_BUNDLE_DEBUG + "Install the VR Juggler debug runtime files as well." + off) + mark_as_advanced(VRJUGGLERRUNTIME_BUNDLE_DEBUG) +else() + # TODO - how to handle when not on Windows? + #option(VRJUGGLERRUNTIME_BUNDLE "Install a local copy of the VR Juggler runtime files with the project." off) +endif() + +mark_as_advanced(VRJUGGLERRUNTIME_BUNDLE VRJUGGLERRUNTIME_BUNDLE_DEBUG) + +if(VRJUGGLERRUNTIME_BUNDLE AND VRJUGGLER22_FOUND) + if(WIN32) + get_filename_component(_vrjlibdir "${VRJ22_LIBRARY_RELEASE}" PATH) + get_filename_component(_vrjroot "${_vrjlibdir}/../" ABSOLUTE) + + # TODO - make sure gadgeteer and sonix can find their DSO's at runtime... + + foreach(_dir bin lib) + if(VRJUGGLERRUNTIME_BUNDLE_DEBUG) + install(DIRECTORY "${_vrjroot}/${_dir}/" + DESTINATION bin + PATTERN "*.lib" EXCLUDE # exclude static and link libraries + PATTERN "*.exe" EXCLUDE # exclude unneeded executables + PATTERN "*.py" EXCLUDE # exclude unneeded python executables + PATTERN "*.pyc" EXCLUDE # exclude unneeded python executables + ) + else() + install(DIRECTORY ${_vrjroot}/${_dir}/ + DESTINATION bin + PATTERN "*.lib" EXCLUDE # exclude static and link libraries + PATTERN "*.exe" EXCLUDE # exclude unneeded executables + PATTERN "*.py" EXCLUDE # exclude unneeded python executables + PATTERN "*.pyc" EXCLUDE # exclude unneeded python executables + + PATTERN "*d.dll" EXCLUDE # exclude debug dll's + PATTERN "*-gd-*.dll" EXCLUDE # exclude Boost debug dll's + ) + endif() + + endforeach() + + install(DIRECTORY ${_vrjroot}/share/ + DESTINATION share + FILES_MATCHING + + # Runtime files + PATTERN "*.dll" + PATTERN "*.jar" + + # Data files + PATTERN "*.wav" + PATTERN "*.xml" + PATTERN "*.xsl" + PATTERN "*.xsd" + PATTERN "*.flt" + PATTERN "*.dat" + PATTERN "*.table" + + + # Config files + PATTERN "*.jdef" + PATTERN "*.jconf" + PATTERN "*.cfg" + PATTERN "hosts.allow" + + # Other Files + PATTERN "*.txt" + PATTERN "COPYING*" + PATTERN "ChangeLog" + ) + + endif() + + + +endif() diff --git a/cmake/cmake-modules/BundleVRJ30Runtime.cmake b/cmake/cmake-modules/BundleVRJ30Runtime.cmake new file mode 100644 index 000000000..c661da0fe --- /dev/null +++ b/cmake/cmake-modules/BundleVRJ30Runtime.cmake @@ -0,0 +1,96 @@ +# - Include the VR Juggler runtime files in an installation or built package. +# +# VRJUGGLERRUNTIME_BUNDLE +# VRJUGGLERRUNTIME_BUNDLE_DEBUG - set to yes to include debug dll's as well +# +# Requires these CMake modules: +# FindVRJuggler22 and its dependencies +# +# Original Author: +# 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> +# http://academic.cleardefinition.com +# Iowa State University HCI Graduate Program/VRAC +# Updated for VR Juggler 3.0 by: +# Brandon Newendorp <brandon@newendorp.com> + +if(WIN32) + option(VRJUGGLERRUNTIME_BUNDLE + "Install a local copy of the VR Juggler runtime files with the project." + on) + option(VRJUGGLERRUNTIME_BUNDLE_DEBUG + "Install the VR Juggler debug runtime files as well." + off) + mark_as_advanced(VRJUGGLERRUNTIME_BUNDLE_DEBUG) +else() + # TODO - how to handle when not on Windows? + #option(VRJUGGLERRUNTIME_BUNDLE "Install a local copy of the VR Juggler runtime files with the project." off) +endif() + +mark_as_advanced(VRJUGGLERRUNTIME_BUNDLE VRJUGGLERRUNTIME_BUNDLE_DEBUG) + +if(VRJUGGLERRUNTIME_BUNDLE AND VRJUGGLER22_FOUND) + if(WIN32) + get_filename_component(_vrjlibdir "${VRJ22_LIBRARY_RELEASE}" PATH) + get_filename_component(_vrjroot "${_vrjlibdir}/../" ABSOLUTE) + + # TODO - make sure gadgeteer and sonix can find their DSO's at runtime... + + foreach(_dir bin lib) + if(VRJUGGLERRUNTIME_BUNDLE_DEBUG) + install(DIRECTORY "${_vrjroot}/${_dir}/" + DESTINATION bin + PATTERN "*.lib" EXCLUDE # exclude static and link libraries + PATTERN "*.exe" EXCLUDE # exclude unneeded executables + PATTERN "*.py" EXCLUDE # exclude unneeded python executables + PATTERN "*.pyc" EXCLUDE # exclude unneeded python executables + ) + else() + install(DIRECTORY ${_vrjroot}/${_dir}/ + DESTINATION bin + PATTERN "*.lib" EXCLUDE # exclude static and link libraries + PATTERN "*.exe" EXCLUDE # exclude unneeded executables + PATTERN "*.py" EXCLUDE # exclude unneeded python executables + PATTERN "*.pyc" EXCLUDE # exclude unneeded python executables + + PATTERN "*d.dll" EXCLUDE # exclude debug dll's + PATTERN "*-gd-*.dll" EXCLUDE # exclude Boost debug dll's + ) + endif() + + endforeach() + + install(DIRECTORY ${_vrjroot}/share/ + DESTINATION share + FILES_MATCHING + + # Runtime files + PATTERN "*.dll" + PATTERN "*.jar" + + # Data files + PATTERN "*.wav" + PATTERN "*.xml" + PATTERN "*.xsl" + PATTERN "*.xsd" + PATTERN "*.flt" + PATTERN "*.dat" + PATTERN "*.table" + + + # Config files + PATTERN "*.jdef" + PATTERN "*.jconf" + PATTERN "*.cfg" + PATTERN "hosts.allow" + + # Other Files + PATTERN "*.txt" + PATTERN "COPYING*" + PATTERN "ChangeLog" + ) + + endif() + + + +endif() diff --git a/cmake/cmake-modules/CheckMacHIDAPI.cmake b/cmake/cmake-modules/CheckMacHIDAPI.cmake new file mode 100644 index 000000000..54337835a --- /dev/null +++ b/cmake/cmake-modules/CheckMacHIDAPI.cmake @@ -0,0 +1,73 @@ +# - Script to check if the signature for a mac HID callback uses UInt32 or uint32_t +# Requires that the associated CPP file be present: CheckMacHIDAPI.cpp. +# +# MACOSX_HID_UINT32T, set according to the results of our test. +# +# Use add_definitions(-DMACOSX_HID_UINT32T=${MACOSX_HID_UINT32T}) in your +# listfile and the following prototype for the function you'd like to +# register using setInterruptReportHandlerCallback: +# void ReaderReportCallback( +# void *target, +# IOReturn result, +# void *refcon, +# void *sender, +# MACOSX_HID_UINT32T size +# ) +# +# Original Author: +# 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> +# http://academic.cleardefinition.com +# Iowa State University HCI Graduate Program/VRAC +# +# Copyright Iowa State University 2009-2010. +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE_1_0.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) + + +if(APPLE) + if(NOT MACOSX_HID_UINT32T) + get_filename_component(_moddir ${CMAKE_CURRENT_LIST_FILE} PATH) + + try_compile(_HID_uint32t + ${CMAKE_BINARY_DIR} + ${_moddir}/CheckMacHIDAPI.cpp + OUTPUT_VARIABLE + _HID_uint32t_OUTPUT + COMPILE_DEFINITIONS + -DMACOSX_HID_UINT32T=uint32_t) + message(STATUS + "Checking uint32_t in HID callback signature... ${_HID_uint32t}") + + try_compile(_HID_UInt32 + ${CMAKE_BINARY_DIR} + ${_moddir}/CheckMacHIDAPI.cpp + OUTPUT_VARIABLE + _HID_UInt32_OUTPUT + COMPILE_DEFINITIONS + -DMACOSX_HID_UINT32T=UInt32) + message(STATUS + "Checking UInt32 in HID callback signature... ${_HID_UInt32}") + + + if(_HID_uint32t) + set(MACOSX_HID_UINT32T + "uint32_t" + CACHE + STRING + "The 32-bit uint type desired in the callback set by setInterruptReportHandlerCallback") + mark_as_advanced(MACOSX_HID_UINT32T) + elseif(_HID_UInt32) + set(MACOSX_HID_UINT32T + "UInt32" + CACHE + STRING + "The 32-bit uint type desired in the callback set by setInterruptReportHandlerCallback") + mark_as_advanced(MACOSX_HID_UINT32T) + else() + message(SEND_ERROR + "ERROR: Could not detect appropriate Mac HID uint32 type!") + endif() + + endif() +endif() diff --git a/cmake/cmake-modules/CheckMacHIDAPI.cpp b/cmake/cmake-modules/CheckMacHIDAPI.cpp new file mode 100644 index 000000000..00d2a4679 --- /dev/null +++ b/cmake/cmake-modules/CheckMacHIDAPI.cpp @@ -0,0 +1,45 @@ +/** + * \file CheckMacHIDAPI.cpp + * \brief C++ source file used by CMake module CheckMacHIDAPI.cmake + * + * \author + * Ryan Pavlik, 2009-2010 + * <rpavlik@iastate.edu> + * http://academic.cleardefinition.com/ + * + * \author + * Based on code extracted from VRPN 07.22 for use as a minimal test case + * + * Attempts to compile a difficult bit of code against the Mac + * HID API, as two different types have been required in the callback + * function (UInt32 and uint32_t) and testing is the best way to know + * which one is correct for a given system. + * + */ + + +#if defined(__APPLE__) + +#include <stdio.h> +#include <IOKit/IOCFPlugIn.h> +#include <IOKit/hid/IOHIDLib.h> +#include <IOKit/hid/IOHIDKeys.h> +#include <CoreFoundation/CoreFoundation.h> +void ReaderReportCallback( + void *target, IOReturn result, void *refcon, void *sender, MACOSX_HID_UINT32T size + ) + {} +#endif + +int main(int argc, char* argv[]) { +#if defined(__APPLE__) + io_object_t _ioObject; + IOHIDDeviceInterface122 **_interface; + unsigned char _buffer[512]; + IOReturn result = (*_interface)->setInterruptReportHandlerCallback(_interface, + _buffer, 512, + ReaderReportCallback, + NULL, 0); +#endif + return 0; +} diff --git a/cmake/cmake-modules/CheckVersion.cmake b/cmake/cmake-modules/CheckVersion.cmake new file mode 100644 index 000000000..baece76d8 --- /dev/null +++ b/cmake/cmake-modules/CheckVersion.cmake @@ -0,0 +1,47 @@ +# - Utility function for Find modules considering multiple possible versions +# +# Requires these CMake modules: +# no additional modules required +# +# Original Author: +# 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> +# http://academic.cleardefinition.com +# Iowa State University HCI Graduate Program/VRAC +# +# Copyright Iowa State University 2009-2010. +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE_1_0.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) + +if(__check_version) + return() +endif() +set(__check_version YES) + +function(check_version var packagename version) + # By default, we say that the version is good enough + set(_result TRUE) + + # Was a version requested? If so, what is our test condition? + if(${packagename}_FIND_VERSION) + if(${packagename}_FIND_VERSION_EXACT) + # Yes, an exact == version was requested - check it. + + if(NOT "${version}" VERSION_EQUAL "${${packagename}_FIND_VERSION}") + # version is not an exact match + set(_result FALSE) + endif() + else() + # Yes, a minimum >= version was requested - check it. + + if("${version}" VERSION_LESS "${${packagename}_FIND_VERSION}") + # version is lower than requested + set(_result FALSE) + endif() + + endif() + endif() + + # Return _result + set(${var} ${_result} PARENT_SCOPE) +endfunction() diff --git a/cmake/cmake-modules/CleanDirectoryList.cmake b/cmake/cmake-modules/CleanDirectoryList.cmake new file mode 100644 index 000000000..58b8963f9 --- /dev/null +++ b/cmake/cmake-modules/CleanDirectoryList.cmake @@ -0,0 +1,48 @@ +# - Removes duplicate entries and non-directories from a provided list +# +# clean_directory_list(<listvar> [<additional list items>...]) +# +# Requires CMake 2.6 or newer (uses the 'function' command) +# +# Original Author: +# 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> +# http://academic.cleardefinition.com +# Iowa State University HCI Graduate Program/VRAC +# +# Copyright Iowa State University 2009-2010. +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE_1_0.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) + +if(__clean_directory_list) + return() +endif() +set(__clean_directory_list YES) + +function(clean_directory_list _var) + # combine variable's current value with additional list items + set(_in ${${_var}} ${ARGN}) + + if(_in) + # Initial list cleaning + list(REMOVE_DUPLICATES _in) + + # Grab the absolute path of each actual directory + set(_out) + foreach(_dir ${_in}) + if(IS_DIRECTORY "${_dir}") + get_filename_component(_dir "${_dir}" ABSOLUTE) + file(TO_CMAKE_PATH "${_dir}" _dir) + list(APPEND _out "${_dir}") + endif() + endforeach() + + if(_out) + # Clean up the output list now + list(REMOVE_DUPLICATES _out) + endif() + + # return _out + set(${_var} "${_out}" PARENT_SCOPE) + endif() +endfunction() diff --git a/cmake/cmake-modules/CleanLibraryList.cmake b/cmake/cmake-modules/CleanLibraryList.cmake new file mode 100644 index 000000000..77613934d --- /dev/null +++ b/cmake/cmake-modules/CleanLibraryList.cmake @@ -0,0 +1,72 @@ +# - A smarter replacement for list(REMOVE_DUPLICATES) for library lists +# +# Note that, in the case of cyclic link dependencies, you _do_ actually need +# a library in a list multiple times. So, only use this function when you know +# that the dependency graph is acyclic. +# +# clean_library_list(<listvar> [<additional list items>...]) - where +# listvar is the name of a destination variable, and also possibly a source, and +# it is followed by any number (including 0) of additional libraries to append +# to the list before processing. +# +# Removes duplicates from the list, leaving only the last instance, while +# preserving the meaning of the "optimized", "debug", and "general" labeling. +# (Libraries listed as general are listed in the result instead as optimized and +# debug) +# +# Requires CMake 2.6 or newer (uses the 'function' command) +# +# Original Author: +# 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> +# http://academic.cleardefinition.com +# Iowa State University HCI Graduate Program/VRAC +# +# Copyright Iowa State University 2009-2010. +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE_1_0.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) + +if(__clean_library_list) + return() +endif() +set(__clean_library_list YES) + +function(clean_library_list _var) + # combine variable's current value with additional list items + set(_work ${${_var}} ${ARGN}) + if(_work) + # Turn each of optimized, debug, and general into flags + # prefixed on their respective library (combining list items) + string(REGEX REPLACE "optimized;" "1CLL%O%" _work "${_work}") + string(REGEX REPLACE "debug;" "1CLL%D%" _work "${_work}") + string(REGEX REPLACE "general;" "1CLL%G%" _work "${_work}") + + # Any library that doesn't have a prefix is general, and a general + # library is both debug and optimized so stdize it + set(_std) + foreach(_lib ${_work}) + if(NOT "${_lib}" MATCHES "^1CLL%.%") + list(APPEND _std "1CLL%D%${_lib}" "1CLL%O%${_lib}") + elseif("${_lib}" MATCHES "^1CLL%G%") + string(REPLACE "1CLL%G%" "" _justlib "${_lib}") + list(APPEND _std "1CLL%D%${_justlib}" "1CLL%O%${_justlib}") + else() + list(APPEND _std "${_lib}") + endif() + endforeach() + + # REMOVE_DUPLICATES leaves the first - so we reverse before and after + # to keep the last, instead + list(REVERSE _std) + list(REMOVE_DUPLICATES _std) + list(REVERSE _std) + + # Split list items back out again: turn prefixes into the + # library type flags. + string(REGEX REPLACE "1CLL%D%" "debug;" _std "${_std}") + string(REGEX REPLACE "1CLL%O%" "optimized;" _std "${_std}") + + # Return _std + set(${_var} ${_std} PARENT_SCOPE) + endif() +endfunction() diff --git a/cmake/cmake-modules/CompatibilityVersionFile-BASIC.cmake.in b/cmake/cmake-modules/CompatibilityVersionFile-BASIC.cmake.in new file mode 100644 index 000000000..d2b97ba7a --- /dev/null +++ b/cmake/cmake-modules/CompatibilityVersionFile-BASIC.cmake.in @@ -0,0 +1,19 @@ +# will always be the actual version one +# Wrapped in a macro because it's got a return before we want. +macro(_gcvf_version) + @GCVF_PREVIOUS_FILE@ +endmacro() +_gcvf_version() + + +if(NOT "${CMAKE_SYSTEM_NAME}" STREQUAL "@CMAKE_SYSTEM_NAME@") + set(PACKAGE_VERSION "${PACKAGE_VERSION} (@CMAKE_SYSTEM_NAME@)") + set(PACKAGE_VERSION_UNSUITABLE TRUE) + return() +endif() + +if(ANDROID AND NOT ("${ANDROID_ABI}" STREQUAL "@ANDROID_ABI@")) + set(PACKAGE_VERSION "${PACKAGE_VERSION} (Android @ANDROID_ABI@)") + set(PACKAGE_VERSION_UNSUITABLE TRUE) + return() +endif() \ No newline at end of file diff --git a/cmake/cmake-modules/CompatibilityVersionFile-CXX_ABI.cmake.in b/cmake/cmake-modules/CompatibilityVersionFile-CXX_ABI.cmake.in new file mode 100644 index 000000000..f09043d6a --- /dev/null +++ b/cmake/cmake-modules/CompatibilityVersionFile-CXX_ABI.cmake.in @@ -0,0 +1,29 @@ +@GCVF_PREVIOUS_FILE@ + +if(MSVC) + if(NOT "${MSVC_VERSION}" STREQUAL "@MSVC_VERSION@") + set(PACKAGE_VERSION "${PACKAGE_VERSION} (@GCVF_WIN_CXXLAYOUT@)") + set(PACKAGE_VERSION_UNSUITABLE TRUE) + return() + endif() +endif() + +macro(_gcvf_compute_cxxabi _var _compilerid _compilerver) + set(${_var}) + if("${_compilerid}" STREQUAL "GNU" AND NOT ("${_compilerver}" STREQUAL "")) + if("${_compilerver}" VER_LESS 5.0) + # This is pre-gcc5, not compatible with post-gcc5 + set(${_var} "g++ < 5.0") + else() + set(${_var} "g++ >= 5.0") + endif() + endif() +endmacro() +_gcvr_compute_cxxabi(_installed_cxx "@CMAKE_CXX_COMPILER_ID@" "@CMAKE_CXX_COMPILER_VERSION@") +_gcvr_compute_cxxabi(_current_cxx "${CMAKE_CXX_COMPILER_ID}" "${CMAKE_CXX_COMPILER_VERSION}") + +# if(NOT "${_installed_cxx}" STREQUAL "${_current_cxx}") +# set(PACKAGE_VERSION "${PACKAGE_VERSION} (${_installed_cxx})") +# set(PACKAGE_VERSION_UNSUITABLE TRUE) +# return() +# endif() diff --git a/cmake/cmake-modules/CompatibilityVersionFile-CXX_LAYOUT.cmake.in b/cmake/cmake-modules/CompatibilityVersionFile-CXX_LAYOUT.cmake.in new file mode 100644 index 000000000..8f98a084c --- /dev/null +++ b/cmake/cmake-modules/CompatibilityVersionFile-CXX_LAYOUT.cmake.in @@ -0,0 +1,16 @@ +@GCVF_PREVIOUS_FILE@ + +set(GCVF_WIN_CXXLAYOUT) +if(MSVC) + set(GCVF_WIN_CXXLAYOUT "MSVC") +elseif(MINGW) + set(GCVF_WIN_CXXLAYOUT "MinGW") +elseif(WIN32) + set(GCVF_WIN_CXXLAYOUT "other") +endif() + +if(NOT "@GCVF_WIN_CXXLAYOUT@" STREQUAL "${GCVF_WIN_CXXLAYOUT}") + set(PACKAGE_VERSION "${PACKAGE_VERSION} (@GCVF_WIN_CXXLAYOUT@)") + set(PACKAGE_VERSION_UNSUITABLE TRUE) + return() +endif() diff --git a/cmake/cmake-modules/CompatibilityVersionFile-C_ABI.cmake.in b/cmake/cmake-modules/CompatibilityVersionFile-C_ABI.cmake.in new file mode 100644 index 000000000..656e90ffa --- /dev/null +++ b/cmake/cmake-modules/CompatibilityVersionFile-C_ABI.cmake.in @@ -0,0 +1,16 @@ +@GCVF_PREVIOUS_FILE@ + +if(NOT ("${CMAKE_C_COMPILER_ABI}" STREQUAL "") AND NOT ("@CMAKE_C_COMPILER_ABI@" STREQUAL "")) + if(NOT "${CMAKE_C_COMPILER_ABI}" STREQUAL "@CMAKE_C_COMPILER_ABI@") + set(PACKAGE_VERSION "${PACKAGE_VERSION} (@CMAKE_C_COMPILER_ABI@)") + set(PACKAGE_VERSION_UNSUITABLE TRUE) + return() + endif() +endif() + +if(NOT "${CMAKE_C_COMPILER_TARGET}" STREQUAL "@CMAKE_C_COMPILER_TARGET@") + set(PACKAGE_VERSION "${PACKAGE_VERSION} (@CMAKE_C_COMPILER_TARGET@)") + set(PACKAGE_VERSION_UNSUITABLE TRUE) + return() +endif() +# todo anything for a C ABI beyond just "basic"? \ No newline at end of file diff --git a/cmake/cmake-modules/CopyImportedTarget.cmake b/cmake/cmake-modules/CopyImportedTarget.cmake new file mode 100644 index 000000000..fed23b4fa --- /dev/null +++ b/cmake/cmake-modules/CopyImportedTarget.cmake @@ -0,0 +1,32 @@ +# - Copy shared libraries from imported targets to the target build directory +# on Windows during post-build. Install them in all cases. +# +# copy_imported_targets(<target_name> [<imported target name> ...]) +# +# install_imported_target(<imported target name> <arguments to pass to install(FILES)) +# +# Likely requires CMake 2.8.12 or newer to work well. +# +# Original Author: +# 2015 Ryan Pavlik <ryan.pavlik@gmail.com> <abiryan@ryand.net> +# +# Copyright Sensics, Inc. 2015. +# 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) + +function(copy_imported_targets _target) + foreach(_dep ${ARGN}) + if(WIN32) + add_custom_command(TARGET ${_target} POST_BUILD + COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:${_dep}> $<TARGET_FILE_DIR:${_target}> + COMMENT "Copying required DLL for dependency ${_dep}" + VERBATIM) + endif() + endforeach() +endfunction() + + +function(install_imported_target _dep) + install(FILES $<TARGET_FILE:${_dep}> ${ARGN}) +endfunction() diff --git a/cmake/cmake-modules/CopyResourcesToBuildTree.cmake b/cmake/cmake-modules/CopyResourcesToBuildTree.cmake new file mode 100644 index 000000000..3512cc484 --- /dev/null +++ b/cmake/cmake-modules/CopyResourcesToBuildTree.cmake @@ -0,0 +1,83 @@ +# - Copy the resources your app needs to the build tree. +# +# copy_resources_to_build_tree(<target_name>) +# +# Requires CMake 2.6 or newer (uses the 'function' command) +# +# Original Author: +# 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> +# http://academic.cleardefinition.com +# Iowa State University HCI Graduate Program/VRAC +# +# Copyright Iowa State University 2009-2010. +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE_1_0.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) + +if(__copy_resources_to_build_tree) + return() +endif() +set(__copy_resources_to_build_tree YES) + +function(copy_resources_to_build_tree _target) + get_target_property(_resources ${_target} RESOURCE) + if(NOT _resources) + # Bail if no resources + message(STATUS + "Told to copy resources for target ${_target}, but " + "no resources are set!") + return() + endif() + + get_target_property(_path ${_target} LOCATION) + get_filename_component(_path "${_path}" PATH) + + if(NOT MSVC AND NOT "${CMAKE_GENERATOR}" MATCHES "Makefiles") + foreach(_config ${CMAKE_CONFIGURATION_TYPES}) + get_target_property(_path${_config} ${_target} LOCATION_${_config}) + get_filename_component(_path${_config} "${_path${_config}}" PATH) + add_custom_command(TARGET ${_target} + POST_BUILD + COMMAND + ${CMAKE_COMMAND} + ARGS -E make_directory "${_path${_config}}/" + COMMENT "Creating directory ${_path${_config}}/") + endforeach() + endif() + + foreach(_res ${_resources}) + if(NOT IS_ABSOLUTE "${_res}") + get_filename_component(_res "${_res}" ABSOLUTE) + endif() + get_filename_component(_name "${_res}" NAME) + + if(MSVC) + # Working dir is solution file dir, not exe file dir. + add_custom_command(TARGET ${_target} + POST_BUILD + COMMAND + ${CMAKE_COMMAND} + ARGS -E copy "${_res}" "${CMAKE_BINARY_DIR}/" + COMMENT "Copying ${_name} to ${CMAKE_BINARY_DIR}/ for MSVC") + else() + if("${CMAKE_GENERATOR}" MATCHES "Makefiles") + add_custom_command(TARGET ${_target} + POST_BUILD + COMMAND + ${CMAKE_COMMAND} + ARGS -E copy "${_res}" "${_path}/" + COMMENT "Copying ${_name} to ${_path}/") + else() + foreach(_config ${CMAKE_CONFIGURATION_TYPES}) + add_custom_command(TARGET ${_target} + POST_BUILD + COMMAND + ${CMAKE_COMMAND} + ARGS -E copy "${_res}" "${_path${_config}}" + COMMENT "Copying ${_name} to ${_path${_config}}") + endforeach() + + endif() + endif() + endforeach() +endfunction() diff --git a/cmake/cmake-modules/CppcheckTargets.cmake b/cmake/cmake-modules/CppcheckTargets.cmake new file mode 100644 index 000000000..cb21bed73 --- /dev/null +++ b/cmake/cmake-modules/CppcheckTargets.cmake @@ -0,0 +1,241 @@ +# - Run cppcheck on c++ source files as a custom target and a test +# +# include(CppcheckTargets) +# add_cppcheck(<target-name> [UNUSED_FUNCTIONS] [STYLE] [POSSIBLE_ERROR] [FORCE] [FAIL_ON_WARNINGS]) - +# Create a target to check a target's sources with cppcheck and the indicated options +# add_cppcheck_sources(<target-name> [UNUSED_FUNCTIONS] [STYLE] [POSSIBLE_ERROR] [FORCE] [FAIL_ON_WARNINGS]) - +# Create a target to check standalone sources with cppcheck and the indicated options +# +# Requires these CMake modules: +# Findcppcheck +# +# Requires CMake 2.8 or newer (uses VERSION_LESS) +# +# Original Author: +# 2009-2010 Ryan Pavlik <ryan.pavlik@gmail.com> <abiryan@ryand.net> +# http://academic.cleardefinition.com +# Iowa State University HCI Graduate Program/VRAC +# +# Copyright Iowa State University 2009-2010. +# Copyright Anthony Pesch 2014 +# Copyright Stefan Eilemann 2014 +# Copyright Nicholas Brown 2015 +# Copyright Ryan Pavlik 2017 +# 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_cppcheck) + return() +endif() +set(__add_cppcheck YES) + +if(NOT CPPCHECK_FOUND) + find_package(cppcheck QUIET) +endif() + +if(NOT CPPCHECK_FOUND) + add_custom_target(all_cppcheck + COMMENT "cppcheck executable not found") + set_target_properties(all_cppcheck PROPERTIES EXCLUDE_FROM_ALL TRUE) +elseif(CPPCHECK_VERSION VERSION_LESS 1.53.0) + add_custom_target(all_cppcheck + COMMENT "Need at least cppcheck 1.53, found ${CPPCHECK_VERSION}") + set_target_properties(all_cppcheck PROPERTIES EXCLUDE_FROM_ALL TRUE) + set(CPPCHECK_FOUND) +endif() + +if(NOT TARGET all_cppcheck) + add_custom_target(all_cppcheck) +endif() + +function(add_cppcheck_sources _targetname) + if(CPPCHECK_FOUND) + set(_cppcheck_args -I ${CMAKE_SOURCE_DIR} ${CPPCHECK_EXTRA_ARGS}) + set(_input ${ARGN}) + list(FIND _input UNUSED_FUNCTIONS _unused_func) + if("${_unused_func}" GREATER "-1") + list(APPEND _cppcheck_args ${CPPCHECK_UNUSEDFUNC_ARG}) + list(REMOVE_AT _input ${_unused_func}) + endif() + + list(FIND _input STYLE _style) + if("${_style}" GREATER "-1") + list(APPEND _cppcheck_args ${CPPCHECK_STYLE_ARG}) + list(REMOVE_AT _input ${_style}) + endif() + + list(FIND _input POSSIBLE_ERROR _poss_err) + if("${_poss_err}" GREATER "-1") + list(APPEND _cppcheck_args ${CPPCHECK_POSSIBLEERROR_ARG}) + list(REMOVE_AT _input ${_poss_err}) + endif() + + list(FIND _input FORCE _force) + if("${_force}" GREATER "-1") + list(APPEND _cppcheck_args "--force") + list(REMOVE_AT _input ${_force}) + endif() + + list(FIND _input FAIL_ON_WARNINGS _fail_on_warn) + if("${_fail_on_warn}" GREATER "-1") + list(APPEND + CPPCHECK_FAIL_REGULAR_EXPRESSION + ${CPPCHECK_WARN_REGULAR_EXPRESSION}) + list(REMOVE_AT _input ${_fail_on_warn}) + endif() + + set(_files) + foreach(_source ${_input}) + get_source_file_property(_cppcheck_loc "${_source}" LOCATION) + if(_cppcheck_loc) + # This file has a source file property, carry on. + get_source_file_property(_cppcheck_lang "${_source}" LANGUAGE) + if(("${_cppcheck_lang}" STREQUAL "C") OR ("${_cppcheck_lang}" STREQUAL "CXX")) + list(APPEND _files "${_cppcheck_loc}") + endif() + else() + # This file doesn't have source file properties - figure it out. + get_filename_component(_cppcheck_loc "${_source}" ABSOLUTE) + if(EXISTS "${_cppcheck_loc}") + list(APPEND _files "${_cppcheck_loc}") + else() + message(FATAL_ERROR + "Adding CPPCHECK for file target ${_targetname}: " + "File ${_source} does not exist or needs a corrected path location " + "since we think its absolute path is ${_cppcheck_loc}") + endif() + endif() + endforeach() + + if("1.${CMAKE_VERSION}" VERSION_LESS "1.2.8.0") + # Older than CMake 2.8.0 + add_test(${_targetname}_cppcheck_test + "${CPPCHECK_EXECUTABLE}" + ${CPPCHECK_TEMPLATE_ARG} + ${_cppcheck_args} + ${_files}) + else() + # CMake 2.8.0 and newer + add_test(NAME + ${_targetname}_cppcheck_test + COMMAND + "${CPPCHECK_EXECUTABLE}" + ${CPPCHECK_TEMPLATE_ARG} + ${_cppcheck_args} + ${_files}) + endif() + + set_tests_properties(${_targetname}_cppcheck_test + PROPERTIES + FAIL_REGULAR_EXPRESSION + "${CPPCHECK_FAIL_REGULAR_EXPRESSION}") + + add_custom_target(${_targetname}_cppcheck + COMMAND + ${CPPCHECK_EXECUTABLE} + ${CPPCHECK_QUIET_ARG} + ${CPPCHECK_TEMPLATE_ARG} + ${_cppcheck_args} + ${_files} + WORKING_DIRECTORY + "${CMAKE_CURRENT_SOURCE_DIR}" + COMMENT + "${_targetname}_cppcheck: Running cppcheck on target ${_targetname}..." + VERBATIM) + add_dependencies(cppcheck ${_targetname}_cppcheck) + endif() +endfunction() + +function(add_cppcheck _name) + if(NOT TARGET ${_name}) + message(FATAL_ERROR + "add_cppcheck given a target name that does not exist: '${_name}' !") + endif() + if(CPPCHECK_FOUND) + set(_cppcheck_args -I ${CMAKE_SOURCE_DIR} ${CPPCHECK_EXTRA_ARGS}) + + list(FIND ARGN UNUSED_FUNCTIONS _unused_func) + if("${_unused_func}" GREATER "-1") + list(APPEND _cppcheck_args ${CPPCHECK_UNUSEDFUNC_ARG}) + endif() + + list(FIND ARGN STYLE _style) + if("${_style}" GREATER "-1") + list(APPEND _cppcheck_args ${CPPCHECK_STYLE_ARG}) + endif() + + list(FIND ARGN POSSIBLE_ERROR _poss_err) + if("${_poss_err}" GREATER "-1") + list(APPEND _cppcheck_args ${CPPCHECK_POSSIBLEERROR_ARG}) + endif() + + list(FIND ARGN FORCE _force) + if("${_force}" GREATER "-1") + list(APPEND _cppcheck_args "--force") + endif() + + list(FIND _input FAIL_ON_WARNINGS _fail_on_warn) + if("${_fail_on_warn}" GREATER "-1") + list(APPEND + CPPCHECK_FAIL_REGULAR_EXPRESSION + ${CPPCHECK_WARN_REGULAR_EXPRESSION}) + list(REMOVE_AT _input ${_unused_func}) + endif() + + get_target_property(_cppcheck_includes "${_name}" INCLUDE_DIRECTORIES) + set(_includes) + foreach(_include ${_cppcheck_includes}) + list(APPEND _includes "-I${_include}") + endforeach() + + get_target_property(_cppcheck_sources "${_name}" SOURCES) + set(_files) + foreach(_source ${_cppcheck_sources}) + get_source_file_property(_cppcheck_lang "${_source}" LANGUAGE) + get_source_file_property(_cppcheck_loc "${_source}" LOCATION) + if(("${_cppcheck_lang}" STREQUAL "C") OR ("${_cppcheck_lang}" STREQUAL "CXX")) + list(APPEND _files "${_cppcheck_loc}") + endif() + endforeach() + + if("1.${CMAKE_VERSION}" VERSION_LESS "1.2.8.0") + # Older than CMake 2.8.0 + add_test(${_name}_cppcheck_test + "${CPPCHECK_EXECUTABLE}" + ${CPPCHECK_TEMPLATE_ARG} + ${_cppcheck_args} + ${_files}) + else() + # CMake 2.8.0 and newer + add_test(NAME + ${_name}_cppcheck_test + COMMAND + "${CPPCHECK_EXECUTABLE}" + ${CPPCHECK_TEMPLATE_ARG} + ${_cppcheck_args} + ${_files}) + endif() + + set_tests_properties(${_name}_cppcheck_test + PROPERTIES + FAIL_REGULAR_EXPRESSION + "${CPPCHECK_FAIL_REGULAR_EXPRESSION}") + + add_custom_target(${_name}_cppcheck + COMMAND + ${CPPCHECK_EXECUTABLE} + ${CPPCHECK_QUIET_ARG} + ${CPPCHECK_TEMPLATE_ARG} + ${_cppcheck_args} + ${_includes} + ${_files} + WORKING_DIRECTORY + "${CMAKE_CURRENT_SOURCE_DIR}" + COMMENT + "${_name}_cppcheck: Running cppcheck on target ${_name}..." + VERBATIM) + add_dependencies(all_cppcheck ${_name}_cppcheck) + endif() + +endfunction() diff --git a/cmake/cmake-modules/CreateDashboardScripts.cmake b/cmake/cmake-modules/CreateDashboardScripts.cmake new file mode 100644 index 000000000..22420b5b4 --- /dev/null +++ b/cmake/cmake-modules/CreateDashboardScripts.cmake @@ -0,0 +1,205 @@ +# - Create ctest -S scripts to use to run dashboard builds +# +# include(CreateDashboardScripts) +# create_dashboard_scripts([<initialcachetemplatefilename>]) +# +# If you need additional settings to persist from the "parent" CMake instance +# to the initial cache created by the dashboard script, +# you may pass a filename which will be configured into the initial cache. +# +# In the resulting DASHBOARDSCRIPT_BASE_DIRECTORY, an end-user +# may optionally create a file named +# CustomInitialCache.${DASHBOARDSCRIPT_SCRIPT_NAME} +# (by default, CustomInitialCache.go.cmake) containing set commands that use +# the CACHE option, to set up additional site-local cache variable values. +# +# Requires these CMake modules: +# GetCompilerInfoString +# +# Requires CMake 2.6 or newer (uses the 'function' command), +# as well as FindGit.cmake (included with 2.8.2, may be backported) +# +# Original Author: +# 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> +# http://academic.cleardefinition.com +# Iowa State University HCI Graduate Program/VRAC +# +# Copyright Iowa State University 2009-2010. +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE_1_0.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) + +# Only do any of the prep work if not already in a dashboard script +if(NOT IN_DASHBOARD_SCRIPT) + + # Hide a CTest variable + mark_as_advanced(DART_TESTING_TIMEOUT) + + include(GetCompilerInfoString) + + get_compiler_info_string(_COMPILERID) + + # We must run the following at "include" time, not at function call time, + # to find the path to this module rather than the path to a calling list file + get_filename_component(_dashboardmoddir + ${CMAKE_CURRENT_LIST_FILE} + PATH) + + if(NOT "$ENV{USER}" MATCHES "^$") + set(_user "$ENV{USER}") + elseif(NOT "$ENV{USERNAME}" MATCHES "^$") + set(_user "$ENV{USERNAME}") + endif() + + if(NOT _dashboardscript_machine) + if(NOT SITE) + site_name(SITE) + endif() + set(_dashboardscript_machine "${SITE}" CACHE INTERNAL "") + set(SITE + "${_user}@${_dashboardscript_machine}" + CACHE + STRING + "Human-readable site name" + FORCE) + endif() + + set(DASHBOARDSCRIPT_BASE_DIRECTORY + "${CMAKE_BINARY_DIR}/Dashboards-${_dashboardscript_machine}-${_user}" + CACHE + PATH + "Directory to use as the root of all dashboard work") + mark_as_advanced(DASHBOARDSCRIPT_BASE_DIRECTORY) + + set(DASHBOARDSCRIPT_SOURCE_DIRECTORY "${CMAKE_SOURCE_DIR}") + + set(BUILDNAME + "${CMAKE_SYSTEM}-${CMAKE_SYSTEM_PROCESSOR}-${_COMPILERID}" + CACHE + STRING + "Human-readable build ID info") + + set(DASHBOARDSCRIPT_CMAKE_COMMAND + "${CMAKE_COMMAND}" + CACHE + FILEPATH + "The cmake binary to use when configuring a dashboard build") + mark_as_advanced(DASHBOARDSCRIPT_CMAKE_COMMAND) + + # Try to find CTest, preferably right next to the chosen CMake + if(DASHBOARDSCRIPT_CMAKE_COMMAND) + get_filename_component(_cmake_dir + ${DASHBOARDSCRIPT_CMAKE_COMMAND} + PATH) + else() + get_filename_component(_cmake_dir ${CMAKE_COMMAND} PATH) + endif() + find_program(DASHBOARDSCRIPT_CTEST_EXECUTABLE + NAMES + ctest + HINTS + "${_cmake_dir}" + NO_DEFAULT_PATH) + find_program(DASHBOARDSCRIPT_CTEST_EXECUTABLE + NAMES + ctest + HINTS + "${_cmake_dir}") + + + set(DASHBOARDSCRIPT_CTEST_EXECUTABLE + "${DASHBOARDSCRIPT_CTEST_EXECUTABLE}" + CACHE + FILEPATH + "Path to the CTest executable to use for dashboard builds.") + mark_as_advanced(DASHBOARDSCRIPT_CTEST_EXECUTABLE) + + + # Optionals + + if(NOT "1.${CMAKE_VERSION}" VERSION_LESS "1.2.8.0") + if(IS_DIRECTORY "${CMAKE_SOURCE_DIRECTORY}/.git") + if(NOT GIT_FOUND) + find_package(Git QUIET) + endif() + # If we have a valid git we found ourselves in older version of the module, + # let the regular FindGit module (since 2.8.2) know. + if(DASHBOARDSCRIPT_GIT_EXECUTABLE AND EXISTS "${DASHBOARDSCRIPT_GIT_EXECUTABLE}" AND NOT GIT_FOUND) + set(GIT_EXECUTABLE "${DASHBOARDSCRIPT_GIT_EXECUTABLE}" CACHE FILEPATH "Git executable" FORCE) + find_package(Git QUIET) + endif() + unset(DASHBOARDSCRIPT_GIT_EXECUTABLE) + unset(DASHBOARDSCRIPT_GIT_EXECUTABLE CACHE) + if(GIT_FOUND) + set(UPDATE_TYPE "git") + set(UPDATE_COMMAND "${GIT_EXECUTABLE}") + set(UPDATE_OPTIONS "") + endif() + endif() + endif() + +else() + # IN_DASHBOARD_SCRIPT is YES + message(STATUS + "CreateDashboardScripts detected that we're in a dashboard script already.") +endif() + +function(create_dashboard_scripts) + # Only create the script if we have all the required variables + # and are not already in it, and are at least 2.8.0. + if(DASHBOARDSCRIPT_BASE_DIRECTORY AND + DASHBOARDSCRIPT_SOURCE_DIRECTORY AND + DASHBOARDSCRIPT_BASE_DIRECTORY AND + BUILDNAME AND + DASHBOARDSCRIPT_CMAKE_COMMAND AND + DASHBOARDSCRIPT_CTEST_EXECUTABLE AND + NOT IN_DASHBOARD_SCRIPT AND + NOT "${CMAKE_VERSION}" VERSION_LESS "2.8.0") + + set(_Continuous_cron "15 * * * * ") + set(_Nightly_cron "15 0 * * * ") + set(_Experimental_cron + "\nor run this command for an one-off experimental test build:\n") + set(_Experimental_flags "-VV") + + message(STATUS + "Dashboard scripts have been generated for automatic nightly and continuous builds.") + if(WIN32) + set(_Continuous_cron) + set(_Nightly_cron) + message(STATUS + "You can set up scheduled tasks to run these command lines:") + else() + message(STATUS "You can add these sample lines to your crontab:") + endif() + + set(_msg) + + if(NOT DASHBOARDSCRIPT_BUILD_CONFIGURATION) + set(DASHBOARDSCRIPT_BUILD_CONFIGURATION "RelWithDebInfo") + endif() + set(DASHBOARDSCRIPT_BUILD_CONFIGURATION "${DASHBOARDSCRIPT_BUILD_CONFIGURATION}" CACHE STRING "Build configuration to use for dashboard builds by default") + mark_as_advanced(DASHBOARDSCRIPT_BUILD_CONFIGURATION) + + foreach(DASHBOARDSCRIPT_DASH_TYPE Nightly Continuous Experimental) + # If given a cache template, configure it + if(ARGN) + configure_file(${ARGN} + "${DASHBOARDSCRIPT_BASE_DIRECTORY}/GeneratedInitialCache.run${DASHBOARDSCRIPT_DASH_TYPE}.cmake" + @ONLY) + endif() + + # Actually create the script file + configure_file(${_dashboardmoddir}/DashboardScript.cmake.in + "${DASHBOARDSCRIPT_BASE_DIRECTORY}/run${DASHBOARDSCRIPT_DASH_TYPE}.cmake" + @ONLY) + + set(_msg + "${_msg}\n${_${DASHBOARDSCRIPT_DASH_TYPE}_cron}\"${DASHBOARDSCRIPT_CTEST_EXECUTABLE}\" -S \"${DASHBOARDSCRIPT_BASE_DIRECTORY}/run${DASHBOARDSCRIPT_DASH_TYPE}.cmake\" ${_${DASHBOARDSCRIPT_DASH_TYPE}_flags}") + + endforeach() + message(STATUS "\n${_msg}\n") + message(STATUS "") + + endif() +endfunction() diff --git a/cmake/cmake-modules/CreateImportedTarget.cmake b/cmake/cmake-modules/CreateImportedTarget.cmake new file mode 100644 index 000000000..31fb3b7e8 --- /dev/null +++ b/cmake/cmake-modules/CreateImportedTarget.cmake @@ -0,0 +1,64 @@ +# - A smarter replacement for list(REMOVE_DUPLICATES) for library lists +# +# create_imported_target(<libname> [SHARED|STATIC|MODULE] [<library dependency>...]) - where +# ${libname}_LIBRARIES is set to this library's paths. +# +# Removes duplicates from the list then sorts while preserving "optimized", +# "debug", and "general" labeling +# +# Requires CMake 2.6 or newer (uses the 'function' command) +# +# Original Author: +# 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> +# http://academic.cleardefinition.com +# Iowa State University HCI Graduate Program/VRAC +# +# Copyright Iowa State University 2009-2010. +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE_1_0.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) + +if(__create_imported_target) + return() +endif() +set(__create_imported_target YES) + +function(create_imported_target _libname) + if(ARGN) + list(FIND ARGN SHARED _target_shared) + list(FIND ARGN STATIC _target_static) + list(FIND ARGN MODULE _target_module) + + if(${_target_shared} GREATER -1) + set(_target_type SHARED) + elseif(${_target_static} GREATER -1) + set(_target_type STATIC) + elseif(${_target_module} GREATER -1) + set(_target_type MODULE) + else() + set(_target_type UNKNOWN) + endif() + + set(_deps ${ARGN}) + list(REMOVE_ITEM _deps SHARED STATIC MODULE UNKNOWN) + else() + set(_target_type UNKNOWN) + set(_deps) + endif() + + if(${_libname}_LIBRARIES AND NOT TARGET ${_libname}_imported) + add_library(${_libname}_imported ${_target_type} IMPORTED) + #message(STATUS "Library ${_libname}: lib ${${_libname}_LIBRARIES}") + #message(STATUS "Deps: ${_deps}") + set_target_properties(${_libname}_imported + PROPERTIES + IMPORTED_LOCATION + "${${_libname}_LIBRARIES}" + IMPORTED_LINK_INTERFACE_LIBRARIES + "${_deps}") + endif() + + if(TARGET ${_libname}_imported) + set(${_libname}_LIBRARIES ${_libname}_imported PARENT_SCOPE) + endif() +endfunction() diff --git a/cmake/cmake-modules/CreateLaunchers.cmake b/cmake/cmake-modules/CreateLaunchers.cmake new file mode 100644 index 000000000..571f044d7 --- /dev/null +++ b/cmake/cmake-modules/CreateLaunchers.cmake @@ -0,0 +1,349 @@ +# - Create launchers to set working directory, env. vars, etc. +# +# include(CreateLaunchers) - to make these available +# guess_runtime_library_dirs(<outputvarname> [<extralibrary> ...]) +# create_default_target_launcher(<targetname> +# [ARGS <args...>] +# [FORWARD_ARGS] +# [RUNTIME_LIBRARY_DIRS <dir...>] +# [WORKING_DIRECTORY <dir>] +# [ENVIRONMENT <VAR=value> [<VAR=value>...]]) +# +# create_target_launcher(<targetname> +# [ARGS <args...>] +# [FORWARD_ARGS] +# [RUNTIME_LIBRARY_DIRS <dir...>] +# [WORKING_DIRECTORY <dir>] +# [ENVIRONMENT <VAR=value> [<VAR=value>...]]) +# +# create_generic_launcher(<launchername> +# [RUNTIME_LIBRARY_DIRS <dir...>] +# [WORKING_DIRECTORY <dir>] +# [ENVIRONMENT <VAR=value> [<VAR=value>...]]) +# - sets GENERIC_LAUNCHER_COMMAND and GENERIC_LAUNCHER_FAIL_REGULAR_EXPRESSION +# +# Requires these CMake modules: +# ListFilter +# ProgramFilesGlob +# CleanDirectoryList +# +# Requires CMake 2.6 or newer (uses the 'function' command) +# +# Original Author: +# 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> +# http://academic.cleardefinition.com +# Iowa State University HCI Graduate Program/VRAC +# +# Copyright Iowa State University 2009-2010. +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE_1_0.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) + +if(__create_launchers) + return() +endif() +set(__create_launchers YES) + +include(CleanDirectoryList) + +# We must run the following at "include" time, not at function call time, +# to find the path to this module rather than the path to a calling list file +get_filename_component(_launchermoddir + ${CMAKE_CURRENT_LIST_FILE} + PATH) +set(_launchermoddir "${_launchermoddir}/launcher-templates") + +macro(_launcher_system_settings) + if(CMAKE_SIZEOF_VOID_P EQUAL 8) + set(BITS 64) + else() + set(BITS 32) + endif() + + if(WIN32) + # Find user and system name + set(SYSTEM_NAME $ENV{USERDOMAIN}) + set(USER_NAME $ENV{USERNAME}) + set(VCPROJ_TYPE vcproj) + set(USERFILE_EXTENSION ${SYSTEM_NAME}.${USER_NAME}.user) + set(LAUNCHER_LINESEP "
") + if(MSVC90) + set(USERFILE_VC_VERSION 9.00) + elseif(MSVC80) + set(USERFILE_VC_VERSION 8.00) + elseif(MSVC71) + set(USERFILE_VC_VERSION 7.10) + elseif(MSVC10 OR (MSVC AND MSVC_VERSION GREATER 1600)) # 2010 or newer + set(LAUNCHER_LINESEP "\n") + set(USERFILE_VC_VERSION 10.00) + set(USERFILE_EXTENSION user) + set(VCPROJ_TYPE vcxproj) + endif() + if(BITS EQUAL 64) + set(USERFILE_PLATFORM x64) + else() + set(USERFILE_PLATFORM Win${BITS}) + endif() + set(_pathdelim ";") + set(_suffix "cmd") + else() + set(_pathdelim ":") + set(USERFILE_PLATFORM ${CMAKE_SYSTEM_NAME}${BITS}) + set(_suffix "sh") + find_package(GDB QUIET) + if(GDB_FOUND) + set(LAUNCHERS_GOT_GDB YES) + if(GDB_HAS_RETURN_CHILD_RESULT) + set(LAUNCHERS_GDB_ARG --return-child-result) + endif() + else() + set(LAUNCHERS_GOT_GDB) + endif() + endif() + + if(WIN32 AND NOT USERFILE_REMOTE_MACHINE) + site_name(USERFILE_REMOTE_MACHINE) + mark_as_advanced(USERFILE_REMOTE_MACHINE) + endif() +endmacro() + +macro(_launcher_process_args) + set(_nowhere) + set(_curdest _nowhere) + set(_val_args + ARGS + RUNTIME_LIBRARY_DIRS + WORKING_DIRECTORY + ENVIRONMENT + TARGET_PLATFORM) + set(_bool_args FORWARD_ARGS) + foreach(_arg ${_val_args} ${_bool_args}) + set(${_arg}) + endforeach() + foreach(_element ${ARGN}) + string(REPLACE ";" "\\;" _element "${_element}") + list(FIND _val_args "${_element}" _val_arg_find) + list(FIND _bool_args "${_element}" _bool_arg_find) + if("${_val_arg_find}" GREATER "-1") + set(_curdest "${_element}") + elseif("${_bool_arg_find}" GREATER "-1") + set("${_element}" ON) + set(_curdest _nowhere) + else() + list(APPEND ${_curdest} "${_element}") + endif() + endforeach() + + if(_nowhere) + message(FATAL_ERROR + "Syntax error in use of a function in CreateLaunchers!") + endif() + + # Turn into a list of native paths + set(_runtime_lib_dirs) + foreach(_dlldir ${RUNTIME_LIBRARY_DIRS}) + file(TO_NATIVE_PATH "${_dlldir}" _path) + set(_runtime_lib_dirs "${_runtime_lib_dirs}${_path}${_pathdelim}") + endforeach() + + if(NOT WORKING_DIRECTORY) + set(WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}") + endif() + + if(FORWARD_ARGS) + if(WIN32) + set(FWD_ARGS %*) + else() + set(FWD_ARGS $*) + endif() + else() + set(FWD_ARGS) + endif() + + if(TARGET_PLATFORM) + set(USERFILE_PLATFORM ${TARGET_PLATFORM}) + endif() + + set(USERFILE_WORKING_DIRECTORY "${WORKING_DIRECTORY}") + set(USERFILE_COMMAND_ARGUMENTS "${ARGS}") + set(LAUNCHERSCRIPT_COMMAND_ARGUMENTS "${ARGS} ${FWD_ARGS}") + + if(WIN32) + if(_runtime_lib_dirs) + set(RUNTIME_LIBRARIES_ENVIRONMENT "PATH=${_runtime_lib_dirs};%PATH%") + endif() + file(READ + "${_launchermoddir}/launcher.env.cmd.in" + _cmdenv) + else() + if(_runtime_lib_dirs) + if(APPLE) + + set(RUNTIME_LIBRARIES_ENVIRONMENT + "DYLD_LIBRARY_PATH=${_runtime_lib_dirs}:$DYLD_LIBRARY_PATH") + else() + set(RUNTIME_LIBRARIES_ENVIRONMENT + "LD_LIBRARY_PATH=${_runtime_lib_dirs}:$LD_LIBRARY_PATH") + endif() + endif() + file(READ + "${_launchermoddir}/launcher.env.sh.in" + _cmdenv) + endif() + set(USERFILE_ENVIRONMENT "${RUNTIME_LIBRARIES_ENVIRONMENT}") + + set(USERFILE_ENV_COMMANDS) + foreach(_arg "${RUNTIME_LIBRARIES_ENVIRONMENT}" ${ENVIRONMENT}) + if(_arg) + string(CONFIGURE + "@USERFILE_ENVIRONMENT@@LAUNCHER_LINESEP@@_arg@" + USERFILE_ENVIRONMENT + @ONLY) + endif() + string(CONFIGURE + "@USERFILE_ENV_COMMANDS@${_cmdenv}" + USERFILE_ENV_COMMANDS + @ONLY) + endforeach() +endmacro() + +macro(_launcher_produce_vcproj_user) + if(MSVC) + file(READ + "${_launchermoddir}/perconfig.${VCPROJ_TYPE}.user.in" + _perconfig) + set(USERFILE_CONFIGSECTIONS) + foreach(USERFILE_CONFIGNAME ${CMAKE_CONFIGURATION_TYPES}) + get_target_property(USERFILE_${USERFILE_CONFIGNAME}_COMMAND + ${_targetname} + LOCATION_${USERFILE_CONFIGNAME}) + file(TO_NATIVE_PATH + "${USERFILE_${USERFILE_CONFIGNAME}_COMMAND}" + USERFILE_${USERFILE_CONFIGNAME}_COMMAND) + string(CONFIGURE "${_perconfig}" _temp @ONLY ESCAPE_QUOTES) + string(CONFIGURE + "${USERFILE_CONFIGSECTIONS}${_temp}" + USERFILE_CONFIGSECTIONS + ESCAPE_QUOTES) + endforeach() + + + configure_file("${_launchermoddir}/${VCPROJ_TYPE}.user.in" + ${VCPROJNAME}.${VCPROJ_TYPE}.${USERFILE_EXTENSION} + @ONLY) + endif() + +endmacro() + +macro(_launcher_configure_executable _src _tmp _target) +# get_filename_component(_targetname "${_target}" NAME) + get_filename_component(_targetpath "${_target}" PATH) + configure_file("${_src}" + "${_tmp}" + @ONLY) + file(COPY "${_tmp}" + DESTINATION "${_targetpath}" + FILE_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_WRITE GROUP_EXECUTE WORLD_READ WORLD_EXECUTE) +endmacro() + +macro(_launcher_create_target_launcher) + if(CMAKE_CONFIGURATION_TYPES) + # Multi-config generator - multiple launchers + foreach(_config ${CMAKE_CONFIGURATION_TYPES}) + get_target_property(USERFILE_${_config}_COMMAND + ${_targetname} + LOCATION_${_config}) + file(TO_NATIVE_PATH + "${USERFILE_${_config}_COMMAND}" + USERFILE_COMMAND) + set(_fn "launch-${_targetname}-${_config}.${_suffix}") + _launcher_configure_executable("${_launchermoddir}/targetlauncher.${_suffix}.in" + "${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/${_fn}" + "${CMAKE_CURRENT_BINARY_DIR}/${_fn}") + endforeach() + else() + # Single-config generator - single launcher + get_target_property(USERFILE_COMMAND + ${_targetname} + LOCATION) + file(TO_NATIVE_PATH + "${USERFILE_COMMAND}" + USERFILE_COMMAND) + _launcher_configure_executable("${_launchermoddir}/targetlauncher.${_suffix}.in" + "${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/launch-${_targetname}.${_suffix}" + "${CMAKE_CURRENT_BINARY_DIR}/launch-${_targetname}.${_suffix}" + @ONLY) + endif() +endmacro() + +function(create_default_target_launcher _targetname) + _launcher_system_settings() + _launcher_process_args(${ARGN}) + + set(VCPROJNAME "${CMAKE_BINARY_DIR}/ALL_BUILD") + _launcher_produce_vcproj_user() + + _launcher_create_target_launcher() +endfunction() + +function(create_target_launcher _targetname) + _launcher_system_settings() + _launcher_process_args(${ARGN}) + + set(VCPROJNAME "${CMAKE_CURRENT_BINARY_DIR}/${_targetname}") + _launcher_produce_vcproj_user() + + _launcher_create_target_launcher() +endfunction() + +function(create_generic_launcher _launchername) + _launcher_system_settings() + _launcher_process_args(${ARGN}) + + if(NOT IS_ABSOLUTE _launchername) + set(_launchername + "${CMAKE_CURRENT_BINARY_DIR}/${_launchername}.${_suffix}") + else() + set(_launchername "${_launchername}.${_suffix}") + endif() + if(WIN32) + set(GENERIC_LAUNCHER_COMMAND "${_launchername}" PARENT_SCOPE) + set(GENERIC_LAUNCHER_FAIL_REGULAR_EXPRESSION) + else() + set(GENERIC_LAUNCHER_COMMAND sh "${_launchername}" PARENT_SCOPE) + set(GENERIC_LAUNCHER_FAIL_REGULAR_EXPRESSION + "Program terminated with signal") + endif() + + _launcher_configure_executable("${_launchermoddir}/genericlauncher.${_suffix}.in" + "${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/genericlauncher.${_suffix}.in" + "${_launchername}") +endfunction() + +function(guess_runtime_library_dirs _var) + # Start off with the link directories of the calling listfile's directory + get_directory_property(_libdirs LINK_DIRECTORIES) + + # Add additional libraries passed to the function + foreach(_lib ${ARGN}) + get_filename_component(_libdir "${_lib}" PATH) + list(APPEND _libdirs "${_libdir}") + endforeach() + + # Now, build a list of potential dll directories + set(_dlldirs) + foreach(_libdir ${_libdirs}) + # Add the libdir itself + list(APPEND _dlldirs "${_libdir}") + + # Look also in libdir/../bin since the dll might not be with the lib + get_filename_component(_libdir "${_libdir}/../bin" ABSOLUTE) + list(APPEND _dlldirs "${_libdir}") + endforeach() + + # Only keep the valid, unique directories + clean_directory_list(_dlldirs) + + # Return _dlldirs + set(${_var} "${_dlldirs}" PARENT_SCOPE) +endfunction() diff --git a/cmake/cmake-modules/DashboardScript.cmake.in b/cmake/cmake-modules/DashboardScript.cmake.in new file mode 100644 index 000000000..da348a8c5 --- /dev/null +++ b/cmake/cmake-modules/DashboardScript.cmake.in @@ -0,0 +1,122 @@ +# - Dashboard driver script for use with ctest. +# +# Generated file processed by CreateDashboardScripts.cmake +# Run it like: +# ctest -S nameofthisfile +# with -V or -V -VV if you want more feedback. +# +# Generally you do not need to edit this file by hand! +# +# If this file isn't named DashboardScript.cmake.in and located +# in the same directory as CreateDashboardScripts.cmake, it has been +# auto-generated and will be overwritten every time CMake configures +# itself. (This may be every build!) +# +# Original Author: +# 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> +# http://academic.cleardefinition.com +# Iowa State University HCI Graduate Program/VRAC + +cmake_minimum_required(VERSION 2.8 FATAL_ERROR) + +set(CTEST_CMAKE_GENERATOR "@CMAKE_GENERATOR@") +set(CTEST_PROJECT_NAME "@PROJECT_NAME@") + +set(CTEST_DASHBOARD_ROOT "@DASHBOARDSCRIPT_BASE_DIRECTORY@") +set(CTEST_SOURCE_DIRECTORY "@DASHBOARDSCRIPT_SOURCE_DIRECTORY@") +set(DASH_TYPE "@DASHBOARDSCRIPT_DASH_TYPE@") +set(CTEST_BINARY_DIRECTORY "${CTEST_DASHBOARD_ROOT}/build-${DASH_TYPE}") + +set(CTEST_NOTES_FILES + "${CTEST_SCRIPT_DIRECTORY}/${CTEST_SCRIPT_NAME}" + "${CTEST_DASHBOARD_ROOT}/GeneratedCombinedCache.${CTEST_SCRIPT_NAME}") + +set(CTEST_BUILD_NAME "@BUILDNAME@") +set(CTEST_SITE "@SITE@") + +set(CTEST_USE_LAUNCHERS TRUE) + +set(CTEST_COMMAND "@DASHBOARDSCRIPT_CTEST_EXECUTABLE@") +set(CTEST_CMAKE_COMMAND "@DASHBOARDSCRIPT_CMAKE_COMMAND@") +set(CTEST_UPDATE_TYPE "@UPDATE_TYPE@") +set(CTEST_UPDATE_COMMAND "@UPDATE_COMMAND@") +set(CTEST_UPDATE_OPTIONS "@UPDATE_OPTIONS@") + +if((NOT CTEST_CONFIGURATION_TYPE) OR (NOT CTEST_BUILD_CONFIGURATION)) + set(CTEST_BUILD_CONFIGURATION "@DASHBOARDSCRIPT_BUILD_CONFIGURATION@") + set(CTEST_CONFIGURATION_TYPE "@DASHBOARDSCRIPT_BUILD_CONFIGURATION@") +endif() + + +# Avoid non-ascii characters in tool output. +set(ENV{LC_ALL} C) + +if(EXISTS "${CTEST_DASHBOARD_ROOT}/GeneratedInitialCache.${CTEST_SCRIPT_NAME}") + file(READ "${CTEST_DASHBOARD_ROOT}/GeneratedInitialCache.${CTEST_SCRIPT_NAME}" _initcache) +else() + set(_initcache) +endif() + +if(EXISTS "${CTEST_DASHBOARD_ROOT}/CustomInitialCache.cmake") + file(READ "${CTEST_DASHBOARD_ROOT}/CustomInitialCache.cmake" _customcache) + set(_initcache "${_initcache} +${_customcache}") +endif() +set(_initcache "# This file is automatically regenerated every dashboard build - +# Do not edit it directly! +# If you want to add initial cache values, you can create/modify +# the CustomInitialCache.cmake file in this directory. + +# Pretty typical settings to preseve from the generating cache +set(BUILD_TESTING ON CACHE BOOL docstring) +set(IN_DASHBOARD_SCRIPT ON CACHE BOOL docstring) +set(CTEST_USE_LAUNCHERS ON CACHE BOOL docstring) +set(CMAKE_PREFIX_PATH \"@CMAKE_PREFIX_PATH@\" CACHE STRING docstring) +set(CMAKE_BUILD_TYPE \"@CMAKE_BUILD_TYPE@\" CACHE STRING docstring) +set(CTEST_CONFIGURATION_TYPE \"@CMAKE_BUILD_TYPE@\" CACHE STRING docstring) + +# testing tool locations +# Saved here because the tools in the path might be outdated +set(CPPCHECK_EXECUTABLE \"@CPPCHECK_EXECUTABLE@\" CACHE FILEPATH docstring) +set(DOXYGEN_EXECUTABLE \"@DOXYGEN_EXECUTABLE@\" CACHE FILEPATH docstring) + +${_initcache}") + +file(WRITE "${CTEST_DASHBOARD_ROOT}/GeneratedCombinedCache.${CTEST_SCRIPT_NAME}" "${_initcache}") + +ctest_empty_binary_directory("${CTEST_BINARY_DIRECTORY}") + +ctest_start(${DASH_TYPE}) + +if(CTEST_UPDATE_COMMAND AND NOT DASH_TYPE STREQUAL "Experimental") + ctest_update(SOURCE "${CTEST_SOURCE_DIRECTORY}" RETURN_VALUE res) +endif() + +# Only proceed if we updated a file or if we're not a continuous build +set(PROCEED NO) +if(res GREATER 0) + message(STATUS "One or more files were updated, so we will proceed to " + "and build") + set(PROCEED YES) +endif() + +if(NOT DASH_TYPE STREQUAL "Continuous") + message(STATUS "We are not a continuous dashboard, so continuing regardless " + "of whether any files were updated") + set(PROCEED YES) +endif() + +if(PROCEED) + ctest_configure(BUILD "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE res + OPTIONS "-C${CTEST_DASHBOARD_ROOT}/GeneratedCombinedCache.${CTEST_SCRIPT_NAME}") + if(${res} EQUAL 0) + # Only try to build if we could configure + ctest_build(BUILD "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE res) + + # Some tests, like cppcheck tests, don't depend on a successful build + ctest_test(BUILD "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE res) + endif() +endif() + +# Always submit results +ctest_submit(RETURN_VALUE res) diff --git a/cmake/cmake-modules/DoxygenTargets.cmake b/cmake/cmake-modules/DoxygenTargets.cmake new file mode 100644 index 000000000..df7c08812 --- /dev/null +++ b/cmake/cmake-modules/DoxygenTargets.cmake @@ -0,0 +1,357 @@ +# - Run doxygen on source files as a custom target +# +# include(DoxygenTargets) +# add_doxygen(<doxyfile> [OUTPUT_DIRECTORY <outputdir>] +# [EXTRA_INPUT <single path or quoted list of paths>] +# [EXTRA_STRIP_FROM_PATH <single path or quoted list of paths>] +# [EXTRA_STRIP_FROM_INC_PATH <single path or quoted list of paths>] +# [INSTALL_DESTINATION <installdir> +# [INSTALL_COMPONENT <installcomponent>] +# [INSTALL_PDF_NAME <installpdfname>] ] +# [DOC_TARGET <targetname>] +# [PROJECT_NUMBER <versionnumber>] +# [NO_WARNINGS] +# [NO_PDF]) +# +# Requires these CMake modules: +# FindDoxygen +# +# Requires CMake 2.6 or newer (uses the 'function' command) +# +# Original Author: +# 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> +# http://academic.cleardefinition.com +# Iowa State University HCI Graduate Program/VRAC +# +# Copyright Iowa State University 2009-2010. +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE_1_0.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) + +if(__add_doxygen) + return() +endif() +set(__add_doxygen YES) + +# We must run the following at "include" time, not at function call time, +# to find the path to this module rather than the path to a calling list file +get_filename_component(_doxygenmoddir ${CMAKE_CURRENT_LIST_FILE} PATH) + +if(APPLE) + list(APPEND CMAKE_PREFIX_PATH "/usr/texbin") +endif() + +if(NOT DOXYGEN_FOUND) + find_package(Doxygen QUIET) +endif() + +set(DOXYGEN_LATEX "NO") +set(DOXYGEN_PDFLATEX "NO") +set(DOXYGEN_DOT "NO") + +if(DOXYGEN_DOT_EXECUTABLE) + set(DOXYGEN_DOT "YES") +endif() + +find_package(LATEX QUIET) +if(LATEX_COMPILER AND MAKEINDEX_COMPILER) + set(DOXYGEN_LATEX "YES") +endif() + +if(PDFLATEX_COMPILER) + set(DOXYGEN_PDFLATEX "YES") +endif() + +set(_PF86 "ProgramFiles(x86)") +find_program(DOXYGEN_MSCGEN_EXECUTABLE + mscgen + PATHS + "$ENV{ProgramFiles}/Mscgen" + "$ENV{${_PF86}}/Mscgen" + "$ENV{ProgramW6432}/Mscgen") +if(DOXYGEN_MSCGEN_EXECUTABLE) + mark_as_advanced(DOXYGEN_MSCGEN_EXECUTABLE) +endif() + +# An optional single-file install that supports cmake older than 2.8.0 +# For internal use +function(_dt_install_file target filename dest rename) + if(CMAKE_VER VERSION_LESS 2.8.0) + set(INSTALL_CODE " + if(EXISTS \"${filename}\") + message(STATUS \"Found: ${filename}\") + file(INSTALL + DESTINATION \"\${CMAKE_INSTALL_PREFIX}/${dest}\" + TYPE FILE + RENAME \"${rename}\" + FILES \"${filename}\") + else() + message(STATUS \"Skipping (build '${target}' to create): ${filename}\") + endif() + ") + if(NOT ARGN STREQUAL "") + set(INSTALL_COMPONENT "${ARGN}") + set(INSTALL_CODE " + if(NOT CMAKE_INSTALL_COMPONENT OR \"\${CMAKE_INSTALL_COMPONENT}\" STREQUAL \"${INSTALL_COMPONENT}\") + ${INSTALL_CODE} + endif() + ") + endif() + install(CODE "${INSTALL_CODE}") + else() + set(COMPONENT_ARGS) + if(NOT ARGN STREQUAL "") + set(COMPONENT_ARGS COMPONENT "${ARGN}") + endif() + install(FILES + "${filename}" + DESTINATION + "${dest}" + RENAME "${rename}" + ${COMPONENT_ARGS} + OPTIONAL) + endif() + +endfunction() + +# An optional single-directory install that supports cmake older than 2.8.0 +# For internal use +function(_dt_install_dir target dir dest) + if(CMAKE_VER VERSION_LESS 2.8.0) + set(INSTALL_CODE " + if(EXISTS \"${dir}\") + message(STATUS \"Found: ${dir}\") + file(INSTALL + DESTINATION \"\${CMAKE_INSTALL_PREFIX}/${dest}\" + TYPE DIRECTORY + FILES \"${dir}\") + else() + message(STATUS \"Skipping (build '${target}' to create): ${dir}\") + endif() + ") + if(NOT ARGN STREQUAL "") + set(INSTALL_COMPONENT "${ARGN}") + set(INSTALL_CODE " + + if(NOT CMAKE_INSTALL_COMPONENT OR \"\${CMAKE_INSTALL_COMPONENT}\" STREQUAL \"${INSTALL_COMPONENT}\") + ${INSTALL_CODE} + endif() + ") + endif() + install(CODE "${INSTALL_CODE}") + else() + set(COMPONENT_ARGS) + if(NOT ARGN STREQUAL "") + set(COMPONENT_ARGS COMPONENT "${ARGN}") + endif() + install(DIRECTORY + "${dir}" + DESTINATION + "${dest}" + ${COMPONENT_ARGS} + OPTIONAL) + endif() + +endfunction() + +function(add_doxygen _doxyfile) + # parse arguments + set(WARNINGS YES) + set(_nowhere) + set(_curdest _nowhere) + set(_val_args + OUTPUT_DIRECTORY + EXTRA_INPUT + EXTRA_STRIP_FROM_PATH + EXTRA_STRIP_FROM_INC_PATH + DOC_TARGET + INSTALL_DESTINATION + INSTALL_COMPONENT + INSTALL_PDF_NAME + PROJECT_NUMBER) + set(_bool_args + NO_WARNINGS + NO_PDF) + foreach(_arg ${_val_args} ${_bool_args}) + set(${_arg}) + endforeach() + foreach(_element ${ARGN}) + list(FIND _val_args "${_element}" _val_arg_find) + list(FIND _bool_args "${_element}" _bool_arg_find) + if("${_val_arg_find}" GREATER "-1") + set(_curdest "${_element}") + elseif("${_bool_arg_find}" GREATER "-1") + set("${_element}" ON) + set(_curdest _nowhere) + else() + list(APPEND ${_curdest} "${_element}") + endif() + endforeach() + + if(_nowhere) + message(FATAL_ERROR "Syntax error in use of add_doxygen!") + endif() + + if(NO_WARNINGS) + set(WARNINGS NO) + endif() + + if(NOT DOC_TARGET) + set(DOC_TARGET doc) + endif() + + if(NOT OUTPUT_DIRECTORY) + set(OUTPUT_DIRECTORY "docs-generated") + endif() + + file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/${OUTPUT_DIRECTORY}") + + if(NOT INSTALL_PDF_NAME) + set(INSTALL_PDF_NAME "docs-generated.pdf") + endif() + + if(NOT PROJECT_NUMBER) + set(PROJECT_NUMBER "${CPACK_PACKAGE_VERSION}") + endif() + + if(DOXYGEN_FOUND) + if(TARGET ${DOC_TARGET}) + message(FATAL_ERROR "Documentation target ${DOC_TARGET} already exists!") + endif() + + if(NOT IS_ABSOLUTE "${OUTPUT_DIRECTORY}") + get_filename_component(OUTPUT_DIRECTORY + "${CMAKE_CURRENT_BINARY_DIR}/${OUTPUT_DIRECTORY}" + ABSOLUTE) + endif() + + set_property(DIRECTORY + APPEND + PROPERTY + ADDITIONAL_MAKE_CLEAN_FILES + "${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) + 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" + VERBATIM) + 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) + + # Doesn't currently work on Windows, so don't bother + if(DOXYGEN_LATEX AND NOT NO_PDF AND NOT WIN32) + set(MAKE_PDF YES) + set(GENERATE_LATEX YES) + else() + set(MAKE_PDF NO) + set(GENERATE_LATEX NO) + endif() + + if(DOXYGEN_PDFLATEX AND MAKE_PDF) + set(USE_PDFLATEX YES) + else() + set(USE_PDFLATEX NO) + endif() + + if(DOXYGEN_DOT) + set(HAVE_DOT YES) + set(DOT_PATH ${DOXYGEN_DOT_PATH}) + else() + set(HAVE_DOT NO) + set(DOT_PATH) + endif() + + if(DOXYGEN_MSCGEN_EXECUTABLE) + get_filename_component(MSCGEN_PATH "${DOXYGEN_MSCGEN_EXECUTABLE}" PATH) + endif() + + # See http://www.cmake.org/pipermail/cmake/2006-August/010786.html + # for info on this variable + if("${CMAKE_BUILD_TOOL}" MATCHES "(msdev|devenv)") + set(WARN_FORMAT "\"$file($line) : $text \"") + else() + set(WARN_FORMAT "\"$file:$line: $text \"") + endif() + + configure_file("${_doxygenmoddir}/DoxygenTargets.doxyfile.in" + "${CMAKE_CURRENT_BINARY_DIR}/Doxyfile.${DOC_TARGET}.additional" + @ONLY) + + if(IN_DASHBOARD_SCRIPT) + set(ALL_IN_DASHBOARD ALL) + else() + set(ALL_IN_DASHBOARD) + endif() + + add_custom_target(${DOC_TARGET} ${ALL_IN_DASHBOARD} + COMMAND + "${DOXYGEN_EXECUTABLE}" + "${CMAKE_CURRENT_BINARY_DIR}/Doxyfile.${DOC_TARGET}.additional" + WORKING_DIRECTORY + "${CMAKE_CURRENT_SOURCE_DIR}" + #MAIN_DEPENDENCY ${DOC_TARGET} + COMMENT + "Running Doxygen with configuration ${_doxyfile}..." + VERBATIM) + + if(NOT IN_DASHBOARD_SCRIPT) + set_target_properties(${DOC_TARGET} + PROPERTIES + EXCLUDE_FROM_ALL + TRUE) + set_target_properties(${DOC_TARGET} + PROPERTIES + EXCLUDE_FROM_DEFAULT_BUILD + TRUE) + endif() + if(MAKE_PDF) + add_custom_command(TARGET + ${DOC_TARGET} + POST_BUILD + COMMAND + ${CMAKE_MAKE_PROGRAM} + WORKING_DIRECTORY + "${OUTPUT_DIRECTORY}/latex" + COMMENT + "Generating PDF using PDFLaTeX..." + VERBATIM) + endif() + + if(INSTALL_DESTINATION) + if(INSTALL_COMPONENT) + _dt_install_dir("${DOC_TARGET}" "${OUTPUT_DIRECTORY}/html" "${INSTALL_DESTINATION}" "${INSTALL_COMPONENT}") + if(MAKE_PDF) + _dt_install_file("${DOC_TARGET}" "${OUTPUT_DIRECTORY}/latex/refman.pdf" "${INSTALL_DESTINATION}" "${INSTALL_PDF_NAME}" "${INSTALL_COMPONENT}") + endif() + + else() + _dt_install_dir("${DOC_TARGET}" "${OUTPUT_DIRECTORY}/html" "${INSTALL_DESTINATION}") + if(MAKE_PDF) + _dt_install_file("${DOC_TARGET}" "${OUTPUT_DIRECTORY}/latex/refman.pdf" "${INSTALL_DESTINATION}" "${INSTALL_PDF_NAME}") + endif() + endif() + endif() + + endif() +endfunction() diff --git a/cmake/cmake-modules/DoxygenTargets.doxyfile.in b/cmake/cmake-modules/DoxygenTargets.doxyfile.in new file mode 100644 index 000000000..3cf36aba6 --- /dev/null +++ b/cmake/cmake-modules/DoxygenTargets.doxyfile.in @@ -0,0 +1,23 @@ +@INCLUDE_PATH = "@INCLUDE_PATH@" +@INCLUDE = "@INCLUDE_FILE@" + +OUTPUT_DIRECTORY = "@OUTPUT_DIRECTORY@" +GENERATE_LATEX = "@GENERATE_LATEX@" +USE_PDFLATEX = @USE_PDFLATEX@ +HAVE_DOT = @HAVE_DOT@ +DOT_PATH = "@DOT_PATH@" +MSCGEN_PATH = "@MSCGEN_PATH@" +LATEX_CMD_NAME = "@LATEX_COMPILER@" +MAKEINDEX_CMD_NAME = "@MAKEINDEX_COMPILER@" + +WARNINGS = @WARNINGS@ +WARN_FORMAT = @WARN_FORMAT@ + +PROJECT_NUMBER = @PROJECT_NUMBER@ + +INPUT += @EXTRA_INPUT@ +STRIP_FROM_PATH += @EXTRA_STRIP_FROM_PATH@ +STRIP_FROM_INC_PATH += @EXTRA_STRIP_FROM_INC_PATH@ + +LATEX_BATCHMODE = YES +QUIET = YES diff --git a/cmake/cmake-modules/EnableExtraCompilerWarnings.cmake b/cmake/cmake-modules/EnableExtraCompilerWarnings.cmake new file mode 100644 index 000000000..4c0e5c78d --- /dev/null +++ b/cmake/cmake-modules/EnableExtraCompilerWarnings.cmake @@ -0,0 +1,88 @@ +# - Add flags to compile with extra warnings +# +# enable_extra_compiler_warnings(<targetname>) +# globally_enable_extra_compiler_warnings() - to modify CMAKE_CXX_FLAGS, etc +# to change for all targets declared after the command, instead of per-command +# +# +# Original Author: +# 2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> +# http://academic.cleardefinition.com +# Iowa State University HCI Graduate Program/VRAC +# +# Copyright Iowa State University 2009-2010. +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE_1_0.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) + +if(__enable_extra_compiler_warnings) + return() +endif() +set(__enable_extra_compiler_warnings YES) + +macro(_enable_extra_compiler_warnings_flags) + set(_flags) + if(MSVC) + option(COMPILER_WARNINGS_EXTREME + "Use compiler warnings that are probably overkill." + off) + mark_as_advanced(COMPILER_WARNINGS_EXTREME) + set(_flags "/W4") + if(COMPILER_WARNINGS_EXTREME) + set(_flags "${_flags} /Wall /wd4619 /wd4668 /wd4820 /wd4571 /wd4710") + endif() + 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() + + if(SUPPORTS_WALL_FLAG) + # At least GCC includes -Wmaybe-uninitialized in -Wall, which + # unneccesarily whines about boost::optional (by it's nature + # it's a "maybe" warning - prone to noisy false-positives) + check_cxx_compiler_flag(-Wno-maybe-uninitialized SUPPORTS_WNO_MAYBE_UNINITIALIZED_FLAG) + if(SUPPORTS_WNO_MAYBE_UNINITIALIZED_FLAG) + set(_flags "${_flags} -Wno-maybe-uninitialized") + endif() + endif() + endif() +endmacro() + +function(enable_extra_compiler_warnings _target) + _enable_extra_compiler_warnings_flags() + get_target_property(_origflags ${_target} COMPILE_FLAGS) + if(_origflags) + set_property(TARGET + ${_target} + PROPERTY + COMPILE_FLAGS + "${_flags} ${_origflags}") + else() + set_property(TARGET + ${_target} + PROPERTY + COMPILE_FLAGS + "${_flags}") + endif() + +endfunction() + +function(globally_enable_extra_compiler_warnings) + _enable_extra_compiler_warnings_flags() + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${_flags}" PARENT_SCOPE) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${_flags}" PARENT_SCOPE) +endfunction() diff --git a/cmake/cmake-modules/EnableProfiling.cmake b/cmake/cmake-modules/EnableProfiling.cmake new file mode 100644 index 000000000..e2a340f7c --- /dev/null +++ b/cmake/cmake-modules/EnableProfiling.cmake @@ -0,0 +1,56 @@ +# - Add flags to compile with profiling support - currently only for GCC +# +# enable_profiling(<targetname>) +# globally_enable_profiling() - to modify CMAKE_CXX_FLAGS, etc +# to change for all targets declared after the command, instead of per-command +# +# +# Original Author: +# 2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> +# http://academic.cleardefinition.com +# Iowa State University HCI Graduate Program/VRAC +# +# Copyright Iowa State University 2009-2010. +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE_1_0.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) + +if(__enable_profiling) + return() +endif() +set(__enable_profiling YES) + +macro(_enable_profiling_flags) + set(_flags) + if(MSVC) + # TODO: what kind of flags are needed to profile on MSVC? + #set(_flags /W4) + elseif(CMAKE_COMPILER_IS_GNUCXX) + set(_flags "-p") + endif() +endmacro() + +function(enable_profiling _target) + _enable_profiling_flags() + get_target_property(_origflags ${_target} COMPILE_FLAGS) + if(_origflags) + set_property(TARGET + ${_target} + PROPERTY + COMPILE_FLAGS + "${_flags} ${_origflags}") + else() + set_property(TARGET + ${_target} + PROPERTY + COMPILE_FLAGS + "${_flags}") + endif() + +endfunction() + +function(globally_enable_profiling) + _enable_profiling_flags() + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${_flags}" PARENT_SCOPE) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${_flags}" PARENT_SCOPE) +endfunction() diff --git a/cmake/cmake-modules/FileCopyTargets.cmake b/cmake/cmake-modules/FileCopyTargets.cmake new file mode 100644 index 000000000..13eb11a4e --- /dev/null +++ b/cmake/cmake-modules/FileCopyTargets.cmake @@ -0,0 +1,103 @@ +# - Add a target for files that just need to be copied +# +# include(FileCopyTargets) +# add_file_copy_target(<target_name> <directory to copy to> <filename> [<filename>...]) +# Creates a custom target that copies the files to a directory, if needed. +# Relative paths for the destination directory are considered with +# with respect to CMAKE_CURRENT_BINARY_DIR +# You can use this target in all the usual ways, including +# add_dependencies(some_other_target this_target) to specify that another +# target depends on this. +# +# install_file_copy_target(<target_name> [arguments to INSTALL(PROGRAMS ...) ]) +# Works just the same as INSTALL(PROGRAMS ...) because it wraps it to install +# the files you specified in add_file_copy_target +# +# +# Requires CMake 2.6 or newer (uses the 'function' command) +# +# Original Author: +# 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> +# http://academic.cleardefinition.com +# Iowa State University HCI Graduate Program/VRAC +# +# Copyright Iowa State University 2009-2010. +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE_1_0.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) + +if(__add_file_copy_target) + return() +endif() +set(__add_file_copy_target YES) + +define_property(TARGET + PROPERTY + FILE_COPY_TARGET + BRIEF_DOCS + "File Copy target" + FULL_DOCS + "Is this a target created by add_file_copy_target?") + +function(add_file_copy_target _target _dest) + if(NOT ARGN) + message(WARNING + "In add_file_copy_target call for target ${_target}, no source files were specified!") + return() + 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() + + # Clean up output file name + get_filename_component(absout "${_dest}/${fn}" ABSOLUTE) + + add_custom_command(OUTPUT "${absout}" + COMMAND + ${CMAKE_COMMAND} + ARGS -E make_directory "${_dest}" + COMMAND + ${CMAKE_COMMAND} + ARGS -E copy "${fullpath}" "${_dest}" + MAIN_DEPENDENCY "${fullpath}" + VERBATIM + COMMENT "Copying ${fn} to ${absout}") + list(APPEND SOURCES "${fullpath}") + list(APPEND ALLFILES "${absout}") + endforeach() + + # Custom target depending on all the file copy commands + add_custom_target(${_target} + SOURCES ${SOURCES} + DEPENDS ${ALLFILES}) + + set_property(TARGET ${_target} PROPERTY FILE_COPY_TARGET YES) +endfunction() + +function(install_file_copy_target _target) + get_target_property(_isFCT ${_target} FILE_COPY_TARGET) + if(NOT _isFCT) + message(WARNING + "install_file_copy_target called on a target not created with add_file_copy_target!") + return() + endif() + + # Get sources + get_target_property(_srcs ${_target} SOURCES) + + # Remove the "fake" file forcing build + list(REMOVE_AT _srcs 0) + + # Forward the call to install + install(PROGRAMS ${_srcs} ${ARGN}) +endfunction() diff --git a/cmake/cmake-modules/FindALUT.cmake b/cmake/cmake-modules/FindALUT.cmake new file mode 100644 index 000000000..48d062d70 --- /dev/null +++ b/cmake/cmake-modules/FindALUT.cmake @@ -0,0 +1,136 @@ +# - try to find the OpenAL ALUT library +# +# Users may optionally supply: +# ALUT_ROOT_DIR - a prefix to start searching. +# +# Cache Variables: (probably not for direct use in your scripts) +# ALUT_INCLUDE_DIR +# ALUT_LIBRARY +# +# Non-cache variables you might use in your CMakeLists.txt: +# ALUT_FOUND +# ALUT_INCLUDE_DIRS +# ALUT_LIBRARIES +# ALUT_WORKAROUND_INCLUDE_DIRS - add these to your include path with +# include_directories(${ALUT_WORKAROUND_INCLUDE_DIRS} ${ALUT_INCLUDE_DIRS}) +# so you can always #include <AL/al.h> and #include <AL/alut.h> even on +# Mac where the paths might differ. +# +# Requires these CMake modules: +# FindPackageHandleStandardArgs (known included with CMake >=2.6.2) +# +# Original Author: +# 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> +# http://academic.cleardefinition.com +# Iowa State University HCI Graduate Program/VRAC +# +# Copyright Iowa State University 2009-2010. +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE_1_0.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) + +set(ALUT_ROOT_DIR + "${ALUT_ROOT_DIR}" + CACHE + PATH + "Path to search for ALUT library") + +# Share search paths with OpenAL +if(NOT "$ENV{OPENALDIR}" STREQUAL "") + if(NOT ALUT_ROOT_DIR) + set(ALUT_ROOT_DIR "$ENV{OPENALDIR}") + endif() +else() + if(ALUT_ROOT_DIR) + set(ENV{OPENALDIR} "${ALUT_ROOT_DIR}") + endif() +endif() + + + +### +# Configure ALUT +### +find_path(ALUT_INCLUDE_DIR + NAMES + alut.h + HINTS + "${ALUT_ROOT_DIR}" + PATH_SUFFIXES + AL + alut + OpenAL + include + include/alut + include/freealut + include/AL + include/OpenAL + PATHS + /usr/local + /opt/local + /sw) +mark_as_advanced(ALUT_INCLUDE_DIR) + +find_library(ALUT_LIBRARY + NAMES + alut + HINTS + "${ALUT_ROOT_DIR}" + PATH_SUFFIXES + lib + lib64 + PATHS + /usr/local + /opt/local + /sw) +mark_as_advanced(ALUT_LIBRARY) + +### +# Prereq: OpenAL +### + +# On Mac OS X, the ALUT headers were in the OpenAL framework until 10.4.7 +# If we found ALUT headers elsewhere, it's probably freealut which may +# define the same symbols as the library in the framework (?) +# so we might want to save/restore the CMake variable that controls searching +# in frameworks +find_package(OpenAL 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(ALUT + DEFAULT_MSG + ALUT_LIBRARY + ALUT_INCLUDE_DIR + OPENAL_FOUND) + +if(ALUT_FOUND) + set(ALUT_INCLUDE_DIRS "${OPENAL_INCLUDE_DIR}" "${ALUT_INCLUDE_DIR}") + set(ALUT_LIBRARIES "${OPENAL_LIBRARY}" ${ALUT_LIBRARY}) + if(APPLE) + get_filename_component(_moddir ${CMAKE_CURRENT_LIST_FILE} PATH) + if("${OPENAL_INCLUDE_DIR}" MATCHES "\\.framework$") + # OpenAL is in a framework - need a workaround + set(OPENAL_WORKAROUND_INCLUDE_DIR + "${_moddir}/workarounds/mac-openal") + list(APPEND + ALUT_WORKAROUND_INCLUDE_DIRS + "${OPENAL_WORKAROUND_INCLUDE_DIR}") + endif() + if("${ALUT_INCLUDE_DIR}" MATCHES "\\.framework$") + # ALUT is in the OpenAL framework - need a workaround + set(ALUT_WORKAROUND_INCLUDE_DIR + "${_moddir}/workarounds/mac-alut-framework") + list(APPEND + ALUT_WORKAROUND_INCLUDE_DIRS + "${ALUT_WORKAROUND_INCLUDE_DIR}") + endif() + endif() + + if("${ALUT_INCLUDE_DIR}" MATCHES "AL$") + get_filename_component(_parent "${ALUT_INCLUDE_DIR}/.." ABSOLUTE) + list(APPEND ALUT_INCLUDE_DIRS "${_parent}") + endif() + mark_as_advanced(ALUT_ROOT_DIR) +endif() diff --git a/cmake/cmake-modules/FindAdrienne.cmake b/cmake/cmake-modules/FindAdrienne.cmake new file mode 100644 index 000000000..d4f174c0c --- /dev/null +++ b/cmake/cmake-modules/FindAdrienne.cmake @@ -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() diff --git a/cmake/cmake-modules/FindBluez.cmake b/cmake/cmake-modules/FindBluez.cmake new file mode 100644 index 000000000..f4f8e0d10 --- /dev/null +++ b/cmake/cmake-modules/FindBluez.cmake @@ -0,0 +1,77 @@ +# - try to find Bluez +# +# Cache Variables: (probably not for direct use in your scripts) +# BLUEZ_INCLUDE_DIR +# BLUEZ_LIBRARY +# +# Non-cache variables you might use in your CMakeLists.txt: +# BLUEZ_FOUND +# BLUEZ_INCLUDE_DIRS +# BLUEZ_LIBRARIES +# +# Requires these CMake modules: +# FindPackageHandleStandardArgs (known included with CMake >=2.6.2) +# +# Original Author: +# 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> +# http://academic.cleardefinition.com +# Iowa State University HCI Graduate Program/VRAC +# +# Copyright Iowa State University 2009-2010. +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE_1_0.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) + +if(WIN32 OR APPLE OR NOT UNIX) + if(NOT Bluez_FIND_QUIETLY) + message(STATUS "Platform not supported by Bluez - skipping search") + endif() +else() + set(BLUEZ_ROOT_DIR + "${BLUEZ_ROOT_DIR}" + CACHE + PATH + "Directory to search") + + if(CMAKE_SIZEOF_VOID_P MATCHES "8") + set(_LIBSUFFIXES lib64 lib) + else() + set(_LIBSUFFIXES lib) + endif() + + find_library(BLUEZ_LIBRARY + NAMES + bluetooth + HINTS + "${BLUEZ_ROOT_DIR}" + PATH_SUFFIXES + "${_LIBSUFFIXES}") + + # Might want to look close to the library first for the includes. + get_filename_component(_libdir "${BLUEZ_LIBRARY}" PATH) + + find_path(BLUEZ_INCLUDE_DIR + NAMES + bluetooth/bluetooth.h + HINTS + "${_libdir}/.." + PATHS + "${BLUEZ_ROOT_DIR}" + PATH_SUFFIXES + include/) +endif() + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(Bluez + DEFAULT_MSG + BLUEZ_LIBRARY + BLUEZ_INCLUDE_DIR) + +if(BLUEZ_FOUND) + set(BLUEZ_LIBRARIES "${BLUEZ_LIBRARY}") + set(BLUEZ_INCLUDE_DIRS "${BLUEZ_INCLUDE_DIR}") + mark_as_advanced(BLUEZ_ROOT_DIR) +endif() + +mark_as_advanced(BLUEZ_INCLUDE_DIR + BLUEZ_LIBRARY) diff --git a/cmake/cmake-modules/FindCPPDOM.cmake b/cmake/cmake-modules/FindCPPDOM.cmake new file mode 100644 index 000000000..449ab73a5 --- /dev/null +++ b/cmake/cmake-modules/FindCPPDOM.cmake @@ -0,0 +1,216 @@ +# - try to find CPPDOM library +# Optionally uses Flagpoll and FindFlagpoll.cmake +# +# CPPDOM_LIBRARY_DIR, library search path +# CPPDOM_INCLUDE_DIR, include search path +# CPPDOM_LIBRARY, the library to link against +# CPPDOM_CXX_FLAGS +# CPPDOM_FOUND, If false, do not try to use this library. +# +# 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.2.0) +# to use when constructing search names and paths +# +# This script will use Flagpoll, if found, to provide hints to the location +# of this library, but does not use the compiler flags returned by Flagpoll +# directly. +# +# VR Juggler requires this package, so this Find script takes that into +# account when determining where to search for the desired files. +# The VJ_BASE_DIR environment variable is searched (preferentially) +# when searching for this package, so most sane VR Juggler build environments +# should "just work." Note that you need to manually re-run CMake if you +# change this environment variable, because it cannot auto-detect this change +# and trigger an automatic re-run. +# +# 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-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(_HUMAN "cppdom") +set(_HEADER cppdom/cppdom.h) +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 + 1.0.3 + 1.0.2 + 1.0.1 + 1.0.0 + 0.7.10 + 0.7.9 + 0.7.8) +set(CPPDOM_DIRS) +set(CPPDOM_RELEASE_LIB_NAMES) +set(CPPDOM_DEBUG_LIB_NAMES) +foreach(_version ${CPPDOM_VERSIONS}) + string(REGEX REPLACE "[-\\.]" "_" _versionclean ${_version}) + list(APPEND CPPDOM_DIRS cppdom-${_version}) + list(APPEND CPPDOM_HEADER_DIRS include/cppdom-${_version}) + list(APPEND CPPDOM_RELEASE_LIB_NAMES cppdom-${_versionclean}) + list(APPEND CPPDOM_DEBUG_LIB_NAMES cppdom_d-${_versionclean}) +endforeach() + +include(SelectLibraryConfigurations) +include(CreateImportedTarget) +include(CleanLibraryList) +include(CleanDirectoryList) +include(FindPackageHandleStandardArgs) + +# Handle the case where a recent cppdom is supplying its own cmake config file. +option(CPPDOM_ATTEMPT_CMAKE_MODULE "Should we attempt to use CPPDOM's own CMake module for configuration?" ON) +mark_as_advanced(CPPDOM_ATTEMPT_CMAKE_MODULE) +if(NOT cppdom_FOUND) + find_package(cppdom QUIET NO_MODULE) + if(cppdom_FOUND) + set(CPPDOM_LIBRARIES ${cppdom_LIBRARIES}) + set(CPPDOM_INCLUDE_DIRS ${cppdom_INCLUDE_DIRS}) + find_package_handle_standard_args(CPPDOM + DEFAULT_MSG + CPPDOM_LIBRARIES + CPPDOM_INCLUDE_DIRS) + return() + endif() +endif() + +if(CPPDOM_INCLUDE_DIRS AND CPPDOM_LIBRARIES) + # in cache already + set(CPPDOM_FIND_QUIETLY TRUE) +endif() + +# Try flagpoll. +find_package(Flagpoll QUIET) + +if(FLAGPOLL) + flagpoll_get_include_dirs(${_FP_PKG_NAME} NO_DEPS) + flagpoll_get_library_dirs(${_FP_PKG_NAME} NO_DEPS) + flagpoll_get_library_names(${_FP_PKG_NAME} NO_DEPS) +endif() + +set(CPPDOM_ROOT_DIR + "${CPPDOM_ROOT_DIR}" + CACHE + PATH + "Root directory to search for CPPDOM") +if(DEFINED VRJUGGLER22_ROOT_DIR) + mark_as_advanced(CPPDOM_ROOT_DIR) +endif() +if(NOT CPPDOM_ROOT_DIR) + if(VRJUGGLER22_ROOT_DIR) + set(CPPDOM_ROOT_DIR "${VRJUGGLER22_ROOT_DIR}") + elseif(VRJUGGLER30_ROOT_DIR) + set(CPPDOM_ROOT_DIR "${VRJUGGLER30_ROOT_DIR}") + endif() +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 + ${_ROOT_DIR} + ${${_FP_PKG_NAME}_FLAGPOLL_INCLUDE_DIRS} + PATHS + PATH_SUFFIXES + ${CPPDOM_DIRS} + ${CPPDOM_HEADER_DIRS} + include + DOC + "Path to ${_HUMAN} includes root") + +find_library(CPPDOM_LIBRARY_RELEASE + NAMES + ${CPPDOM_RELEASE_LIB_NAMES} + ${${_FP_PKG_NAME}_FLAGPOLL_LIBRARY_NAMES} + HINTS + ${_ROOT_DIR} + ${${_FP_PKG_NAME}_FLAGPOLL_LIBRARY_DIRS} + PATH_SUFFIXES + ${_VRJ_LIBSUFFIXES} + DOC + "${_HUMAN} library full path") + +find_library(CPPDOM_LIBRARY_DEBUG + NAMES + ${CPPDOM_DEBUG_LIB_NAMES} + HINTS + ${_ROOT_DIR} + ${${_FP_PKG_NAME}_FLAGPOLL_LIBRARY_DIRS} + PATH_SUFFIXES + ${_VRJ_LIBDSUFFIXES} + DOC + "${_HUMAN} debug library full path") + +# Fallback to same library name but in the debug folder +if(NOT CPPDOM_LIBRARY_DEBUG) + find_library(CPPDOM_LIBRARY_DEBUG + NAMES + ${CPPDOM_LIB_NAMES} + HINTS + ${CPPDOM_INCLUDE_DIR}/../ + ${${_FP_PKG_NAME}_FLAGPOLL_LIBRARY_DIRS} + PATH_SUFFIXES + ${_VRJ_LIBDSUFFIXES_ONLY} + NO_DEFAULT_PATH + DOC + "${_HUMAN} debug library full path") +endif() + +if(CPPDOM_LIBRARY_RELEASE OR CPPDOM_LIBRARY_DEBUG) + select_library_configurations(CPPDOM) +endif() + +# handle the QUIETLY and REQUIRED arguments and set xxx_FOUND to TRUE if +# all listed variables are TRUE +find_package_handle_standard_args(CPPDOM + DEFAULT_MSG + CPPDOM_LIBRARY + CPPDOM_INCLUDE_DIR) + +if(CPPDOM_FOUND) + set(CPPDOM_INCLUDE_DIRS ${CPPDOM_INCLUDE_DIR}) + if(MSVC) + set(CPPDOM_CXX_FLAGS "/wd4290") + endif() + + mark_as_advanced(CPPDOM_ROOT_DIR) +endif() + +mark_as_advanced(CPPDOM_LIBRARY_RELEASE + CPPDOM_LIBRARY_DEBUG + CPPDOM_INCLUDE_DIR) diff --git a/cmake/cmake-modules/FindColibriApi.cmake b/cmake/cmake-modules/FindColibriApi.cmake new file mode 100644 index 000000000..0d7b4ff36 --- /dev/null +++ b/cmake/cmake-modules/FindColibriApi.cmake @@ -0,0 +1,120 @@ +# - try to find Trivisio Colibri API library +# +# Cache Variables: +# COLIBRIAPI_LIBRARY +# COLIBRIAPI_INCLUDE_DIR +# +# Non-cache variables you might use in your CMakeLists.txt: +# COLIBRIAPI_FOUND +# COLIBRIAPI_SERVER_LIBRARIES - server libraries +# COLIBRIAPI_LIBRARIES - client libraries +# COLIBRIAPI_CLIENT_DEFINITIONS - definitions if you only use the client library +# COLIBRIAPI_DEFINITIONS - Client-only definition if all we found was the client library. +# COLIBRIAPI_INCLUDE_DIRS +# +# COLIBRIAPI_ROOT_DIR is searched preferentially for these files +# +# Requires these CMake modules: +# FindPackageHandleStandardArgs (known included with CMake >=2.6.2) +# +# 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-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(COLIBRIAPI_ROOT_DIR + "${COLIBRIAPI_ROOT_DIR}" + CACHE + PATH + "Root directory to search for Colibri API") + +if("${CMAKE_SIZEOF_VOID_P}" MATCHES "8") + set(_libsuffixes lib64 lib) + + # 64-bit dir: only set on win64 + file(TO_CMAKE_PATH "$ENV{ProgramW6432}" _progfiles) +else() + set(_libsuffixes lib) + set(_PF86 "ProgramFiles(x86)") + if(NOT "$ENV{${_PF86}}" STREQUAL "") + # 32-bit dir: only set on win64 + file(TO_CMAKE_PATH "$ENV{${_PF86}}" _progfiles) + else() + # 32-bit dir on win32, useless to us on win64 + file(TO_CMAKE_PATH "$ENV{ProgramFiles}" _progfiles) + endif() +endif() + +### +# Configure COLIBRIAPI +### + +find_path(COLIBRIAPI_INCLUDE_DIR + NAMES + colibri_api.h + PATH_SUFFIXES + include + HINTS + "${COLIBRIAPI_ROOT_DIR}" + PATHS + "${_progfiles}/ColibriAPI 1.1.20140925 (64-bit)" + "$ENV{HOME}" + "$ENV{HOME}/ColibriAPI-1.1.20140710-Linux-amd64" + C:/usr/local + /usr/local) + +find_library(COLIBRIAPI_LIBRARY + NAMES + colibri-api + PATH_SUFFIXES + ${_libsuffixes} + HINTS + "${COLIBRIAPI_ROOT_DIR}" + PATHS + "${_progfiles}/ColibriAPI 1.1.20140925 (64-bit)" + "$ENV{HOME}" + "$ENV{HOME}/ColibriAPI-1.1.20140710-Linux-amd64" + C:/usr/local + /usr/local) + +### +# Dependencies +### +set(_deps_libs) +set(_deps_includes) +set(_deps_check) + +find_package(quatlib) +list(APPEND _deps_libs ${QUATLIB_LIBRARIES}) +list(APPEND _deps_includes ${QUATLIB_INCLUDE_DIRS}) +list(APPEND _deps_check QUATLIB_FOUND) + +if(NOT WIN32) + find_package(Threads) + list(APPEND _deps_libs ${CMAKE_THREAD_LIBS_INIT}) + list(APPEND _deps_check CMAKE_HAVE_THREADS_LIBRARY) +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(ColibriApi + DEFAULT_MSG + COLIBRIAPI_LIBRARY + COLIBRIAPI_INCLUDE_DIR + ${_deps_check}) + +if(COLIBRIAPI_FOUND) + set(COLIBRIAPI_INCLUDE_DIRS "${COLIBRIAPI_INCLUDE_DIR}" ${_deps_includes}) + set(COLIBRIAPI_LIBRARIES "${COLIBRIAPI_LIBRARY}" ${_deps_libs}) + + mark_as_advanced(COLIBRIAPI_ROOT_DIR) +endif() + +mark_as_advanced(COLIBRIAPI_LIBRARY COLIBRIAPI_INCLUDE_DIR) diff --git a/cmake/cmake-modules/FindDCubed.cmake b/cmake/cmake-modules/FindDCubed.cmake new file mode 100644 index 000000000..4ca33d25f --- /dev/null +++ b/cmake/cmake-modules/FindDCubed.cmake @@ -0,0 +1,192 @@ +# - try to find DCUBED library +# +# DCUBED_LIBRARY_DIR, library search path +# DCUBED_INCLUDE_DIR, include search path +# DCUBED_{component}_LIBRARY, the library to link against +# DCUBED_ENVIRONMENT +# DCUBED_FOUND, If false, do not try to use this library. +# +# Plural versions refer to this library and its dependencies, and +# are recommended to be used instead, unless you have a good reason. +# +# Useful configuration variables you might want to add to your cache: +# DCUBED_ROOT_DIR - A directory prefix to search +# (a path that contains include/ as a subdirectory) +# +# 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> +# http://academic.cleardefinition.com +# Iowa State University HCI Graduate Program/VRAC +# +# Copyright Iowa State University 2009-2010. +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE_1_0.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) + +if(NOT BITS) + if(CMAKE_SIZEOF_VOID_P MATCHES "8") + set(BITS 64) + else() + set(BITS 32) + endif() +endif() + +if(WIN32 AND MSVC) + include(CMakeDetermineVSServicePack) + determinevsservicepack(_sp) + if(MSVC71) + set(VC_VER vc71) + set(VC_VER_LONG vc71) + elseif(MSVC80) + set(VC_VER vc8) + set(VC_VER_LONG vc80) + # FIXME TODO provide more options here + set(D3BUILD nt8) + if("${_sp}" STREQUAL "vc80sp1") + set(_verstring nt8s1) + else() + set(_verstring nt8) + endif() + elseif(MSVC90) + set(VC_VER vc9) + set(VC_VER_LONG vc90) + set(_verstring nt9) + endif() + + if(BITS EQUAL 32) + set(PLATFORM win32) + else() + set(PLATFORM win64) + endif() +endif() + +if(NOT DCUBED_ROOT_DIR) + if(EXISTS "$ENV{DCUBED}" AND IS_DIRECTORY "$ENV{DCUBED}") + set(DCUBED_ROOT_DIR "$ENV{DCUBED}") + endif() +endif() + +file(TO_CMAKE_PATH "${DCUBED_ROOT_DIR}" DCUBED_ROOT_DIR) + +set(DCUBED_ROOT_DIR + "${DCUBED_ROOT_DIR}" + CACHE + PATH + "Root directory to search for DCubed") + +# Do this by default +if(NOT DEFINED DCUBED_NESTED_TARGETS) + set(DCUBED_NESTED_TARGETS TRUE) +endif() + +set(DCUBED_NESTED_TARGETS + "${DCUBED_NESTED_TARGETS}" + CACHE + BOOL + "Whether we should compile the wrappers as a part of the solution") +mark_as_advanced(DCUBED_NESTED_TARGETS) + +### +# Configure DCubed +### + + +find_path(DCUBED_CORE_INCLUDE_DIR + d3ew_inc/modelgate.hxx + PATHS + "${DCUBED_ROOT_DIR}/inc") + +foreach(lib aem cdmwp d3e_base d3e_cd dcm dcm3 g3) + find_library(DCUBED_${lib}_LIBRARY + ${lib} + PATHS + "${DCUBED_ROOT_DIR}/lib/${_verstring}") + if(DCUBED_${lib}_LIBRARY) + list(APPEND DCUBED_LIBRARIES ${DCUBED_${lib}_LIBRARY}) + list(APPEND DCUBED_CORE_LIBRARIES ${DCUBED_${lib}_LIBRARY}) + endif() + mark_as_advanced(DCUBED_${lib}_LIBRARY) +endforeach() + +find_path(DCUBED_WRAPPER_INCLUDE_DIR + d3ew_p/p_utils.hxx + PATHS + "${DCUBED_ROOT_DIR}/source/wrapper_source/") + +foreach(lib d3ew_p d3ew_scene) + find_library(DCUBED_WRAPPER_${lib}_LIBRARY + ${lib}_${D3BUILD} + PATHS + "${DCUBED_ROOT_DIR}/wrappers/cdmwp/${lib}") + mark_as_advanced(DCUBED_WRAPPER_${lib}_LIBRARY) +endforeach() + +set(_nest_targets) +if(DCUBED_WRAPPER_INCLUDE_DIR) + foreach(lib d3ew_p d3ew_scene) + if(DCUBED_NESTED_TARGETS OR NOT DCUBED_WRAPPER_${lib}_LIBRARY) + if(PARASOLID_FOUND) + set(_nest_targets YES) + set(DCUBED_WRAPPER_${lib}_LIBRARY + "dcubed_wrapper_${lib}_nested_target" + CACHE + STRING + "We will build the DCubed wrapper ${lib} lib." + FORCE) + else() + set(DCUBED_WRAPPER_${lib}_LIBRARY + "NESTED_TARGET_REQUIRES_PARASOLID-NOTFOUND" + CACHE + STRING + "Can't build the DCubed wrapper ${lib} without first finding Parasolid." + FORCE) + endif() + endif() + endforeach() +endif() + +foreach(lib d3ew_p d3ew_scene) + if(DCUBED_WRAPPER_${lib}_LIBRARY) + list(APPEND DCUBED_WRAPPER_LIBRARIES ${DCUBED_WRAPPER_${lib}_LIBRARY}) + endif() +endforeach() + +if(NOT DCUBED_ROOT_DIR) + get_filename_component(_path "${DCUBED_dcm_LIBRARY}" PATH) + get_filename_component(_path "${_path}/../.." ABSOLUTE) + set(DCUBED_ROOT_DIR + "${_path}" + CACHE + PATH + "Root directory to search for DCubed" + FORCE) +endif() + +#file(TO_NATIVE_PATH "${DCUBED_ROOT_DIR}" _d3envdir) +set(DCUBED_ENVIRONMENT "DCUBED=${DCUBED_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(DCubed + DEFAULT_MSG + DCUBED_ROOT_DIR + DCUBED_LIBRARIES + DCUBED_CORE_LIBRARIES + DCUBED_CORE_INCLUDE_DIR + DCUBED_WRAPPER_INCLUDE_DIR + DCUBED_WRAPPER_LIBRARIES) + +if(DCUBED_FOUND) + if(_nest_targets) + get_filename_component(_moddir "${CMAKE_CURRENT_LIST_FILE}" PATH) + add_subdirectory("${_moddir}/nested_targets/DCubed") + endif() + 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() + +mark_as_advanced(DCUBED_CORE_INCLUDE_DIR DCUBED_WRAPPER_INCLUDE_DIR) diff --git a/cmake/cmake-modules/FindDirectShow.cmake b/cmake/cmake-modules/FindDirectShow.cmake new file mode 100644 index 000000000..1fb33061a --- /dev/null +++ b/cmake/cmake-modules/FindDirectShow.cmake @@ -0,0 +1,204 @@ +# - 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. + +set(_ds_quiet) +if(DirectShow_FIND_QUIETLY) + set(_ds_quiet QUIET) +endif() +find_package(WindowsSDK ${_ds_quiet}) +find_package(DirectX ${_ds_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") + +### +# Begin code dedicated to finding a proper qedit.h file... +### + +# Checks to see if a directory has qedit.h and if that file contains ISampleGrabber. +function(_directshow_check_qedit _dir _var) + set(fn "${_dir}/qedit.h") + if(NOT EXISTS "${fn}") + set(${_var} FALSE PARENT_SCOPE) + return() + endif() + file(STRINGS "${fn}" samplegrabber REGEX ISampleGrabber) + if(NOT samplegrabber) + set(${_var} FALSE PARENT_SCOPE) + return() + endif() + set(${_var} TRUE PARENT_SCOPE) +endfunction() + +function(_directshow_check_current_qedit) + if(DIRECTSHOW_QEDIT_INCLUDE_DIR) + _directshow_check_qedit("${DIRECTSHOW_QEDIT_INCLUDE_DIR}" _ds_ok) + if(NOT _ds_ok) + message(STATUS "FindDirectShow: qedit.h in ${DIRECTSHOW_QEDIT_INCLUDE_DIR} lacks ISampleGrabber, unsetting DIRECTSHOW_QEDIT_INCLUDE_DIR") + set(DIRECTSHOW_QEDIT_INCLUDE_DIR "" CACHE PATH "" FORCE) + endif() + endif() +endfunction() + +# Check before deciding if we should make our list of possible locations. +_directshow_check_current_qedit() + +# Compose a list of possible directories that might hold a qedit.h file. +set(DIRECTSHOW_QEDIT_SEARCH) +if(WINDOWSSDK_FOUND AND NOT DIRECTSHOW_QEDIT_INCLUDE_DIR) + foreach(_sdk ${WINDOWSSDK_DIRS}) + windowssdk_build_lookup("${_sdk}" _build) + if(_build AND ("${_build}" VERSION_LESS 6.2)) + get_windowssdk_include_dirs("${_sdk}" _dirs) + if(_dirs) + list(APPEND DIRECTSHOW_QEDIT_SEARCH ${_dirs}) + endif() + endif() + endforeach() +endif() + +# This one we can grab from another SDK version. +find_path(DIRECTSHOW_QEDIT_INCLUDE_DIR + NAMES + qedit.h + HINTS + "${DIRECTSHOW_WINDOWSSDK_ROOT}" + PATHS + ${DIRECTSHOW_QEDIT_SEARCH} + PATH_SUFFIXES + "Include") + +# Check if the directory is OK after the search. +_directshow_check_current_qedit() + +# If we didn't find a proper qedit, manually look through the possibilities. +if(NOT DIRECTSHOW_QEDIT_INCLUDE_DIR) + foreach(_dir "${DIRECTSHOW_WINDOWSSDK_ROOT}/Include" ${DIRECTSHOW_QEDIT_SEARCH}) + if(NOT DIRECTSHOW_QEDIT_INCLUDE_DIR) + _directshow_check_qedit("${_dir}" _ds_ok) + if(_ds_ok) + set(DIRECTSHOW_QEDIT_INCLUDE_DIR "${_dir}" CACHE PATH "" FORCE) + endif() + endif() + endforeach() +endif() + +### +# End qedit.h section. +### + +set(DIRECTSHOW_STRMIIDS_SEARCH) +if(WINDOWSSDK_FOUND AND NOT DIRECTSHOW_STRMIIDS_LIBRARY) + foreach(_sdk ${WINDOWSSDK_DIRS}) + get_windowssdk_library_dirs("${_sdk}" _dirs) + if(_dirs) + list(APPEND DIRECTSHOW_STRMIIDS_SEARCH ${_dirs}) + endif() + endforeach() +endif() + +find_library(DIRECTSHOW_STRMIIDS_LIBRARY + NAMES + strmiids + HINTS + "${DIRECTSHOW_WINDOWSSDK_ROOT}" + PATHS + ${DIRECTSHOW_STRMIIDS_SEARCH} + 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 + 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) diff --git a/cmake/cmake-modules/FindDirectX.cmake b/cmake/cmake-modules/FindDirectX.cmake new file mode 100644 index 000000000..d77ca757e --- /dev/null +++ b/cmake/cmake-modules/FindDirectX.cmake @@ -0,0 +1,322 @@ +# - 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 - deprecated, see below +# DIRECTX_DXERR_LIBRARY - deprecated, see http://blogs.msdn.com/b/chuckw/archive/2012/04/24/where-s-dxerr-lib.aspx +# 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 +# +# Defines these macros: +# find_directx_include - wrapper for find_path that provides PATHS, HINTS, and PATH_SUFFIXES. +# find_directx_library - wrapper for find_library that provides PATHS, HINTS, and PATH_SUFFIXES. +# 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) + set(_PF86 "ProgramFiles(x86)") + file(TO_CMAKE_PATH "$ENV{${_PF86}}" _PROG_FILES_X86) + if(_PROG_FILES_X86) + set(_PROG_FILES "${_PROG_FILES_X86}") + endif() + if(CMAKE_SIZEOF_VOID_P EQUAL 8) + set(_dx_lib_suffixes lib/x64 lib) + else() + set(_dx_lib_suffixes lib/x86 lib) + endif() + set(DXSDK_DIRS) + + set(_dx_quiet) + if(DirectX_FIND_QUIETLY) + set(_dx_quiet QUIET) + endif() + find_package(WindowsSDK ${_dx_quiet}) + if(WINDOWSSDK_FOUND) + foreach(_dir ${WINDOWSSDK_DIRS}) + get_windowssdk_include_dirs(${_dir} _include_dirs) + if(_include_dirs) + list(APPEND DXSDK_DIRS ${_include_dirs}) + endif() + endforeach() + 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(_dx_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) + +set(DXLIB_HINTS) +if(WINDOWSSDK_FOUND AND DIRECTX_INCLUDE_DIR) + get_windowssdk_from_component("${DIRECTX_INCLUDE_DIR}" _winsdk) + if(_winsdk) + get_windowssdk_library_dirs("${_winsdk}" _libdirs) + if(_libdirs) + list(APPEND DXLIB_HINTS ${_libdirs}) + endif() + endif() +endif() + +if(WINDOWSSDK_FOUND AND DIRECTX_DINPUT_INCLUDE_DIR) + get_windowssdk_from_component("${DIRECTX_DINPUT_INCLUDE_DIR}" _winsdk) + if(_winsdk) + get_windowssdk_library_dirs("${_winsdk}" _includes) + if(_includes) + list(APPEND DXLIB_HINTS ${_includes}) + endif() + endif() +endif() + +find_library(DIRECTX_DXGUID_LIBRARY + NAMES + dxguid + PATHS + ${DXLIB_HINTS} + ${DXSDK_DIRS} + HINTS + "${DIRECTX_ROOT_DIR}" + PATH_SUFFIXES + ${_dx_lib_suffixes}) + +if(DIRECTX_DXGUID_LIBRARY) + get_filename_component(_dxsdk_lib_dir ${DIRECTX_DXGUID_LIBRARY} PATH) + list(APPEND DXLIB_HINTS "${_dxsdk_lib_dir}") +endif() + +find_library(DIRECTX_DINPUT_LIBRARY + NAMES + dinput8 + dinput + PATHS + ${DXSDK_DIRS} + HINTS + ${DXLIB_HINTS} + "${DIRECTX_ROOT_DIR}" + PATH_SUFFIXES + ${_dx_lib_suffixes}) + +find_library(DIRECTX_DXERR_LIBRARY + NAMES + dxerr + dxerr9 + dxerr8 + PATHS + ${DXSDK_DIRS} + HINTS + ${DXLIB_HINTS} + "${DIRECTX_ROOT_DIR}" + PATH_SUFFIXES + ${_dx_lib_suffixes}) + +find_library(DIRECTX_D3D9_LIBRARY + NAMES + d3d9 + PATHS + ${DXSDK_DIRS} + HINTS + ${DXLIB_HINTS} + "${DIRECTX_ROOT_DIR}" + PATH_SUFFIXES + ${_dx_lib_suffixes}) + +find_library(DIRECTX_D3DXOF_LIBRARY + NAMES + d3dxof + PATHS + ${DXSDK_DIRS} + HINTS + ${DXLIB_HINTS} + "${DIRECTX_ROOT_DIR}" + PATH_SUFFIXES + ${_dx_lib_suffixes}) + +find_library(DIRECTX_D3DX9_LIBRARY_RELEASE + NAMES + d3dx9 + PATHS + ${DXSDK_DIRS} + HINTS + ${DXLIB_HINTS} + "${DIRECTX_ROOT_DIR}" + PATH_SUFFIXES + ${_dx_lib_suffixes}) + +find_library(DIRECTX_D3DX9_LIBRARY_DEBUG + NAMES + d3dx9d + PATHS + ${DXSDK_DIRS} + HINTS + ${DXLIB_HINTS} + "${DIRECTX_ROOT_DIR}" + PATH_SUFFIXES + ${_dx_lib_suffixes}) + +find_library(DIRECTX_XINPUT_LIBRARY + NAMES + Xinput9_1_0 + Xinput + PATHS + ${DXSDK_DIRS} + HINTS + ${DXLIB_HINTS} + "${DIRECTX_ROOT_DIR}" + PATH_SUFFIXES + ${_dx_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; + } + #endif + " + DIRECTX_SDK_SUPPORTS_COMPILER) + set(DIRECTX_EXTRA_CHECK DIRECTX_SDK_SUPPORTS_COMPILER) + set(CMAKE_REQUIRED_INCLUDES "${_dinput_old_includes}") + else() + # Until proven otherwise. + set(DIRECTX_SDK_SUPPORTS_COMPILER TRUE) + endif() +endif() + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(DirectX + DEFAULT_MSG + DIRECTX_DXGUID_LIBRARY + DIRECTX_DINPUT_LIBRARY + DIRECTX_INCLUDE_DIR + ${DIRECTX_EXTRA_CHECK}) + +if(DIRECTX_FOUND) + set(DIRECTX_LIBRARIES + "${DIRECTX_DXGUID_LIBRARY}" + "${DIRECTX_DINPUT_LIBRARY}") + + set(DIRECTX_INCLUDE_DIRS "${DIRECTX_INCLUDE_DIR}") + + mark_as_advanced(DIRECTX_ROOT_DIR) +endif() + +macro(find_directx_library) + find_library(${ARGN} + PATHS + ${DXSDK_DIRS} + HINTS + ${DXLIB_HINTS} + "${DIRECTX_ROOT_DIR}" + PATH_SUFFIXES + ${_dx_lib_suffixes}) +endmacro() +macro(find_directx_include) + find_path(${ARGN} + PATHS + ${DXSDK_DIRS} + HINTS + ${DIRECTX_INCLUDE_DIR} + "${DIRECTX_ROOT_DIR}" + PATH_SUFFIXES + include) +endmacro() + +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) diff --git a/cmake/cmake-modules/FindFlagpoll.cmake b/cmake/cmake-modules/FindFlagpoll.cmake new file mode 100644 index 000000000..a016656db --- /dev/null +++ b/cmake/cmake-modules/FindFlagpoll.cmake @@ -0,0 +1,151 @@ +# - try to find Flagpoll application, and offer package-finding services +# FLAGPOLL, the executable: if not defined, do not try to use Flagpoll. +# +# Useful configuration variables you might want to add to your cache: +# FLAGPOLL_ROOT_DIR - A directory prefix to search for the app +# (a path that contains bin/ as a subdirectory) +# +# VR Juggler requires this package, so this Find script takes that into +# account when determining where to search for the desired files. +# The VJ_BASE_DIR environment variable is searched (preferentially) +# when searching for this package, so most sane VR Juggler build environments +# should "just work." Note that you need to manually re-run CMake if you +# change this environment variable, because it cannot auto-detect this change +# and trigger an automatic re-run. +# +# You can use Flagpoll to provide directories to use as HINTS for find_* +# These are the provided macros: +# flagpoll_get_include_dirs +# flagpoll_get_library_dirs +# flagpoll_get_library_names +# flagpoll_get_extra_libs +# All take the name of the desired package, optionally NO_DEPS to pass --no-deps +# to Flagpoll, and return yourpkgname_FLAGPOLL_INCLUDE_DIRS(etc. for the other +# macros). +# +# Example usage: +# flagpoll_get_include_dirs(vpr NO_DEPS) +# find_path(VPR20_INCLUDE_DIRS vpr/vpr.h +# HINTS ${vpr_FLAGPOLL_INCLUDE_DIRS}) +# +# Original Author: +# 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> +# http://academic.cleardefinition.com +# Iowa State University HCI Graduate Program/VRAC +# +# Copyright Iowa State University 2009-2010. +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE_1_0.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) + + +### +# Flagpoll detection +### +set(Flagpoll_FIND_QUIETLY true) +find_program(FLAGPOLL + NAMES + flagpoll + flagpoll.exe + PATHS + "${FLAGPOLL_ROOT_DIR}" + "${VRJUGGLER22_ROOT_DIR}" + PATH_SUFFIXES + bin) + +# 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(Flagpoll DEFAULT_MSG FLAGPOLL) + +mark_as_advanced(FLAGPOLL) + +### +# Macro for internal use - shared workings between all the public macros below. +### +macro(_flagpoll_get_results _package _arg _flag _output) + if(FLAGPOLL) + + # If the CMakeLists that called the flagpoll macro passed NO_DEPS, + # we won't return the results for dependencies + if("${ARGN}" MATCHES "NO_DEPS") + set(_FLAGPOLL_NODEP "--no-deps") + else() + set(_FLAGPOLL_NODEP "") + endif() + + # Run flagpoll + execute_process(COMMAND + ${FLAGPOLL} + ${_package} + ${_arg} + ${_FLAGPOLL_NODEP} + OUTPUT_VARIABLE + _FLAGPOLL_OUTPUT + ERROR_QUIET + OUTPUT_STRIP_TRAILING_WHITESPACE) + + if(_FLAGPOLL_OUTPUT) + # Remove -I and /I(or equivalent for other flags + string(REGEX + REPLACE + "[-/]${_flag}" + "" + _FLAGPOLL_OUTPUT + ${_FLAGPOLL_OUTPUT}) + + # Remove extra spaces + string(REGEX REPLACE " +" " " _FLAGPOLL_OUTPUT ${_FLAGPOLL_OUTPUT}) + + # Make a CMake list, standardize paths, and append only what we want to our final list + separate_arguments(_FLAGPOLL_OUTPUT) + foreach(_RESULT ${_FLAGPOLL_OUTPUT}) + string(REGEX MATCH "^-" _BAD ${_RESULT}) + if(_RESULT AND NOT _BAD) + file(TO_CMAKE_PATH "${_RESULT}" _RESULT_CLEAN) + list(APPEND ${_output} ${_RESULT_CLEAN}) + endif() + endforeach() + endif() + + endif() +endmacro() + +### +# "Public" macros - to use flagpoll to give you HINTS directories when finding things +### +macro(flagpoll_get_include_dirs _package) + # Passing ARGN along so if they specified NO_DEPS we actually do it. + _flagpoll_get_results(${_package} + "--cflags-only-I" + I + ${_package}_FLAGPOLL_INCLUDE_DIRS + ${ARGN}) +endmacro() + +macro(flagpoll_get_library_dirs _package) + # Passing ARGN along so if they specified NO_DEPS we actually do it. + _flagpoll_get_results(${_package} + "--libs-only-L" + L + ${_package}_FLAGPOLL_LIBRARY_DIRS + ${ARGN}) +endmacro() + +macro(flagpoll_get_library_names _package) + # Passing ARGN along so if they specified NO_DEPS we actually do it. + _flagpoll_get_results(${_package} + "--libs-only-l" + l + ${_package}_FLAGPOLL_LIBRARY_NAMES + ${ARGN}) +endmacro() + +macro(flagpoll_get_extra_libs _package) + # Passing ARGN along so if they specified NO_DEPS we actually do it. + _flagpoll_get_results(${_package} + "--get-extra-libs" + l + ${_package}_FLAGPOLL_EXTRA_LIBS + ${ARGN}) +endmacro() diff --git a/cmake/cmake-modules/FindGDB.cmake b/cmake/cmake-modules/FindGDB.cmake new file mode 100644 index 000000000..e7caa190c --- /dev/null +++ b/cmake/cmake-modules/FindGDB.cmake @@ -0,0 +1,74 @@ +# - Try to find GDB +# +# Once done, this will define: +# GDB_FOUND - system has GDB +# GDB_COMMAND - the command to run +# GDB_VERSION - version +# GDB_HAS_RETURN_CHILD_RESULT - if the --return-child-result flag is supported +# +# Useful configuration variables you might want to add to your cache: +# GDB_ROOT_DIR - A directory prefix to search +# +# Original Author: +# 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> +# http://academic.cleardefinition.com +# Iowa State University HCI Graduate Program/VRAC +# +# Copyright Iowa State University 2009-2010. +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE_1_0.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) + + +set(GDB_ROOT_DIR + "${GDB_ROOT_DIR}" + CACHE + PATH + "Directory to start our search in") + +find_program(GDB_COMMAND + NAMES + gdb + HINTS + "${GDB_ROOT_DIR}" + PATH_SUFFIXES + bin + libexec) + +if(GDB_COMMAND) + 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}") +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) + +if(GDB_FOUND) + mark_as_advanced(GDB_ROOT_DIR) + if(GDB_VERSION VERSION_LESS 6.4) + set(GDB_HAS_RETURN_CHILD_RESULT FALSE) + else() + set(GDB_HAS_RETURN_CHILD_RESULT TRUE) + endif() +endif() + +mark_as_advanced(GDB_COMMAND) diff --git a/cmake/cmake-modules/FindGHOST.cmake b/cmake/cmake-modules/FindGHOST.cmake new file mode 100644 index 000000000..71f17ee56 --- /dev/null +++ b/cmake/cmake-modules/FindGHOST.cmake @@ -0,0 +1,90 @@ +# - try to find Sensable GHOST library and include files +# GHOST_INCLUDE_DIRS, where to find GL/glut.h, etc. +# GHOST_LIBRARIES, the libraries to link against +# GHOST_FOUND, If false, do not try to use GLUT. +# GHOST_RUNTIME_LIBRARY_DIRS, path to DLL on Windows for runtime use. +# +# Requires these CMake modules: +# no additional modules required +# +# Original Author: +# 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> +# http://academic.cleardefinition.com +# Iowa State University HCI Graduate Program/VRAC +# +# Copyright Iowa State University 2009-2010. +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE_1_0.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) + +set(GHOST_ROOT_DIR + "${GHOST_ROOT_DIR}" + CACHE + PATH + "Path to search for GHOST") + +set(_dirs) +if(WIN32) + include(ProgramFilesGlob) + program_files_fallback_glob(_dirs "/Sensable/GHOST/v*/") +endif() + +find_path(GHOST_INCLUDE_DIR + gstPHANToM.h + PATHS + ${_dirs} + HINTS + "${GHOST_ROOT_DIR}" + PATH_SUFFIXES + include) + +find_library(GHOST_LIBRARY + GHOST40 + GHOST31 + PATHS + ${_dirs} + HINTS + "${GHOST_ROOT_DIR}" + PATH_SUFFIXES + lib) + +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() + set(_deps_check) +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(GHOST + DEFAULT_MSG + GHOST_LIBRARY + ${_deps_check} + GHOST_INCLUDE_DIR) + +if(GHOST_FOUND) + set(GHOST_LIBRARIES "${GHOST_LIBRARY}") + 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) diff --git a/cmake/cmake-modules/FindGLEW.cmake b/cmake/cmake-modules/FindGLEW.cmake new file mode 100644 index 000000000..684f6f10d --- /dev/null +++ b/cmake/cmake-modules/FindGLEW.cmake @@ -0,0 +1,132 @@ +#.rst: +# FindGLEW +# -------- +# +# Find the OpenGL Extension Wrangler Library (GLEW) +# +# IMPORTED Targets +# ^^^^^^^^^^^^^^^^ +# +# This module defines the :prop_tgt:`IMPORTED` target ``GLEW::GLEW``, +# if GLEW has been found. +# +# Result Variables +# ^^^^^^^^^^^^^^^^ +# +# This module defines the following variables: +# +# :: +# +# GLEW_INCLUDE_DIRS - include directories for GLEW +# GLEW_LIBRARIES - libraries to link against GLEW +# GLEW_FOUND - true if GLEW has been found and can be used + +#============================================================================= +# Copyright 2012 Benjamin Eikel +# Copyright 2016 Ryan Pavlik +# +# 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. +#============================================================================= + +find_path(GLEW_INCLUDE_DIR GL/glew.h) +if(WIN32) + # TODO how to make this exclude arm? + if(CMAKE_SIZEOF_VOID_P EQUAL 4) + set(GLEW_ARCH Win32) + else() + set(GLEW_ARCH x64) + endif() + set(GLEW_EXTRA_SUFFIXES lib/Release/${GLEW_ARCH} bin/Release/${GLEW_ARCH}) +endif() + +if(WIN32 AND GLEW_INCLUDE_DIR) + get_filename_component(GLEW_LIB_ROOT_CANDIDATE "${GLEW_INCLUDE_DIR}/.." ABSOLUTE) +endif() + +find_library(GLEW_LIBRARY + NAMES GLEW glew32 glew glew32s + PATH_SUFFIXES lib64 ${GLEW_EXTRA_SUFFIXES} + HINTS "${GLEW_LIB_ROOT_CANDIDATE}") + +if(WIN32 AND GLEW_LIBRARY AND NOT GLEW_LIBRARY MATCHES ".*s.lib") + get_filename_component(GLEW_LIB_DIR "${GLEW_LIBRARY}" DIRECTORY) + get_filename_component(GLEW_BIN_ROOT_CANDIDATE1 "${GLEW_LIB_DIR}/.." ABSOLUTE) + get_filename_component(GLEW_BIN_ROOT_CANDIDATE2 "${GLEW_LIB_DIR}/../../.." ABSOLUTE) + find_file(GLEW_RUNTIME_LIBRARY + NAMES glew32.dll + PATH_SUFFIXES bin ${GLEW_EXTRA_SUFFIXES} + HINTS + "${GLEW_BIN_ROOT_CANDIDATE1}" + "${GLEW_BIN_ROOT_CANDIDATE2}") +endif() + +set(GLEW_INCLUDE_DIRS ${GLEW_INCLUDE_DIR}) +set(GLEW_LIBRARIES ${GLEW_LIBRARY}) + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(GLEW + REQUIRED_VARS GLEW_INCLUDE_DIR GLEW_LIBRARY) + +if(GLEW_FOUND AND NOT TARGET GLEW::GLEW) + if(WIN32 AND GLEW_LIBRARY MATCHES ".*s.lib") + # Windows, known static library. + add_library(GLEW::GLEW STATIC IMPORTED) + set_target_properties(GLEW::GLEW PROPERTIES + IMPORTED_LOCATION "${GLEW_LIBRARY}" + PROPERTY INTERFACE_COMPILE_DEFINITIONS GLEW_STATIC) + + elseif(WIN32 AND GLEW_RUNTIME_LIBRARY) + # Windows, known dynamic library and we have both pieces + # TODO might be different for mingw + add_library(GLEW::GLEW SHARED IMPORTED) + set_target_properties(GLEW::GLEW PROPERTIES + IMPORTED_LOCATION "${GLEW_RUNTIME_LIBRARY}" + IMPORTED_IMPLIB "${GLEW_LIBRARY}") + else() + + # Anything else - previous behavior. + add_library(GLEW::GLEW UNKNOWN IMPORTED) + set_target_properties(GLEW::GLEW PROPERTIES + IMPORTED_LOCATION "${GLEW_LIBRARY}") + endif() + + set_target_properties(GLEW::GLEW PROPERTIES + INTERFACE_INCLUDE_DIRECTORIES "${GLEW_INCLUDE_DIRS}") + +endif() + +mark_as_advanced(GLEW_INCLUDE_DIR GLEW_LIBRARY GLEW_RUNTIME_LIBRARY) diff --git a/cmake/cmake-modules/FindGLUI.cmake b/cmake/cmake-modules/FindGLUI.cmake new file mode 100644 index 000000000..51797cae4 --- /dev/null +++ b/cmake/cmake-modules/FindGLUI.cmake @@ -0,0 +1,136 @@ +# - Try to find GLUI (GL User Interface) +# Requires OpenGL and GLUT - searches for them using find_package +# Once done, this will define +# +# GLUI_INCLUDE_DIR, where to find GL/glui.h (or GLUI/glui.h on mac) +# GLUI_LIBRARY, the libraries to link against +# GLUI_FOUND, If false, do not try to use GLUI. +# +# Plural versions refer to this library and its dependencies, and +# are recommended to be used instead, unless you have a good reason. +# +# Useful configuration variables you might want to add to your cache: +# GLUI_ROOT_DIR - A directory prefix to search +# (usually a path that contains include/ as a subdirectory) +# +# Original Author: +# 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> +# http://academic.cleardefinition.com +# Iowa State University HCI Graduate Program/VRAC +# +# Copyright Iowa State University 2009-2010. +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE_1_0.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) + +if(GLUI_FIND_QUIETLY) + find_package(OpenGL QUIET) + find_package(GLUT QUIET) +else() + find_package(OpenGL) + find_package(GLUT) +endif() + +if(OPENGL_FOUND AND GLUT_FOUND) + if(WIN32) + find_path(GLUI_INCLUDE_DIR + NAMES + GL/glui.h + PATHS + ${GLUI_ROOT_PATH}/include + DOC + "GLUI include directory") + find_library(GLUI_LIBRARY + NAMES + glui + ${GLUI_ROOT_DIR}/lib + ${GLUI_ROOT_DIR}/Release + HINTS + ${OPENGL_LIBRARY_DIR} + ${OPENGL_INCLUDE_DIR}/../lib + DOC + "GLUI library") + find_library(GLUI_DEBUG_LIBRARY + NAMES + glui32 + ${GLUI_ROOT_DIR}/lib + ${GLUI_ROOT_DIR}/Debug + HINTS + ${OPENGL_LIBRARY_DIR} + ${OPENGL_INCLUDE_DIR}/../lib + DOC + "GLUI debug library") + else() + find_library(GLUI_LIBRARY + NAMES + GLUI + glui + PATHS + ${GLUI_ROOT_DIR}/lib64 + ${GLUI_ROOT_DIR}/lib + ${GLUI_ROOT_DIR} + /usr/openwin/lib + HINTS + ${OPENGL_LIBRARY_DIR} + ${OPENGL_INCLUDE_DIR}/../lib64 + ${OPENGL_INCLUDE_DIR}/../lib + DOC + "GLUI library") + + if(APPLE) + find_path(GLUI_INCLUDE_DIR + GLUI/glui.h + HINTS + ${OPENGL_INCLUDE_DIR} + DOC + "GLUI include directory") + else() + find_path(GLUI_INCLUDE_DIR + GL/glui.h + PATHS + ${GLUI_ROOT_DIR}/include + /usr/include/GL + /usr/openwin/share/include + /usr/openwin/include + /opt/graphics/OpenGL/include + /opt/graphics/OpenGL/contrib/libglui + DOC + "GLUI include directory") + endif() + endif() +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(GLUI + DEFAULT_MSG + GLUI_INCLUDE_DIR + GLUI_LIBRARY + GLUT_FOUND + OPENGL_FOUND) + +if(GLUI_FOUND) + if(WIN32 AND GLUI_LIBRARY AND GLUI_DEBUG_LIBRARY) + set(GLUI_LIBRARIES + optimized + ${GLUI_LIBRARY} + debug + ${GLUI_DEBUG_LIBRARY} + ${GLUT_LIBRARIES} + ${OPENGL_LIBRARIES}) + else() + set(GLUI_LIBRARIES + ${GLUI_LIBRARY} + ${GLUT_LIBRARIES} + ${OPENGL_LIBRARIES}) + endif() + set(GLUI_INCLUDE_DIRS + ${GLUI_INCLUDE_DIR} + ${GLUT_INCLUDE_DIR} + ${OPENGL_INCLUDE_DIR}) +endif() + +if(GLUI_LIBRARY AND GLUI_INCLUDE_DIR) + mark_as_advanced(GLUI_INCLUDE_DIR GLUI_LIBRARY GLUI_DEBUG_LIBRARY) +endif() diff --git a/cmake/cmake-modules/FindGLUT.cmake b/cmake/cmake-modules/FindGLUT.cmake new file mode 100644 index 000000000..79486f07a --- /dev/null +++ b/cmake/cmake-modules/FindGLUT.cmake @@ -0,0 +1,132 @@ +# - try to find glut library and include files +# GLUT_INCLUDE_DIRS, where to find GL/glut.h, etc. +# GLUT_LIBRARIES, the libraries to link against +# GLUT_FOUND, If false, do not try to use GLUT. +# GLUT_RUNTIME_LIBRARY_DIRS, path to DLL on Windows for runtime use. +# GLUT_RUNTIME_LIBRARY, dll on Windows, for installation purposes +# +# Also defined, but not for general use are: +# GLUT_INCLUDE_DIR, where to find GL/glut.h, etc. +# GLUT_glut_LIBRARY = the full path to the glut library. + +#============================================================================= +# Copyright 2001-2009 Kitware, Inc. +# Copyright 2009-2010 Iowa State University +# (Author: Ryan Pavlik <abiryan@ryand.net> ) +# +# 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. +#============================================================================= + +if(GLUT_FIND_QUIETLY) + find_package(OpenGL QUIET) +else() + find_package(OpenGL) +endif() + +if(OPENGL_FOUND) + get_filename_component(_ogl_libdir ${OPENGL_gl_LIBRARY} PATH) + find_path(GLUT_INCLUDE_DIR + NAMES + GL/glut.h + GLUT/glut.h + glut.h + PATHS + ${_ogl_libdir}/../include + ${GLUT_ROOT_PATH} + ${GLUT_ROOT_PATH}/include + /usr/include/GL + /usr/openwin/share/include + /usr/openwin/include + /opt/graphics/OpenGL/include + /opt/graphics/OpenGL/contrib/libglut) + + find_library(GLUT_glut_LIBRARY + NAMES + glut + glut32 + GLUT + freeglut + PATHS + ${_ogl_libdir} + ${GLUT_ROOT_PATH} + ${GLUT_ROOT_PATH}/Release + /usr/openwin/lib) + +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(GLUT + DEFAULT_MSG + GLUT_glut_LIBRARY + GLUT_INCLUDE_DIR + OPENGL_FOUND) + +if(GLUT_FOUND) + set(GLUT_LIBRARIES ${GLUT_glut_LIBRARY} ${OPENGL_LIBRARIES}) + set(GLUT_INCLUDE_DIRS ${GLUT_INCLUDE_DIR} ${OPENGL_INCLUDE_DIR}) + + if(WIN32) + get_filename_component(_basename "${GLUT_glut_LIBRARY}" NAME_WE) + get_filename_component(_libpath "${GLUT_glut_LIBRARY}" PATH) + find_path(GLUT_RUNTIME_LIBRARY + NAMES + ${_basename}.dll + glut.dll + glut32.dll + freeglut.dll + HINTS + ${_libpath} + ${_libpath}/../bin) + if(GLUT_RUNTIME_LIBRARY) + get_filename_component(GLUT_RUNTIME_LIBRARY_DIRS + "${GLUT_RUNTIME_LIBRARY}" + PATH) + else() + set(GLUT_RUNTIME_LIBRARY_DIRS) + endif() + endif() + + #The following deprecated settings are for backwards compatibility with CMake1.4 + set(GLUT_LIBRARY ${GLUT_LIBRARIES}) + set(GLUT_INCLUDE_PATH ${GLUT_INCLUDE_DIR}) +endif() + +mark_as_advanced(GLUT_INCLUDE_DIR + GLUT_glut_LIBRARY + GLUT_RUNTIME_LIBRARY) diff --git a/cmake/cmake-modules/FindGMTL.cmake b/cmake/cmake-modules/FindGMTL.cmake new file mode 100644 index 000000000..bdc23e4e5 --- /dev/null +++ b/cmake/cmake-modules/FindGMTL.cmake @@ -0,0 +1,111 @@ +# - Try to find GMTL +# Optionally uses Flagpoll and FindFlagpoll.cmake +# Once done, this will define +# +# GMTL_FOUND - system has GMTL +# GMTL_INCLUDE_DIR - the GMTL include directory +# +# 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.7.0) +# to use when constructing search names and paths +# +# This script will use Flagpoll, if found, to provide hints to the location +# of this library, but does not use the compiler flags returned by Flagpoll +# directly. +# +# VR Juggler requires this package, so this Find script takes that into +# account when determining where to search for the desired files. +# The VJ_BASE_DIR environment variable is searched (preferentially) +# when searching for this package, so most sane VR Juggler build environments +# should "just work." Note that you need to manually re-run CMake if you +# change this environment variable, because it cannot auto-detect this change +# and trigger an automatic re-run. +# +# 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-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(_HUMAN "GMTL") +set(_HEADER gmtl/gmtl.h) +set(_FP_PKG_NAME gmtl) + +include(CheckVersion) + +set(GMTL_VERSIONS + ${GMTL_ADDITIONAL_VERSIONS} + 0.7.0 + 0.6.2 + 0.6.1 + 0.6.0 + 0.5.4 + 0.5.3 + 0.5.2 + 0.5.1) +set(GMTL_DIRS) +foreach(_version ${GMTL_VERSIONS}) + check_version(_ver_ok GMTL ${_version}) + if(_ver_ok) + list(APPEND GMTL_DIRS gmtl-${_version}) + list(APPEND GMTL_HEADER_DIRS include/gmtl-${_version}) + endif() +endforeach() + +include(SelectLibraryConfigurations) +include(CreateImportedTarget) +include(CleanDirectoryList) + +# Try flagpoll. +find_package(Flagpoll QUIET) + +if(FLAGPOLL) + flagpoll_get_include_dirs(${_FP_PKG_NAME}) +endif() + +set(GMTL_ROOT_DIR + "${GMTL_ROOT_DIR}" + CACHE + PATH + "Root directory to search for GMTL") +if(DEFINED VRJUGGLER22_ROOT_DIR) + mark_as_advanced(GMTL_ROOT_DIR) +endif() +if(NOT GMTL_ROOT_DIR) + set(GMTL_ROOT_DIR "${VRJUGGLER22_ROOT_DIR}") +endif() + +set(_ROOT_DIR "${GMTL_ROOT_DIR}") + +# Include dir +find_path(GMTL_INCLUDE_DIR + NAMES + ${_HEADER} + HINTS + "${_ROOT_DIR}" + ${${_FP_PKG_NAME}_FLAGPOLL_INCLUDE_DIRS} + PATHS + PATH_SUFFIXES + ${GMTL_DIRS} + ${GMTL_HEADER_DIRS} + include/ + DOC + "GMTL include path") + +# 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(GMTL DEFAULT_MSG GMTL_INCLUDE_DIR) + +if(GMTL_FOUND) + set(GMTL_INCLUDE_DIRS "${GMTL_INCLUDE_DIR}") + mark_as_advanced(GMTL_ROOT_DIR) +endif() + +mark_as_advanced(GMTL_INCLUDE_DIR) diff --git a/cmake/cmake-modules/FindGPM.cmake b/cmake/cmake-modules/FindGPM.cmake new file mode 100644 index 000000000..ea70d8550 --- /dev/null +++ b/cmake/cmake-modules/FindGPM.cmake @@ -0,0 +1,43 @@ +# - try to find GPM library +# +# Cache Variables: (probably not for direct use in your scripts) +# GPM_INCLUDE_DIR +# GPM_LIBRARY +# +# Non-cache variables you might use in your CMakeLists.txt: +# GPM_FOUND +# GPM_INCLUDE_DIRS +# GPM_LIBRARIES +# +# Requires these CMake modules: +# FindPackageHandleStandardArgs (known included with CMake >=2.6.2) +# +# Original Author: +# 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> +# http://academic.cleardefinition.com +# Iowa State University HCI Graduate Program/VRAC +# +# Copyright Iowa State University 2009-2010. +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE_1_0.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) + +find_library(GPM_LIBRARY + NAMES gpm) + +find_path(GPM_INCLUDE_DIR + NAMES gpm.h) + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(GPM + DEFAULT_MSG + GPM_LIBRARY + GPM_INCLUDE_DIR) + +if(GPM_FOUND) + set(GPM_LIBRARIES "${GPM_LIBRARY}") + + set(GPM_INCLUDE_DIRS "${GPM_INCLUDE_DIR}") +endif() + +mark_as_advanced(GPM_INCLUDE_DIR GPM_LIBRARY) diff --git a/cmake/cmake-modules/FindGadgeteer12.cmake b/cmake/cmake-modules/FindGadgeteer12.cmake new file mode 100644 index 000000000..42c33f8e5 --- /dev/null +++ b/cmake/cmake-modules/FindGadgeteer12.cmake @@ -0,0 +1,186 @@ +# - try to find Gadgeteer 1.2 library +# Requires JCCL 1.2 and VPR 2.0 (thus FindJCCL12.cmake and FindVPR20.cmake) +# Requires X11 if not on Mac or Windows. +# Optionally uses Flagpoll and FindFlagpoll.cmake +# +# This library is a part of VR Juggler 2.2 - you probably want to use +# find_package(VRJuggler22) instead, for an easy interface to this and +# related scripts. See FindVRJuggler22.cmake for more information. +# +# GADGETEER12_LIBRARY_DIR, library search path +# GADGETEER12_INCLUDE_DIR, include search path +# GADGETEER12_LIBRARY, the library to link against +# GADGETEER12_FOUND, If false, do not try to use this library. +# +# Plural versions refer to this library and its dependencies, and +# are recommended to be used instead, unless you have a good reason. +# +# Useful configuration variables you might want to add to your cache: +# GADGETEER12_ROOT_DIR - A directory prefix to search +# (a path that contains include/ as a subdirectory) +# +# This script will use Flagpoll, if found, to provide hints to the location +# of this library, but does not use the compiler flags returned by Flagpoll +# directly. +# +# The VJ_BASE_DIR environment variable is also searched (preferentially) +# when searching for this component, so most sane build environments should +# "just work." Note that you need to manually re-run CMake if you 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> <abiryan@ryand.net> +# http://academic.cleardefinition.com +# Iowa State University HCI Graduate Program/VRAC +# +# Copyright Iowa State University 2009-2010. +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE_1_0.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) + +set(_HUMAN "Gadgeteer 1.2") +set(_RELEASE_NAMES gadget-1_2 libgadget-1_2) +set(_DEBUG_NAMES gadget_d-1_2 libgadget_d-1_2) +set(_DIR gadgeteer-1.2) +set(_HEADER gadget/gadgetConfig.h) +set(_FP_PKG_NAME gadgeteer) + +include(SelectLibraryConfigurations) +include(CreateImportedTarget) +include(CleanLibraryList) +include(CleanDirectoryList) + +if(Gadgeteer12_FIND_QUIETLY) + set(_FIND_FLAGS "QUIET") +else() + set(_FIND_FLAGS "") +endif() + +# Try flagpoll. +find_package(Flagpoll QUIET) + +if(FLAGPOLL) + flagpoll_get_include_dirs(${_FP_PKG_NAME} NO_DEPS) + flagpoll_get_library_dirs(${_FP_PKG_NAME} NO_DEPS) + flagpoll_get_extra_libs(${_FP_PKG_NAME} NO_DEPS) +endif() + +set(GADGETEER12_ROOT_DIR + "${GADGETEER12_ROOT_DIR}" + CACHE + PATH + "Root directory to search for Gadgeteer") +if(DEFINED VRJUGGLER22_ROOT_DIR) + mark_as_advanced(GADGETEER12_ROOT_DIR) +endif() +if(NOT GADGETEER12_ROOT_DIR) + set(GADGETEER12_ROOT_DIR "${VRJUGGLER22_ROOT_DIR}") +endif() + +set(_ROOT_DIR "${GADGETEER12_ROOT_DIR}") + +find_path(GADGETEER12_INCLUDE_DIR + ${_HEADER} + HINTS + "${_ROOT_DIR}" + ${${_FP_PKG_NAME}_FLAGPOLL_INCLUDE_DIRS} + PATH_SUFFIXES + ${_DIR} + include/${_DIR} + include/ + DOC + "Path to ${_HUMAN} includes root") + +find_library(GADGETEER12_LIBRARY_RELEASE + NAMES + ${_RELEASE_NAMES} + HINTS + "${_ROOT_DIR}" + ${${_FP_PKG_NAME}_FLAGPOLL_LIBRARY_DIRS} + PATH_SUFFIXES + ${_VRJ_LIBSUFFIXES} + DOC + "${_HUMAN} release library full path") + +find_library(GADGETEER12_LIBRARY_DEBUG + NAMES + ${_DEBUG_NAMES} + HINTS + "${_ROOT_DIR}" + ${${_FP_PKG_NAME}_FLAGPOLL_LIBRARY_DIRS} + PATH_SUFFIXES + ${_VRJ_LIBDSUFFIXES} + DOC + "${_HUMAN} debug library full path") + +select_library_configurations(GADGETEER12) + +# Dependencies +foreach(package JCCL12 VPR20 GMTL) + if(NOT ${PACKAGE}_FOUND) + find_package(${package} ${_FIND_FLAGS}) + endif() +endforeach() + +if(UNIX AND NOT APPLE AND NOT WIN32) + # We need X11 if not on Mac or Windows + if(NOT X11_FOUND) + find_package(X11 ${_FIND_FLAGS}) + endif() + + set(_CHECK_EXTRAS + X11_FOUND + X11_X11_LIB + X11_ICE_LIB + X11_SM_LIB + X11_INCLUDE_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(Gadgeteer12 + DEFAULT_MSG + GADGETEER12_LIBRARY + GADGETEER12_INCLUDE_DIR + JCCL12_FOUND + JCCL12_LIBRARIES + JCCL12_INCLUDE_DIR + VPR20_FOUND + VPR20_LIBRARIES + VPR20_INCLUDE_DIR + GMTL_FOUND + GMTL_INCLUDE_DIR + ${_CHECK_EXTRAS}) + +if(GADGETEER12_FOUND) + set(_DEPS ${JCCL12_LIBRARIES} ${VPR20_LIBRARIES}) + + set(GADGETEER12_INCLUDE_DIRS ${GADGETEER12_INCLUDE_DIR}) + list(APPEND + GADGETEER12_INCLUDE_DIRS + ${JCCL12_INCLUDE_DIRS} + ${VPR20_INCLUDE_DIRS} + ${GMTL_INCLUDE_DIRS}) + + if(UNIX AND NOT APPLE AND NOT WIN32) + # We need X11 if not on Mac or Windows + list(APPEND _DEPS ${X11_X11_LIB} ${X11_ICE_LIB} ${X11_SM_LIB}) + list(APPEND GADGETEER12_INCLUDE_DIRS ${X11_INCLUDE_DIR}) + endif() + + clean_directory_list(GADGETEER12_INCLUDE_DIRS) + + if(VRJUGGLER22_CREATE_IMPORTED_TARGETS) + create_imported_target(GADGETEER12 ${_DEPS}) + else() + clean_library_list(GADGETEER12_LIBRARIES ${_DEPS}) + endif() + + mark_as_advanced(GADGETEER12_ROOT_DIR) +endif() + +mark_as_advanced(GADGETEER12_LIBRARY_RELEASE + GADGETEER12_LIBRARY_DEBUG + GADGETEER12_INCLUDE_DIR) diff --git a/cmake/cmake-modules/FindGadgeteer20.cmake b/cmake/cmake-modules/FindGadgeteer20.cmake new file mode 100644 index 000000000..f6f3b44de --- /dev/null +++ b/cmake/cmake-modules/FindGadgeteer20.cmake @@ -0,0 +1,187 @@ +# - try to find Gadgeteer 2.0 library +# Requires JCCL 1.4 and VPR 2.2 (thus FindJCCL14.cmake and FindVPR22.cmake) +# Requires X11 if not on Mac or Windows. +# Optionally uses Flagpoll and FindFlagpoll.cmake +# +# This library is a part of VR Juggler 3.0 - you probably want to use +# find_package(VRJuggler30) instead, for an easy interface to this and +# related scripts. See FindVRJuggler30.cmake for more information. +# +# GADGETEER20_LIBRARY_DIR, library search path +# GADGETEER20_INCLUDE_DIR, include search path +# GADGETEER20_LIBRARY, the library to link against +# GADGETEER20_FOUND, If false, do not try to use this library. +# +# Plural versions refer to this library and its dependencies, and +# are recommended to be used instead, unless you have a good reason. +# +# Useful configuration variables you might want to add to your cache: +# GADGETEER20_ROOT_DIR - A directory prefix to search +# (a path that contains include/ as a subdirectory) +# +# This script will use Flagpoll, if found, to provide hints to the location +# of this library, but does not use the compiler flags returned by Flagpoll +# directly. +# +# The VJ_BASE_DIR environment variable is also searched (preferentially) +# when searching for this component, so most sane build environments should +# "just work." Note that you need to manually re-run CMake if you 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> <abiryan@ryand.net> +# http://academic.cleardefinition.com +# Iowa State University HCI Graduate Program/VRAC +# Updated for VR Juggler 3.0 by: +# Brandon Newendorp <brandon@newendorp.com> + +set(_HUMAN "Gadgeteer 2.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) + +include(SelectLibraryConfigurations) +include(CreateImportedTarget) +include(CleanLibraryList) +include(CleanDirectoryList) + +if(GADGETEER20_FIND_QUIETLY) + set(_FIND_FLAGS "QUIET") +else() + set(_FIND_FLAGS "") +endif() + +# Try flagpoll. +find_package(Flagpoll QUIET) + +if(FLAGPOLL) + flagpoll_get_include_dirs(${_FP_PKG_NAME} NO_DEPS) + flagpoll_get_library_dirs(${_FP_PKG_NAME} NO_DEPS) + flagpoll_get_extra_libs(${_FP_PKG_NAME} NO_DEPS) +endif() + +set(GADGETEER20_ROOT_DIR + "${GADGETEER20_ROOT_DIR}" + CACHE + PATH + "Root directory to search for Gadgeteer") +if(DEFINED VRJUGGLER30_ROOT_DIR) + mark_as_advanced(GADGETEER20_ROOT_DIR) +endif() +if(NOT GADGETEER20_ROOT_DIR) + set(GADGETEER20_ROOT_DIR "${VRJUGGLER30_ROOT_DIR}") +endif() + +set(_ROOT_DIR "${GADGETEER20_ROOT_DIR}") + +find_path(GADGETEER20_INCLUDE_DIR + ${_HEADER} + HINTS + "${_ROOT_DIR}" + ${${_FP_PKG_NAME}_FLAGPOLL_INCLUDE_DIRS} + PATH_SUFFIXES + ${_DIR} + include/${_DIR} + include/ + DOC + "Path to ${_HUMAN} includes root") + +find_library(GADGETEER20_LIBRARY_RELEASE + NAMES + ${_RELEASE_NAMES} + HINTS + "${_ROOT_DIR}" + ${${_FP_PKG_NAME}_FLAGPOLL_LIBRARY_DIRS} + PATH_SUFFIXES + ${_VRJ_LIBSUFFIXES} + DOC + "${_HUMAN} release library full path") + +find_library(GADGETEER20_LIBRARY_DEBUG + NAMES + ${_DEBUG_NAMES} + HINTS + "${_ROOT_DIR}" + ${${_FP_PKG_NAME}_FLAGPOLL_LIBRARY_DIRS} + PATH_SUFFIXES + ${_VRJ_LIBDSUFFIXES} + DOC + "${_HUMAN} debug library full path") + +select_library_configurations(GADGETEER20) + +# Dependencies +foreach(package JCCL14 VPR22 GMTL) + if(NOT ${PACKAGE}_FOUND) + find_package(${package} ${_FIND_FLAGS}) + endif() +endforeach() + +if(UNIX AND NOT APPLE AND NOT WIN32) + # We need X11 if not on Mac or Windows + if(NOT X11_FOUND) + find_package(X11 ${_FIND_FLAGS}) + endif() + + set(_CHECK_EXTRAS + X11_FOUND + X11_X11_LIB + X11_ICE_LIB + X11_SM_LIB + X11_INCLUDE_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(GADGETEER20 + DEFAULT_MSG + GADGETEER20_LIBRARY + GADGETEER20_INCLUDE_DIR + JCCL14_FOUND + JCCL14_LIBRARIES + JCCL14_INCLUDE_DIR + VPR22_FOUND + VPR22_LIBRARIES + VPR22_INCLUDE_DIR + GMTL_FOUND + GMTL_INCLUDE_DIR + ${_CHECK_EXTRAS}) + +if(GADGETEER20_FOUND) + set(_DEPS ${JCCL14_LIBRARIES} ${VPR22_LIBRARIES}) + + set(GADGETEER20_INCLUDE_DIRS ${GADGETEER20_INCLUDE_DIR}) + list(APPEND + GADGETEER20_INCLUDE_DIRS + ${JCCL14_INCLUDE_DIRS} + ${VPR22_INCLUDE_DIRS} + ${GMTL_INCLUDE_DIRS}) + + if(UNIX AND NOT APPLE AND NOT WIN32) + # We need X11 if not on Mac or Windows + list(APPEND _DEPS ${X11_X11_LIB} ${X11_ICE_LIB} ${X11_SM_LIB}) + list(APPEND GADGETEER20_INCLUDE_DIRS ${X11_INCLUDE_DIR}) + endif() + + clean_directory_list(GADGETEER20_INCLUDE_DIRS) + + if(VRJUGGLER30_CREATE_IMPORTED_TARGETS) + create_imported_target(GADGETEER20 ${_DEPS}) + else() + clean_library_list(GADGETEER20_LIBRARIES ${_DEPS}) + endif() + + mark_as_advanced(GADGETEER20_ROOT_DIR) +endif() + +mark_as_advanced(GADGETEER20_LIBRARY_RELEASE + GADGETEER20_LIBRARY_DEBUG + GADGETEER20_INCLUDE_DIR) diff --git a/cmake/cmake-modules/FindGlove5DT.cmake b/cmake/cmake-modules/FindGlove5DT.cmake new file mode 100644 index 000000000..fca626bd2 --- /dev/null +++ b/cmake/cmake-modules/FindGlove5DT.cmake @@ -0,0 +1,203 @@ +# - try to find Glove5DT libraries +# +# Cache Variables: (probably not for direct use in your scripts) +# GLOVE5DT_INCLUDE_DIR +# GLOVE5DT_LIBRARY +# GLOVE5DT_LIBRARY_RELEASE +# GLOVE5DT_LIBRARY_DEBUG +# GLOVE5DT_RUNTIME_LIBRARY_RELEASE +# GLOVE5DT_RUNTIME_LIBRARY_DEBUG +# +# Non-cache variables you might use in your CMakeLists.txt: +# GLOVE5DT_FOUND +# GLOVE5DT_INCLUDE_DIRS +# GLOVE5DT_LIBRARIES +# GLOVE5DT_RUNTIME_LIBRARY_DIRS +# +# Requires these CMake modules: +# CleanDirectoryList +# CleanLibraryList +# ListCombinations +# ProgramFilesGlob +# SelectLibraryConfigurations (included with CMake >=2.8.0) +# FindPackageHandleStandardArgs (known included with CMake >=2.6.2) +# +# Original Author: +# 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> +# http://academic.cleardefinition.com +# Iowa State University HCI Graduate Program/VRAC +# +# Copyright Iowa State University 2009-2010. +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE_1_0.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) + +set(GLOVE5DT_ROOT_DIR + "${GLOVE5DT_ROOT_DIR}" + CACHE + PATH + "Path to search for Glove5DT SDK") + +### +# Configure Glove5DT +### + +include(SelectLibraryConfigurations) +include(ListCombinations) +include(CleanDirectoryList) +include(ProgramFilesGlob) + +if(WIN32) + # Data Glove 5 and 16 use these directories for includes, lib, and runtime + program_files_glob(_dirs516 "/5DT/*/Driver") + set(_dirs516 + "${GLOVE5DT_ROOT_DIR}/Driver" + "${GLOVE5DT_ROOT_DIR}" + ${_dirs516}) + + # Data Glove Ultra uses this directory as the base for a dll, inc, and lib directory + program_files_glob(_dirsultra "/5DT/*/SDK") + + list_combinations(_libsearchultra + PREFIXES + "${GLOVE5DT_ROOT_DIR}" + "${_dirsultra}" + SUFFIXES + "/lib") + list_combinations(_incsearchultra + PREFIXES + "${GLOVE5DT_ROOT_DIR}" + "${_dirsultra}" + SUFFIXES + "/inc") + list_combinations(_dllsearchultra + PREFIXES + "${GLOVE5DT_ROOT_DIR}" + "${_dirsultra}" + SUFFIXES + "/dll") +endif() + + +### +# First search for the Ultra (2.0) SDK +### +find_path(GLOVE5DT_INCLUDE_DIR + NAMES + fglove.h + HINTS + ${_incsearchultra} + ${GLOVE5DT_ROOT_DIR}) + +find_library(GLOVE5DT_LIBRARY_RELEASE + NAMES + fglove + HINTS + ${_libsearchultra} + ${GLOVE5DT_ROOT_DIR}) + +find_library(GLOVE5DT_LIBRARY_DEBUG + NAMES + fgloved + HINTS + ${_libsearchultra} + ${GLOVE5DT_ROOT_DIR}) + + +select_library_configurations(GLOVE5DT) +# As a post condition, either both LIBRARY_RELEASE and LIBRARY_DEBUG are set, or +# neither is. + + +### +# Ultra (2.0) SDK Runtime Libraries +### +if(WIN32) + find_file(GLOVE5DT_RUNTIME_LIBRARY_RELEASE + NAMES + fglove.dll + HINTS + ${_dllsearchultra}) + + find_file(GLOVE5DT_RUNTIME_LIBRARY_DEBUG + NAMES + fgloved.dll + HINTS + ${_dllsearchultra}) +else() + # the library is the runtime library + set(GLOVE5DT_RUNTIME_LIBRARY_RELEASE "${GLOVE5DT_LIBRARY_RELEASE}") + set(GLOVE5DT_RUNTIME_LIBRARY_DEBUG "${GLOVE5DT_LIBRARY_DEBUG}") +endif() + + +select_library_configurations(GLOVE5DT_RUNTIME) + + +### +# Fallback to the 5/16 (1.0) SDK +### +find_path(GLOVE5DT_INCLUDE_DIR + NAMES + fglove.h + HINTS + ${_dirs516}) + +find_library(GLOVE5DT_LIBRARY_RELEASE + NAMES + fglove + HINTS + ${_dirs516}) + +select_library_configurations(GLOVE5DT) + +### +# 5/16 (1.0) SDK Runtime Libraries +### + +if(WIN32) + find_file(GLOVE5DT_RUNTIME_LIBRARY_RELEASE + NAMES + fglove.dll + HINTS + ${_dirs516}) +else() + # the library is the runtime library + set(GLOVE5DT_RUNTIME_LIBRARY_RELEASE "${GLOVE5DT_LIBRARY_RELEASE}") +endif() + +select_library_configurations(GLOVE5DT_RUNTIME) + +# 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(Glove5DT + DEFAULT_MSG + GLOVE5DT_LIBRARY_RELEASE + GLOVE5DT_RUNTIME_LIBRARY_RELEASE + GLOVE5DT_INCLUDE_DIR) + + +if(GLOVE5DT_FOUND) + set(GLOVE5DT_RUNTIME_LIBRARY_DIRS) + foreach(_lib + GLOVE5DT_RUNTIME_LIBRARY_RELEASE + GLOVE5DT_RUNTIME_LIBRARY_DEBUG) + if(${_lib}) + get_filename_component(_libdir ${${_lib}} PATH) + list(APPEND GLOVE5DT_RUNTIME_LIBRARY_DIRS "${_libdir}") + endif() + endforeach() + + clean_directory_list(GLOVE5DT_RUNTIME_LIBRARY_DIRS) + set(GLOVE5DT_INCLUDE_DIRS "${GLOVE5DT_INCLUDE_DIR}") + set(GLOVE5DT_LIBRARIES ${GLOVE5DT_LIBRARY}) + mark_as_advanced(GLOVE5DT_ROOT_DIR) +endif() + + +mark_as_advanced(GLOVE5DT_INCLUDE_DIR + GLOVE5DT_LIBRARY_RELEASE + GLOVE5DT_LIBRARY_DEBUG + GLOVE5DT_RUNTIME_LIBRARY_RELEASE + GLOVE5DT_RUNTIME_LIBRARY_DEBUG) diff --git a/cmake/cmake-modules/FindHIDAPI.cmake b/cmake/cmake-modules/FindHIDAPI.cmake new file mode 100644 index 000000000..646f90026 --- /dev/null +++ b/cmake/cmake-modules/FindHIDAPI.cmake @@ -0,0 +1,46 @@ +# - try to find HIDAPI library +# from http://www.signal11.us/oss/hidapi/ +# +# Cache Variables: (probably not for direct use in your scripts) +# HIDAPI_INCLUDE_DIR +# HIDAPI_LIBRARY +# +# Non-cache variables you might use in your CMakeLists.txt: +# HIDAPI_FOUND +# HIDAPI_INCLUDE_DIRS +# HIDAPI_LIBRARIES +# +# Requires these CMake modules: +# FindPackageHandleStandardArgs (known included with CMake >=2.6.2) +# +# Original Author: +# 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> +# http://academic.cleardefinition.com +# Iowa State University HCI Graduate Program/VRAC +# +# Copyright Iowa State University 2009-2010. +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE_1_0.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) + +find_library(HIDAPI_LIBRARY + NAMES hidapi hidapi-libusb) + +find_path(HIDAPI_INCLUDE_DIR + NAMES hidapi.h + PATH_SUFFIXES + hidapi) + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(HIDAPI + DEFAULT_MSG + HIDAPI_LIBRARY + HIDAPI_INCLUDE_DIR) + +if(HIDAPI_FOUND) + set(HIDAPI_LIBRARIES "${HIDAPI_LIBRARY}") + + set(HIDAPI_INCLUDE_DIRS "${HIDAPI_INCLUDE_DIR}") +endif() + +mark_as_advanced(HIDAPI_INCLUDE_DIR HIDAPI_LIBRARY) diff --git a/cmake/cmake-modules/FindIDLJ.cmake b/cmake/cmake-modules/FindIDLJ.cmake new file mode 100644 index 000000000..04def2212 --- /dev/null +++ b/cmake/cmake-modules/FindIDLJ.cmake @@ -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) diff --git a/cmake/cmake-modules/FindInterSense.cmake b/cmake/cmake-modules/FindInterSense.cmake new file mode 100644 index 000000000..855c9a1d2 --- /dev/null +++ b/cmake/cmake-modules/FindInterSense.cmake @@ -0,0 +1,108 @@ +# - try to find InterSense library +# +# Cache Variables: (probably not for direct use in your scripts) +# INTERSENSE_INCLUDE_DIR +# INTERSENSE_ISENSEC_DIR - location of the isense.c "import library" substitute. +# INTERSENSE_LIBRARY +# +# Non-cache variables you might use in your CMakeLists.txt: +# INTERSENSE_FOUND +# INTERSENSE_INCLUDE_DIRS +# INTERSENSE_LIBRARIES +# +# Requires these CMake modules: +# FindPackageHandleStandardArgs (known included with CMake >=2.6.2) +# +# Author: +# 2013 Eric Marsh <bits@wemarsh.com> +# http://wemarsh.com/ +# Kognitiv Neuroinformatik, Universität Bremen +# +# (building on Ryan Pavlik's templates) +# +# 2013 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> +# http://academic.cleardefinition.com +# Iowa State University HCI Graduate Program/VRAC +# +# 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(INTERSENSE_ROOT_DIR + "${INTERSENSE_ROOT_DIR}" + CACHE + PATH + "Directory to search for the Intersense SDK") + +if(APPLE) + set(_ARCH UniversalLib) +else() + if(CMAKE_SIZEOF_VOID_P MATCHES "8") + set(_IS_ARCH x86_64) + else() + set(_IS_ARCH x86_32) + endif() +endif() + +set(_IS_INSTALLDIRS) +if(APPLE) + set(_IS_SDKDIR MacOSX) +elseif(WIN32) + set(_IS_SDKDIR Windows) + # Default locations, as well as registry places it records install locations, + # if you installed from a (actual or downloaded) product "CD" + foreach(_IS_PROD "IS-900 Software" "InertiaCube Software") + get_filename_component(_IS_REGPATH "[HKEY_LOCAL_MACHINE\\SOFTWARE\\InterSense\\${_IS_PROD};Path]" ABSOLUTE) + if(_IS_REGPATH AND (NOT "${_IS_REGPATH}" STREQUAL "/registry")) + list(APPEND _IS_INSTALLDIRS "${_IS_REGPATH}/SDK") + endif() + list(APPEND _IS_INSTALLDIRS "C:/InterSense/${_IS_PROD}/SDK") + endforeach() +else() # Assume Linux, since that's the only other platform supported by this library + set(_IS_SDKDIR Linux) +endif() + +find_path(INTERSENSE_INCLUDE_DIR + NAMES isense.h + PATHS "${INTERSENSE_ROOT_DIR}" "${INTERSENSE_ROOT_DIR}/SDK" ${_IS_INSTALLDIRS}) + +find_path(INTERSENSE_ISENSEC_DIR + NAMES isense.c + PATHS "${INTERSENSE_ROOT_DIR}" "${INTERSENSE_ROOT_DIR}/SDK" ${_IS_INSTALLDIRS} + PATH_SUFFIXES + "Windows/Sample/Visual C++ 2005" + "Windows/Sample/Visual C++ 2005 (single tracker)" + Linux/Sample + MacOSX/Sample) + +include(FindPackageHandleStandardArgs) + +# This is a weird one - no import library is supplied, and instead, at least on Windows, they use +# an isense.c file to call into the DLL. Not sure if MinGW can link right against the dll in this case. +if(WIN32) + find_package_handle_standard_args(InterSense + DEFAULT_MSG + INTERSENSE_INCLUDE_DIR + INTERSENSE_ISENSEC_DIR) + if(INTERSENSE_FOUND) + set(INTERSENSE_LIBRARIES "") + set(INTERSENSE_INCLUDE_DIRS "${INTERSENSE_INCLUDE_DIR}" "${INTERSENSE_ISENSEC_DIR}") + endif() +else() # Only MSVC on Windows theoretically needs import libraries, so... + find_library(INTERSENSE_LIBRARY + NAMES isense + PATHS "${INTERSENSE_ROOT_DIR}" "${INTERSENSE_ROOT_DIR}/SDK" ${_IS_INSTALLDIRS} + PATH_SUFFIXES "${_IS_SDKDIR}/${_IS_ARCH}") + + find_package_handle_standard_args(InterSense + DEFAULT_MSG + INTERSENSE_LIBRARY + INTERSENSE_INCLUDE_DIR) + + if(INTERSENSE_FOUND) + set(INTERSENSE_LIBRARIES "${INTERSENSE_LIBRARY}" ${CMAKE_DL_LIBS}) + set(INTERSENSE_INCLUDE_DIRS "${INTERSENSE_INCLUDE_DIR}") + endif() +endif() + +mark_as_advanced(INTERSENSE_INCLUDE_DIR INTERSENSE_ISENSEC_DIR INTERSENSE_LIBRARY) diff --git a/cmake/cmake-modules/FindJCCL12.cmake b/cmake/cmake-modules/FindJCCL12.cmake new file mode 100644 index 000000000..a936c945c --- /dev/null +++ b/cmake/cmake-modules/FindJCCL12.cmake @@ -0,0 +1,152 @@ +# - try to find JCCL 1.2 library +# Requires VPR 2.0 (thus FindVPR20.cmake) +# Optionally uses Flagpoll and FindFlagpoll.cmake +# +# This library is a part of VR Juggler 2.2 - you probably want to use +# find_package(VRJuggler22) instead, for an easy interface to this and +# related scripts. See FindVRJuggler22.cmake for more information. +# +# JCCL12_LIBRARY_DIR, library search path +# JCCL12_INCLUDE_DIR, include search path +# JCCL12_LIBRARY, the library to link against +# JCCL12_FOUND, If false, do not try to use this library. +# +# Plural versions refer to this library and its dependencies, and +# are recommended to be used instead, unless you have a good reason. +# +# Useful configuration variables you might want to add to your cache: +# JCCL12_ROOT_DIR - A directory prefix to search +# (a path that contains include/ as a subdirectory) +# +# This script will use Flagpoll, if found, to provide hints to the location +# of this library, but does not use the compiler flags returned by Flagpoll +# directly. +# +# The VJ_BASE_DIR environment variable is also searched (preferentially) +# when searching for this component, so most sane build environments should +# "just work." Note that you need to manually re-run CMake if you 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> <abiryan@ryand.net> +# http://academic.cleardefinition.com +# Iowa State University HCI Graduate Program/VRAC +# +# Copyright Iowa State University 2009-2010. +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE_1_0.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) + + +set(_HUMAN "JCCL 1.2") +set(_RELEASE_NAMES jccl-1_2 libjccl-1_2) +set(_DEBUG_NAMES jccl_d-1_2 libjccl_d-1_2) +set(_DIR jccl-1.2) +set(_HEADER jccl/jcclConfig.h) +set(_FP_PKG_NAME jccl) + +include(SelectLibraryConfigurations) +include(CreateImportedTarget) +include(CleanLibraryList) +include(CleanDirectoryList) + +if(JCCL12_FIND_QUIETLY) + set(_FIND_FLAGS "QUIET") +else() + set(_FIND_FLAGS "") +endif() + +# Try flagpoll. +find_package(Flagpoll QUIET) + +if(FLAGPOLL) + flagpoll_get_include_dirs(${_FP_PKG_NAME} NO_DEPS) + flagpoll_get_library_dirs(${_FP_PKG_NAME} NO_DEPS) +endif() + +set(JCCL12_ROOT_DIR + "${JCCL12_ROOT_DIR}" + CACHE + PATH + "Root directory to search for JCCL") +if(DEFINED VRJUGGLER22_ROOT_DIR) + mark_as_advanced(JCCL12_ROOT_DIR) +endif() +if(NOT JCCL12_ROOT_DIR) + set(JCCL12_ROOT_DIR "${VRJUGGLER22_ROOT_DIR}") +endif() + +set(_ROOT_DIR ${JCCL12_ROOT_DIR}) + +find_path(JCCL12_INCLUDE_DIR + ${_HEADER} + HINTS + "${_ROOT_DIR}" + ${${_FP_PKG_NAME}_FLAGPOLL_INCLUDE_DIRS} + PATH_SUFFIXES + ${_DIR} + include/${_DIR} + include/ + DOC + "Path to ${_HUMAN} includes root") + +find_library(JCCL12_LIBRARY_RELEASE + NAMES + ${_RELEASE_NAMES} + HINTS + "${_ROOT_DIR}" + ${${_FP_PKG_NAME}_FLAGPOLL_LIBRARY_DIRS} + PATH_SUFFIXES + ${_VRJ_LIBSUFFIXES} + DOC + "${_HUMAN} release library full path") + +find_library(JCCL12_LIBRARY_DEBUG + NAMES + ${_DEBUG_NAMES} + HINTS + "${_ROOT_DIR}" + ${${_FP_PKG_NAME}_FLAGPOLL_LIBRARY_DIRS} + PATH_SUFFIXES + ${_VRJ_LIBDSUFFIXES} + DOC + "${_HUMAN} debug library full path") + +select_library_configurations(JCCL12) + +# Dependency +if(NOT VPR20_FOUND) + find_package(VPR20 ${_FIND_FLAGS}) +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(JCCL12 + DEFAULT_MSG + JCCL12_LIBRARY + JCCL12_INCLUDE_DIR + VPR20_FOUND + VPR20_LIBRARIES + VPR20_INCLUDE_DIR) + +if(JCCL12_FOUND) + set(_DEPS ${VPR20_LIBRARIES}) + + set(JCCL12_INCLUDE_DIRS ${JCCL12_INCLUDE_DIR}) + list(APPEND JCCL12_INCLUDE_DIRS ${VPR20_INCLUDE_DIRS}) + clean_directory_list(JCCL12_INCLUDE_DIRS) + + if(VRJUGGLER22_CREATE_IMPORTED_TARGETS) + create_imported_target(JCCL12 ${_DEPS}) + else() + clean_library_list(JCCL12_LIBRARIES) + endif() + + mark_as_advanced(JCCL12_ROOT_DIR) +endif() + +mark_as_advanced(JCCL12_LIBRARY_RELEASE + JCCL12_LIBRARY_DEBUG + JCCL12_INCLUDE_DIR) diff --git a/cmake/cmake-modules/FindJCCL14.cmake b/cmake/cmake-modules/FindJCCL14.cmake new file mode 100644 index 000000000..147bb0122 --- /dev/null +++ b/cmake/cmake-modules/FindJCCL14.cmake @@ -0,0 +1,153 @@ +# - try to find JCCL 1.4 library +# Requires VPR 2.2 (thus FindVPR22.cmake) +# Optionally uses Flagpoll and FindFlagpoll.cmake +# +# This library is a part of VR Juggler 3.0 - you probably want to use +# find_package(VRJuggler30) instead, for an easy interface to this and +# related scripts. See FindVRJuggler30.cmake for more information. +# +# JCCL14_LIBRARY_DIR, library search path +# JCCL14_INCLUDE_DIR, include search path +# JCCL14_LIBRARY, the library to link against +# JCCL14_FOUND, If false, do not try to use this library. +# +# Plural versions refer to this library and its dependencies, and +# are recommended to be used instead, unless you have a good reason. +# +# Useful configuration variables you might want to add to your cache: +# JCCL14_ROOT_DIR - A directory prefix to search +# (a path that contains include/ as a subdirectory) +# +# This script will use Flagpoll, if found, to provide hints to the location +# of this library, but does not use the compiler flags returned by Flagpoll +# directly. +# +# The VJ_BASE_DIR environment variable is also searched (preferentially) +# when searching for this component, so most sane build environments should +# "just work." Note that you need to manually re-run CMake if you 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> <abiryan@ryand.net> +# http://academic.cleardefinition.com +# Iowa State University HCI Graduate Program/VRAC +# Updated for VR Juggler 3.0 by: +# Brandon Newendorp <brandon@newendorp.com> + + +set(_HUMAN "JCCL 1.4") +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) + +include(SelectLibraryConfigurations) +include(CreateImportedTarget) +include(CleanLibraryList) +include(CleanDirectoryList) + +if(JCCL14_FIND_QUIETLY) + set(_FIND_FLAGS "QUIET") +else() + set(_FIND_FLAGS "") +endif() + +# Try flagpoll. +find_package(Flagpoll QUIET) + +if(FLAGPOLL) + flagpoll_get_include_dirs(${_FP_PKG_NAME} NO_DEPS) + flagpoll_get_library_dirs(${_FP_PKG_NAME} NO_DEPS) +endif() + +set(JCCL14_ROOT_DIR + "${JCCL14_ROOT_DIR}" + CACHE + PATH + "Root directory to search for JCCL") +if(DEFINED VRJUGGLER30_ROOT_DIR) + mark_as_advanced(JCCL14_ROOT_DIR) +endif() +if(NOT JCCL14_ROOT_DIR) + set(JCCL14_ROOT_DIR "${VRJUGGLER30_ROOT_DIR}") +endif() + +set(_ROOT_DIR ${JCCL14_ROOT_DIR}) + +find_path(JCCL14_INCLUDE_DIR + ${_HEADER} + HINTS + "${_ROOT_DIR}" + ${${_FP_PKG_NAME}_FLAGPOLL_INCLUDE_DIRS} + PATH_SUFFIXES + ${_DIR} + include/${_DIR} + include/ + DOC + "Path to ${_HUMAN} includes root") + +find_library(JCCL14_LIBRARY_RELEASE + NAMES + ${_RELEASE_NAMES} + HINTS + "${_ROOT_DIR}" + ${${_FP_PKG_NAME}_FLAGPOLL_LIBRARY_DIRS} + PATH_SUFFIXES + ${_VRJ_LIBSUFFIXES} + DOC + "${_HUMAN} release library full path") + +find_library(JCCL14_LIBRARY_DEBUG + NAMES + ${_DEBUG_NAMES} + HINTS + "${_ROOT_DIR}" + ${${_FP_PKG_NAME}_FLAGPOLL_LIBRARY_DIRS} + PATH_SUFFIXES + ${_VRJ_LIBDSUFFIXES} + DOC + "${_HUMAN} debug library full path") + +select_library_configurations(JCCL14) + +# Dependency +if(NOT VPR22_FOUND) + find_package(VPR22 ${_FIND_FLAGS}) +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(JCCL14 + DEFAULT_MSG + JCCL14_LIBRARY + JCCL14_INCLUDE_DIR + VPR22_FOUND + VPR22_LIBRARIES + VPR22_INCLUDE_DIR) + +if(JCCL14_FOUND) + set(_DEPS ${VPR22_LIBRARIES}) + + set(JCCL14_INCLUDE_DIRS ${JCCL14_INCLUDE_DIR}) + list(APPEND JCCL14_INCLUDE_DIRS ${VPR22_INCLUDE_DIRS}) + clean_directory_list(JCCL14_INCLUDE_DIRS) + + if(VRJUGGLER30_CREATE_IMPORTED_TARGETS) + create_imported_target(JCCL14 ${_DEPS}) + else() + clean_library_list(JCCL14_LIBRARIES) + endif() + + mark_as_advanced(JCCL14_ROOT_DIR) +endif() + +mark_as_advanced(JCCL14_LIBRARY_RELEASE + JCCL14_LIBRARY_DEBUG + JCCL14_INCLUDE_DIR) diff --git a/cmake/cmake-modules/FindJsonCpp.cmake b/cmake/cmake-modules/FindJsonCpp.cmake new file mode 100644 index 000000000..28fca2f9f --- /dev/null +++ b/cmake/cmake-modules/FindJsonCpp.cmake @@ -0,0 +1,392 @@ +# - Find jsoncpp - Overarching find module +# This is a over-arching find module to find older jsoncpp versions and those sadly built +# without JSONCPP_WITH_CMAKE_PACKAGE=ON, as well as those built with the cmake config file. +# It also wraps the different versions of the module. +# +# On CMake 3.0 and newer: +# JsonCpp::JsonCpp - Imported target (possibly an interface/alias) to use: +# if anything is populated, this is. If both shared and static are found, then +# this will be the static version on DLL platforms and shared on non-DLL platforms. +# JsonCpp::JsonCppShared - Imported target (possibly an interface/alias) for a +# shared library version. +# JsonCpp::JsonCppStatic - Imported target (possibly an interface/alias) for a +# static library version. +# +# On all CMake versions: (Note that on CMake 2.8.10 and earlier, you may need to use JSONCPP_INCLUDE_DIRS) +# JSONCPP_LIBRARY - wraps JsonCpp::JsonCpp or equiv. +# JSONCPP_LIBRARY_IS_SHARED - if we know for sure JSONCPP_LIBRARY is shared, this is true-ish. We try to "un-set" it if we don't know one way or another. +# JSONCPP_LIBRARY_SHARED - wraps JsonCpp::JsonCppShared or equiv. +# JSONCPP_LIBRARY_STATIC - wraps JsonCpp::JsonCppStatic or equiv. +# JSONCPP_INCLUDE_DIRS - Include directories - should (generally?) not needed if you require CMake 2.8.11+ since it handles target include directories. +# +# JSONCPP_FOUND - True if JsonCpp was found. +# +# Original Author: +# 2016 Ryan Pavlik <ryan.pavlik@gmail.com> +# Incorporates work from the module contributed to VRPN under the same license: +# 2011 Philippe Crassous (ENSAM ParisTech / Institut Image) p.crassous _at_ free.fr +# +# Copyright Philippe Crassous 2011. +# Copyright Sensics, Inc. 2016. +# 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(__jsoncpp_have_namespaced_targets OFF) +set(__jsoncpp_have_interface_support OFF) +if(NOT ("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" LESS 3.0)) + set(__jsoncpp_have_namespaced_targets ON) + set(__jsoncpp_have_interface_support ON) +elseif(("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" EQUAL 2.8) AND "${CMAKE_PATCH_VERSION}" GREATER 10) + set(__jsoncpp_have_interface_support ON) +endif() + +# sets __jsoncpp_have_jsoncpplib based on whether or not we have a real imported jsoncpp_lib target. +macro(_jsoncpp_check_for_real_jsoncpplib) + set(__jsoncpp_have_jsoncpplib FALSE) + if(TARGET jsoncpp_lib) + get_property(__jsoncpp_lib_type TARGET jsoncpp_lib PROPERTY TYPE) + # We make interface libraries. If an actual config module made it, it would be an imported library. + if(NOT __jsoncpp_lib_type STREQUAL "INTERFACE_LIBRARY") + set(__jsoncpp_have_jsoncpplib TRUE) + endif() + endif() + #message(STATUS "__jsoncpp_have_jsoncpplib ${__jsoncpp_have_jsoncpplib}") +endmacro() + +include(FindPackageHandleStandardArgs) +# Ensure that if this is TRUE later, it's because we set it. +set(JSONCPP_FOUND FALSE) +set(__jsoncpp_have_jsoncpplib FALSE) + +# See if we find a CMake config file - there is no harm in calling this more than once, +# and we need to call it at least once every CMake invocation to create the original +# imported targets, since those don't stick around like cache variables. +find_package(jsoncpp QUIET NO_MODULE) + +if(jsoncpp_FOUND) + # Build a string to help us figure out when to invalidate our cache variables. + # start with where we found jsoncpp + set(__jsoncpp_info_string "[${jsoncpp_DIR}]") + + # part of the string to indicate if we found a real jsoncpp_lib (and what kind) + _jsoncpp_check_for_real_jsoncpplib() + + macro(_jsoncpp_apply_map_config target) + if(MSVC) + # Can't do this - different runtimes, incompatible ABI, etc. + set(_jsoncpp_debug_fallback) + else() + set(_jsoncpp_debug_fallback DEBUG) + #osvr_stash_map_config(DEBUG DEBUG RELWITHDEBINFO RELEASE MINSIZEREL NONE) + endif() + # Appending, just in case using project or upstream fixes this. + set_property(TARGET ${target} APPEND PROPERTY MAP_IMPORTED_CONFIG_RELEASE RELEASE RELWITHDEBINFO MINSIZEREL NONE ${_jsoncpp_debug_fallback}) + set_property(TARGET ${target} APPEND PROPERTY MAP_IMPORTED_CONFIG_RELWITHDEBINFO RELWITHDEBINFO RELEASE MINSIZEREL NONE ${_jsoncpp_debug_fallback}) + set_property(TARGET ${target} APPEND PROPERTY MAP_IMPORTED_CONFIG_MINSIZEREL MINSIZEREL RELEASE RELWITHDEBINFO NONE ${_jsoncpp_debug_fallback}) + set_property(TARGET ${target} APPEND PROPERTY MAP_IMPORTED_CONFIG_NONE RELEASE RELWITHDEBINFO MINSIZEREL ${_jsoncpp_debug_fallback}) + if(NOT MSVC) + set_property(TARGET ${target} APPEND PROPERTY MAP_IMPORTED_CONFIG_DEBUG DEBUG RELWITHDEBINFO RELEASE MINSIZEREL NONE) + endif() + endmacro() + if(__jsoncpp_have_jsoncpplib) + list(APPEND __jsoncpp_info_string "[${__jsoncpp_lib_type}]") + _jsoncpp_apply_map_config(jsoncpp_lib) + else() + list(APPEND __jsoncpp_info_string "[]") + endif() + # part of the string to indicate if we found jsoncpp_lib_static + if(TARGET jsoncpp_lib_static) + list(APPEND __jsoncpp_info_string "[T]") + _jsoncpp_apply_map_config(jsoncpp_lib_static) + else() + list(APPEND __jsoncpp_info_string "[]") + endif() +endif() + + +# If we found something, and it's not the exact same as what we've found before... +# NOTE: The contents of this "if" block update only (internal) cache variables! +# (since this will only get run the first CMake pass that finds jsoncpp or that finds a different/updated install) +if(jsoncpp_FOUND AND NOT __jsoncpp_info_string STREQUAL "${JSONCPP_CACHED_JSONCPP_DIR_DETAILS}") + #message("Updating jsoncpp cache variables! ${__jsoncpp_info_string}") + set(JSONCPP_CACHED_JSONCPP_DIR_DETAILS "${__jsoncpp_info_string}" CACHE INTERNAL "" FORCE) + unset(JSONCPP_IMPORTED_LIBRARY_SHARED) + unset(JSONCPP_IMPORTED_LIBRARY_STATIC) + unset(JSONCPP_IMPORTED_LIBRARY) + unset(JSONCPP_IMPORTED_INCLUDE_DIRS) + unset(JSONCPP_IMPORTED_LIBRARY_IS_SHARED) + + # if(__jsoncpp_have_jsoncpplib) is equivalent to if(TARGET jsoncpp_lib) except it excludes our + # "invented" jsoncpp_lib interface targets, made for convenience purposes after this block. + + if(__jsoncpp_have_jsoncpplib AND TARGET jsoncpp_lib_static) + + # A veritable cache of riches - we have both shared and static! + set(JSONCPP_IMPORTED_LIBRARY_SHARED jsoncpp_lib CACHE INTERNAL "" FORCE) + set(JSONCPP_IMPORTED_LIBRARY_STATIC jsoncpp_lib_static CACHE INTERNAL "" FORCE) + if(WIN32 OR CYGWIN OR MINGW) + # DLL platforms: static library should be default + set(JSONCPP_IMPORTED_LIBRARY ${JSONCPP_IMPORTED_LIBRARY_STATIC} CACHE INTERNAL "" FORCE) + set(JSONCPP_IMPORTED_LIBRARY_IS_SHARED FALSE CACHE INTERNAL "" FORCE) + else() + # Other platforms - might require PIC to be linked into shared libraries, so safest to prefer shared. + set(JSONCPP_IMPORTED_LIBRARY ${JSONCPP_IMPORTED_LIBRARY_SHARED} CACHE INTERNAL "" FORCE) + set(JSONCPP_IMPORTED_LIBRARY_IS_SHARED TRUE CACHE INTERNAL "" FORCE) + endif() + + elseif(TARGET jsoncpp_lib_static) + # Well, only one variant, but we know for sure that it's static. + set(JSONCPP_IMPORTED_LIBRARY_STATIC jsoncpp_lib_static CACHE INTERNAL "" FORCE) + set(JSONCPP_IMPORTED_LIBRARY jsoncpp_lib_static CACHE INTERNAL "" FORCE) + set(JSONCPP_IMPORTED_LIBRARY_IS_SHARED FALSE CACHE INTERNAL "" FORCE) + + elseif(__jsoncpp_have_jsoncpplib AND __jsoncpp_lib_type STREQUAL "STATIC_LIBRARY") + # We were able to figure out the mystery library is static! + set(JSONCPP_IMPORTED_LIBRARY_STATIC jsoncpp_lib CACHE INTERNAL "" FORCE) + set(JSONCPP_IMPORTED_LIBRARY jsoncpp_lib CACHE INTERNAL "" FORCE) + set(JSONCPP_IMPORTED_LIBRARY_IS_SHARED FALSE CACHE INTERNAL "" FORCE) + + elseif(__jsoncpp_have_jsoncpplib AND __jsoncpp_lib_type STREQUAL "SHARED_LIBRARY") + # We were able to figure out the mystery library is shared! + set(JSONCPP_IMPORTED_LIBRARY_SHARED jsoncpp_lib CACHE INTERNAL "" FORCE) + set(JSONCPP_IMPORTED_LIBRARY jsoncpp_lib CACHE INTERNAL "" FORCE) + set(JSONCPP_IMPORTED_LIBRARY_IS_SHARED TRUE CACHE INTERNAL "" FORCE) + + elseif(__jsoncpp_have_jsoncpplib) + # One variant, and we have no idea if this is just an old version or if + # this is shared based on the target name alone. Hmm. + set(JSONCPP_IMPORTED_LIBRARY jsoncpp_lib CACHE INTERNAL "" FORCE) + endif() + + # Now, we need include directories. Can't just limit this to old CMakes, since + # new CMakes might be used to build projects designed to support older ones. + if(__jsoncpp_have_jsoncpplib) + get_property(__jsoncpp_interface_include_dirs TARGET jsoncpp_lib PROPERTY INTERFACE_INCLUDE_DIRECTORIES) + if(__jsoncpp_interface_include_dirs) + set(JSONCPP_IMPORTED_INCLUDE_DIRS "${__jsoncpp_interface_include_dirs}" CACHE INTERNAL "" FORCE) + endif() + endif() + if(TARGET jsoncpp_lib_static AND NOT JSONCPP_IMPORTED_INCLUDE_DIRS) + get_property(__jsoncpp_interface_include_dirs TARGET jsoncpp_lib_static PROPERTY INTERFACE_INCLUDE_DIRECTORIES) + if(__jsoncpp_interface_include_dirs) + set(JSONCPP_IMPORTED_INCLUDE_DIRS "${__jsoncpp_interface_include_dirs}" CACHE INTERNAL "" FORCE) + endif() + endif() +endif() + +# As a convenience... +if(TARGET jsoncpp_lib_static AND NOT TARGET jsoncpp_lib) + add_library(jsoncpp_lib INTERFACE) + target_link_libraries(jsoncpp_lib INTERFACE jsoncpp_lib_static) +endif() + +if(JSONCPP_IMPORTED_LIBRARY) + if(NOT JSONCPP_IMPORTED_INCLUDE_DIRS) + # OK, so we couldn't get it from the target... maybe we can figure it out from jsoncpp_DIR. + + # take off the jsoncpp component + get_filename_component(__jsoncpp_import_root "${jsoncpp_DIR}/.." ABSOLUTE) + set(__jsoncpp_hints "${__jsoncpp_import_root}") + # take off the cmake component + get_filename_component(__jsoncpp_import_root "${__jsoncpp_import_root}/.." ABSOLUTE) + list(APPEND __jsoncpp_hints "${__jsoncpp_import_root}") + # take off the lib component + get_filename_component(__jsoncpp_import_root "${__jsoncpp_import_root}/.." ABSOLUTE) + list(APPEND __jsoncpp_hints "${__jsoncpp_import_root}") + # take off one more component in case of multiarch lib + get_filename_component(__jsoncpp_import_root "${__jsoncpp_import_root}/.." ABSOLUTE) + list(APPEND __jsoncpp_hints "${__jsoncpp_import_root}") + + # Now, search. + find_path(JsonCpp_INCLUDE_DIR + NAMES + json/json.h + PATH_SUFFIXES include jsoncpp include/jsoncpp + HINTS ${__jsoncpp_hints}) + if(JsonCpp_INCLUDE_DIR) + mark_as_advanced(JsonCpp_INCLUDE_DIR) + # Note - this does not set it in the cache, in case we find it better at some point in the future! + set(JSONCPP_IMPORTED_INCLUDE_DIRS ${JsonCpp_INCLUDE_DIR}) + endif() + endif() + + find_package_handle_standard_args(JsonCpp + DEFAULT_MSG + jsoncpp_DIR + JSONCPP_IMPORTED_LIBRARY + JSONCPP_IMPORTED_INCLUDE_DIRS) +endif() + +if(JSONCPP_FOUND) + # Create any missing namespaced targets from the config module. + if(__jsoncpp_have_namespaced_targets) + if(JSONCPP_IMPORTED_LIBRARY AND NOT TARGET JsonCpp::JsonCpp) + add_library(JsonCpp::JsonCpp INTERFACE IMPORTED) + set_target_properties(JsonCpp::JsonCpp PROPERTIES + INTERFACE_INCLUDE_DIRECTORIES "${JSONCPP_IMPORTED_INCLUDE_DIRS}" + INTERFACE_LINK_LIBRARIES "${JSONCPP_IMPORTED_LIBRARY}") + endif() + + if(JSONCPP_IMPORTED_LIBRARY_SHARED AND NOT TARGET JsonCpp::JsonCppShared) + add_library(JsonCpp::JsonCppShared INTERFACE IMPORTED) + set_target_properties(JsonCpp::JsonCppShared PROPERTIES + INTERFACE_INCLUDE_DIRECTORIES "${JSONCPP_IMPORTED_INCLUDE_DIRS}" + INTERFACE_LINK_LIBRARIES "${JSONCPP_IMPORTED_LIBRARY_SHARED}") + endif() + + if(JSONCPP_IMPORTED_LIBRARY_STATIC AND NOT TARGET JsonCpp::JsonCppStatic) + add_library(JsonCpp::JsonCppStatic INTERFACE IMPORTED) + set_target_properties(JsonCpp::JsonCppStatic PROPERTIES + INTERFACE_INCLUDE_DIRECTORIES "${JSONCPP_IMPORTED_INCLUDE_DIRS}" + INTERFACE_LINK_LIBRARIES "${JSONCPP_IMPORTED_LIBRARY_STATIC}") + endif() + + # Hide the stuff we didn't, and no longer, need. + if(NOT JsonCpp_LIBRARY) + unset(JsonCpp_LIBRARY CACHE) + endif() + if(NOT JsonCpp_INCLUDE_DIR) + unset(JsonCpp_INCLUDE_DIR CACHE) + endif() + endif() + + set(JSONCPP_LIBRARY ${JSONCPP_IMPORTED_LIBRARY}) + set(JSONCPP_INCLUDE_DIRS ${JSONCPP_IMPORTED_INCLUDE_DIRS}) + if(DEFINED JSONCPP_IMPORTED_LIBRARY_IS_SHARED) + set(JSONCPP_LIBRARY_IS_SHARED ${JSONCPP_IMPORTED_LIBRARY_IS_SHARED}) + else() + unset(JSONCPP_LIBRARY_IS_SHARED) + endif() + + if(JSONCPP_IMPORTED_LIBRARY_SHARED) + set(JSONCPP_LIBRARY_SHARED ${JSONCPP_IMPORTED_LIBRARY_SHARED}) + endif() + + if(JSONCPP_IMPORTED_LIBRARY_STATIC) + set(JSONCPP_LIBRARY_STATIC ${JSONCPP_IMPORTED_LIBRARY_STATIC}) + endif() +endif() + +# Still nothing after looking for the config file: must go "old-school" +if(NOT JSONCPP_FOUND) + # Invoke pkgconfig for hints + find_package(PkgConfig QUIET) + set(_JSONCPP_INCLUDE_HINTS) + set(_JSONCPP_LIB_HINTS) + if(PKG_CONFIG_FOUND) + pkg_search_module(_JSONCPP_PC QUIET jsoncpp) + if(_JSONCPP_PC_INCLUDE_DIRS) + set(_JSONCPP_INCLUDE_HINTS ${_JSONCPP_PC_INCLUDE_DIRS}) + endif() + if(_JSONCPP_PC_LIBRARY_DIRS) + set(_JSONCPP_LIB_HINTS ${_JSONCPP_PC_LIBRARY_DIRS}) + endif() + if(_JSONCPP_PC_LIBRARIES) + set(_JSONCPP_LIB_NAMES ${_JSONCPP_PC_LIBRARIES}) + endif() + endif() + + if(NOT _JSONCPP_LIB_NAMES) + # OK, if pkg-config wasn't able to give us a library name suggestion, then we may + # have to resort to some intense old logic. + set(_JSONCPP_LIB_NAMES jsoncpp) + set(_JSONCPP_PATHSUFFIXES) + + if(CMAKE_SYSTEM_NAME STREQUAL "Linux") + list(APPEND _JSONCPP_PATHSUFFIXES + linux-gcc) # bit of a generalization but close... + endif() + if(CMAKE_COMPILER_IS_GNUCXX AND CMAKE_SYSTEM_NAME STREQUAL "Linux") + list(APPEND + _JSONCPP_LIB_NAMES + json_linux-gcc-${CMAKE_CXX_COMPILER_VERSION}_libmt + json_linux-gcc_libmt) + list(APPEND _JSONCPP_PATHSUFFIXES + linux-gcc-${CMAKE_CXX_COMPILER_VERSION}) + + elseif(MSVC) + if(MSVC_VERSION EQUAL 1200) + list(APPEND _JSONCPP_LIB_NAMES json_vc6_libmt) + list(APPEND _JSONCPP_PATHSUFFIXES msvc6) + elseif(MSVC_VERSION EQUAL 1300) + list(APPEND _JSONCPP_LIB_NAMES json_vc7_libmt) + list(APPEND _JSONCPP_PATHSUFFIXES msvc7) + elseif(MSVC_VERSION EQUAL 1310) + list(APPEND _JSONCPP_LIB_NAMES json_vc71_libmt) + list(APPEND _JSONCPP_PATHSUFFIXES msvc71) + elseif(MSVC_VERSION EQUAL 1400) + list(APPEND _JSONCPP_LIB_NAMES json_vc8_libmt) + list(APPEND _JSONCPP_PATHSUFFIXES msvc80) + elseif(MSVC_VERSION EQUAL 1500) + list(APPEND _JSONCPP_LIB_NAMES json_vc9_libmt) + list(APPEND _JSONCPP_PATHSUFFIXES msvc90) + elseif(MSVC_VERSION EQUAL 1600) + list(APPEND _JSONCPP_LIB_NAMES json_vc10_libmt) + list(APPEND _JSONCPP_PATHSUFFIXES msvc10 msvc100) + endif() + + elseif(MINGW) + list(APPEND _JSONCPP_LIB_NAMES + json_mingw_libmt) + list(APPEND _JSONCPP_PATHSUFFIXES mingw) + + else() + list(APPEND _JSONCPP_LIB_NAMES + json_suncc_libmt + json_vacpp_libmt) + endif() + endif() # end of old logic + + # Actually go looking. + find_path(JsonCpp_INCLUDE_DIR + NAMES + json/json.h + PATH_SUFFIXES jsoncpp + HINTS ${_JSONCPP_INCLUDE_HINTS}) + find_library(JsonCpp_LIBRARY + NAMES + ${_JSONCPP_LIB_NAMES} + PATHS libs + PATH_SUFFIXES ${_JSONCPP_PATHSUFFIXES} + HINTS ${_JSONCPP_LIB_HINTS}) + + find_package_handle_standard_args(JsonCpp + DEFAULT_MSG + JsonCpp_INCLUDE_DIR + JsonCpp_LIBRARY) + + if(JSONCPP_FOUND) + # We already know that the target doesn't exist, let's make it. + # TODO don't know why we get errors like: + # error: 'JsonCpp::JsonCpp-NOTFOUND', needed by 'bin/osvr_json_to_c', missing and no known rule to make it + # when we do the imported target commented out below. So, instead, we make an interface + # target with an alias. Hmm. + + #add_library(JsonCpp::JsonCpp UNKNOWN IMPORTED) + #set_target_properties(JsonCpp::JsonCpp PROPERTIES + # IMPORTED_LOCATION "${JsonCpp_LIBRARY}" + # INTERFACE_INCLUDE_DIRECTORIES "${JsonCpp_INCLUDE_DIR}" + # IMPORTED_LINK_INTERFACE_LANGUAGES "CXX") + + set(JSONCPP_LIBRARY "${JsonCpp_LIBRARY}") + set(JSONCPP_INCLUDE_DIRS "${JsonCpp_INCLUDE_DIR}") + unset(JSONCPP_LIBRARY_IS_SHARED) + + if(__jsoncpp_have_interface_support AND NOT TARGET jsoncpp_interface) + add_library(jsoncpp_interface INTERFACE) + set_target_properties(jsoncpp_interface PROPERTIES + INTERFACE_LINK_LIBRARIES "${JsonCpp_LIBRARY}" + INTERFACE_INCLUDE_DIRECTORIES "${JsonCpp_INCLUDE_DIR}") + endif() + if(__jsoncpp_have_namespaced_targets) + if(NOT TARGET JsonCpp::JsonCpp) + add_library(JsonCpp::JsonCpp ALIAS jsoncpp_interface) + endif() + endif() + endif() +endif() + +if(JSONCPP_FOUND) + mark_as_advanced(jsoncpp_DIR JsonCpp_INCLUDE_DIR JsonCpp_LIBRARY) +endif() diff --git a/cmake/cmake-modules/FindJtTk.cmake b/cmake/cmake-modules/FindJtTk.cmake new file mode 100644 index 000000000..9ef214157 --- /dev/null +++ b/cmake/cmake-modules/FindJtTk.cmake @@ -0,0 +1,455 @@ +# - try to find JTTK library +# +# JTTK_LIBRARY_DIRS, library search path +# JTTK_INCLUDE_DIRS, include search path +# JTTK_{component}_LIBRARY, the library to link against +# JTTK_ENVIRONMENT, environment variables to set +# JTTK_RUNTIME_LIBRARY_DIRS +# JTTK_FOUND, If false, do not try to use this library. +# +# If you have license issues, you might run this command on each JtTk-using target: +# jttk_stamp_binary(<targetname>) +# +# Plural versions refer to this library and its dependencies, and +# are recommended to be used instead, unless you have a good reason. +# +# Useful configuration variables you might want to add to your cache: +# JTTK_ROOT_DIR - A directory prefix to search +# (a path that contains include/ as a subdirectory) +# +# Original Author: +# 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> +# http://academic.cleardefinition.com +# Iowa State University HCI Graduate Program/VRAC +# +# Copyright Iowa State University 2009-2010. +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE_1_0.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) + +include(ListCombinations) +include(CheckVersion) +include(GetDirectoryList) +include(PrefixListGlob) +include(GetCompilerInfoString) +if(WIN32) + include(ProgramFilesGlob) +endif() + +set(JTTK_ROOT_DIR + "${JTTK_ROOT_DIR}" + CACHE + PATH + "Root directory to search for JtTk") + +if(NOT JTTK_CUSTOMER_ID) + set(JTTK_CUSTOMER_ID "$ENV{JTTK_CUSTOMER_ID}") +endif() + +set(JTTK_CUSTOMER_ID + "${JTTK_CUSTOMER_ID}" + CACHE + STRING + "JtTk customer ID, to place in the environment") + + +get_filename_component(_jttk_mod_dir "${CMAKE_CURRENT_LIST_FILE}" PATH) + +if(NOT BITS) + if(CMAKE_SIZEOF_VOID_P MATCHES "8") + set(BITS 64) + else() + set(BITS 32) + endif() +endif() + +set(JTTK_ENVIRONMENT "JTTK_DEV_PLATFORM=${BITS}") +if(JTTK_CUSTOMER_ID) + list(APPEND JTTK_ENVIRONMENT "JTTK_CUSTOMER_ID=${JTTK_CUSTOMER_ID}") +endif() + +if(WIN32 AND MSVC) + if(MSVC90) + set(VC_VER vc9) + set(VC_VER_LONG vc90) + elseif(MSVC80) + set(VC_VER vc8) + set(VC_VER_LONG vc80) + elseif(MSVC71) + set(VC_VER vc71) + set(VC_VER_LONG vc71) + endif() + + if(BITS EQUAL 32) + set(PLATFORM win32) + else() + set(PLATFORM win64) + endif() +endif() + +if(NOT "${3RDPARTYROOT}") + set(3RDPARTYROOT ${CMAKE_SOURCE_DIR}/third-party) +endif() + +set(libsearchdirs) +set(includesearchdirs) +set(_jttklibs) +set(_libsuffixes) +if(WIN32) + program_files_fallback_glob(_dirs "/UGS/JTOpenToolkit/*/dev") + program_files_fallback_glob(_dirs2 "/Siemens/JTOpenToolkit/*/dev") + list(APPEND _dirs ${_dirs2}) + + file(TO_CMAKE_PATH "$ENV{JTTK_DEV_PATH}" _envloc) + list(APPEND _dirs "${_envloc}") + + if(MSVC90) + prefix_list_glob(_vc9_libdirs + "/lib/win_${BITS}vc9/JtTk*.dll" + "${JTTK_ROOT_DIR}" + ${_dirs}) + list(APPEND _jttklibs ${_vc9_libdirs}) + prefix_list_glob(_vc9_libdirs + "/lib/win_${BITS}_vc9/JtTk*.dll" + "${JTTK_ROOT_DIR}" + ${_dirs}) + list(APPEND _jttklibs ${_vc9_libdirs}) + list(APPEND _libsuffixes "/lib/win_${BITS}vc9" "/lib/win_${BITS}_vc9") + endif() + if(MSVC80) + prefix_list_glob(_vc8_libdirs + "/lib/win_${BITS}/JtTk*.dll" + "${JTTK_ROOT_DIR}" + ${_dirs}) + list(APPEND _jttklibs ${_vc8_libdirs}) + list(APPEND _libsuffixes "/lib/win_${BITS}") + endif() + if(MSVC71) + prefix_list_glob(_vc71_libdirs + "/lib/win_${BITS}vs7/JtTk*.dll" + "${dirs}") + list(APPEND _jttklibs "${_vc71_libdirs}") + list(APPEND _libsuffixes "/lib/win_${BITS}vs7") + endif() + +elseif(UNIX) + + get_gcc_version(_gccver) + if("${_gccver}" VERSION_LESS "4.1.0") + set(_compiler "") + else() + set(_compiler "_gcc41") + endif() + + string(TOLOWER "${CMAKE_SYSTEM_NAME}" _sysname) + file(TO_CMAKE_PATH "$ENV{JTTK_DEV_PATH}" _envloc) + prefix_list_glob(_jttklibs + "/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*" + "${JTTK_ROOT_DIR}" + "/usr/" + "/usr/local/" + "/usr/local/siemens/" + "/usr/local/ugs/" + "${_envloc}/") + list(APPEND _jttklibs ${_jttklibs2}) + + list(APPEND _libsuffixes "/lib/${_sysname}_${BITS}${_compiler}") +endif() + +foreach(_lib ${_jttklibs}) + string(REGEX MATCH "JtTk[0-9][0-9]" _jttkver "${_lib}") + if(_jttkver) + string(REGEX + REPLACE + "JtTk([0-9])([0-9])" + "\\1.\\2" + _verstd + "${_jttkver}") + string(REGEX + REPLACE + "JtTk([0-9])([0-9])" + "\\1\\2" + _vernodot + "${_jttkver}") + endif() + check_version(_result JtTk "${_verstd}") + if(_result) + get_filename_component(_libpath "${_lib}" PATH) + list(APPEND JTTK_JTTK_VERSIONS ${_vernodot}) + list(APPEND JTTK_DEV_PATHS "${_libpath}") + else() + #message(STATUS "Found JtTk version ${ver}, does not meet requirements") + endif() +endforeach() + +if(JTTK_JTTK_VERSIONS) + list(SORT JTTK_JTTK_VERSIONS) + list(REVERSE JTTK_JTTK_VERSIONS) +endif() + +### +# Configure JtTk +### + +### +# Find the link library +### +list_combinations(names PREFIXES "JtTk" SUFFIXES ${JTTK_JTTK_VERSIONS}) +find_library(JTTK_JtTk_LIBRARY + NAMES + ${names} + HINTS + ${JTTK_DEV_PATHS} + PATH_SUFFIXES + ${_libsuffixes}) +set(JTTK_LIBRARY "${JTTK_JtTk_LIBRARY}") +set(JTTK_LIBRARIES "${JTTK_JtTk_LIBRARY}") + +### +# Prepare for the rest of our search based off of where we found the link library +### +get_filename_component(JTTK_LIBRARY_DIR "${JTTK_LIBRARY}" PATH) +get_filename_component(JTTK_DEV_PATH + "${JTTK_LIBRARY_DIR}/../.." + ABSOLUTE) + +# Grab JtTk version +string(REGEX MATCH "JtTk[0-9]*" _ver "${JTTK_LIBRARY}") +string(REGEX + REPLACE + "JtTk([0-9])([0-9])" + "\\1.\\2" + JTTK_JTTK_VERSION + "${_ver}") +string(REGEX + REPLACE + "JtTk([0-9])([0-9])" + "\\1\\2" + JTTK_JTTK_VERNODOT + "${_ver}") + +# Grab JT version +file(GLOB _jtdll "${JTTK_LIBRARY_DIR}/*JtBrep*") +string(REGEX MATCH "JtBrep[0-9]*" _jtver "${_jtdll}") +string(REGEX + REPLACE + "JtBrep([0-9])([0-9])" + "\\1\\2" + JTTK_JT_VERNODOT + "${_jtver}") + +# Setup dev path +get_filename_component(JTTK_DEV_PATH + "${JTTK_LIBRARY_DIR}/../../" + ABSOLUTE) + +list(APPEND JTTK_ENVIRONMENT "JTTK_DEV_PATH=${JTTK_DEV_PATH}") +set(ENV{JTTK_DEV_PLATFORM} ${BITS}) +set(ENV{JTTK_DEV_PATH} "${JTTK_DEV_PATH}") + +set(_deps_libs) +set(_deps_includes) +set(_deps_check) + +### +# Find the headers +### +find_path(JTTK_INCLUDE_DIR + JtTk/JtkEntity.h + HINTS + ${JTTK_DEV_PATH}/include) + +if(WIN32) + ### + # Find the DLL's + ### + + # Find the versioned DLL's + foreach(dll Jt JtBrep JtLibra JtSimp JtSupt JtXTBrep ParaSupt) + find_file(JTTK_${dll}_DLL + NAMES + "${dll}${JTTK_JT_VERNODOT}.dll" + HINTS + "${JTTK_LIBRARY_DIR}") + list(APPEND JTTK_DLLS ${JTTK_${dll}_DLL}) + mark_as_advanced(JTTK_${dll}_DLL) + endforeach() + + # Find the unversioned DLL's and the matching JtTk dll + foreach(dll psbodyshop pskernel psxttoolkit JtTk${JTTK_JTTK_VERNODOT}) + list_combinations(names PREFIXES "${dll}" SUFFIXES ".dll") + find_file(JTTK_${dll}_DLL + NAMES + ${names} + HINTS + "${JTTK_LIBRARY_DIR}") + list(APPEND JTTK_DLLS ${JTTK_${dll}_DLL}) + mark_as_advanced(JTTK_${dll}_DLL) + endforeach() + + get_directory_list(JTTK_RUNTIME_LIBRARY_DIRS ${JTTK_DLLS}) + +elseif(UNIX) + + foreach(_lib Jt JtBrep JtLibra JtSimp JtSupt JtXTBrep ParaSupt) + find_library(JTTK_${_lib}_LIBRARY + NAMES + "${_lib}${JTTK_JT_VERNODOT}" + HINTS + "${JTTK_LIBRARY_DIR}") + list(APPEND _deps_libs "${JTTK_${_lib}_LIBRARY}") + list(APPEND _deps_check JTTK_${_lib}_LIBRARY) + mark_as_advanced(JTTK_${_lib}_LIBRARY) + endforeach() + + # Find the unversioned libs + foreach(_lib psbodyshop pskernel psxttoolkit eaiunicode) + find_library(JTTK_${_lib}_LIBRARY + NAMES + ${_lib} + HINTS + "${JTTK_LIBRARY_DIR}") + list(APPEND _deps_libs "${JTTK_${_lib}_LIBRARY}") + list(APPEND _deps_check JTTK_${_lib}_LIBRARY) + mark_as_advanced(JTTK_${_lib}_LIBRARY) + endforeach() + + # Find stamper + #list(APPEND _deps_check JTTK_KEYS) + + find_program(JTTK_STAMP_COMMAND + stampkey + HINTS + "${JTTK_DEV_PATH}/../bin") + list(APPEND _deps_check JTTK_STAMP_COMMAND) + + find_program(JTTK_STAMP_PLATFORM_COMMAND + stampkey + HINTS + "${JTTK_DEV_PATH}/../bin/${_sysname}") + list(APPEND _deps_check JTTK_STAMP_PLATFORM_COMMAND) + + + if("${JTTK_KEYS}" STREQUAL "${JTTK_KEYS_AUTO}" OR NOT JTTK_KEYS) + find_file(JTTK_INSTALL_LOG + install.log + HINTS + "${JTTK_DEV_PATH}/.." + NO_DEFAULT_PATH) + #list(APPEND _deps_check JTTK_INSTALL_LOG) + mark_as_advanced(JTTK_INSTALL_LOG) + + if(JTTK_INSTALL_LOG) + file(READ "${JTTK_INSTALL_LOG}" _log) + string(REGEX MATCHALL "..key ([0-9A-Z])+" _keylines "${_log}") + set(JTTK_KEYS) + foreach(_keyline ${_keylines}) + string(REGEX + REPLACE + "..key (([0-9A-Z])+)$" + "\\1" + _key + "${_keyline}") + list(APPEND JTTK_KEYS "${_key}") + message(STATUS "Found JtTk key: ${_key}") + endforeach() + set(JTTK_KEYS + "${JTTK_KEYS}" + CACHE + STRING + "A semi-colon separated list of JtTk keys to stamp on the binaries." + FORCE) + set(JTTK_KEYS_AUTO + "${JTTK_KEYS}" + CACHE + INTERNAL + "The keys we auto-detected" + FORCE) + endif() + else() + foreach(_key ${JTTK_KEYS}) + message(STATUS "Using cached JtTk key: ${_key}") + endforeach() + set(JTTK_KEYS + "${JTTK_KEYS}" + CACHE + STRING + "A semi-colon separated list of JtTk keys to stamp on the binaries.") + endif() + + # Find dependencies + find_library(JTTK_MATH_LIBRARY m) + mark_as_advanced(JTTK_MATH_LIBRARY) + list(APPEND _deps_check JTTK_MATH_LIBRARY) + list(APPEND _deps_libs ${JTTK_MATH_LIBRARY}) + + if(NOT X11_FOUND) + find_package(X11) + endif() + list(APPEND _deps_check X11_FOUND) + list(APPEND _deps_libs ${X11_LIBRARIES}) + list(APPEND _deps_includes ${X11_INCLUDE_DIRS}) + + if(NOT OPENGL_FOUND) + find_package(OpenGL) + endif() + list(APPEND _deps_check OPENGL_FOUND) + list(APPEND _deps_libs ${OPENGL_LIBRARIES}) + list(APPEND _deps_includes ${OPENGL_INCLUDE_DIR}) + + if(NOT THREADS_FOUND) + find_package(Threads) + endif() + list(APPEND _deps_check THREADS_FOUND) + list(APPEND _deps_libs ${CMAKE_THREAD_LIBS_INIT}) + + get_directory_list(JTTK_RUNTIME_LIBRARY_DIRS ${_deps_libs}) +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(JtTk + DEFAULT_MSG + JTTK_JtTk_LIBRARY + JTTK_CUSTOMER_ID + JTTK_INCLUDE_DIR + ${_deps_check}) + +if(JTTK_FOUND) + set(JTTK_INCLUDE_DIRS "${JTTK_INCLUDE_DIR}" ${_deps_includes}) + set(JTTK_LIBRARIES "${JTTK_LIBRARY}" ${_deps_libs}) + mark_as_advanced(JTTK_CUSTOMER_ID JTTK_ROOT_DIR) +endif() + +function(jttk_stamp_binary _target) + if(UNIX) + get_target_property(_binary "${_target}" LOCATION) + configure_file("${_jttk_mod_dir}/FindJtTk.stampkey.cmake.in" + "${CMAKE_CURRENT_BINARY_DIR}/${_target}.stampkey.cmake" + @ONLY) + add_custom_command(TARGET + "${_target}" + POST_BUILD + COMMAND + "${CMAKE_COMMAND}" + -P + "${CMAKE_CURRENT_BINARY_DIR}/${_target}.stampkey.cmake" + COMMENT + "Stamping executable ${_binary} with JtTk keys..." + VERBATIM) + endif() +endfunction() + +mark_as_advanced(JTTK_JtTk_LIBRARY + JTTK_INCLUDE_DIR + JTTK_KEYS + JTTK_STAMP_COMMAND + JTTK_STAMP_PLATFORM_COMMAND) diff --git a/cmake/cmake-modules/FindJtTk.stampkey.cmake.in b/cmake/cmake-modules/FindJtTk.stampkey.cmake.in new file mode 100644 index 000000000..53985d26f --- /dev/null +++ b/cmake/cmake-modules/FindJtTk.stampkey.cmake.in @@ -0,0 +1,42 @@ +# Small script to stamp the JtTk license key on an executable +# +# Original Author: +# 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> +# http://academic.cleardefinition.com +# Iowa State University HCI Graduate Program/VRAC + +set(ENV{JTTK_DEV_PLATFORM} @BITS@) +set(ENV{JTTK_DEV_PATH} @JTTK_DEV_PATH@) +set(ENV{LD_LIBRARY_PATH} "$ENV{LD_LIBRARY_PATH}:@JTTK_LIBRARY_DIR@") +set(ENV{PATH} "$ENV{PATH}:@JTTK_DEV_PATH@/../bin/") + +message(STATUS "The stamp commands are being run with these environment variables:") +execute_process(COMMAND ${CMAKE_COMMAND} -E environment) + +set(JTTK_KEYS @JTTK_KEYS@) +foreach(_key ${JTTK_KEYS}) + execute_process(COMMAND ${_command} @JTTK_STAMP_COMMAND@ ${_key} @_binary@ + RESULT_VARIABLE _result) + + if(NOT "${_result}" EQUAL "0") + message(STATUS "Failed (error ${_result}) running stamp command: +@JTTK_STAMP_COMMAND@ ${_key} @_binary@") + + else() + message(STATUS "Succeeded running stamp command: +@JTTK_STAMP_COMMAND@ ${_key} @_binary@") + endif() + + execute_process(COMMAND @JTTK_STAMP_PLATFORM_COMMAND@ ${_key} @_binary@ + RESULT_VARIABLE _result) + + if(NOT "${_result}" EQUAL "0") + message(STATUS "Failed (error ${_result}) running stamp command: +@JTTK_STAMP_PLATFORM_COMMAND@ ${_key} @_binary@") + + else() + message(STATUS "Succeeded running stamp command: +@JTTK_STAMP_PLATFORM_COMMAND@ ${_key} @_binary@") + endif() + +endforeach() diff --git a/cmake/cmake-modules/FindLAPACKLibs.cmake b/cmake/cmake-modules/FindLAPACKLibs.cmake new file mode 100644 index 000000000..51d0c41dd --- /dev/null +++ b/cmake/cmake-modules/FindLAPACKLibs.cmake @@ -0,0 +1,91 @@ +# - Try to find LAPACK and BLAS libraries +# Once done, this will define +# LAPACKLIBS_LIBRARIES, all libraries to link against +# LAPACKLIBS_FOUND, If false, do not try to use LAPACK library features. +# +# Users may wish to set: +# LAPACKLIBS_ROOT_DIR, location to start searching for LAPACK libraries +# +# Original Author: +# 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> +# http://academic.cleardefinition.com +# Iowa State University HCI Graduate Program/VRAC +# +# Copyright Iowa State University 2009-2010. +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE_1_0.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) + +set(_check) + +set(LAPACKLIBS_ROOT_DIR + "${LAPACKLIBS_ROOT_DIR}" + CACHE + PATH + "Directory to search for LAPACK libraries") + +if(APPLE) + find_library(LAPACKLIBS_VECLIB_FRAMEWORK veclib) + find_library(LAPACKLIBS_ACCELERATE_FRAMEWORK accelerate) + mark_as_advanced(LAPACKLIBS_VECLIB_FRAMEWORK + LAPACKLIBS_ACCELERATE_FRAMEWORK) + + set(LAPACKLIBS_LIBRARIES + "${LAPACKLIBS_VECLIB_FRAMEWORK}" + "${LAPACKLIBS_ACCELERATE_FRAMEWORK}") + list(APPEND + _check + LAPACKLIBS_VECLIB_FRAMEWORK + LAPACKLIBS_ACCELERATE_FRAMEWORK) +elseif(WIN32) + # Tested to work with the files from http://www.fi.muni.cz/~xsvobod2/misc/lapack/ + # You might also see http://icl.cs.utk.edu/lapack-for-windows/clapack/index.html for + # the libraries and headers. + + # Good luck! + + find_library(LAPACKLIBS_LAPACK_LIBRARY + NAMES + lapack_win32_MT + lapack + lapackd + HINTS + ${LAPACKLIBS_ROOT_DIR} + PATH_SUFFIXES + lapack-MT-release + lapack-MT-debug + lib) + find_library(LAPACKLIBS_BLAS_LIBRARY + NAMES + blas_win32_MT + blas + blasd + HINTS + ${LAPACKLIBS_ROOT_DIR} + PATH_SUFFIXES + lapack-MT-release + lapack-MT-debug + lib) + set(LAPACKLIBS_LIBRARIES + "${LAPACKLIBS_LAPACK_LIBRARY}" + "${LAPACKLIBS_BLAS_LIBRARY}") + list(APPEND _check LAPACKLIBS_LAPACK_LIBRARY LAPACKLIBS_BLAS_LIBRARY) +elseif(UNIX) + # All other Linux/Unix should have lapack without a fuss + list(APPEND _check LAPACKLIBS_LAPACK_LIBRARY) + find_library(LAPACKLIBS_LAPACK_LIBRARY lapack) + set(LAPACKLIBS_LIBRARIES "${LAPACKLIBS_LAPACK_LIBRARY}") +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(LAPACKLibs + DEFAULT_MSG + ${_check}) + +if(LAPACKLIBS_FOUND) + mark_as_advanced(LAPACKLIBS_ROOT_DIR + LAPACKLIBS_LAPACK_LIBRARY + LAPACKLIBS_BLAS_LIBRARY) +endif() diff --git a/cmake/cmake-modules/FindLibFreespace.cmake b/cmake/cmake-modules/FindLibFreespace.cmake new file mode 100644 index 000000000..b83e837bb --- /dev/null +++ b/cmake/cmake-modules/FindLibFreespace.cmake @@ -0,0 +1,78 @@ +# - try to find Hillcrest Labs' libfreespace library +# +# Cache Variables: (probably not for direct use in your scripts) +# LIBFREESPACE_INCLUDE_DIR +# LIBFREESPACE_LIBRARY +# +# Non-cache variables you might use in your CMakeLists.txt: +# LIBFREESPACE_FOUND +# LIBFREESPACE_INCLUDE_DIRS +# LIBFREESPACE_LIBRARIES +# +# Requires these CMake modules: +# FindPackageHandleStandardArgs (known included with CMake >=2.6.2) +# +# Original Author: +# 2014 Ryan Pavlik <ryan@sensics.com> <abiryan@ryand.net> +# http://academic.cleardefinition.com +# +# Copyright Sensics, Inc. 2014. +# 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(LIBFREESPACE_ROOT_DIR + "${LIBFREESPACE_ROOT_DIR}" + CACHE + PATH + "Directory to search for libfreespace") + +find_library(LIBFREESPACE_LIBRARY + NAMES + freespace + libfreespace + PATHS + "${LIBFREESPACE_ROOT_DIR}" + PATH_SUFFIXES + lib) + +get_filename_component(_libdir "${LIBFREESPACE_LIBRARY}" PATH) + +find_path(LIBFREESPACE_INCLUDE_DIR + NAMES + freespace/freespace.h + HINTS + "${_libdir}" + "${_libdir}/.." + PATHS + "${LIBFREESPACE_ROOT_DIR}" + PATH_SUFFIXES + include/) + + +include(FindPackageHandleStandardArgs) +if(WIN32) + find_package(WinHID QUIET) + find_package_handle_standard_args(LibFreespace + DEFAULT_MSG + LIBFREESPACE_LIBRARY + LIBFREESPACE_INCLUDE_DIR + WINHID_LIBRARIES) +else() + find_package_handle_standard_args(LibFreespace + DEFAULT_MSG + LIBFREESPACE_LIBRARY + LIBFREESPACE_INCLUDE_DIR) +endif() + +if(LIBFREESPACE_FOUND) + set(LIBFREESPACE_LIBRARIES "${LIBFREESPACE_LIBRARY}") + if(WIN32) + list(APPEND LIBFREESPACE_LIBRARIES ${WINHID_LIBRARIES}) + endif() + set(LIBFREESPACE_INCLUDE_DIRS "${LIBFREESPACE_INCLUDE_DIR}") + mark_as_advanced(LIBFREESPACE_ROOT_DIR) +endif() + +mark_as_advanced(LIBFREESPACE_INCLUDE_DIR + LIBFREESPACE_LIBRARY) diff --git a/cmake/cmake-modules/FindLibusb1.cmake b/cmake/cmake-modules/FindLibusb1.cmake new file mode 100644 index 000000000..b161c81e0 --- /dev/null +++ b/cmake/cmake-modules/FindLibusb1.cmake @@ -0,0 +1,96 @@ +# - try to find libusb-1 library +# +# Cache Variables: (probably not for direct use in your scripts) +# LIBUSB1_LIBRARY +# LIBUSB1_INCLUDE_DIR +# +# Non-cache variables you should use in your CMakeLists.txt: +# LIBUSB1_LIBRARIES +# LIBUSB1_INCLUDE_DIRS +# LIBUSB1_FOUND - if this is not true, do not attempt to use this library +# +# Requires these CMake modules: +# ProgramFilesGlob +# FindPackageHandleStandardArgs (known included with CMake >=2.6.2) +# +# Original Author: +# 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> +# http://academic.cleardefinition.com +# Iowa State University HCI Graduate Program/VRAC +# +# Copyright Iowa State University 2009-2010. +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE_1_0.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) + + +set(LIBUSB1_ROOT_DIR + "${LIBUSB1_ROOT_DIR}" + CACHE + PATH + "Root directory to search for libusb-1") + +if(WIN32) + include(ProgramFilesGlob) + program_files_fallback_glob(_dirs "LibUSB-Win32") + if(CMAKE_SIZEOF_VOID_P EQUAL 8) + if(MSVC) + set(_lib_suffixes lib/msvc_x64 MS64/static) + endif() + else() + if(MSVC) + set(_lib_suffixes lib/msvc MS32/static) + elseif(COMPILER_IS_GNUCXX) + set(_lib_suffixes lib/gcc) + endif() + endif() +else() + set(_lib_suffixes) + find_package(PkgConfig QUIET) + if(PKG_CONFIG_FOUND) + pkg_check_modules(PC_LIBUSB1 libusb-1.0) + endif() +endif() + +find_path(LIBUSB1_INCLUDE_DIR + NAMES + libusb.h + PATHS + ${PC_LIBUSB1_INCLUDE_DIRS} + ${PC_LIBUSB1_INCLUDEDIR} + ${_dirs} + HINTS + "${LIBUSB1_ROOT_DIR}" + PATH_SUFFIXES + include/libusb-1.0 + include + libusb-1.0) + +find_library(LIBUSB1_LIBRARY + NAMES + libusb-1.0 + usb-1.0 + PATHS + ${PC_LIBUSB1_LIBRARY_DIRS} + ${PC_LIBUSB1_LIBDIR} + ${_dirs} + HINTS + "${LIBUSB1_ROOT_DIR}" + PATH_SUFFIXES + ${_lib_suffixes}) + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(Libusb1 + DEFAULT_MSG + LIBUSB1_LIBRARY + LIBUSB1_INCLUDE_DIR) + +if(LIBUSB1_FOUND) + set(LIBUSB1_LIBRARIES "${LIBUSB1_LIBRARY}") + + set(LIBUSB1_INCLUDE_DIRS "${LIBUSB1_INCLUDE_DIR}") + + mark_as_advanced(LIBUSB1_ROOT_DIR) +endif() + +mark_as_advanced(LIBUSB1_INCLUDE_DIR LIBUSB1_LIBRARY) diff --git a/cmake/cmake-modules/FindLuabind.cmake b/cmake/cmake-modules/FindLuabind.cmake new file mode 100644 index 000000000..29062d3af --- /dev/null +++ b/cmake/cmake-modules/FindLuabind.cmake @@ -0,0 +1,73 @@ +# - try to find Luabind +# +# Users may optionally supply: +# LUABIND_ROOT_DIR - a prefix to start searching +# +# Non-cache variables you might use in your CMakeLists.txt: +# LUABIND_FOUND +# LUABIND_DEFINITIONS +# LUABIND_INCLUDE_DIRS +# LUABIND_LIBRARIES +# +# Requires these CMake modules: +# FindPackageHandleStandardArgs (known included with CMake >=2.6.2) +# +# Original Author: +# 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> +# http://academic.cleardefinition.com +# Iowa State University HCI Graduate Program/VRAC +# +# Copyright Iowa State University 2009-2010. +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE_1_0.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) + +set(LUABIND_ROOT_DIR + "${LUABIND_ROOT_DIR}" + CACHE + PATH + "Path to search for Luabind") + +### +# Dependencies +### +find_package(Lua51 QUIET) + +### +# Configure Luabind +### +find_path(LUABIND_INCLUDE_DIR + NAMES + luabind/luabind.hpp + HINTS + "${LUABIND_ROOT_DIR}" + PATH_SUFFIXES + include) +mark_as_advanced(LUABIND_INCLUDE_DIR) + +find_library(LUABIND_LIBRARY + NAMES + luabind + HINTS + "${LUABIND_ROOT_DIR}" + PATH_SUFFIXES + lib64 + lib) +mark_as_advanced(LUABIND_LIBRARY) + +# 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(Luabind + DEFAULT_MSG + LUABIND_LIBRARY + LUABIND_INCLUDE_DIR + LUA_LIBRARIES + LUA_INCLUDE_DIR) + +if(LUABIND_FOUND) + set(LUABIND_INCLUDE_DIRS "${LUABIND_INCLUDE_DIR}" "${LUA_INCLUDE_DIR}") + set(LUABIND_LIBRARIES "${LUABIND_LIBRARY}" ${LUA_LIBRARIES}) + set(LUABIND_DEFINITIONS "-DLUABIND_DYNAMIC_LINK") + mark_as_advanced(LUABIND_ROOT_DIR) +endif() diff --git a/cmake/cmake-modules/FindLyX.cmake b/cmake/cmake-modules/FindLyX.cmake new file mode 100644 index 000000000..7ec33b78d --- /dev/null +++ b/cmake/cmake-modules/FindLyX.cmake @@ -0,0 +1,144 @@ +# - Try to find LyX, and define some custom commands to export from LyX +# +# Once done, this will define: +# LYX_FOUND - system has LyX +# LYX_COMMAND - the command to run +# +# and the following new functions: +# lyx_export(<format> <extension-without-leading-dot> <output-variable> +# INPUT <lyx-file> [...] +# [OUTPUT_TO_SOURCE_DIR] +# [ EXTRA_DEPS <bibtex-or-other-file> [...] ]) - the base function +# +# These shortcut functions all have the same syntax: +# lyx_export_to_XXX(<output-variable> +# INPUT <lyx-file> [...] +# [OUTPUT_TO_SOURCE_DIR] +# [ EXTRA_DEPS <bibtex-or-other-file> [...] ]) +# +# Available shortcuts: +# lyx_export_to_docbook_xml +# lyx_export_to_docbook +# lyx_export_to_pdf +# lyx_export_to_pdf_via_pdflatex +# lyx_export_to_pdf_via_dvi +# +# Useful configuration variables you might want to add to your cache: +# LYX_ROOT_DIR - A directory prefix to search +# +# Original Author: +# 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> +# http://academic.cleardefinition.com +# Iowa State University HCI Graduate Program/VRAC +# +# Copyright Iowa State University 2009-2010. +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE_1_0.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) + + +set(LYX_ROOT_DIR + "${LYX_ROOT_DIR}" + CACHE + PATH + "Directory to start our search in") + +find_program(LYX_COMMAND + NAMES + lyx + HINTS + "${LYX_ROOT_DIR}" + PATH_SUFFIXES + bin) + +# 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(LyX DEFAULT_MSG LYX_COMMAND) + +if(LYX_FOUND) + mark_as_advanced(LYX_ROOT_DIR) +endif() + +mark_as_advanced(LYX_COMMAND) + +function(lyx_export _format _extension _outvar) + set(_nowhere) + set(_curdest _nowhere) + set(_val_args EXTRA_DEPS INPUT) + set(_bool_args OUTPUT_TO_SOURCE_DIR) + foreach(_arg ${_val_args} ${_bool_args}) + set(${_arg}) + endforeach() + foreach(_element ${ARGN}) + list(FIND _val_args "${_element}" _val_arg_find) + list(FIND _bool_args "${_element}" _bool_arg_find) + if("${_val_arg_find}" GREATER "-1") + set(_curdest "${_element}") + elseif("${_bool_arg_find}" GREATER "-1") + set("${_element}" ON) + set(_curdest _nowhere) + else() + list(APPEND ${_curdest} "${_element}") + endif() + endforeach() + + if(_nowhere) + message(FATAL_ERROR "Syntax error in use of a lyx_export command!") + endif() + + set(_out) + set(_outname) + foreach(_file ${INPUT}) + get_filename_component(_base "${_file}" NAME_WE) + + if(NOT OUTPUT_TO_SOURCE_DIR) + set(_outname "${CMAKE_CURRENT_BINARY_DIR}/${_base}.${_extension}") + else() + set(_outname "${CMAKE_CURRENT_SOURCE_DIR}/${_base}.${_extension}") + endif() + + list(APPEND _out "${_outname}") + if(LYX_COMMAND) + add_custom_command(OUTPUT "${_outname}" + COMMAND ${CMAKE_COMMAND} -E remove "${_outname}" + #COMMAND ${LYX_COMMAND} "${_file}" --export ${_format} + COMMAND ${LYX_COMMAND} "${_file}" + --execute + "buffer-export-custom ${_format} ${CMAKE_COMMAND} -E copy '$$$$FName' '${_outname}'" + --execute + "lyx-quit" + MAIN_DEPENDENCY "${_file}" + WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}" + DEPENDS "${_file}" ${EXTRA_DEPS} + COMMENT "Exporting ${_file} to ${_format}...") + endif() + endforeach() + + set(${_outvar} ${_out} PARENT_SCOPE) +endfunction() + +function(lyx_export_to_docbook_xml _outvar) + lyx_export(docbook-xml xml ${_outvar} ${ARGN}) + set(${_outvar} ${${_outvar}} PARENT_SCOPE) +endfunction() + +function(lyx_export_to_docbook _outvar) + lyx_export(docbook sgml ${_outvar} ${ARGN}) + set(${_outvar} ${${_outvar}} PARENT_SCOPE) +endfunction() + +function(lyx_export_to_pdf _outvar) + lyx_export(pdf pdf ${_outvar} ${ARGN}) + set(${_outvar} ${${_outvar}} PARENT_SCOPE) +endfunction() + +function(lyx_export_to_pdf_via_pdflatex _outvar) + lyx_export(pdf2 pdf ${_outvar} ${ARGN}) + set(${_outvar} ${${_outvar}} PARENT_SCOPE) +endfunction() + +function(lyx_export_to_pdf_via_dvi _outvar) + lyx_export(pdf3 pdf ${_outvar} ${ARGN}) + set(${_outvar} ${${_outvar}} PARENT_SCOPE) +endfunction() diff --git a/cmake/cmake-modules/FindMacHID.cmake b/cmake/cmake-modules/FindMacHID.cmake new file mode 100644 index 000000000..d96baceb5 --- /dev/null +++ b/cmake/cmake-modules/FindMacHID.cmake @@ -0,0 +1,66 @@ +# - try to find Mac HID frameworks +# +# Cache Variables: (probably not for direct use in your scripts) +# MACHID_CoreFoundation_LIBRARY +# MACHID_CoreFoundation_INCLUDE_DIR +# MACHID_IOKit_LIBRARY +# MACHID_IOKit_INCLUDE_DIR +# MACOSX_HID_UINT32T (from CheckMacHIDAPI) +# +# Non-cache variables you should use in your CMakeLists.txt: +# MACHID_DEFINITIONS +# MACHID_LIBRARIES +# MACHID_INCLUDE_DIRS +# MACHID_FOUND - if this is not true, do not attempt to use this library +# +# Requires these CMake modules: +# CheckMacHIDAPI +# FindPackageHandleStandardArgs (known included with CMake >=2.6.2) +# +# Original Author: +# 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> +# http://academic.cleardefinition.com +# Iowa State University HCI Graduate Program/VRAC +# +# Copyright Iowa State University 2009-2010. +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE_1_0.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) + +if(APPLE) + find_library(MACHID_CoreFoundation_LIBRARY CoreFoundation) + find_path(MACHID_CoreFoundation_INCLUDE_DIR + CoreFoundation/CoreFoundation.h) + + find_library(MACHID_IOKit_LIBRARY IOKit) + find_path(MACHID_IOKit_INCLUDE_DIR IOKit/hid/IOHIDLib.h) + + include(CheckMacHIDAPI) + set(MACHID_DEFINITIONS "-DMACOSX_HID_UINT32T=${MACOSX_HID_UINT32T}") + + include(FindPackageHandleStandardArgs) + find_package_handle_standard_args(MacHID + DEFAULT_MSG + MACHID_CoreFoundation_LIBRARY + MACHID_CoreFoundation_INCLUDE_DIR + MACHID_IOKit_LIBRARY + MACHID_IOKit_INCLUDE_DIR + MACOSX_HID_UINT32T) + +endif() + +if(MACHID_FOUND) + set(MACHID_LIBRARIES + "${MACHID_CoreFoundation_LIBRARY}" + "${MACHID_IOKit_LIBRARY}") + + set(MACHID_INCLUDE_DIRS + "${MACHID_CoreFoundation_INCLUDE_DIR}" + "${MACHID_IOKit_INCLUDE_DIR}") + + mark_as_advanced(MACHID_CoreFoundation_LIBRARY + MACHID_CoreFoundation_INCLUDE_DIR + MACHID_IOKit_LIBRARY + MACHID_IOKit_INCLUDE_DIR) + +endif() diff --git a/cmake/cmake-modules/FindMarkdown.cmake b/cmake/cmake-modules/FindMarkdown.cmake new file mode 100644 index 000000000..63b930532 --- /dev/null +++ b/cmake/cmake-modules/FindMarkdown.cmake @@ -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) diff --git a/cmake/cmake-modules/FindOVR.cmake b/cmake/cmake-modules/FindOVR.cmake new file mode 100644 index 000000000..fa1473f7c --- /dev/null +++ b/cmake/cmake-modules/FindOVR.cmake @@ -0,0 +1,219 @@ +# - try to find Oculus VR's SDK for Oculus Rift support +# +# Cache Variables: (probably not for direct use in your scripts) +# OVR_INCLUDE_DIR +# OVR_SOURCE_DIR +# OVR_LIBRARY +# +# Non-cache variables you might use in your CMakeLists.txt: +# OVR_FOUND +# OVR_INCLUDE_DIRS +# OVR_LIBRARIES +# +# Requires these CMake modules: +# FindPackageHandleStandardArgs (known included with CMake >=2.6.2) +# +# Original Author: +# 2014 Kevin M. Godby <kevin@godby.org> +# +# 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(OVR_ROOT_DIR + "${OVR_ROOT_DIR}" + CACHE + PATH + "Directory to search for Oculus SDK") + +# The OVR library is built in a directory tree that varies based on platform, +# architecture, and compiler. +# +# The libraries live in one of the following locations: +# +# Lib/Win32/VS2012/libovrd.lib +# Lib/Win32/VS2012/libovr.lib +# Lib/Win32/VS2013/libovrd.lib +# Lib/Win32/VS2013/libovr.lib +# Lib/Win32/VS2010/libovrd.lib +# Lib/Win32/VS2010/libovr.lib +# Lib/x64/VS2012/libovr64d.lib +# Lib/x64/VS2012/libovr64.lib +# Lib/x64/VS2013/libovr64d.lib +# Lib/x64/VS2013/libovr64.lib +# Lib/x64/VS2010/libovr64d.lib +# Lib/x64/VS2010/libovr64.lib +# Lib/Linux/Release/x86_64/libovr.a +# Lib/Linux/Debug/x86_64/libovr.a +# Lib/Linux/Release/i386/libovr.a +# Lib/Linux/Debug/i386/libovr.a +# Lib/Mac/Release/libovr.a +# Lib/Mac/Debug/libovr.a + +set(OVR_LIBRARY_PATH_SUFFIX "Lib") + +# Test compiler +if(MSVC10) # Microsoft Visual Studio 2010 + set(_ovr_library_compiler "VS2010") +elseif(MSVC11) # Microsoft Visual Studio 2012 + set(_ovr_library_compiler "VS2012") +elseif(MSVC12) # Microsoft Visual Studio 2013 + set(_ovr_library_compiler "VS2013") +endif() + + +# Test 32/64 bits +if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8") + set(_ovr_library_arch "x86_64") + if (WIN32) + set(_ovr_library_arch "x64") + set(_ovr_libname_bitsuffix "64") + endif(WIN32) +else() + set(_ovr_library_arch "i386") + if (WIN32) + set(_ovr_library_arch "Win32") + set(_ovr_libname_bitsuffix "") + endif(WIN32) +endif() + +# Test platform +if(${CMAKE_SYSTEM_NAME} MATCHES "Linux") + set(OVR_LIBRARY_PATH_SUFFIX_START "Lib/Linux") # needs build type and arch +elseif(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") + set(OVR_LIBRARY_PATH_SUFFIX_START "Lib/Mac") # needs build type +elseif(${CMAKE_SYSTEM_NAME} MATCHES "Windows") + set(OVR_LIBRARY_PATH_SUFFIX "Lib/${_ovr_library_arch}/${_ovr_library_compiler}") +endif() + +find_library(OVR_LIBRARY_RELEASE + NAMES + ovr${_ovr_libname_bitsuffix} + libovr${_ovr_libname_bitsuffix} + PATHS + "${OVR_ROOT_DIR}" + "${OVR_ROOT_DIR}/LibOVR" + c:/tools/oculus-sdk.install/OculusSDK/LibOVR + PATH_SUFFIXES + ${OVR_LIBRARY_PATH_SUFFIX} + ${OVR_LIBRARY_PATH_SUFFIX_START}/Release + ${OVR_LIBRARY_PATH_SUFFIX_START}/Release/${_ovr_library_arch}) + +find_library(OVR_LIBRARY_DEBUG + NAMES + ovr${_ovr_libname_bitsuffix}d + libovr${_ovr_libname_bitsuffix}d + PATHS + "${OVR_ROOT_DIR}" + "${OVR_ROOT_DIR}/LibOVR" + c:/tools/oculus-sdk.install/OculusSDK/LibOVR + PATH_SUFFIXES + ${OVR_LIBRARY_PATH_SUFFIX} + ${OVR_LIBRARY_PATH_SUFFIX_START}/Debug + ${OVR_LIBRARY_PATH_SUFFIX_START}/Debug/${_ovr_library_arch}) + +include(SelectLibraryConfigurations) +select_library_configurations(OVR) + +if(OVR_LIBRARY_RELEASE) + get_filename_component(_libdir "${OVR_LIBRARY_RELEASE}" PATH) +endif() + +find_path(OVR_INCLUDE_DIR + NAMES + OVR.h + HINTS + "${_libdir}" + "${_libdir}/.." + "${_libdir}/../.." + "${_libdir}/../../.." + PATHS + "${OVR_ROOT_DIR}" + PATH_SUFFIXES + include + Include + ) + +find_path(OVR_SOURCE_DIR + NAMES + OVR_CAPI.h + HINTS + "${_libdir}" + "${_libdir}/.." + "${_libdir}/../.." + "${_libdir}/../../.." + PATHS + "${OVR_ROOT_DIR}" + PATH_SUFFIXES + Src + ) + +# Dependencies + +set(_ovr_dependency_libraries "") +set(_ovr_dependency_includes "") + +if(NOT OPENGL_FOUND) + find_package(OpenGL) + list(APPEND _ovr_dependency_libraries ${OPENGL_LIBRARIES}) + list(APPEND _ovr_dependency_includes ${OPENGL_INCLUDE_DIR}) + list(APPEND _ovr_dependencies OPENGL_FOUND) +endif() + +if(NOT THREADS_FOUND) + find_package(Threads) + list(APPEND _ovr_dependency_libraries ${CMAKE_THREAD_LIBS_INIT}) + list(APPEND _ovr_dependencies THREADS_FOUND) +endif() + +# Linux-only dependencies +if(${CMAKE_SYSTEM_NAME} MATCHES "Linux") + if(NOT X11_FOUND) + find_package(X11) + list(APPEND _ovr_dependency_libraries ${X11_LIBRARIES}) + list(APPEND _ovr_dependency_includes ${X11_INCLUDE_DIR}) + list(APPEND _ovr_dependencies X11_FOUND) + endif() + + if(NOT XRANDR_FOUND) + find_package(Xrandr) + list(APPEND _ovr_dependency_libraries ${XRANDR_LIBRARIES}) + list(APPEND _ovr_dependency_includes ${XRANDR_INCLUDE_DIR}) + list(APPEND _ovr_dependencies XRANDR_FOUND) + endif() + + if(NOT UDEV_FOUND) + find_package(udev) + list(APPEND _ovr_dependency_libraries ${UDEV_LIBRARIES}) + list(APPEND _ovr_dependency_includes ${UDEV_INCLUDE_DIR}) + list(APPEND _ovr_dependencies UDEV_FOUND) + endif() +endif() + +if(WIN32) + #find_library(OVR_WINMM_LIBRARY winmm) + #find_library(OVR_WS2_LIBRARY ws2_32) + list(APPEND _ovr_dependency_libraries winmm ws2_32)#${OVR_WINMM_LIBRARY} ${OVR_WS2_LIBRARY}) +endif() + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(OVR + DEFAULT_MSG + OVR_LIBRARY + OVR_INCLUDE_DIR + OVR_SOURCE_DIR + ${_ovr_dependencies} + ) + +if(OVR_FOUND) + set(OVR_LIBRARIES ${OVR_LIBRARY} ${_ovr_dependency_libraries}) + set(OVR_INCLUDE_DIRS ${OVR_INCLUDE_DIR} ${OVR_SOURCE_DIR} ${_ovr_dependency_includes}) + mark_as_advanced(OVR_ROOT_DIR) +endif() + +mark_as_advanced(OVR_INCLUDE_DIR + OVR_SOURCE_DIR + OVR_LIBRARY + OVR_WINMM_LIBRARY + OVR_WS2_LIBRARY) + diff --git a/cmake/cmake-modules/FindOpenCV1.cmake b/cmake/cmake-modules/FindOpenCV1.cmake new file mode 100644 index 000000000..148af568f --- /dev/null +++ b/cmake/cmake-modules/FindOpenCV1.cmake @@ -0,0 +1,245 @@ +# - Try to find OpenCV library installation +# See http://sourceforge.net/projects/opencvlibrary/ +# +# The following variable is optionally searched for defaults +# OPENCV_ROOT_DIR: Base directory of OpenCv tree to use. +# +# OPENCV_NEW_LIBRARY_NAMES Set to YES before searching if you want to +# The following are set after configuration is done: +# OPENCV_FOUND +# OPENCV_INCLUDE_DIRS +# OPENCV_LIBRARIES +# +# 2004/05 Jan Woetzel, Friso, Daniel Grest +# 2006/01 complete rewrite by Jan Woetzel +# 2006/09 2nd rewrite introducing ROOT_DIR and PATH_SUFFIXES +# to handle multiple installed versions gracefully by Jan Woetzel +# 2010/02 Ryan Pavlik (Iowa State University) - partial rewrite to standardize +# +# tested with: +# -OpenCV 0.97 (beta5a): MSVS 7.1, gcc 3.3, gcc 4.1 +# -OpenCV 0.99 (1.0rc1): MSVS 7.1 +# +# www.mip.informatik.uni-kiel.de/~jw +# academic.cleardefinition.com +# -------------------------------- + +set(OPENCV_ROOT_DIR + "${OPENCV_ROOT_DIR}" + CACHE + PATH + "Path to search for OpenCV") + +find_package(OpenCV QUIET NO_MODULE) +if(OpenCV_LIBS AND NOT OpenCV_LIBRARIES) + set(OPENCV_LIBRARIES ${OpenCV_LIBS}) + set(OPENCV_FOUND true) +else() + include(ProgramFilesGlob) + + # typical root dirs of installations, exactly one of them is used + program_files_glob(_dirs "/OpenCV*/") + + # + # select exactly ONE OPENCV base directory/tree + # to avoid mixing different version headers and libs + # + find_path(OPENCV_BASE_DIR + NAMES + cv/include/cv.h + include/opencv/cv.h + include/cv/cv.h + include/cv.h + HINTS + "${OPENCV_ROOT_DIR}" + "$ENV{OPENCV_ROOT_DIR}" + "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\Intel(R) Open Source Computer Vision Library_is1;Inno Setup: App Path]" + ${_dirs}) + + + + + # header include dir suffixes appended to OPENCV_BASE_DIR + set(OPENCV_INCDIR_SUFFIXES + include + include/cv + include/opencv + cv/include + cxcore/include + cvaux/include + otherlibs/cvcam/include + otherlibs/highgui + otherlibs/highgui/include + otherlibs/_graphics/include) + + # library linkdir suffixes appended to OPENCV_BASE_DIR + set(OPENCV_LIBDIR_SUFFIXES + lib + lib64 + OpenCV/lib + otherlibs/_graphics/lib) + + + # + # find incdir for each lib + # + find_path(OPENCV_cv_INCLUDE_DIR + NAMES + cv.h + HINTS + "${OPENCV_BASE_DIR}" + "${OPENCV_ROOT_DIR}" + PATH_SUFFIXES + ${OPENCV_INCDIR_SUFFIXES}) + find_path(OPENCV_cxcore_INCLUDE_DIR + NAMES + cxcore.h + HINTS + "${OPENCV_BASE_DIR}" + "${OPENCV_ROOT_DIR}" + PATH_SUFFIXES + ${OPENCV_INCDIR_SUFFIXES}) + find_path(OPENCV_cxcore_INCLUDE_DIR + NAMES + cvaux.h + HINTS + "${OPENCV_BASE_DIR}" + "${OPENCV_ROOT_DIR}" + PATH_SUFFIXES + ${OPENCV_INCDIR_SUFFIXES}) + find_path(OPENCV_highgui_INCLUDE_DIR + NAMES + highgui.h + HINTS + "${OPENCV_BASE_DIR}" + "${OPENCV_ROOT_DIR}" + PATH_SUFFIXES + ${OPENCV_INCDIR_SUFFIXES}) + find_path(OPENCV_cvcam_INCLUDE_DIR + NAMES + cvcam.h + HINTS + "${OPENCV_BASE_DIR}" + "${OPENCV_ROOT_DIR}" + PATH_SUFFIXES + ${OPENCV_INCDIR_SUFFIXES}) + + # + # find sbsolute path to all libraries + # some are optionally, some may not exist on Linux + # + find_library(OPENCV_legacy_LIBRARY + NAMES + opencv_legacy + HINTS + "${OPENCV_BASE_DIR}" + "${OPENCV_ROOT_DIR}" + PATH_SUFFIXES + ${OPENCV_LIBDIR_SUFFIXES}) + + set(OPENCV_NEW_COMPONENTS calib3d contrib core features2d highgui imgproc legacy ml objdetect video) + set(OPENCV_OLD_COMPONENTS cv cvaux cvcam cvhaartraining cxcore cxts highgui ml trs) + set(opencv_components) + if(OPENCV_NEW_LIBRARY_NAMES OR OPENCV_legacy_LIBRARY) + + # New-style library names + foreach(component ${OPENCV_NEW_COMPONENTS}) + find_library(OPENCV_${component}_LIBRARY + NAMES + opencv_${component} + HINTS + ${OPENCV_BASE_DIR} + PATH_SUFFIXES + ${OPENCV_LIBDIR_SUFFIXES}) + endforeach() + + # cv components with header and library if COMPONENTS unspecified + if(NOT OpenCV_FIND_COMPONENTS) + # default + set(opencv_components core legacy imgproc highgui) + if(WIN32) + list(APPEND opencv_components video) # WIN32 only actually + endif() + else() + # TODO: clean up/convert to new components + string(TOLOWER "${OpenCV_FIND_COMPONENTS}" opencv_components) + endif() + + else() + # Old-style lib names + if(NOT OpenCV_FIND_COMPONENTS) + # default + set(opencv_components cv cxcore cvaux highgui) + if(WIN32) + list(APPEND opencv_components cvcam) # WIN32 only actually + endif() + else() + string(TOLOWER "${OpenCV_FIND_COMPONENTS}" opencv_components) + endif() + + foreach(component ${OPENCV_OLD_COMPONENTS}) + find_library(OPENCV_${component}_LIBRARY + NAMES + ${component} + HINTS + ${OPENCV_BASE_DIR} + PATH_SUFFIXES + ${OPENCV_LIBDIR_SUFFIXES}) + endforeach() + endif() + + # + # Logic selecting required libs and headers + # + + set(_req_check) + set(_req_libs) + set(_req_includes) + foreach(component ${opencv_components}) + #message(STATUS "Component requested: ${component}") + + # only good if header and library both found + list(APPEND + _req_check + OPENCV_${component}_LIBRARY) + list(APPEND _req_libs "${OPENCV_${component}_LIBRARY}") + if(DEFINED OPENCV_${component}_INCLUDE_DIR) + list(APPEND + _req_check + OPENCV_${component}_INCLUDE_DIR) + list(APPEND _req_includes "${OPENCV_${component}_INCLUDE_DIR}") + endif() + + + endforeach() + + # 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(OpenCV + DEFAULT_MSG + OPENCV_cv_INCLUDE_DIR + ${_req_check}) + + if(OPENCV_FOUND) + set(OPENCV_LIBRARY_DIRS) + foreach(lib ${_req_libs}) + get_filename_component(dir "${lib}" PATH) + list(APPEND OPENCV_LIBRARY_DIRS "${dir}") + endforeach() + list(REVERSE OPENCV_LIBRARY_DIRS) + list(REMOVE_DUPLICATES OPENCV_LIBRARY_DIRS) + list(REVERSE OPENCV_LIBRARY_DIRS) + + set(OPENCV_INCLUDE_DIRS ${_req_includes}) + set(OPENCV_LIBRARIES ${_req_libs}) + mark_as_advanced(OPENCV_ROOT_DIR OpenCV_DIR) + endif() + + mark_as_advanced(OPENCV_BASE_DIR) + foreach(component ${OPENCV_NEW_COMPONENTS} ${OPENCV_OLD_COMPONENTS}) + mark_as_advanced(OPENCV_${component}_LIBRARY OPENCV_${component}_INCLUDE_DIR) + endforeach() +endif() + + diff --git a/cmake/cmake-modules/FindOpenHaptics.cmake b/cmake/cmake-modules/FindOpenHaptics.cmake new file mode 100644 index 000000000..0e4958c5f --- /dev/null +++ b/cmake/cmake-modules/FindOpenHaptics.cmake @@ -0,0 +1,481 @@ +# - try to find OpenHaptics libraries +# +# 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 +# HLAPI_HLU_LIBRARY_DEBUG +# +# Non-cache variables you might use in your CMakeLists.txt: +# OPENHAPTICS_FOUND +# HDAPI_INCLUDE_DIRS +# HDAPI_LIBRARIES +# HDAPI_HDU_INCLUDE_DIRS +# HDAPI_HDU_LIBRARIES +# HLAPI_INCLUDE_DIRS +# HLAPI_LIBRARIES +# HLAPI_HLU_INCLUDE_DIRS +# HLAPI_HLU_LIBRARIES +# OPENHAPTICS_LIBRARIES - includes HD, HDU, HL, HLU +# OPENHAPTICS_RUNTIME_LIBRARY_DIRS +# OPENHAPTICS_ENVIRONMENT +# OPENHAPTICS_LIBRARY_DIRS +# OPENHAPTICS_INCLUDE_DIRS +# +# Requires these CMake modules: +# CleanDirectoryList +# CleanLibraryList +# ListCombinations +# ProgramFilesGlob +# SelectLibraryConfigurations (included with CMake >=2.8.0) +# FindPackageHandleStandardArgs (known included with CMake >=2.6.2) +# CMake 2.6.3 (uses "unset") +# +# 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 Boost Software License, Version 1.0. +# (See accompanying file LICENSE_1_0.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) + +cmake_minimum_required(VERSION 2.6.3) + +set(OPENHAPTICS_ROOT_DIR + "${OPENHAPTICS_ROOT_DIR}" + CACHE + PATH + "Path to search for OpenHaptics") +option(OPENHAPTICS_NESTED_TARGETS + "Whether we should compile HDU and HLU, if needed, as a part of the solution" + ON) +mark_as_advanced(OPENHAPTICS_NESTED_TARGETS) + +### +# Configure OpenHaptics +### + +include(SelectLibraryConfigurations) +include(ListCombinations) +include(CleanDirectoryList) +include(CleanLibraryList) +include(ProgramFilesGlob) + +set(_nest_targets) +set(_incsearchdirs) +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(_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) + set(_vc "vc7") + elseif(MSVC80) + set(_vc "vc8") + endif() + if(CMAKE_SIZEOF_VOID_P MATCHES "8") + # 64-bit + list_combinations(_libsearch + PREFIXES + "${OPENHAPTICS_ROOT_DIR}" + ${_dirs} + SUFFIXES + "/lib/x64") + list_combinations(_libsearch2 + PREFIXES + "${OPENHAPTICS_ROOT_DIR}" + ${_dirs} + SUFFIXES + "/utilities/lib/x64") + else() + # 32-bit + list_combinations(_libsearch + PREFIXES + "${OPENHAPTICS_ROOT_DIR}" + ${_dirs} + SUFFIXES + "/lib" + "/lib/win32") + list_combinations(_libsearch2 + PREFIXES + "${OPENHAPTICS_ROOT_DIR}" + ${_dirs} + SUFFIXES + "/utilities/lib/Win32" + "/utilities/lib" + "/utilities/lib/${_vc}") + endif() + + clean_directory_list(_libsearchdirs ${_libsearch} ${_libsearch2}) +endif() + +list_combinations(_incsearch + PREFIXES + "${OPENHAPTICS_ROOT_DIR}" + ${_dirs} + SUFFIXES + "/include") +list_combinations(_incsearch2 + PREFIXES + "${OPENHAPTICS_ROOT_DIR}" + ${_dirs} + SUFFIXES + "/utilities/include") +clean_directory_list(_incsearchdirs ${_incsearch} ${_incsearch2}) + +set(_deps_check) +set(_deps_libs) + +### +# HDAPI: HD +### + +if(UNIX) + find_library(HDAPI_PHANToMIO_LIBRARY + NAMES + PHANToMIO + HINTS + ${_libsearchdirs}) + mark_as_advanced(HDAPI_PHANToMIO_LIBRARY) + list(APPEND _deps_check HDAPI_PHANToMIO_LIBRARY) + list(APPEND _deps_libs "${HDAPI_PHANToMIO_LIBRARY}") +endif() + +find_path(HDAPI_INCLUDE_DIR + NAMES + HD/hd.h + HINTS + ${_incsearchdirs}) + +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 +### +find_path(HDAPI_HDU_INCLUDE_DIR + NAMES + HDU/hdu.h + HINTS + ${_incsearchdirs}) + +find_library(HDAPI_HDU_LIBRARY_RELEASE + NAMES + HDU + PATH_SUFFIXES + ReleaseAcademicEdition + Release + HINTS + ${_libsearchdirs}) + +find_library(HDAPI_HDU_LIBRARY_DEBUG + NAMES + HDU + PATH_SUFFIXES + DebugAcademicEdition + Debug + HINTS + ${_libsearchdirs}) + +# Fallback +find_library(HDAPI_HDU_LIBRARY_DEBUG + NAMES + HDUD + PATH_SUFFIXES + DebugAcademicEdition + Debug + HINTS + ${_libsearchdirs}) + +select_library_configurations(HDAPI_HDU) + +if(OPENHAPTICS_NESTED_TARGETS OR NOT HDAPI_HDU_LIBRARY) + if(HDAPI_HDU_SOURCE_DIR AND NOT EXISTS "${HDAPI_HDU_SOURCE_DIR}/hdu.cpp") + unset(HDAPI_HDU_SOURCE_DIR) + endif() + find_path(HDAPI_HDU_SOURCE_DIR + NAMES + hdu.cpp + PATH_SUFFIXES + src + src/HDU + src/HDU/src + libsrc/HDU + HINTS + "${HDAPI_HDU_INCLUDE_DIR}/.." + "${HDAPI_HDU_INCLUDE_DIR}/../share/3DTouch") + list(APPEND _deps_check HDAPI_HDU_SOURCE_DIR) + if(HDAPI_HDU_SOURCE_DIR) + mark_as_advanced(HDAPI_HDU_SOURCE_DIR) + set(_nest_targets YES) + set(HDAPI_HDU_LIBRARY + "openhaptics_hdu_nested_target" + CACHE + STRING + "We will build the OpenHaptics HDU lib." + FORCE) + set(HDAPI_HDU_LIBRARIES ${HDAPI_HDU_LIBRARY}) + endif() +endif() + + +### +# HLAPI: HL +### +find_path(HLAPI_INCLUDE_DIR + NAMES + HL/hl.h + HINTS + ${_incsearchdirs}) + +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 +### +find_path(HLAPI_HLU_INCLUDE_DIR + NAMES + HLU/hlu.h + HINTS + ${_incsearchdirs}) + +find_library(HLAPI_HLU_LIBRARY_RELEASE + NAMES + HLU + PATH_SUFFIXES + ReleaseAcademicEdition + Release + HINTS + ${_libsearchdirs}) + +find_library(HLAPI_HLU_LIBRARY_DEBUG + NAMES + HLU + PATH_SUFFIXES + DebugAcademicEdition + Debug + HINTS + ${_libsearchdirs}) + +# fallback +find_library(HLAPI_HLU_LIBRARY_DEBUG + NAMES + HLUD + PATH_SUFFIXES + DebugAcademicEdition + Debug + HINTS + ${_libsearchdirs}) + +select_library_configurations(HLAPI_HLU) + +if(OPENHAPTICS_NESTED_TARGETS OR NOT HLAPI_HLU_LIBRARY) + if(HLAPI_HLU_SOURCE_DIR AND NOT EXISTS "${HLAPI_HLU_SOURCE_DIR}/hlu.cpp") + unset(HLAPI_HLU_SOURCE_DIR) + endif() + find_path(HLAPI_HLU_SOURCE_DIR + NAMES + hlu.cpp + PATH_SUFFIXES + src + src/HLU + src/HLU/src + libsrc/HLU + HINTS + "${HLAPI_HLU_INCLUDE_DIR}/.." + "${HLAPI_HLU_INCLUDE_DIR}/../share/3DTouch") + list(APPEND _deps_check HLAPI_HLU_SOURCE_DIR) + if(HLAPI_HLU_SOURCE_DIR) + mark_as_advanced(HLAPI_HLU_SOURCE_DIR) + set(_nest_targets YES) + set(HLAPI_HLU_LIBRARY + "openhaptics_hlu_nested_target" + CACHE + STRING + "We will build the OpenHaptics HLU lib." + FORCE) + set(HLAPI_HLU_LIBRARIES ${HLAPI_HLU_LIBRARY}) + endif() +endif() + +### +# Add dependencies: Libraries +### +set(HDAPI_LIBRARIES "${HDAPI_LIBRARY}" ${_deps_libs}) + +if(HDAPI_HDU_LIBRARIES AND HDAPI_LIBRARIES) + list(APPEND HDAPI_HDU_LIBRARIES ${HDAPI_LIBRARIES}) +else() + set(HDAPI_HDU_LIBRARIES) +endif() + +if(HLAPI_LIBRARY AND HDAPI_LIBRARIES) + set(HLAPI_LIBRARIES ${HLAPI_LIBRARY} ${HDAPI_LIBRARIES}) +else() + set(HLAPI_LIBRARIES) +endif() + +if(HLAPI_HLU_LIBRARIES AND HLAPI_LIBRARIES) + list(APPEND HLAPI_HLU_LIBRARIES ${HLAPI_LIBRARIES}) +else() + set(HLAPI_HLU_LIBRARIES) +endif() + +### +# Add dependencies: Include dirs +### +if(HDAPI_INCLUDE_DIR) + set(HDAPI_INCLUDE_DIRS ${HDAPI_INCLUDE_DIR}) + + if(HDAPI_HDU_INCLUDE_DIR) + set(HDAPI_HDU_INCLUDE_DIRS + ${HDAPI_INCLUDE_DIRS} + ${HDAPI_HDU_INCLUDE_DIR}) + + if(HDAPI_HDU_INCLUDE_DIR) + set(HLAPI_INCLUDE_DIRS ${HDAPI_INCLUDE_DIRS} ${HLAPI_INCLUDE_DIR}) + + if(HLAPI_HLU_INCLUDE_DIR) + set(HLAPI_HLU_INCLUDE_DIRS + ${HLAPI_INCLUDE_DIRS} + ${HLAPI_HLU_INCLUDE_DIR}) + + endif() + endif() + endif() +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(OpenHaptics + DEFAULT_MSG + HDAPI_LIBRARY + HDAPI_INCLUDE_DIR + HDAPI_HDU_INCLUDE_DIR + HDAPI_HDU_LIBRARY + HLAPI_INCLUDE_DIR + HLAPI_LIBRARY + HLAPI_HLU_INCLUDE_DIR + HLAPI_HLU_LIBRARY + ${_deps_check}) + +if(OPENHAPTICS_FOUND) + # Recurse into the nested targets subdirectory if needed + if(_nest_targets) + get_filename_component(_moddir "${CMAKE_CURRENT_LIST_FILE}" PATH) + add_subdirectory("${_moddir}/nested_targets/OpenHaptics" "OpenHapticsNestedTargets") + endif() + + set(OPENHAPTICS_LIBRARIES + ${HDAPI_LIBRARY} + ${HDAPI_HDU_LIBRARY} + ${HLAPI_LIBRARY} + ${HLAPI_HLU_LIBRARY}) + set(OPENHAPTICS_LIBRARY_DIRS) + foreach(_lib + ${_deps_check} + HDAPI_LIBRARY_RELEASE + HDAPI_LIBRARY_DEBUG + HDAPI_HDU_LIBRARY_RELEASE + HDAPI_HDU_LIBRARY_DEBUG + HLAPI_LIBRARY_RELEASE + HLAPI_LIBRARY_DEBUG + HLAPI_HLU_LIBRARY_RELEASE + HLAPI_HLU_LIBRARY_DEBUG) + get_filename_component(_libdir ${${_lib}} PATH) + list(APPEND OPENHAPTICS_LIBRARY_DIRS ${_libdir}) + endforeach() + + set(OPENHAPTICS_INCLUDE_DIRS + ${HLAPI_HLU_INCLUDE_DIRS} + ${HDAPI_HDU_INCLUDE_DIRS}) + + clean_directory_list(OPENHAPTICS_LIBRARY_DIRS) + clean_directory_list(OPENHAPTICS_INCLUDE_DIRS) + + list(APPEND + OPENHAPTICS_RUNTIME_LIBRARY_DIRS + ${OPENHAPTICS_LIBRARY_DIRS}) + + clean_library_list(OPENHAPTICS_LIBRARIES) + + mark_as_advanced(OPENHAPTICS_ROOT_DIR) +endif() + +mark_as_advanced(HDAPI_INCLUDE_DIR + HDAPI_LIBRARY_RELEASE + HDAPI_LIBRARY_DEBUG + HDAPI_HDU_INCLUDE_DIR + HDAPI_HDU_LIBRARY_RELEASE + HDAPI_HDU_LIBRARY_DEBUG + HLAPI_INCLUDE_DIR + HLAPI_LIBRARY_RELEASE + HLAPI_LIBRARY_DEBUG + HLAPI_HLU_INCLUDE_DIR + HLAPI_HLU_LIBRARY_RELEASE + HLAPI_HLU_LIBRARY_DEBUG) diff --git a/cmake/cmake-modules/FindParasolid.cmake b/cmake/cmake-modules/FindParasolid.cmake new file mode 100644 index 000000000..17636d702 --- /dev/null +++ b/cmake/cmake-modules/FindParasolid.cmake @@ -0,0 +1,305 @@ +# - try to find PARASOLID library +# Important note: If you are also using JtTk, do your +# find_package(JtTk) +# first, to avoid runtime PK_* errors! +# +# PARASOLID_LIBRARY_DIR, library search path +# PARASOLID_INCLUDE_DIR, include search path +# PARASOLID_{component}_LIBRARY, the library to link against +# PARASOLID_FOUND, If false, do not try to use this library. +# +# Plural versions refer to this library and its dependencies, and +# are recommended to be used instead, unless you have a good reason. +# +# Requires these CMake modules: +# CheckVersion +# ListCombinations +# ProgramFilesGlob +# FindPackageHandleStandardArgs (known included with CMake >=2.6.2) +# +# Original Author: +# 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> +# http://academic.cleardefinition.com +# Iowa State University HCI Graduate Program/VRAC +# +# Copyright Iowa State University 2009-2010. +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE_1_0.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) + +include(ListCombinations) +include(CheckVersion) +include(PrefixListGlob) +include(CleanDirectoryList) +if(WIN32) + include(ProgramFilesGlob) +endif() + +set(PARASOLID_ROOT_DIR + "${PARASOLID_ROOT_DIR}" + CACHE + PATH + "Root directory to search for Parasolid") + +file(TO_CMAKE_PATH "${PARASOLID_ROOT_DIR}" PARASOLID_ROOT_DIR) + +# Do this by default +if(NOT DEFINED PARASOLID_NESTED_TARGETS) + set(PARASOLID_NESTED_TARGETS TRUE) +endif() + +set(PARASOLID_NESTED_TARGETS + "${PARASOLID_NESTED_TARGETS}" + CACHE + BOOL + "Whether we should compile fg and frustrum as a part of the solution") +mark_as_advanced(PARASOLID_NESTED_TARGETS) + +set(_nest_targets) + +### +# Configure Parasolid +### + +string(TOLOWER "${CMAKE_SYSTEM_NAME}" _lcsystem) +set(libsearchdirs) +if(WIN32) + if(CMAKE_SIZEOF_VOID_P MATCHES "8") + # 64-bit + program_files_fallback_glob(dirs "/Parasolid*/kernel/x64_win/base") + program_files_fallback_glob(dirs2 "/Parasolid/kernel/*/x64_win/base") + list(APPEND dirs ${dirs2}) + else() + # 32-bit + program_files_glob(dirs "/Parasolid*/kernel/intel_nt/base") + program_files_fallback_glob(dirs2 "/Parasolid/kernel/*/intel_nt/base") + list(APPEND dirs ${dirs2}) + endif() + + list_combinations(libsearchdirs + PREFIXES + ${dirs} + "${PARASOLID_ROOT_DIR}" + SUFFIXES + "/dll") + list(APPEND libsearchdirs ${dirs} "${PARASOLID_ROOT_DIR}") +elseif("${_lcsystem}" MATCHES "linux") + if(CMAKE_SIZEOF_VOID_P MATCHES "8") + # 64-bit + prefix_list_glob(libsearchdirs + "/Parasolid*/kernel/intel_linux/base_lx64" + "${PARASOLID_ROOT_DIR}" + "/usr" + "/usr/local" + "/usr/local/ugs") + else() + # 32-bit + prefix_list_glob(libsearchdirs + "/Parasolid*/kernel/intel_linux/base_lx32" + "${PARASOLID_ROOT_DIR}" + "/usr" + "/usr/local" + "/usr/local/ugs") + endif() +endif() + +### +# Find the link library +### +find_library(PARASOLID_pskernel_LIBRARY + NAMES + pskernel + PATH_SUFFIXES + dll + shared_object + HINTS + ${libsearchdirs} + PATHS + "${PARASOLID_ROOT_DIR}") + + +# Don't add this library to the default list of libraries +find_library(PARASOLID_pskernel_archive_LIBRARY + NAMES + pskernel_archive + pskernel_archive.lib + HINTS + ${libsearchdirs} + PATHS + "${PARASOLID_ROOT_DIR}") +mark_as_advanced(PARASOLID_pskernel_archive_LIBRARY) + + +### +# Prepare for the rest of our search based off of where we found the link library +### +get_filename_component(PARASOLID_LIBRARY_DIR + "${PARASOLID_pskernel_LIBRARY}" + PATH) + +# Setup include search path +get_filename_component(_includedir + "${PARASOLID_LIBRARY_DIR}/../include" + ABSOLUTE) +get_filename_component(_includedir2 + "${PARASOLID_LIBRARY_DIR}/.." + ABSOLUTE) +set(includesearchdirs + "${PARASOLID_LIBRARY_DIR}" + "${_includedir}" + "${_includedir2}") +clean_directory_list(includesearchdirs) + +### +# Find the headers +### +find_path(PARASOLID_INCLUDE_DIR + NAMES + parasolid_kernel.h + HINTS + ${includesearchdirs} + PATHS + "${PARASOLID_ROOT_DIR}") + +### +# Find remaining libs +### + +# Default libs +foreach(lib fg frustrum) + find_library(PARASOLID_${lib}_LIBRARY + NAMES + ${lib} + PATH_SUFFIXES + dll + HINTS + "${PARASOLID_LIBRARY_DIR}" + ${libsearchdirs} + PATHS + "${PARASOLID_ROOT_DIR}") + +endforeach() + +if(PARASOLID_pskernel_LIBRARY OR PARASOLID_INCLUDE_DIR) + get_filename_component(_libdir "${PARASOLID_pskernel_LIBRARY}" PATH) + get_filename_component(_incdir "${PARASOLID_INCLUDE_DIR}" PATH) + + if(PARASOLID_NESTED_TARGETS OR NOT PARASOLID_fg_LIBRARY) + find_file(PARASOLID_FG_C + NAMES + fg.c + HINTS + "${_libdir}" + "${_libdir}/.." + "${_incdir}") + if(PARASOLID_FG_C) + mark_as_advanced(PARASOLID_FG_C) + set(_nest_targets YES) + set(PARASOLID_fg_LIBRARY + "parasolid_fg_nested_target" + CACHE + STRING + "We will build the Parasolid fg lib." + FORCE) + endif() + endif() + + if(PARASOLID_NESTED_TARGETS OR NOT PARASOLID_frustrum_LIBRARY) + find_file(PARASOLID_FRUSTRUM_C + NAMES + frustrum.c + HINTS + "${_libdir}" + "${_libdir}/.." + "${_incdir}") + if(PARASOLID_FRUSTRUM_C) + mark_as_advanced(PARASOLID_FRUSTRUM_C) + set(_nest_targets YES) + set(PARASOLID_frustrum_LIBRARY + "parasolid_frustrum_nested_target" + CACHE + STRING + "We will build the Parasolid frustrum lib." + FORCE) + endif() + endif() + +endif() + +# Non-default libs +foreach(lib testfr) + find_library(PARASOLID_${lib}_LIBRARY + NAMES + ${lib} + PATH_SUFFIXES + dll + HINTS + ${PARASOLID_LIBRARY_DIR} + ${libsearchdirs} + PATHS + "${PARASOLID_ROOT_DIR}") + mark_as_advanced(PARASOLID_${lib}_LIBRARY) +endforeach() + +### +# Find the DLL's +### + +if(JTTK_FOUND AND JTTK_pskernel_DLL) + # If we have JtTk, must use the dll there or we'll have weird runtime errors + # in parasolid + set(PARASOLID_pskernel_DLL "${JTTK_pskernel_DLL}") +else() + # Find the unversioned DLL + set(dll pskernel) + find_file(PARASOLID_${dll}_DLL + NAMES + ${dll}.dll + PATH_SUFFIXES + dll + HINTS + ${PARASOLID_LIBRARY_DIR} + ${libsearchdirs} + PATHS + "${PARASOLID_ROOT_DIR}") + list(APPEND PARASOLID_DLLS ${PARASOLID_${dll}_DLL}) + mark_as_advanced(PARASOLID_${dll}_DLL) +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(Parasolid + DEFAULT_MSG + PARASOLID_pskernel_LIBRARY + PARASOLID_fg_LIBRARY + PARASOLID_frustrum_LIBRARY + PARASOLID_INCLUDE_DIR) + +if(PARASOLID_FOUND) + # Recurse into the nested targets subdirectory if needed + if(_nest_targets) + get_filename_component(_moddir "${CMAKE_CURRENT_LIST_FILE}" PATH) + add_subdirectory("${_moddir}/nested_targets/Parasolid") + endif() + + set(PARASOLID_INCLUDE_DIRS "${PARASOLID_INCLUDE_DIR}") + set(PARASOLID_LIBRARIES + "${PARASOLID_pskernel_LIBRARY}" + "${PARASOLID_fg_LIBRARY}" + "${PARASOLID_frustrum_LIBRARY}") + if(PARASOLID_pskernel_DLL) + get_filename_component(PARASOLID_RUNTIME_LIBRARY_DIRS + "${PARASOLID_pskernel_DLL}" + PATH) + endif() + mark_as_advanced(PARASOLID_ROOT_DIR) +endif() + +mark_as_advanced(PARASOLID_pskernel_LIBRARY + PARASOLID_pskernel_archive_LIBRARY + PARASOLID_fg_LIBRARY + PARASOLID_frustrum_LIBRARY + PARASOLID_INCLUDE_DIR + PARASOLID_FRUSTRUM_C + PARASOLID_FG_C) diff --git a/cmake/cmake-modules/FindPerformer.cmake b/cmake/cmake-modules/FindPerformer.cmake new file mode 100644 index 000000000..db2b9c5cc --- /dev/null +++ b/cmake/cmake-modules/FindPerformer.cmake @@ -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) diff --git a/cmake/cmake-modules/FindPerlModules.cmake b/cmake/cmake-modules/FindPerlModules.cmake new file mode 100644 index 000000000..f09ff851d --- /dev/null +++ b/cmake/cmake-modules/FindPerlModules.cmake @@ -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}) + diff --git a/cmake/cmake-modules/FindQVRPN.cmake b/cmake/cmake-modules/FindQVRPN.cmake new file mode 100644 index 000000000..37e1af2b9 --- /dev/null +++ b/cmake/cmake-modules/FindQVRPN.cmake @@ -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) diff --git a/cmake/cmake-modules/FindSDL2.cmake b/cmake/cmake-modules/FindSDL2.cmake new file mode 100644 index 000000000..f69c68a13 --- /dev/null +++ b/cmake/cmake-modules/FindSDL2.cmake @@ -0,0 +1,249 @@ +# - Find SDL2 +# Find the SDL2 headers and libraries +# +# SDL2::SDL2 - Imported target to use for building a library +# SDL2::SDL2main - Imported interface target to use if you want SDL and SDLmain. +# SDL2_FOUND - True if SDL2 was found. +# SDL2_DYNAMIC - If we found a DLL version of SDL (meaning you might want to copy a DLL from SDL2::SDL2) +# +# Original Author: +# 2015 Ryan Pavlik <ryan.pavlik@gmail.com> <abiryan@ryand.net> +# +# Copyright Sensics, Inc. 2015. +# 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 up architectures (for windows) and prefixes (for mingw builds) +if(WIN32) + if(MINGW) + include(MinGWSearchPathExtras OPTIONAL) + if(MINGWSEARCH_TARGET_TRIPLE) + set(SDL2_PREFIX ${MINGWSEARCH_TARGET_TRIPLE}) + endif() + endif() + if(CMAKE_SIZEOF_VOID_P EQUAL 8) + set(SDL2_LIB_PATH_SUFFIX lib/x64) + if(NOT MSVC AND NOT SDL2_PREFIX) + set(SDL2_PREFIX x86_64-w64-mingw32) + endif() + else() + set(SDL2_LIB_PATH_SUFFIX lib/x86) + if(NOT MSVC AND NOT SDL2_PREFIX) + set(SDL2_PREFIX i686-w64-mingw32) + endif() + endif() +endif() + +if(SDL2_PREFIX) + set(SDL2_ORIGPREFIXPATH ${CMAKE_PREFIX_PATH}) + if(SDL2_ROOT_DIR) + list(APPEND CMAKE_PREFIX_PATH "${SDL2_ROOT_DIR}") + endif() + if(CMAKE_PREFIX_PATH) + foreach(_prefix ${CMAKE_PREFIX_PATH}) + list(APPEND CMAKE_PREFIX_PATH "${_prefix}/${SDL2_PREFIX}") + endforeach() + endif() + if(MINGWSEARCH_PREFIXES) + list(APPEND CMAKE_PREFIX_PATH ${MINGWSEARCH_PREFIXES}) + endif() +endif() + +# Invoke pkgconfig for hints +find_package(PkgConfig QUIET) +set(SDL2_INCLUDE_HINTS) +set(SDL2_LIB_HINTS) +if(PKG_CONFIG_FOUND) + pkg_search_module(SDL2PC QUIET sdl2) + if(SDL2PC_INCLUDE_DIRS) + set(SDL2_INCLUDE_HINTS ${SDL2PC_INCLUDE_DIRS}) + endif() + if(SDL2PC_LIBRARY_DIRS) + set(SDL2_LIB_HINTS ${SDL2PC_LIBRARY_DIRS}) + endif() +endif() + +include(FindPackageHandleStandardArgs) + +find_library(SDL2_LIBRARY + NAMES + SDL2 + HINTS + ${SDL2_LIB_HINTS} + PATHS + ${SDL2_ROOT_DIR} + ENV SDL2DIR + PATH_SUFFIXES lib SDL2 ${SDL2_LIB_PATH_SUFFIX}) + +set(_sdl2_framework FALSE) +# Some special-casing if we've found/been given a framework. +# Handles whether we're given the library inside the framework or the framework itself. +if(APPLE AND "${SDL2_LIBRARY}" MATCHES "(/[^/]+)*.framework(/.*)?$") + set(_sdl2_framework TRUE) + set(SDL2_FRAMEWORK "${SDL2_LIBRARY}") + # Move up in the directory tree as required to get the framework directory. + while("${SDL2_FRAMEWORK}" MATCHES "(/[^/]+)*.framework(/.*)$" AND NOT "${SDL2_FRAMEWORK}" MATCHES "(/[^/]+)*.framework$") + get_filename_component(SDL2_FRAMEWORK "${SDL2_FRAMEWORK}" DIRECTORY) + endwhile() + if("${SDL2_FRAMEWORK}" MATCHES "(/[^/]+)*.framework$") + set(SDL2_FRAMEWORK_NAME ${CMAKE_MATCH_1}) + # If we found a framework, do a search for the header ahead of time that will be more likely to get the framework header. + find_path(SDL2_INCLUDE_DIR + NAMES + SDL_haptic.h # this file was introduced with SDL2 + HINTS + "${SDL2_FRAMEWORK}/Headers/") + else() + # For some reason we couldn't get the framework directory itself. + # Shouldn't happen, but might if something is weird. + unset(SDL2_FRAMEWORK) + endif() +endif() + +find_path(SDL2_INCLUDE_DIR + NAMES + SDL_haptic.h # this file was introduced with SDL2 + HINTS + ${SDL2_INCLUDE_HINTS} + PATHS + ${SDL2_ROOT_DIR} + ENV SDL2DIR + PATH_SUFFIXES include include/sdl2 include/SDL2 SDL2) + +if(WIN32 AND SDL2_LIBRARY) + find_file(SDL2_RUNTIME_LIBRARY + NAMES + SDL2.dll + libSDL2.dll + HINTS + ${SDL2_LIB_HINTS} + PATHS + ${SDL2_ROOT_DIR} + ENV SDL2DIR + PATH_SUFFIXES bin lib ${SDL2_LIB_PATH_SUFFIX}) +endif() + + +if(WIN32 OR ANDROID OR IOS OR (APPLE AND NOT _sdl2_framework)) + set(SDL2_EXTRA_REQUIRED SDL2_SDLMAIN_LIBRARY) + find_library(SDL2_SDLMAIN_LIBRARY + NAMES + SDL2main + PATHS + ${SDL2_ROOT_DIR} + ENV SDL2DIR + PATH_SUFFIXES lib ${SDL2_LIB_PATH_SUFFIX}) +endif() + +if(MINGW AND NOT SDL2PC_FOUND) + find_library(SDL2_MINGW_LIBRARY mingw32) + find_library(SDL2_MWINDOWS_LIBRARY mwindows) +endif() + +if(SDL2_PREFIX) + # Restore things the way they used to be. + set(CMAKE_PREFIX_PATH ${SDL2_ORIGPREFIXPATH}) +endif() + +# handle the QUIETLY and REQUIRED arguments and set QUATLIB_FOUND to TRUE if +# all listed variables are TRUE +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(SDL2 + DEFAULT_MSG + SDL2_LIBRARY + SDL2_INCLUDE_DIR + ${SDL2_EXTRA_REQUIRED}) + +if(SDL2_FOUND) + if(NOT TARGET SDL2::SDL2) + # Create SDL2::SDL2 + if(WIN32 AND SDL2_RUNTIME_LIBRARY) + set(SDL2_DYNAMIC TRUE) + add_library(SDL2::SDL2 SHARED IMPORTED) + set_target_properties(SDL2::SDL2 + PROPERTIES + IMPORTED_IMPLIB "${SDL2_LIBRARY}" + IMPORTED_LOCATION "${SDL2_RUNTIME_LIBRARY}" + INTERFACE_INCLUDE_DIRECTORIES "${SDL2_INCLUDE_DIR}" + ) + else() + add_library(SDL2::SDL2 UNKNOWN IMPORTED) + if(SDL2_FRAMEWORK AND SDL2_FRAMEWORK_NAME) + # Handle the case that SDL2 is a framework and we were able to decompose it above. + set_target_properties(SDL2::SDL2 PROPERTIES + IMPORTED_LOCATION "${SDL2_FRAMEWORK}/${SDL2_FRAMEWORK_NAME}") + elseif(_sdl2_framework AND SDL2_LIBRARY MATCHES "(/[^/]+)*.framework$") + # Handle the case that SDL2 is a framework and SDL_LIBRARY is just the framework itself. + + # This takes the basename of the framework, without the extension, + # and sets it (as a child of the framework) as the imported location for the target. + # This is the library symlink inside of the framework. + set_target_properties(SDL2::SDL2 PROPERTIES + IMPORTED_LOCATION "${SDL2_LIBRARY}/${CMAKE_MATCH_1}") + else() + # Handle non-frameworks (including non-Mac), as well as the case that we're given the library inside of the framework + set_target_properties(SDL2::SDL2 PROPERTIES + IMPORTED_LOCATION "${SDL2_LIBRARY}") + endif() + set_target_properties(SDL2::SDL2 + PROPERTIES + INTERFACE_INCLUDE_DIRECTORIES "${SDL2_INCLUDE_DIR}" + ) + endif() + + if(APPLE) + # Need Cocoa here, is always a framework + find_library(SDL2_COCOA_LIBRARY Cocoa) + list(APPEND SDL2_EXTRA_REQUIRED SDL2_COCOA_LIBRARY) + if(SDL2_COCOA_LIBRARY) + set_target_properties(SDL2::SDL2 PROPERTIES + IMPORTED_LINK_INTERFACE_LIBRARIES ${SDL2_COCOA_LIBRARY}) + endif() + endif() + + + # Compute what to do with SDL2main + set(SDL2MAIN_LIBRARIES SDL2::SDL2) + add_library(SDL2::SDL2main INTERFACE IMPORTED) + if(SDL2_SDLMAIN_LIBRARY) + add_library(SDL2::SDL2main_real STATIC IMPORTED) + set_target_properties(SDL2::SDL2main_real + PROPERTIES + IMPORTED_LOCATION "${SDL2_SDLMAIN_LIBRARY}") + set(SDL2MAIN_LIBRARIES SDL2::SDL2main_real ${SDL2MAIN_LIBRARIES}) + endif() + if(MINGW) + # MinGW requires some additional libraries to appear earlier in the link line. + if(SDL2PC_LIBRARIES) + # Use pkgconfig-suggested extra libraries if available. + list(REMOVE_ITEM SDL2PC_LIBRARIES SDL2main SDL2) + set(SDL2MAIN_LIBRARIES ${SDL2PC_LIBRARIES} ${SDL2MAIN_LIBRARIES}) + else() + # fall back to extra libraries specified in pkg-config in + # an official binary distro of SDL2 for MinGW I downloaded + if(SDL2_MINGW_LIBRARY) + set(SDL2MAIN_LIBRARIES ${SDL2_MINGW_LIBRARY} ${SDL2MAIN_LIBRARIES}) + endif() + if(SDL2_MWINDOWS_LIBRARY) + set(SDL2MAIN_LIBRARIES ${SDL2_MWINDOWS_LIBRARY} ${SDL2MAIN_LIBRARIES}) + endif() + endif() + set_target_properties(SDL2::SDL2main + PROPERTIES + INTERFACE_COMPILE_DEFINITIONS "main=SDL_main") + endif() + set_target_properties(SDL2::SDL2main + PROPERTIES + INTERFACE_LINK_LIBRARIES "${SDL2MAIN_LIBRARIES}") + endif() + mark_as_advanced(SDL2_ROOT_DIR) +endif() + +mark_as_advanced(SDL2_LIBRARY + SDL2_RUNTIME_LIBRARY + SDL2_INCLUDE_DIR + SDL2_SDLMAIN_LIBRARY + SDL2_COCOA_LIBRARY + SDL2_MINGW_LIBRARY + SDL2_MWINDOWS_LIBRARY) diff --git a/cmake/cmake-modules/FindSonix12.cmake b/cmake/cmake-modules/FindSonix12.cmake new file mode 100644 index 000000000..0ab159961 --- /dev/null +++ b/cmake/cmake-modules/FindSonix12.cmake @@ -0,0 +1,162 @@ +# - try to find Sonix 1.2 library +# Requires VPR 2.0 and GMTL (thus FindVPR20.cmake and FindGMTL.cmake) +# Optionally uses Flagpoll and FindFlagpoll.cmake +# +# This library is a part of VR Juggler 2.2 - you probably want to use +# find_package(VRJuggler22) instead, for an easy interface to this and +# related scripts. See FindVRJuggler22.cmake for more information. +# +# SONIX12_LIBRARY_DIR, library search path +# SONIX12_INCLUDE_DIR, include search path +# SONIX12_LIBRARY, the library to link against +# SONIX12_FOUND, If false, do not try to use this library. +# +# Plural versions refer to this library and its dependencies, and +# are recommended to be used instead, unless you have a good reason. +# +# Useful configuration variables you might want to add to your cache: +# SONIX12_ROOT_DIR - A directory prefix to search +# (a path that contains include/ as a subdirectory) +# +# This script will use Flagpoll, if found, to provide hints to the location +# of this library, but does not use the compiler flags returned by Flagpoll +# directly. +# +# The VJ_BASE_DIR environment variable is also searched (preferentially) +# when searching for this component, so most sane build environments should +# "just work." Note that you need to manually re-run CMake if you 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> <abiryan@ryand.net> +# http://academic.cleardefinition.com +# Iowa State University HCI Graduate Program/VRAC +# +# Copyright Iowa State University 2009-2010. +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE_1_0.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) + + +set(_HUMAN "Sonix 1.2") +set(_RELEASE_NAMES sonix-1_2 libsonix-1_2) +set(_DEBUG_NAMES sonix_d-1_2 libsonix_d-1_2) +set(_DIR sonix-1.2) +set(_HEADER snx/sonix.h) +set(_FP_PKG_NAME sonix) + +include(SelectLibraryConfigurations) +include(CreateImportedTarget) +include(CleanLibraryList) +include(CleanDirectoryList) + +if(Sonix12_FIND_QUIETLY) + set(_FIND_FLAGS "QUIET") +else() + set(_FIND_FLAGS "") +endif() + +# Try flagpoll. +find_package(Flagpoll QUIET) + +if(FLAGPOLL) + flagpoll_get_include_dirs(${_FP_PKG_NAME} NO_DEPS) + flagpoll_get_library_dirs(${_FP_PKG_NAME} NO_DEPS) +endif() + +set(SONIX12_ROOT_DIR + "${SONIX12_ROOT_DIR}" + CACHE + PATH + "Root directory to search for Sonix") +if(DEFINED VRJUGGLER22_ROOT_DIR) + mark_as_advanced(SONIX12_ROOT_DIR) +endif() +if(NOT SONIX12_ROOT_DIR) + set(SONIX12_ROOT_DIR "${VRJUGGLER22_ROOT_DIR}") +endif() + +set(_ROOT_DIR "${SONIX12_ROOT_DIR}") + +find_path(SONIX12_INCLUDE_DIR + ${_HEADER} + HINTS + "${_ROOT_DIR}" + ${${_FP_PKG_NAME}_FLAGPOLL_INCLUDE_DIRS} + PATH_SUFFIXES + ${_DIR} + include/${_DIR} + include/ + DOC + "Path to ${_HUMAN} includes root") + +find_library(SONIX12_LIBRARY_RELEASE + NAMES + ${_RELEASE_NAMES} + HINTS + "${_ROOT_DIR}" + ${${_FP_PKG_NAME}_FLAGPOLL_LIBRARY_DIRS} + PATH_SUFFIXES + ${_VRJ_LIBSUFFIXES} + DOC + "${_HUMAN} release library full path") + +find_library(SONIX12_LIBRARY_DEBUG + NAMES + ${_DEBUG_NAMES} + HINTS + "${_ROOT_DIR}" + ${${_FP_PKG_NAME}_FLAGPOLL_LIBRARY_DIRS} + PATH_SUFFIXES + ${_VRJ_LIBDSUFFIXES} + DOC + "${_HUMAN} debug library full path") + +select_library_configurations(SONIX12) + +# Dependencies +if(NOT VPR20_FOUND) + find_package(VPR20 ${_FIND_FLAGS}) +endif() + +if(NOT GMTL_FOUND) + find_package(GMTL ${_FIND_FLAGS}) +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(Sonix12 + DEFAULT_MSG + SONIX12_LIBRARY + SONIX12_INCLUDE_DIR + VPR20_FOUND + VPR20_LIBRARIES + VPR20_INCLUDE_DIR + GMTL_FOUND + GMTL_INCLUDE_DIR) + +if(SONIX12_FOUND) + set(_DEPS ${VPR20_LIBRARIES}) + + set(SONIX12_INCLUDE_DIRS ${SONIX12_INCLUDE_DIR}) + list(APPEND + SONIX12_INCLUDE_DIRS + ${VPR20_INCLUDE_DIRS} + ${GMTL_INCLUDE_DIRS}) + + clean_directory_list(SONIX12_INCLUDE_DIRS) + + if(VRJUGGLER22_CREATE_IMPORTED_TARGETS) + create_imported_target(SONIX12 ${_DEPS}) + else() + clean_library_list(SONIX12_LIBRARIES ${_DEPS}) + endif() + + mark_as_advanced(SONIX12_ROOT_DIR) +endif() + +mark_as_advanced(SONIX12_LIBRARY_RELEASE + SONIX12_LIBRARY_DEBUG + SONIX12_INCLUDE_DIR) diff --git a/cmake/cmake-modules/FindSonix14.cmake b/cmake/cmake-modules/FindSonix14.cmake new file mode 100644 index 000000000..692216fdf --- /dev/null +++ b/cmake/cmake-modules/FindSonix14.cmake @@ -0,0 +1,163 @@ +# - try to find Sonix 1.4 library +# Requires VPR 2.2 and GMTL (thus FindVPR22.cmake and FindGMTL.cmake) +# Optionally uses Flagpoll and FindFlagpoll.cmake +# +# This library is a part of VR Juggler 3.0 - you probably want to use +# find_package(VRJuggler30) instead, for an easy interface to this and +# related scripts. See FindVRJuggler30.cmake for more information. +# +# SONIX14_LIBRARY_DIR, library search path +# SONIX14_INCLUDE_DIR, include search path +# SONIX14_LIBRARY, the library to link against +# SONIX14_FOUND, If false, do not try to use this library. +# +# Plural versions refer to this library and its dependencies, and +# are recommended to be used instead, unless you have a good reason. +# +# Useful configuration variables you might want to add to your cache: +# SONIX14_ROOT_DIR - A directory prefix to search +# (a path that contains include/ as a subdirectory) +# +# This script will use Flagpoll, if found, to provide hints to the location +# of this library, but does not use the compiler flags returned by Flagpoll +# directly. +# +# The VJ_BASE_DIR environment variable is also searched (preferentially) +# when searching for this component, so most sane build environments should +# "just work." Note that you need to manually re-run CMake if you 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> <abiryan@ryand.net> +# http://academic.cleardefinition.com +# Iowa State University HCI Graduate Program/VRAC +# Updated for VR Juggler 3.0 by: +# Brandon Newendorp <brandon@newendorp.com> + + +set(_HUMAN "Sonix 1.4") +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) + +include(SelectLibraryConfigurations) +include(CreateImportedTarget) +include(CleanLibraryList) +include(CleanDirectoryList) + +if(SONIX14_FIND_QUIETLY) + set(_FIND_FLAGS "QUIET") +else() + set(_FIND_FLAGS "") +endif() + +# Try flagpoll. +find_package(Flagpoll QUIET) + +if(FLAGPOLL) + flagpoll_get_include_dirs(${_FP_PKG_NAME} NO_DEPS) + flagpoll_get_library_dirs(${_FP_PKG_NAME} NO_DEPS) +endif() + +set(SONIX14_ROOT_DIR + "${SONIX14_ROOT_DIR}" + CACHE + PATH + "Root directory to search for Sonix") +if(DEFINED VRJUGGLER30_ROOT_DIR) + mark_as_advanced(SONIX14_ROOT_DIR) +endif() +if(NOT SONIX14_ROOT_DIR) + set(SONIX14_ROOT_DIR "${VRJUGGLER30_ROOT_DIR}") +endif() + +set(_ROOT_DIR "${SONIX14_ROOT_DIR}") + +find_path(SONIX14_INCLUDE_DIR + ${_HEADER} + HINTS + "${_ROOT_DIR}" + ${${_FP_PKG_NAME}_FLAGPOLL_INCLUDE_DIRS} + PATH_SUFFIXES + ${_DIR} + include/${_DIR} + include/ + DOC + "Path to ${_HUMAN} includes root") + +find_library(SONIX14_LIBRARY_RELEASE + NAMES + ${_RELEASE_NAMES} + HINTS + "${_ROOT_DIR}" + ${${_FP_PKG_NAME}_FLAGPOLL_LIBRARY_DIRS} + PATH_SUFFIXES + ${_VRJ_LIBSUFFIXES} + DOC + "${_HUMAN} release library full path") + +find_library(SONIX14_LIBRARY_DEBUG + NAMES + ${_DEBUG_NAMES} + HINTS + "${_ROOT_DIR}" + ${${_FP_PKG_NAME}_FLAGPOLL_LIBRARY_DIRS} + PATH_SUFFIXES + ${_VRJ_LIBDSUFFIXES} + DOC + "${_HUMAN} debug library full path") + +select_library_configurations(SONIX14) + +# Dependencies +if(NOT VPR22_FOUND) + find_package(VPR22 ${_FIND_FLAGS}) +endif() + +if(NOT GMTL_FOUND) + find_package(GMTL ${_FIND_FLAGS}) +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(SONIX14 + DEFAULT_MSG + SONIX14_LIBRARY + SONIX14_INCLUDE_DIR + VPR22_FOUND + VPR22_LIBRARIES + VPR22_INCLUDE_DIR + GMTL_FOUND + GMTL_INCLUDE_DIR) + +if(SONIX14_FOUND) + set(_DEPS ${VPR22_LIBRARIES}) + + set(SONIX14_INCLUDE_DIRS ${SONIX14_INCLUDE_DIR}) + list(APPEND + SONIX14_INCLUDE_DIRS + ${VPR22_INCLUDE_DIRS} + ${GMTL_INCLUDE_DIRS}) + + clean_directory_list(SONIX14_INCLUDE_DIRS) + + if(VRJUGGLER30_CREATE_IMPORTED_TARGETS) + create_imported_target(SONIX14 ${_DEPS}) + else() + clean_library_list(SONIX14_LIBRARIES ${_DEPS}) + endif() + + mark_as_advanced(SONIX14_ROOT_DIR) +endif() + +mark_as_advanced(SONIX14_LIBRARY_RELEASE + SONIX14_LIBRARY_DEBUG + SONIX14_INCLUDE_DIR) diff --git a/cmake/cmake-modules/FindTR1.cmake b/cmake/cmake-modules/FindTR1.cmake new file mode 100644 index 000000000..82bb1db50 --- /dev/null +++ b/cmake/cmake-modules/FindTR1.cmake @@ -0,0 +1,73 @@ +# - Try to find C++ TR1 headers and libraries +# Once done, this will define +# +# TR1_USE_FILE, which you may "include" in your CMake file to be able +# to use TR1 features transparently +# TR1_INCLUDE_DIRS, any directories needed to access TR1 headers +# TR1_LIBRARY_DIRS, any directories needed to access (auto-link) TR1 libraries +# TR1_FOUND, If false, do not try to use TR1 features. +# +# If TR1 features are not built-in, we will try to use Boost to +# substitute for them. +# +# Original Author: +# 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> +# http://academic.cleardefinition.com +# Iowa State University HCI Graduate Program/VRAC +# +# Copyright Iowa State University 2009-2010. +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE_1_0.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) + +# If we were sought quietly, any dependencies should be quiet as well +if(TR1_FIND_QUIETLY) + set(_findflags QUIET) +else() + set(_findflags) +endif() + +set(_check) +set(TR1_INCLUDE_DIRS) +set(TR1_LIBRARY_DIRS) + +get_filename_component(_findtr1moddir + ${CMAKE_CURRENT_LIST_FILE} + PATH) +set(TR1_USE_FILE "${_findtr1moddir}/UseTR1.cmake") + +if(WIN32) + if(MSVC) + set(PLATFORM "Visual Studio - no workarounds") + else() + set(PLATFORM "Unknown Windows platform - no workarounds set") + endif() + + if(MSVC_VERSION LESS 1600) + # Earlier than VS 2010 + # Missing stdint.h/cstdint + set(PLATFORM "Visual Studio older than Visual Studio 2010") + endif() + + if(MSVC_VERSION LESS 1500) + # Earlier than VS 2008 + # Missing all of TR1 + # (The feature pack or SP1 is required for VS2008 TR support) + set(PLATFORM "Visual Studio older than Visual Studio 2008") + list(APPEND _check Boost_FOUND) + find_package(Boost COMPONENTS math_c99 math_tr1 ${_findflags}) + list(APPEND + TR1_INCLUDE_DIRS + "${Boost_INCLUDE_DIR}/boost/tr1/tr1" + "${Boost_INCLUDE_DIR}/boost/tr1" + "${Boost_INCLUDE_DIR}") + list(APPEND TR1_LIBRARY_DIRS ${Boost_LIBRARY_DIRS}) + endif() +else() + set(PLATFORM "Non-Windows Platform - no workarounds set") +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}) diff --git a/cmake/cmake-modules/FindTooN.cmake b/cmake/cmake-modules/FindTooN.cmake new file mode 100644 index 000000000..1dda1de68 --- /dev/null +++ b/cmake/cmake-modules/FindTooN.cmake @@ -0,0 +1,68 @@ +# - try to find TooN headers +# +# Users may optionally supply: +# TOON_ROOT_DIR - a prefix to start searching for the toon headers. +# +# Cache Variables: (probably not for direct use in your scripts) +# TOON_INCLUDE_DIR +# +# Non-cache variables you might use in your CMakeLists.txt: +# TOON_FOUND +# TOON_INCLUDE_DIRS +# TOON_LIBRARIES +# +# Requires these CMake modules: +# FindPackageHandleStandardArgs (known included with CMake >=2.6.2) +# +# Original Author: +# 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> +# http://academic.cleardefinition.com +# Iowa State University HCI Graduate Program/VRAC +# +# Copyright Iowa State University 2009-2010. +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE_1_0.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) + +set(TOON_ROOT_DIR + "${TOON_ROOT_DIR}" + CACHE + PATH + "Path to search for TooN") + +### +# Dependencies +### +if(NOT LAPACKLIBS_ROOT_DIR) + set(LAPACKLIBS_ROOT_DIR "${TOON_ROOT_DIR}") +endif() +find_package(LAPACKLibs QUIET) + +### +# Configure TooN +### +find_path(TOON_INCLUDE_DIR + NAMES + TooN/TooN.h + HINTS + "${TOON_ROOT_DIR}" + PATH_SUFFIXES + include) +mark_as_advanced(TOON_INCLUDE_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(TooN + DEFAULT_MSG + TOON_INCLUDE_DIR + LAPACKLIBS_FOUND) + +if(TOON_FOUND) + set(TOON_INCLUDE_DIRS "${TOON_INCLUDE_DIR}") + set(TOON_LIBRARIES ${LAPACKLIBS_LIBRARIES}) + mark_as_advanced(TOON_ROOT_DIR) +endif() + + + diff --git a/cmake/cmake-modules/FindTooNtag.cmake b/cmake/cmake-modules/FindTooNtag.cmake new file mode 100644 index 000000000..76e790660 --- /dev/null +++ b/cmake/cmake-modules/FindTooNtag.cmake @@ -0,0 +1,84 @@ +# - try to find tag algorithm library (built on TooN) +# +# Users may optionally supply: +# TAG_ROOT_DIR - a prefix to start searching for the toon headers. +# +# Cache Variables: (probably not for direct use in your scripts) +# TAG_INCLUDE_DIR +# TAG_LIBRARY +# +# Non-cache variables you might use in your CMakeLists.txt: +# TOONTAG_FOUND +# TOONTAG_INCLUDE_DIRS +# TOONTAG_LIBRARIES +# +# Requires these CMake modules: +# FindPackageHandleStandardArgs (known included with CMake >=2.6.2) +# +# Original Author: +# 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> +# http://academic.cleardefinition.com +# Iowa State University HCI Graduate Program/VRAC +# +# Copyright Iowa State University 2009-2010. +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE_1_0.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) + +set(TOONTAG_ROOT_DIR + "${TOONTAG_ROOT_DIR}" + CACHE + PATH + "Path to search for tag") + +### +# Dependencies +### +if(NOT TOON_ROOT_DIR) + set(TOON_ROOT_DIR "${TOONTAG_ROOT_DIR}") +endif() +find_package(TooN QUIET) + +find_package(TR1 QUIET) +include("${TR1_USE_FILE}") + +### +# Configure tag +### +find_path(TOONTAG_INCLUDE_DIR + NAMES + tag/helpers.h + HINTS + "${TOONTAG_ROOT_DIR}" + PATH_SUFFIXES + tag + include) +mark_as_advanced(TOONTAG_INCLUDE_DIR) + +find_library(TOONTAG_LIBRARY + NAMES + toontag + HINTS + "${TOONTAG_ROOT_DIR}" + PATH_SUFFIXES + lib + lib64) +mark_as_advanced(TOONTAG_LIBRARY) + +# 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(TooNtag + DEFAULT_MSG + TOONTAG_LIBRARY + TOONTAG_INCLUDE_DIR + TOON_FOUND) + +if(TOONTAG_FOUND) + set(TOONTAG_INCLUDE_DIRS "${TOONTAG_INCLUDE_DIR}" ${TOON_INCLUDE_DIRS}) + set(TOONTAG_LIBRARIES "${TOONTAG_LIBRARY}" ${TOON_LIBRARIES}) + mark_as_advanced(TOONTAG_ROOT_DIR) +endif() + + + diff --git a/cmake/cmake-modules/FindTweek12.cmake b/cmake/cmake-modules/FindTweek12.cmake new file mode 100644 index 000000000..47b9a5e1a --- /dev/null +++ b/cmake/cmake-modules/FindTweek12.cmake @@ -0,0 +1,153 @@ +# - try to find Tweek 1.2 library +# Requires VPR 2.0 (thus FindVPR20.cmake) +# Optionally uses Flagpoll and FindFlagpoll.cmake +# +# This library is a part of VR Juggler 2.2 - you probably want to use +# find_package(VRJuggler22) instead, for an easy interface to this and +# related scripts. See FindVRJuggler22.cmake for more information. +# +# TWEEK12_LIBRARY_DIR, library search path +# TWEEK12_INCLUDE_DIR, include search path +# TWEEK12_LIBRARY, the library to link against +# TWEEK12_FOUND, If false, do not try to use this library. +# +# Plural versions refer to this library and its dependencies, and +# are recommended to be used instead, unless you have a good reason. +# +# Useful configuration variables you might want to add to your cache: +# TWEEK12_ROOT_DIR - A directory prefix to search +# (a path that contains include/ as a subdirectory) +# +# This script will use Flagpoll, if found, to provide hints to the location +# of this library, but does not use the compiler flags returned by Flagpoll +# directly. +# +# The VJ_BASE_DIR environment variable is also searched (preferentially) +# when searching for this component, so most sane build environments should +# "just work." Note that you need to manually re-run CMake if you 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> <abiryan@ryand.net> +# http://academic.cleardefinition.com +# Iowa State University HCI Graduate Program/VRAC +# +# Copyright Iowa State University 2009-2010. +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE_1_0.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) + + +set(_HUMAN "Tweek 1.2") +set(_RELEASE_NAMES tweek-1_2 libtweek-1_2) +set(_DEBUG_NAMES tweek_d-1_2 libtweek_d-1_2) +set(_DIR tweek-1.2) +set(_HEADER tweek/tweek.h) +set(_FP_PKG_NAME tweek) + +include(SelectLibraryConfigurations) +include(CreateImportedTarget) +include(CleanLibraryList) +include(CleanDirectoryList) + +if(Tweek12_FIND_QUIETLY) + set(_FIND_FLAGS "QUIET") +else() + set(_FIND_FLAGS "") +endif() + +# Try flagpoll. +find_package(Flagpoll QUIET) + +if(FLAGPOLL) + flagpoll_get_include_dirs(${_FP_PKG_NAME} NO_DEPS) + flagpoll_get_library_dirs(${_FP_PKG_NAME} NO_DEPS) +endif() + +set(TWEEK12_ROOT_DIR + "${TWEEK12_ROOT_DIR}" + CACHE + PATH + "Root directory to search for Tweek") +if(DEFINED VRJUGGLER22_ROOT_DIR) + mark_as_advanced(TWEEK12_ROOT_DIR) +endif() +if(NOT TWEEK12_ROOT_DIR) + set(TWEEK12_ROOT_DIR "${VRJUGGLER22_ROOT_DIR}") +endif() + +set(_ROOT_DIR "${TWEEK12_ROOT_DIR}") + +find_path(TWEEK12_INCLUDE_DIR + ${_HEADER} + HINTS + "${_ROOT_DIR}" + ${${_FP_PKG_NAME}_FLAGPOLL_INCLUDE_DIRS} + PATH_SUFFIXES + ${_DIR} + include/${_DIR} + include/ + DOC + "Path to ${_HUMAN} includes root") + +find_library(TWEEK12_LIBRARY_RELEASE + NAMES + ${_RELEASE_NAMES} + HINTS + "${_ROOT_DIR}" + ${${_FP_PKG_NAME}_FLAGPOLL_LIBRARY_DIRS} + PATH_SUFFIXES + ${_VRJ_LIBSUFFIXES} + DOC + "${_HUMAN} release library full path") + +find_library(TWEEK12_LIBRARY_DEBUG + NAMES + ${_DEBUG_NAMES} + HINTS + "${_ROOT_DIR}" + ${${_FP_PKG_NAME}_FLAGPOLL_LIBRARY_DIRS} + PATH_SUFFIXES + ${_VRJ_LIBDSUFFIXES} + DOC + "${_HUMAN} debug library full path") + +select_library_configurations(TWEEK12) + +# Dependency +if(NOT VPR20_FOUND) + find_package(VPR20 ${_FIND_FLAGS}) +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(Tweek12 + DEFAULT_MSG + TWEEK12_LIBRARY + TWEEK12_INCLUDE_DIR + VPR20_FOUND + VPR20_LIBRARIES + VPR20_INCLUDE_DIR) + +if(TWEEK12_FOUND) + set(_DEPS ${VPR20_LIBRARIES}) + + set(TWEEK12_INCLUDE_DIRS ${TWEEK12_INCLUDE_DIR}) + list(APPEND TWEEK12_INCLUDE_DIRS ${VPR20_INCLUDE_DIRS}) + + clean_directory_list(TWEEK12_INCLUDE_DIRS) + + if(VRJUGGLER22_CREATE_IMPORTED_TARGETS) + create_imported_target(TWEEK12 ${_DEPS}) + else() + clean_library_list(TWEEK12_LIBRARIES ${_DEPS}) + endif() + + mark_as_advanced(TWEEK12_ROOT_DIR) +endif() + +mark_as_advanced(TWEEK12_LIBRARY_RELEASE + TWEEK12_LIBRARY_DEBUG + TWEEK12_INCLUDE_DIR) diff --git a/cmake/cmake-modules/FindTweek14.cmake b/cmake/cmake-modules/FindTweek14.cmake new file mode 100644 index 000000000..c6e1e5b2d --- /dev/null +++ b/cmake/cmake-modules/FindTweek14.cmake @@ -0,0 +1,154 @@ +# - try to find Tweek 1.4 library +# Requires VPR 2.2 (thus FindVPR22.cmake) +# Optionally uses Flagpoll and FindFlagpoll.cmake +# +# This library is a part of VR Juggler 3.0 - you probably want to use +# find_package(VRJuggler30) instead, for an easy interface to this and +# related scripts. See FindVRJuggler30.cmake for more information. +# +# TWEEK14_LIBRARY_DIR, library search path +# TWEEK14_INCLUDE_DIR, include search path +# TWEEK14_LIBRARY, the library to link against +# TWEEK14_FOUND, If false, do not try to use this library. +# +# Plural versions refer to this library and its dependencies, and +# are recommended to be used instead, unless you have a good reason. +# +# Useful configuration variables you might want to add to your cache: +# TWEEK14_ROOT_DIR - A directory prefix to search +# (a path that contains include/ as a subdirectory) +# +# This script will use Flagpoll, if found, to provide hints to the location +# of this library, but does not use the compiler flags returned by Flagpoll +# directly. +# +# The VJ_BASE_DIR environment variable is also searched (preferentially) +# when searching for this component, so most sane build environments should +# "just work." Note that you need to manually re-run CMake if you 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> <abiryan@ryand.net> +# http://academic.cleardefinition.com +# Iowa State University HCI Graduate Program/VRAC +# Updated for VR Juggler 3.0 by: +# Brandon Newendorp <brandon@newendorp.com> + + +set(_HUMAN "Tweek 1.4") +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) + +include(SelectLibraryConfigurations) +include(CreateImportedTarget) +include(CleanLibraryList) +include(CleanDirectoryList) + +if(TWEEK14_FIND_QUIETLY) + set(_FIND_FLAGS "QUIET") +else() + set(_FIND_FLAGS "") +endif() + +# Try flagpoll. +find_package(Flagpoll QUIET) + +if(FLAGPOLL) + flagpoll_get_include_dirs(${_FP_PKG_NAME} NO_DEPS) + flagpoll_get_library_dirs(${_FP_PKG_NAME} NO_DEPS) +endif() + +set(TWEEK14_ROOT_DIR + "${TWEEK14_ROOT_DIR}" + CACHE + PATH + "Root directory to search for Tweek") +if(DEFINED VRJUGGLER30_ROOT_DIR) + mark_as_advanced(TWEEK14_ROOT_DIR) +endif() +if(NOT TWEEK14_ROOT_DIR) + set(TWEEK14_ROOT_DIR "${VRJUGGLER30_ROOT_DIR}") +endif() + +set(_ROOT_DIR "${TWEEK14_ROOT_DIR}") + +find_path(TWEEK14_INCLUDE_DIR + ${_HEADER} + HINTS + "${_ROOT_DIR}" + ${${_FP_PKG_NAME}_FLAGPOLL_INCLUDE_DIRS} + PATH_SUFFIXES + ${_DIR} + include/${_DIR} + include/ + DOC + "Path to ${_HUMAN} includes root") + +find_library(TWEEK14_LIBRARY_RELEASE + NAMES + ${_RELEASE_NAMES} + HINTS + "${_ROOT_DIR}" + ${${_FP_PKG_NAME}_FLAGPOLL_LIBRARY_DIRS} + PATH_SUFFIXES + ${_VRJ_LIBSUFFIXES} + DOC + "${_HUMAN} release library full path") + +find_library(TWEEK14_LIBRARY_DEBUG + NAMES + ${_DEBUG_NAMES} + HINTS + "${_ROOT_DIR}" + ${${_FP_PKG_NAME}_FLAGPOLL_LIBRARY_DIRS} + PATH_SUFFIXES + ${_VRJ_LIBDSUFFIXES} + DOC + "${_HUMAN} debug library full path") + +select_library_configurations(TWEEK14) + +# Dependency +if(NOT VPR22_FOUND) + find_package(VPR22 ${_FIND_FLAGS}) +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(TWEEK14 + DEFAULT_MSG + TWEEK14_LIBRARY + TWEEK14_INCLUDE_DIR + VPR22_FOUND + VPR22_LIBRARIES + VPR22_INCLUDE_DIR) + +if(TWEEK14_FOUND) + set(_DEPS ${VPR22_LIBRARIES}) + + set(TWEEK14_INCLUDE_DIRS ${TWEEK14_INCLUDE_DIR}) + list(APPEND TWEEK14_INCLUDE_DIRS ${VPR22_INCLUDE_DIRS}) + + clean_directory_list(TWEEK14_INCLUDE_DIRS) + + if(VRJUGGLER30_CREATE_IMPORTED_TARGETS) + create_imported_target(TWEEK14 ${_DEPS}) + else() + clean_library_list(TWEEK14_LIBRARIES ${_DEPS}) + endif() + + mark_as_advanced(TWEEK14_ROOT_DIR) +endif() + +mark_as_advanced(TWEEK14_LIBRARY_RELEASE + TWEEK14_LIBRARY_DEBUG + TWEEK14_INCLUDE_DIR) diff --git a/cmake/cmake-modules/FindVPR20.cmake b/cmake/cmake-modules/FindVPR20.cmake new file mode 100644 index 000000000..03eb12dc6 --- /dev/null +++ b/cmake/cmake-modules/FindVPR20.cmake @@ -0,0 +1,276 @@ +# - try to find VPR 2.0 library +# Requires Boost 1.33.1 or greater (including filesystem and signals libraries) +# (and thus FindBoost.cmake from 2.8rc3 or newer, preferably) +# Requires NSPR4 (and PLC4) on Windows +# Requires pthreads on Unix (Mac or Linux) +# Requires libuuid on Linux +# Optionally uses Flagpoll and FindFlagpoll.cmake +# +# This library is a part of VR Juggler 2.2 - you probably want to use +# find_package(VRJuggler22) instead, for an easy interface to this and +# related scripts. See FindVRJuggler22.cmake for more information. +# +# VPR20_LIBRARY_DIR, library search path +# VPR20_INCLUDE_DIR, include search path +# VPR20_LIBRARY, the library to link against +# VPR20_FOUND, If false, do not try to use this library. +# +# Plural versions refer to this library and its dependencies, and +# are recommended to be used instead, unless you have a good reason. +# +# Useful configuration variables you might want to add to your cache: +# VPR20_ROOT_DIR - A directory prefix to search +# (a path that contains include/ as a subdirectory) +# +# This script will use Flagpoll, if found, to provide hints to the location +# of this library, but does not use the compiler flags returned by Flagpoll +# directly. +# +# The VJ_BASE_DIR environment variable is also searched (preferentially) +# when searching for this component, so most sane build environments should +# "just work." Note that you need to manually re-run CMake if you 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> <abiryan@ryand.net> +# http://academic.cleardefinition.com +# Iowa State University HCI Graduate Program/VRAC +# +# Copyright Iowa State University 2009-2010. +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE_1_0.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) + +set(_HUMAN "VPR 2.0") +set(_RELEASE_NAMES vpr-2_0 libvpr-2_0) +set(_DEBUG_NAMES vpr_d-2_0 libvpr_d-2_0) +set(_DIR vpr-2.0) +set(_HEADER vpr/vpr.h) +set(_FP_PKG_NAME vpr) + +include(SelectLibraryConfigurations) +include(CreateImportedTarget) +include(CleanLibraryList) +include(CleanDirectoryList) + +if(VPR20_FIND_QUIETLY) + set(_FIND_FLAGS "QUIET") +else() + set(_FIND_FLAGS "") +endif() + +# Try flagpoll. +find_package(Flagpoll QUIET) + +if(FLAGPOLL) + flagpoll_get_include_dirs(${_FP_PKG_NAME} NO_DEPS) + flagpoll_get_library_dirs(${_FP_PKG_NAME} NO_DEPS) + flagpoll_get_extra_libs(${_FP_PKG_NAME} NO_DEPS) +endif() + +set(VPR20_ROOT_DIR + "${VPR20_ROOT_DIR}" + CACHE + PATH + "Root directory to search for VPR") +if(DEFINED VRJUGGLER22_ROOT_DIR) + mark_as_advanced(VPR20_ROOT_DIR) +endif() +if(NOT VPR20_ROOT_DIR) + set(VPR20_ROOT_DIR "${VRJUGGLER22_ROOT_DIR}") +endif() + +set(_ROOT_DIR "${VPR20_ROOT_DIR}") + +find_path(VPR20_INCLUDE_DIR + ${_HEADER} + HINTS + "${_ROOT_DIR}" + ${${_FP_PKG_NAME}_FLAGPOLL_INCLUDE_DIRS} + PATH_SUFFIXES + ${_DIR} + include/${_DIR} + include/ + DOC + "Path to ${_HUMAN} includes root") + +find_library(VPR20_LIBRARY_RELEASE + NAMES + ${_RELEASE_NAMES} + HINTS + "${_ROOT_DIR}" + ${${_FP_PKG_NAME}_FLAGPOLL_LIBRARY_DIRS} + PATH_SUFFIXES + ${_VRJ_LIBSUFFIXES} + DOC + "${_HUMAN} release library full path") + +find_library(VPR20_LIBRARY_DEBUG + NAMES + ${_DEBUG_NAMES} + HINTS + "${_ROOT_DIR}" + ${${_FP_PKG_NAME}_FLAGPOLL_LIBRARY_DIRS} + PATH_SUFFIXES + ${_VRJ_LIBDSUFFIXES} + DOC + "${_HUMAN} debug library full path") + +select_library_configurations(VPR20) + +# Dependencies +set(_deps_libs) +set(_deps_includes) +set(_deps_check) +if(COMMAND cmake_policy) + cmake_policy(SET CMP0011 NEW) + cmake_policy(SET CMP0012 NEW) +endif() +if((NOT "${Boost_FOUND}") + OR (NOT "${Boost_FILESYSTEM_FOUND}") + OR (NOT "${Boost_SIGNALS_FOUND}") + OR (Boost_VERSION GREATER 103401 AND NOT Boost_SYSTEM_FOUND)) + if(VPR20_LIBRARY_RELEASE) + # Find Boost in the same place as VPR + get_filename_component(VPR20_LIBRARY_DIR + ${VPR20_LIBRARY_RELEASE} + PATH) + set(BOOST_ROOT ${VPR20_LIBRARY_DIR}/../) + + if(APPLE) + # VR Juggler 2.2.1 binaries for Mac are built against single-threaded boost. + set(Boost_USE_STATIC_LIBS ON) + #set(Boost_USE_MULTITHREADED OFF) + endif() + + find_package(Boost + 1.33.1 + ${_FIND_FLAGS} + COMPONENTS + filesystem + signals) + + mark_as_advanced(Boost_LIB_DIAGNOSTIC_DEFINITIONS) + + if(WIN32 AND NOT Boost_FOUND) + if(NOT VPR20_FIND_QUIETLY) + message(STATUS + "Searching for Boost using forced '-vc80' override...") + endif() + set(Boost_COMPILER "-vc80") + find_package(Boost + 1.33.1 + ${_FIND_FLAGS} + COMPONENTS + filesystem + signals) + endif() + + if(Boost_VERSION GREATER 103401) + find_package(Boost + ${_FIND_FLAGS} + COMPONENTS + filesystem + system + signals) + endif() + endif() + +endif() + +list(APPEND + _deps_libs + ${Boost_FILESYSTEM_LIBRARY} + ${Boost_SYSTEM_LIBRARY} + ${Boost_SIGNALS_LIBRARY}) +list(APPEND _deps_includes ${Boost_INCLUDE_DIRS}) +list(APPEND + _deps_check + Boost_FILESYSTEM_LIBRARY + Boost_SIGNALS_LIBRARY + Boost_INCLUDE_DIRS) + +if(NOT CPPDOM_FOUND) + find_package(CPPDOM ${_FIND_FLAGS}) +endif() + +list(APPEND _deps_libs ${CPPDOM_LIBRARIES}) +list(APPEND _deps_includes ${CPPDOM_INCLUDE_DIRS}) +list(APPEND _deps_check CPPDOM_LIBRARIES CPPDOM_INCLUDE_DIRS) + +if(UNIX AND NOT WIN32) + if(NOT THREADS_FOUND) + find_package(Threads ${_FIND_FLAGS}) + endif() + + list(APPEND _deps_check THREADS_FOUND) + list(APPEND _deps_libs ${CMAKE_THREAD_LIBS_INIT}) + + if(NOT APPLE) + find_library(VPR20_libuuid_LIBRARY NAMES uuid) + mark_as_advanced(VPR20_libuuid_LIBRARY) + list(APPEND _deps_check VPR20_libuuid_LIBRARY) + list(APPEND _deps_libs ${VPR20_libuuid_LIBRARY}) + endif() +endif() + +if(WIN32) + find_library(VPR20_libnspr4_LIBRARY + NAMES + nspr4 + libnspr4 + HINTS + ${${_FP_PKG_NAME}_FLAGPOLL_LIBRARY_DIRS} + "${_ROOT_DIR}" + PATH_SUFFIXES + ${_VRJ_LIBSUFFIXES} + DOC + "${_HUMAN} NSPR4 library full path") + + find_library(VPR20_libplc4_LIBRARY + NAMES + plc4 + libplc4 + HINTS + ${${_FP_PKG_NAME}_FLAGPOLL_LIBRARY_DIRS} + "${_ROOT_DIR}" + PATH_SUFFIXES + ${_VRJ_LIBDSUFFIXES} + DOC + "${_HUMAN} PLC4 library full path") + mark_as_advanced(VPR20_libnspr4_LIBRARY VPR20_libplc4_LIBRARY) + list(APPEND _deps_check VPR20_libnspr4_LIBRARY VPR20_libplc4_LIBRARY) + list(APPEND + _deps_libs + ${VPR20_libnspr4_LIBRARY} + ${VPR20_libplc4_LIBRARY}) +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(VPR20 + DEFAULT_MSG + VPR20_LIBRARY + VPR20_INCLUDE_DIR + ${_deps_check}) + +if(VPR20_FOUND) + + set(VPR20_INCLUDE_DIRS "${VPR20_INCLUDE_DIR}" ${_deps_includes}) + + clean_directory_list(VPR20_INCLUDE_DIRS) + + if(VRJUGGLER22_CREATE_IMPORTED_TARGETS) + create_imported_target(VPR20 ${_deps_libs}) + else() + clean_library_list(VPR20_LIBRARIES ${VPR20_LIBRARY} ${_deps_libs}) + endif() + + mark_as_advanced(VPR20_ROOT_DIR) +endif() + +mark_as_advanced(VPR20_LIBRARY_RELEASE + VPR20_LIBRARY_DEBUG + VPR20_INCLUDE_DIR) diff --git a/cmake/cmake-modules/FindVPR22.cmake b/cmake/cmake-modules/FindVPR22.cmake new file mode 100644 index 000000000..d9ab26ff6 --- /dev/null +++ b/cmake/cmake-modules/FindVPR22.cmake @@ -0,0 +1,232 @@ +# - try to find VPR 2.2 library +# Requires Boost 1.33.1 or greater (including filesystem and signals libraries) +# (and thus FindBoost.cmake from 2.8rc3 or newer, preferably) +# Requires NSPR4 (and PLC4) on Windows +# Requires pthreads on Unix (Mac or Linux) +# Requires libuuid on Linux +# Optionally uses Flagpoll and FindFlagpoll.cmake +# +# This library is a part of VR Juggler 3.0 - you probably want to use +# find_package(VRJuggler30) instead, for an easy interface to this and +# related scripts. See FindVRJuggler30.cmake for more information. +# +# VPR22_LIBRARY_DIR, library search path +# VPR22_INCLUDE_DIR, include search path +# VPR22_LIBRARY, the library to link against +# VPR22_FOUND, If false, do not try to use this library. +# +# Plural versions refer to this library and its dependencies, and +# are recommended to be used instead, unless you have a good reason. +# +# Useful configuration variables you might want to add to your cache: +# VPR22_ROOT_DIR - A directory prefix to search +# (a path that contains include/ as a subdirectory) +# +# This script will use Flagpoll, if found, to provide hints to the location +# of this library, but does not use the compiler flags returned by Flagpoll +# directly. +# +# The VJ_BASE_DIR environment variable is also searched (preferentially) +# when searching for this component, so most sane build environments should +# "just work." Note that you need to manually re-run CMake if you 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> <abiryan@ryand.net> +# http://academic.cleardefinition.com +# Iowa State University HCI Graduate Program/VRAC +# Updated for VR Juggler 3.0 by: +# Brandon Newendorp <brandon@newendorp.com> + +set(_HUMAN "VPR 2.2") +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) + +include(SelectLibraryConfigurations) +include(CreateImportedTarget) +include(CleanLibraryList) +include(CleanDirectoryList) + +if(VPR22_FIND_QUIETLY) + set(_FIND_FLAGS "QUIET") +else() + set(_FIND_FLAGS "") +endif() + +# Try flagpoll. +find_package(Flagpoll QUIET) + +if(FLAGPOLL) + flagpoll_get_include_dirs(${_FP_PKG_NAME} NO_DEPS) + flagpoll_get_library_dirs(${_FP_PKG_NAME} NO_DEPS) + flagpoll_get_extra_libs(${_FP_PKG_NAME} NO_DEPS) +endif() + +set(VPR22_ROOT_DIR + "${VPR22_ROOT_DIR}" + CACHE + PATH + "Root directory to search for VPR") +if(DEFINED VRJUGGLER30_ROOT_DIR) + mark_as_advanced(VPR22_ROOT_DIR) +endif() +if(NOT VPR22_ROOT_DIR) + set(VPR22_ROOT_DIR "${VRJUGGLER30_ROOT_DIR}") +endif() + +set(_ROOT_DIR "${VPR22_ROOT_DIR}") + +find_path(VPR22_INCLUDE_DIR + ${_HEADER} + HINTS + "${_ROOT_DIR}" + ${${_FP_PKG_NAME}_FLAGPOLL_INCLUDE_DIRS} + PATH_SUFFIXES + ${_DIR} + include/${_DIR} + include/ + DOC + "Path to ${_HUMAN} includes root") + +find_library(VPR22_LIBRARY_RELEASE + NAMES + ${_RELEASE_NAMES} + HINTS + "${_ROOT_DIR}" + ${${_FP_PKG_NAME}_FLAGPOLL_LIBRARY_DIRS} + PATH_SUFFIXES + ${_VRJ_LIBSUFFIXES} + DOC + "${_HUMAN} release library full path") + +find_library(VPR22_LIBRARY_DEBUG + NAMES + ${_DEBUG_NAMES} + HINTS + "${_ROOT_DIR}" + ${${_FP_PKG_NAME}_FLAGPOLL_LIBRARY_DIRS} + PATH_SUFFIXES + ${_VRJ_LIBDSUFFIXES} + DOC + "${_HUMAN} debug library full path") + +select_library_configurations(VPR22) + +# Dependencies +set(_deps_libs) +set(_deps_includes) +set(_deps_check) +if(COMMAND cmake_policy) + cmake_policy(SET CMP0011 NEW) + cmake_policy(SET CMP0012 NEW) +endif() +if((NOT Boost_FOUND) + OR (NOT Boost_FILESYSTEM_FOUND) + OR (NOT Boost_SIGNALS_FOUND) + OR (NOT Boost_SYSTEM_FOUND) + OR (NOT Boost_PROGRAM_OPTIONS_FOUND) + OR (NOT Boost_DATE_TIME_FOUND) + OR (NOT Boost_REGEX_FOUND)) + if(VPR22_LIBRARY_RELEASE) + # Find Boost in the same place as VPR + get_filename_component(VPR22_LIBRARY_DIR + ${VPR22_LIBRARY_RELEASE} + PATH) + set(BOOST_ROOT ${VPR22_LIBRARY_DIR}/../) + + find_package(Boost + 1.40.0 + ${_FIND_FLAGS} + COMPONENTS + filesystem + system + signals + program_options + date_time + regex) + + mark_as_advanced(Boost_LIB_DIAGNOSTIC_DEFINITIONS) + + endif() + +endif() + +list(APPEND + _deps_libs + ${Boost_FILESYSTEM_LIBRARY} + ${Boost_SYSTEM_LIBRARY} + ${Boost_SIGNALS_LIBRARY} + ${Boost_PROGRAM_OPTIONS_LIBRARY} + ${Boost_DATE_TIME_LIBRARY} + ${Boost_REGEX_LIBRARY}) +list(APPEND _deps_includes ${Boost_INCLUDE_DIRS}) +list(APPEND + _deps_check + Boost_FILESYSTEM_LIBRARY + Boost_SYSTEM_LIBRARY + Boost_SIGNALS_LIBRARY + Boost_PROGRAM_OPTIONS_LIBRARY + Boost_DATE_TIME_LIBRARY + Boost_REGEX_LIBRARY + Boost_INCLUDE_DIRS) + +if(NOT CPPDOM_FOUND) + find_package(CPPDOM ${_FIND_FLAGS}) +endif() + +list(APPEND _deps_libs ${CPPDOM_LIBRARIES}) +list(APPEND _deps_includes ${CPPDOM_INCLUDE_DIRS}) +list(APPEND _deps_check CPPDOM_LIBRARIES CPPDOM_INCLUDE_DIRS) + +if(UNIX AND NOT WIN32) + if(NOT THREADS_FOUND) + find_package(Threads ${_FIND_FLAGS}) + endif() + + list(APPEND _deps_check THREADS_FOUND) + list(APPEND _deps_libs ${CMAKE_THREAD_LIBS_INIT}) + + if(NOT APPLE) + find_library(VPR22_libuuid_LIBRARY NAMES uuid) + mark_as_advanced(VPR22_libuuid_LIBRARY) + if(VPR22_libuuid_LIBRARY) + list(APPEND _deps_libs ${VPR22_libuuid_LIBRARY}) + endif() + endif() +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(VPR22 + DEFAULT_MSG + VPR22_LIBRARY + VPR22_INCLUDE_DIR + ${_deps_check}) + +if(VPR22_FOUND) + + set(VPR22_INCLUDE_DIRS ${VPR22_INCLUDE_DIR} ${_deps_includes}) + + clean_directory_list(VPR22_INCLUDE_DIRS) + + if(VRJUGGLER30_CREATE_IMPORTED_TARGETS) + create_imported_target(VPR22 ${_deps_libs}) + else() + clean_library_list(VPR22_LIBRARIES ${VPR22_LIBRARY} ${_deps_libs}) + endif() + + mark_as_advanced(VPR22_ROOT_DIR) +endif() + +mark_as_advanced(VPR22_LIBRARY_RELEASE + VPR22_LIBRARY_DEBUG + VPR22_INCLUDE_DIR) diff --git a/cmake/cmake-modules/FindVPS.cmake b/cmake/cmake-modules/FindVPS.cmake new file mode 100644 index 000000000..c2b52c03a --- /dev/null +++ b/cmake/cmake-modules/FindVPS.cmake @@ -0,0 +1,304 @@ +# - try to find VPS library +# +# VPS_LIBRARY_DIR, library search path +# VPS_INCLUDE_DIR, include search path +# VPS_{component}_LIBRARY, the library to link against +# VPS_FOUND, If false, do not try to use this library. +# +# Plural versions refer to this library and its dependencies, and +# are recommended to be used instead, unless you have a good reason. +# +# Useful configuration variables you might want to add to your cache: +# VPS_ROOT_DIR - A directory prefix to search +# (a path that contains include/ as a subdirectory) +# +# Original Author: +# 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> +# http://academic.cleardefinition.com +# Iowa State University HCI Graduate Program/VRAC +# +# Copyright Iowa State University 2009-2010. +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE_1_0.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) + +include(SelectLibraryConfigurations) +include(ListCombinations) +include(CheckVersion) +include(ListFilter) + +set(VPS_ROOT_DIR + "${VPS_ROOT_DIR}" + CACHE + PATH + "Root directory to search for VPS") + +# Try the config file mode. +find_package(VPS QUIET NO_MODULE) +if(VPS_FOUND) + mark_as_advanced(VPS_DIR VPS_ROOT_DIR) + return() +endif() + +if(NOT BITS) + if(CMAKE_SIZEOF_VOID_P MATCHES "8") + set(BITS 64) + else() + set(BITS 32) + endif() +endif() + +set(_vpslibnames) +set(_grviewerlibnames) + +### +# Cray MTA(Multi-Threaded Architecture) family: CMake build not tested +if("${CMAKE_SYSTEM_NAME}" STREQUAL "MTX") + set(VPS_PLATFORM MTX) + set(_VPS_FLAGS_32 "-pl all.pl -par") + set(_VPS_FLAGS_64 "-pl all.pl -par") +### +# Linux +elseif("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux") + set(VPS_PLATFORM LINUX) + set(_VPS_FLAGS_32 "-O2 -Wno-write-strings") + set(_VPS_FLAGS_64 "-m64 -O3 -ffast-math -funroll-all-loops -Wno-write-strings") + +### +# IBM-AIX: CMake build not tested +elseif("${CMAKE_SYSTEM_NAME}" STREQUAL "AIX") + set(VPS_PLATFORM AIX) + set(_VPS_FLAGS_32 "-q32") + set(_VPS_FLAGS_64 "-q64") + +### +# HP-UX: CMake build not tested +elseif("${CMAKE_SYSTEM_NAME}" STREQUAL "HP-UX") + set(VPS_PLATFORM HPUX) + set(_VPS_FLAGS_32 "-O") + +### +# SunOS: CMake build not tested +elseif("${CMAKE_SYSTEM_NAME}" STREQUAL "SunOS") + set(VPS_PLATFORM SOLARIS) + set(_VPS_FLAGS_32 "-O") + +### +# IRIX: CMake build not tested +elseif("${CMAKE_SYSTEM_NAME}" MATCHES "IRIX") + set(VPS_PLATFORM IRIX) + set(_VPS_FLAGS_32 "-O2 -OPT") + set(_VPS_FLAGS_64 "-64 -O2 -OPT") + +### +# Mac OS X +elseif(APPLE AND "${CMAKE_SYSTEM_NAME}" STREQUAL "Darwin") + set(VPS_PLATFORM MACOSX) + set(_VPS_FLAGS_32 "-O2 -lm -lobjc -lstdc++ -Wno-write-strings") + set(_VPS_FLAGS_64 "-m64 -O3 -ffast-math -funroll-all-loops -lm -lobjc -lstdc++ -Wno-write-strings") + +### +# Windows +elseif(WIN32) + set(VPS_PLATFORM WINDOWS) + set(_VPS_FLAGS_32 "-O2") + set(_VPS_FLAGS_64 "-O2") + + if(MSVC) + set(DEFS_32 -D_CRT_SECURE_NO_DEPRECATE) + set(DEFS_64 -D_CRT_SECURE_NO_DEPRECATE) + if(MSVC60) + set(VPS_CRT "VC6") + elseif(MSVC70) + set(VPS_CRT "VC7") + elseif(MSVC71) + set(VPS_CRT "VC71") + elseif(MSVC80) + set(VPS_CRT "VC8") + elseif(MSVC90) + set(VPS_CRT "VC9") + elseif(MSVC10) + set(VPS_CRT "VC10") + else() + set(VPS_CRT "VC") + endif() + endif() +endif() + +if(WIN32 AND MSVC) + set(PLATFORM win${BITS}) + set(_threadsuffix Mt) + if(MSVC71) + set(VC_VER vc71) + set(VC_VER_LONG vc71) + elseif(MSVC80) + set(VC_SHORT VC8) + set(VC_LONG MSVC80) + elseif(MSVC90) + set(VC_SHORT VC9) + set(VC_LONG MSVC90) + endif() + list(APPEND + _vpslibnames + "Vps${VC_SHORT}_${BITS}" + "Vps${VC_SHORT}_${BITS}${_threadsuffix}") +endif() + +list(APPEND _vpslibnames "Vps${VPS_PLATFORM}${VPS_CRT}_${BITS}") +list(APPEND + _grviewerlibnames + "Viewer" + "GrViewer${VPS_PLATFORM}${VPS_CRT}_${BITS}") + +### +# Configure VPS +### + +set(_incsearchdirs) +set(_libsearchdirs) + +if(WIN32) + include(ProgramFilesGlob) + program_files_glob(_dirs "/VPS*/") + program_files_glob(_dirs2 "/VPS/*/") + list(APPEND _dirs ${_dirs2}) +endif() + +list_combinations(_libsearchdirs + PREFIXES + "${VPS_ROOT_DIR}" + "${_dirs}" + SUFFIXES + "/lib" + "/Viewer") +list_combinations(_libsearchdirs2 + PREFIXES + ${_libsearchdirs} + SUFFIXES + "/Release" + "/RelWithDebInfo" + "/MinSizeRel" + "/Debug") +clean_directory_list(_libsearchdirs ${_libsearchdirs2}) + +list_combinations(_incsearchdirs + PREFIXES + "${VPS_ROOT_DIR}" + "${_dirs}" + SUFFIXES + "/include" + "/include/vps" + "/src" + "/../src" + "/Viewer" + "/../Viewer") +clean_directory_list(_incsearchdirs) + +# If a version was specified, the least we can do is remove any directories +# from our search that contain too low of versions +if(VPS_FIND_VERSION) + + set(_badversions) + foreach(_dir ${_libsearchdirs}) + string(REGEX MATCH "([0-9]).([0-9]).([0-9])" _ver "${_dir}") + if(_ver) + string(REGEX + REPLACE + "([0-9]).([0-9]).([0-9])" + "\\1.\\2.\\3" + _verstd + "${_ver}") + check_version(_result VPS "${_verstd}") + if(NOT _result) + list(APPEND _badversions "${_verstd}") + endif() + endif() + endforeach() + + foreach(_badver ${_badversions}) + list_filter_out(_libsearchdirs ${_badver} ${_libsearchdirs}) + list_filter_out(_incsearchdirs ${_badver} ${_incsearchdirs}) + endforeach() +endif() +if(_libsearchdirs) + list(SORT _libsearchdirs) + list(REVERSE _libsearchdirs) +endif() + +if(_incsearchdirs) + list(SORT _incsearchdirs) + list(REVERSE _incsearchdirs) +endif() + +find_library(VPS_vps_LIBRARY + NAMES + ${_vpslibnames} + PATH_SUFFIXES + LP + HINTS + ${_libsearchdirs} + PATHS + ${VPS_ROOT_DIR} + ${VPS_ROOT_DIR}/src + ${VPS_ROOT_DIR}/lib) + +find_path(VPS_vps_INCLUDE_DIR + NAMES + Vps.h + HINTS + ${_incsearchdirs} + PATHS + ${VPS_ROOT_DIR} + PATH_SUFFIXES + include + include/vps + src) + +find_library(VPS_grviewer_LIBRARY + NAMES + ${_grviewerlibnames} + HINTS + ${_libsearchdirs} + PATHS + ${VPS_ROOT_DIR} + PATH_SUFFIXES + lib + Viewer) + +find_path(VPS_grviewer_INCLUDE_DIR + NAMES + grViewerLib.h + HINTS + ${_incsearchdirs} + PATHS + ${VPS_ROOT_DIR} + PATH_SUFFIXES + include + include/vps + Viewer) + +mark_as_advanced(VPS_vps_LIBRARY + VPS_vps_INCLUDE_DIR + VPS_grviewer_LIBRARY + VPS_grviewer_INCLUDE_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(VPS + DEFAULT_MSG + VPS_vps_LIBRARY + VPS_vps_INCLUDE_DIR) + +if(VPS_FOUND) + set(VPS_vps_INCLUDE_DIRS "${VPS_vps_INCLUDE_DIR}") + set(VPS_INCLUDE_DIRS "${VPS_vps_INCLUDE_DIR}") + set(VPS_grviewer_INCLUDE_DIRS + "${VPS_vps_INCLUDE_DIR}" + "${VPS_grviewer_INCLUDE_DIR}") + set(VPS_LIBRARIES "${VPS_vps_LIBRARY}") + set(VPS_grviewer_LIBRARIES + "${VPS_vps_LIBRARY}" + "${VPS_grviewer_LIBRARY}") + mark_as_advanced(VPS_ROOT_DIR VPS_DIR) +endif() diff --git a/cmake/cmake-modules/FindVRJ22.cmake b/cmake/cmake-modules/FindVRJ22.cmake new file mode 100644 index 000000000..7a291f0a4 --- /dev/null +++ b/cmake/cmake-modules/FindVRJ22.cmake @@ -0,0 +1,210 @@ +# - try to find VR Juggler 2.2 core library +# Requires JCCL 1.2, Gadgeteer 1.2, VPR 2.0, and Sonix 1.2 +# (thus FindJCCL12.cmake, FindGadgeteer12.cmake, FindVPR20.cmake, +# and FindSonix12.cmake) +# Requires X11 if not on Mac or Windows. +# Optionally uses Flagpoll and FindFlagpoll.cmake +# +# This library is a part of VR Juggler 2.2 - you probably want to use +# find_package(VRJuggler22) instead, for an easy interface to this and +# related scripts. See FindVRJuggler22.cmake for more information. +# +# VRJ22_LIBRARY_DIR, library search path +# VRJ22_INCLUDE_DIR, include search path +# VRJ22_LIBRARY, the library to link against +# VRJ22_FOUND, If false, do not try to use this library. +# +# Plural versions refer to this library and its dependencies, and +# are recommended to be used instead, unless you have a good reason. +# +# Useful configuration variables you might want to add to your cache: +# VRJ22_ROOT_DIR - A directory prefix to search +# (a path that contains include/ as a subdirectory) +# +# This script will use Flagpoll, if found, to provide hints to the location +# of this library, but does not use the compiler flags returned by Flagpoll +# directly. +# +# The VJ_BASE_DIR environment variable is also searched (preferentially) +# when searching for this component, so most sane build environments should +# "just work." Note that you need to manually re-run CMake if you 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> <abiryan@ryand.net> +# http://academic.cleardefinition.com +# Iowa State University HCI Graduate Program/VRAC +# +# Copyright Iowa State University 2009-2010. +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE_1_0.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) + + +set(_HUMAN "VR Juggler 2.2 Core") +set(_RELEASE_NAMES vrj-2_2 libvrj-2_2) +set(_DEBUG_NAMES vrj_d-2_2 libvrj_d-2_2) +set(_DIR vrjuggler-2.2) +set(_HEADER vrj/Kernel/Kernel.h) +set(_FP_PKG_NAME vrjuggler) + +include(SelectLibraryConfigurations) +include(CreateImportedTarget) +include(CleanLibraryList) +include(CleanDirectoryList) + +if(VRJ22_FIND_QUIETLY) + set(_FIND_FLAGS "QUIET") +else() + set(_FIND_FLAGS "") +endif() + +# Try flagpoll. +find_package(Flagpoll QUIET) + +if(FLAGPOLL) + flagpoll_get_include_dirs(${_FP_PKG_NAME} NO_DEPS) + flagpoll_get_library_dirs(${_FP_PKG_NAME} NO_DEPS) + flagpoll_get_extra_libs(${_FP_PKG_NAME} NO_DEPS) +endif() + +set(VRJ22_ROOT_DIR + "${VRJ22_ROOT_DIR}" + CACHE + PATH + "Root directory to search for VRJ") +if(DEFINED VRJUGGLER22_ROOT_DIR) + mark_as_advanced(VRJ22_ROOT_DIR) +endif() +if(NOT VRJ22_ROOT_DIR) + set(VRJ22_ROOT_DIR "${VRJUGGLER22_ROOT_DIR}") +endif() + +set(_ROOT_DIR "${VRJ22_ROOT_DIR}") + +find_path(VRJ22_INCLUDE_DIR + ${_HEADER} + HINTS + "${_ROOT_DIR}" + ${${_FP_PKG_NAME}_FLAGPOLL_INCLUDE_DIRS} + PATH_SUFFIXES + ${_DIR} + include/${_DIR} + include/ + DOC + "Path to ${_HUMAN} includes root") + +find_library(VRJ22_LIBRARY_RELEASE + NAMES + ${_RELEASE_NAMES} + HINTS + "${_ROOT_DIR}" + ${${_FP_PKG_NAME}_FLAGPOLL_LIBRARY_DIRS} + PATH_SUFFIXES + ${_VRJ_LIBSUFFIXES} + DOC + "${_HUMAN} release library full path") + +find_library(VRJ22_LIBRARY_DEBUG + NAMES + ${_DEBUG_NAMES} + HINTS + "${_ROOT_DIR}" + ${${_FP_PKG_NAME}_FLAGPOLL_LIBRARY_DIRS} + PATH_SUFFIXES + ${_VRJ_LIBDSUFFIXES} + DOC + "${_HUMAN} debug library full path") + +select_library_configurations(VRJ22) + +# Dependencies +if(NOT JCCL12_FOUND) + find_package(JCCL12 ${_FIND_FLAGS}) +endif() + +if(NOT GADGETEER12_FOUND) + find_package(Gadgeteer12 ${_FIND_FLAGS}) +endif() + +if(NOT VPR20_FOUND) + find_package(VPR20 ${_FIND_FLAGS}) +endif() + +if(NOT SONIX12_FOUND) + find_package(Sonix12 ${_FIND_FLAGS}) +endif() + +if(UNIX AND NOT APPLE AND NOT WIN32) + if(NOT X11_FOUND) + find_package(X11 ${_FIND_FLAGS}) + endif() + set(_CHECK_EXTRAS + X11_FOUND + X11_X11_LIB + X11_ICE_LIB + X11_SM_LIB + X11_INCLUDE_DIR) +endif() +if(UNIX AND NOT WIN32) + find_library(VRJ22_libm_LIBRARY m) + mark_as_advanced(VRJ22_libm_LIBRARY) + list(APPEND _CHECK_EXTRAS VRJ22_libm_LIBRARY) +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(VRJ22 + DEFAULT_MSG + VRJ22_LIBRARY + VRJ22_INCLUDE_DIR + JCCL12_FOUND + JCCL12_LIBRARIES + JCCL12_INCLUDE_DIR + GADGETEER12_FOUND + GADGETEER12_LIBRARIES + GADGETEER12_INCLUDE_DIR + VPR20_FOUND + VPR20_LIBRARIES + VPR20_INCLUDE_DIR + SONIX12_FOUND + SONIX12_LIBRARIES + SONIX12_INCLUDE_DIR + ${_CHECK_EXTRAS}) + +if(VRJ22_FOUND) + set(_DEPS + ${JCCL12_LIBRARIES} + ${GADGETEER12_LIBRARIES} + ${VPR20_LIBRARIES} + ${SONIX12_LIBRARIES}) + if(UNIX AND NOT APPLE AND NOT WIN32) + list(APPEND _DEPS ${X11_X11_LIB} ${X11_ICE_LIB} ${X11_SM_LIB}) + endif() + if(UNIX AND NOT WIN32) + list(APPEND _DEPS ${VRJ22_libm_LIBRARY}) + endif() + + set(VRJ22_INCLUDE_DIRS "${VRJ22_INCLUDE_DIR}") + list(APPEND + VRJ22_INCLUDE_DIRS + ${JCCL12_INCLUDE_DIRS} + ${GADGETEER12_INCLUDE_DIRS} + ${VPR20_INCLUDE_DIRS} + ${SONIX12_INCLUDE_DIRS}) + clean_directory_list(VRJ22_INCLUDE_DIRS) + + if(VRJUGGLER22_CREATE_IMPORTED_TARGETS) + create_imported_target(VRJ22 ${_DEPS}) + else() + clean_library_list(VRJ22_LIBRARIES ${_DEPS}) + endif() + + mark_as_advanced(VRJ22_ROOT_DIR) +endif() + +mark_as_advanced(VRJ22_LIBRARY_RELEASE + VRJ22_LIBRARY_DEBUG + VRJ22_INCLUDE_DIR) diff --git a/cmake/cmake-modules/FindVRJ30.cmake b/cmake/cmake-modules/FindVRJ30.cmake new file mode 100644 index 000000000..30091bccf --- /dev/null +++ b/cmake/cmake-modules/FindVRJ30.cmake @@ -0,0 +1,216 @@ +# - try to find VR Juggler 3.0 core library +# Requires JCCL 1.4, Gadgeteer 1.4, VPR 2.2, and Sonix 1.4 +# (thus FindJCCL14.cmake, FindGadgeteer20.cmake, FindVPR22.cmake, +# and FindSonix14.cmake) +# Requires X11 if not on Mac or Windows. +# Optionally uses Flagpoll and FindFlagpoll.cmake +# +# This library is a part of VR Juggler 3.0 - you probably want to use +# find_package(VRJuggler30) instead, for an easy interface to this and +# related scripts. See FindVRJuggler30.cmake for more information. +# +# VRJ30_LIBRARY_DIR, library search path +# VRJ30_INCLUDE_DIR, include search path +# VRJ30_LIBRARY, the library to link against +# VRJ30_FOUND, If false, do not try to use this library. +# +# Plural versions refer to this library and its dependencies, and +# are recommended to be used instead, unless you have a good reason. +# +# Useful configuration variables you might want to add to your cache: +# VRJ30_ROOT_DIR - A directory prefix to search +# (a path that contains include/ as a subdirectory) +# +# This script will use Flagpoll, if found, to provide hints to the location +# of this library, but does not use the compiler flags returned by Flagpoll +# directly. +# +# The VJ_BASE_DIR environment variable is also searched (preferentially) +# when searching for this component, so most sane build environments should +# "just work." Note that you need to manually re-run CMake if you 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> <abiryan@ryand.net> +# http://academic.cleardefinition.com +# Iowa State University HCI Graduate Program/VRAC +# Updated for VR Juggler 3.0 by: +# Brandon Newendorp <brandon@newendorp.com> +# +# Copyright Iowa State University 2009-2010. +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE_1_0.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) + + +set(_HUMAN "VR Juggler 3.0 Core") +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) + +include(SelectLibraryConfigurations) +include(CreateImportedTarget) +include(CleanLibraryList) +include(CleanDirectoryList) + +if(VRJ30_FIND_QUIETLY) + set(_FIND_FLAGS "QUIET") +else() + set(_FIND_FLAGS "") +endif() + +# Try flagpoll. +find_package(Flagpoll QUIET) + +if(FLAGPOLL) + flagpoll_get_include_dirs(${_FP_PKG_NAME} NO_DEPS) + flagpoll_get_library_dirs(${_FP_PKG_NAME} NO_DEPS) + flagpoll_get_extra_libs(${_FP_PKG_NAME} NO_DEPS) +endif() + +set(VRJ30_ROOT_DIR + "${VRJ30_ROOT_DIR}" + CACHE + PATH + "Root directory to search for VRJ") +if(DEFINED VRJUGGLER30_ROOT_DIR) + mark_as_advanced(VRJ30_ROOT_DIR) +endif() +if(NOT VRJ30_ROOT_DIR) + set(VRJ30_ROOT_DIR "${VRJUGGLER30_ROOT_DIR}") +endif() + +set(_ROOT_DIR "${VRJ30_ROOT_DIR}") + +find_path(VRJ30_INCLUDE_DIR + ${_HEADER} + HINTS + "${_ROOT_DIR}" + ${${_FP_PKG_NAME}_FLAGPOLL_INCLUDE_DIRS} + PATH_SUFFIXES + ${_DIR} + include/${_DIR} + include/ + DOC + "Path to ${_HUMAN} includes root") + +find_library(VRJ30_LIBRARY_RELEASE + NAMES + ${_RELEASE_NAMES} + HINTS + "${_ROOT_DIR}" + ${${_FP_PKG_NAME}_FLAGPOLL_LIBRARY_DIRS} + PATH_SUFFIXES + ${_VRJ_LIBSUFFIXES} + DOC + "${_HUMAN} release library full path") + +find_library(VRJ30_LIBRARY_DEBUG + NAMES + ${_DEBUG_NAMES} + HINTS + "${_ROOT_DIR}" + ${${_FP_PKG_NAME}_FLAGPOLL_LIBRARY_DIRS} + PATH_SUFFIXES + ${_VRJ_LIBDSUFFIXES} + DOC + "${_HUMAN} debug library full path") + +select_library_configurations(VRJ30) + +# Dependencies +if(NOT JCCL14_FOUND) + find_package(JCCL14 ${_FIND_FLAGS}) +endif() + +if(NOT GADGETEER20_FOUND) + find_package(Gadgeteer20 ${_FIND_FLAGS}) +endif() + +if(NOT VPR22_FOUND) + find_package(VPR22 ${_FIND_FLAGS}) +endif() + +if(NOT SONIX14_FOUND) + find_package(Sonix14 ${_FIND_FLAGS}) +endif() + +if(UNIX AND NOT APPLE AND NOT WIN32) + if(NOT X11_FOUND) + find_package(X11 ${_FIND_FLAGS}) + endif() + set(_CHECK_EXTRAS + X11_FOUND + X11_X11_LIB + X11_ICE_LIB + X11_SM_LIB + X11_INCLUDE_DIR) +endif() +if(UNIX AND NOT WIN32) + find_library(VRJ30_libm_LIBRARY m) + mark_as_advanced(VRJ30_libm_LIBRARY) + list(APPEND _CHECK_EXTRAS VRJ30_libm_LIBRARY) +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(VRJ30 + DEFAULT_MSG + VRJ30_LIBRARY + VRJ30_INCLUDE_DIR + JCCL14_FOUND + JCCL14_LIBRARIES + JCCL14_INCLUDE_DIR + GADGETEER20_FOUND + GADGETEER20_LIBRARIES + GADGETEER20_INCLUDE_DIR + VPR22_FOUND + VPR22_LIBRARIES + VPR22_INCLUDE_DIR + SONIX14_FOUND + SONIX14_LIBRARIES + SONIX14_INCLUDE_DIR + ${_CHECK_EXTRAS}) + +if(VRJ30_FOUND) + set(_DEPS + ${JCCL14_LIBRARIES} + ${GADGETEER20_LIBRARIES} + ${VPR22_LIBRARIES} + ${SONIX14_LIBRARIES}) + if(UNIX AND NOT APPLE AND NOT WIN32) + list(APPEND _DEPS ${X11_X11_LIB} ${X11_ICE_LIB} ${X11_SM_LIB}) + endif() + if(UNIX AND NOT WIN32) + list(APPEND _DEPS ${VRJ30_libm_LIBRARY}) + endif() + + set(VRJ30_INCLUDE_DIRS ${VRJ30_INCLUDE_DIR}) + list(APPEND + VRJ30_INCLUDE_DIRS + ${JCCL14_INCLUDE_DIRS} + ${GADGETEER20_INCLUDE_DIRS} + ${VPR22_INCLUDE_DIRS} + ${SONIX14_INCLUDE_DIRS}) + clean_directory_list(VRJ30_INCLUDE_DIRS) + + if(VRJUGGLER30_CREATE_IMPORTED_TARGETS) + create_imported_target(VRJ30 ${_DEPS}) + else() + clean_library_list(VRJ30_LIBRARIES ${_DEPS}) + endif() + + mark_as_advanced(VRJ30_ROOT_DIR) +endif() + +mark_as_advanced(VRJ30_LIBRARY_RELEASE + VRJ30_LIBRARY_DEBUG + VRJ30_INCLUDE_DIR) diff --git a/cmake/cmake-modules/FindVRJOGL22.cmake b/cmake/cmake-modules/FindVRJOGL22.cmake new file mode 100644 index 000000000..7f0aafd8d --- /dev/null +++ b/cmake/cmake-modules/FindVRJOGL22.cmake @@ -0,0 +1,161 @@ +# - try to find VRJuggler 2.2 OpenGL library +# Requires VRJ core 2.2 (thus FindVRJ22.cmake) +# Requires OpenGL. +# Optionally uses Flagpoll and FindFlagpoll.cmake +# +# This library is a part of VR Juggler 2.2 - you probably want to use +# find_package(VRJuggler22) instead, for an easy interface to this and +# related scripts. See FindVRJuggler22.cmake for more information. +# +# VRJOGL22_LIBRARY_DIR, library search path +# VRJOGL22_INCLUDE_DIRS, include search path for dependencies +# VRJOGL22_LIBRARY, the library to link against +# VRJOGL22_FOUND, If false, do not try to use this library. +# +# Plural versions refer to this library and its dependencies, and +# are recommended to be used instead, unless you have a good reason. +# +# Useful configuration variables you might want to add to your cache: +# VRJOGL22_ROOT_DIR - A directory prefix to search +# (a path that contains include/ as a subdirectory) +# +# This script will use Flagpoll, if found, to provide hints to the location +# of this library, but does not use the compiler flags returned by Flagpoll +# directly. +# +# The VJ_BASE_DIR environment variable is also searched (preferentially) +# when searching for this component, so most sane build environments should +# "just work." Note that you need to manually re-run CMake if you 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> <abiryan@ryand.net> +# http://academic.cleardefinition.com +# Iowa State University HCI Graduate Program/VRAC +# +# Copyright Iowa State University 2009-2010. +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE_1_0.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) + + +set(_HUMAN "VR Juggler 2.2 OpenGL Core") +set(_RELEASE_NAMES vrj_ogl-2_2 libvrj_ogl-2_2) +set(_DEBUG_NAMES vrj_ogl_d-2_2 libvrj_ogl_d-2_2) +set(_DIR vrjuggler-2.2) +set(_FP_PKG_NAME vrjuggler-opengl) + +include(SelectLibraryConfigurations) +include(CreateImportedTarget) +include(CleanLibraryList) +include(CleanDirectoryList) + +if(VRJOGL22_FIND_QUIETLY) + set(_FIND_FLAGS "QUIET") +else() + set(_FIND_FLAGS "") +endif() + +# Try flagpoll. +find_package(Flagpoll QUIET) + +if(FLAGPOLL) + flagpoll_get_library_dirs(${_FP_PKG_NAME} NO_DEPS) + flagpoll_get_library_names(${_FP_PKG_NAME} NO_DEPS) +endif() + +set(VRJOGL22_ROOT_DIR + "${VRJOGL22_ROOT_DIR}" + CACHE + PATH + "Root directory to search for VRJOGL") +if(DEFINED VRJUGGLER22_ROOT_DIR) + mark_as_advanced(VRJOGL22_ROOT_DIR) +endif() +if(NOT VRJOGL22_ROOT_DIR) + set(VRJOGL22_ROOT_DIR "${VRJUGGLER22_ROOT_DIR}") +endif() + +set(_ROOT_DIR "${VRJOGL22_ROOT_DIR}") + +find_library(VRJOGL22_LIBRARY_RELEASE + NAMES + ${_RELEASE_NAMES} + HINTS + "${_ROOT_DIR}" + ${${_FP_PKG_NAME}_FLAGPOLL_LIBRARY_DIRS} + PATH_SUFFIXES + ${_VRJ_LIBSUFFIXES} + DOC + "${_HUMAN} release library full path") + +find_library(VRJOGL22_LIBRARY_DEBUG + NAMES + ${_DEBUG_NAMES} + HINTS + "${_ROOT_DIR}" + ${${_FP_PKG_NAME}_FLAGPOLL_LIBRARY_DIRS} + PATH_SUFFIXES + ${_VRJ_LIBDSUFFIXES} + DOC + "${_HUMAN} debug library full path") + +select_library_configurations(VRJOGL22) + +# Dependency +if(NOT VRJ22_FOUND) + find_package(VRJ22 ${_FIND_FLAGS}) +endif() + +if(NOT OPENGL_FOUND) + find_package(OpenGL ${_FIND_FLAGS}) +endif() + +if(APPLE) + set(VRJOGL22_AppKit_LIBRARY + "-framework AppKit" + CACHE + STRING + "AppKit framework for OSX") + set(VRJOGL22_Cocoa_LIBRARY + "-framework Cocoa" + CACHE + STRING + "Cocoa framework for OSX") + mark_as_advanced(VRJOGL22_AppKit_LIBRARY VRJOGL22_Cocoa_LIBRARY) +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(VRJOGL22 + DEFAULT_MSG + VRJOGL22_LIBRARY + VRJ22_FOUND + VRJ22_LIBRARIES + VRJ22_INCLUDE_DIRS + OPENGL_FOUND + OPENGL_LIBRARIES) + +if(VRJOGL22_FOUND) + set(_DEPS ${VRJ22_LIBRARIES} ${OPENGL_LIBRARIES}) + if(APPLE) + list(APPEND + _DEPS + ${VRJOGL22_AppKit_LIBRARY} + ${VRJOGL22_Cocoa_LIBRARY}) + endif() + + set(VRJOGL22_INCLUDE_DIRS ${VRJ22_INCLUDE_DIRS} ${OPENGL_INCLUDE_DIRS}) + + if(VRJUGGLER22_CREATE_IMPORTED_TARGETS) + create_imported_target(VRJOGL22 ${_DEPS}) + else() + clean_library_list(VRJOGL22_LIBRARIES ${_DEPS}) + endif() + + mark_as_advanced(VRJOGL22_ROOT_DIR) +endif() + +mark_as_advanced(VRJOGL22_LIBRARY_RELEASE VRJOGL22_LIBRARY_DEBUG) diff --git a/cmake/cmake-modules/FindVRJOGL30.cmake b/cmake/cmake-modules/FindVRJOGL30.cmake new file mode 100644 index 000000000..780e2c335 --- /dev/null +++ b/cmake/cmake-modules/FindVRJOGL30.cmake @@ -0,0 +1,162 @@ +# - try to find VRJuggler 3.0 OpenGL library +# Requires VRJ core 3.0 (thus FindVRJ30.cmake) +# Requires OpenGL. +# Optionally uses Flagpoll and FindFlagpoll.cmake +# +# This library is a part of VR Juggler 3.0 - you probably want to use +# find_package(VRJuggler30) instead, for an easy interface to this and +# related scripts. See FindVRJuggler30.cmake for more information. +# +# VRJOGL30_LIBRARY_DIR, library search path +# VRJOGL30_INCLUDE_DIRS, include search path for dependencies +# VRJOGL30_LIBRARY, the library to link against +# VRJOGL30_FOUND, If false, do not try to use this library. +# +# Plural versions refer to this library and its dependencies, and +# are recommended to be used instead, unless you have a good reason. +# +# Useful configuration variables you might want to add to your cache: +# VRJOGL30_ROOT_DIR - A directory prefix to search +# (a path that contains include/ as a subdirectory) +# +# This script will use Flagpoll, if found, to provide hints to the location +# of this library, but does not use the compiler flags returned by Flagpoll +# directly. +# +# The VJ_BASE_DIR environment variable is also searched (preferentially) +# when searching for this component, so most sane build environments should +# "just work." Note that you need to manually re-run CMake if you 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> <abiryan@ryand.net> +# http://academic.cleardefinition.com +# Iowa State University HCI Graduate Program/VRAC +# Updated for VR Juggler 3.0 by: +# Brandon Newendorp <brandon@newendorp.com> + + +set(_HUMAN "VR Juggler 3.0 OpenGL Core") +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) +include(CleanLibraryList) +include(CleanDirectoryList) + +if(VRJOGL30_FIND_QUIETLY) + set(_FIND_FLAGS "QUIET") +else() + set(_FIND_FLAGS "") +endif() + +# Try flagpoll. +find_package(Flagpoll QUIET) + +if(FLAGPOLL) + flagpoll_get_library_dirs(${_FP_PKG_NAME} NO_DEPS) + flagpoll_get_library_names(${_FP_PKG_NAME} NO_DEPS) +endif() + +set(VRJOGL30_ROOT_DIR + "${VRJOGL30_ROOT_DIR}" + CACHE + PATH + "Root directory to search for VRJOGL") +if(DEFINED VRJUGGLER30_ROOT_DIR) + mark_as_advanced(VRJOGL30_ROOT_DIR) +endif() +if(NOT VRJOGL30_ROOT_DIR) + set(VRJOGL30_ROOT_DIR "${VRJUGGLER30_ROOT_DIR}") +endif() + +set(_ROOT_DIR "${VRJOGL30_ROOT_DIR}") + +find_library(VRJOGL30_LIBRARY_RELEASE + NAMES + ${_RELEASE_NAMES} + HINTS + "${_ROOT_DIR}" + ${${_FP_PKG_NAME}_FLAGPOLL_LIBRARY_DIRS} + PATH_SUFFIXES + ${_VRJ_LIBSUFFIXES} + DOC + "${_HUMAN} release library full path") + +find_library(VRJOGL30_LIBRARY_DEBUG + NAMES + ${_DEBUG_NAMES} + HINTS + "${_ROOT_DIR}" + ${${_FP_PKG_NAME}_FLAGPOLL_LIBRARY_DIRS} + PATH_SUFFIXES + ${_VRJ_LIBDSUFFIXES} + DOC + "${_HUMAN} debug library full path") + +select_library_configurations(VRJOGL30) + +# Dependency +if(NOT VRJ30_FOUND) + find_package(VRJ30 ${_FIND_FLAGS}) +endif() + +if(NOT OPENGL_FOUND) + find_package(OpenGL ${_FIND_FLAGS}) +endif() + +if(APPLE) + set(VRJOGL30_AppKit_LIBRARY + "-framework AppKit" + CACHE + STRING + "AppKit framework for OSX") + set(VRJOGL30_Cocoa_LIBRARY + "-framework Cocoa" + CACHE + STRING + "Cocoa framework for OSX") + mark_as_advanced(VRJOGL30_AppKit_LIBRARY VRJOGL30_Cocoa_LIBRARY) +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(VRJOGL30 + DEFAULT_MSG + VRJOGL30_LIBRARY + VRJ30_FOUND + VRJ30_LIBRARIES + VRJ30_INCLUDE_DIRS + OPENGL_FOUND + OPENGL_LIBRARIES) + +if(VRJOGL30_FOUND) + set(_DEPS ${VRJ30_LIBRARIES} ${OPENGL_LIBRARIES}) + if(APPLE) + list(APPEND + _DEPS + ${VRJOGL30_AppKit_LIBRARY} + ${VRJOGL30_Cocoa_LIBRARY}) + endif() + + set(VRJOGL30_INCLUDE_DIRS ${VRJ30_INCLUDE_DIRS} ${OPENGL_INCLUDE_DIRS}) + + if(VRJUGGLER30_CREATE_IMPORTED_TARGETS) + create_imported_target(VRJOGL30 ${_DEPS}) + else() + clean_library_list(VRJOGL30_LIBRARIES ${_DEPS}) + endif() + + mark_as_advanced(VRJOGL30_ROOT_DIR) +endif() + +mark_as_advanced(VRJOGL30_LIBRARY_RELEASE VRJOGL30_LIBRARY_DEBUG) diff --git a/cmake/cmake-modules/FindVRJuggler.cmake b/cmake/cmake-modules/FindVRJuggler.cmake new file mode 100644 index 000000000..c794d0906 --- /dev/null +++ b/cmake/cmake-modules/FindVRJuggler.cmake @@ -0,0 +1,198 @@ +# - try to find VR Juggler-related packages (combined finder) +# VRJUGGLER_INCLUDE_DIRS, include search paths +# VRJUGGLER_LIBRARIES, the libraries to link against +# VRJUGGLER_ENVIRONMENT +# VRJUGGLER_RUNTIME_LIBRARY_DIRS +# VRJUGGLER_CXX_FLAGS +# VRJUGGLER_DEFINITIONS +# VRJUGGLER_FOUND, If false, do not try to use VR Juggler. +# +# Components available to search for (uses "VRJOGL" by default): +# VRJOGL +# VRJ +# Gadgeteer +# JCCL +# VPR +# Sonix +# Tweek +# +# Additionally, a full setup requires these packages and their Find_.cmake scripts +# CPPDOM +# GMTL +# +# Optionally uses Flagpoll (and FindFlagpoll.cmake) +# +# Notes on components: +# - All components automatically include their dependencies. +# - If you do not specify a component, VRJOGL (the OpenGL view manager) +# will be used by default. +# - Capitalization of component names does not matter, but it's best to +# pretend it does and use the above capitalization. +# - Since this script calls find_package for your requested components and +# their dependencies, you can use any of the variables specified in those +# files in addition to the "summary" ones listed here, for more finely +# controlled building and linking. +# +# This CMake script requires all of the Find*.cmake scripts for the +# components listed above, as it is only a "meta-script" designed to make +# using those scripts more developer-friendly. +# +# Useful configuration variables you might want to add to your cache: +# (CAPS COMPONENT NAME)_ROOT_DIR - A directory prefix to search +# (a path that contains include/ as a subdirectory) +# +# The VJ_BASE_DIR environment variable is also searched (preferentially) +# when seeking any of the above components, as well as Flagpoll, CPPDOM, +# and Boost (from within VPR), so most sane build environments should +# "just work." +# +# IMPORTANT: Note that you need to manually re-run CMake if you 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> <abiryan@ryand.net> +# http://academic.cleardefinition.com +# Iowa State University HCI Graduate Program/VRAC +# Updated for VR Juggler 3.0 by: +# Brandon Newendorp <brandon@newendorp.com> +# +# Copyright Iowa State University 2009-2010. +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE_1_0.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) + +include(CleanLibraryList) +include(CleanDirectoryList) +include(FindPackageMessage) + +if(NOT VRJUGGLER_ROOT_DIR) + file(TO_CMAKE_PATH "$ENV{VJ_BASE_DIR}" VRJUGGLER_ROOT_DIR) +endif() + +set(VRJUGGLER_ROOT_DIR + "${VRJUGGLER_ROOT_DIR}" + CACHE + PATH + "Additional root directory to search for VR Juggler and its dependencies.") +if(NOT VRJUGGLER_ROOT_DIR) + file(TO_CMAKE_PATH "$ENV{VJ_BASE_DIR}" VRJUGGLER30_ROOT_DIR) +endif() + +# Default required components +if(NOT VRJuggler_FIND_COMPONENTS) + set(VRJuggler_FIND_COMPONENTS vrjogl) +endif() + +if(VRJuggler30_FIND_QUIETLY) + set(_FIND_FLAGS "QUIET") +else() + set(_FIND_FLAGS "") +endif() + +set(VRJUGGLER_FIND_22 TRUE) +set(VRJUGGLER_FIND_30 TRUE) +if(VRJuggler_FIND_VERSION) + if(VRJuggler_FIND_VERSION_EXACT) + if(VRJuggler_FIND_VERSION MATCHES "2.2" OR VRJuggler_FIND_VERSION MATCHES "22") + set(VRJUGGLER_FIND_30 FALSE) + elseif(VRJuggler_FIND_VERSION MATCHES "3.0" OR VRJuggler_FIND_VERSION MATCHES "30") + set(VRJUGGLER_FIND_22 FALSE) + endif() + else() + if(VRJuggler_FIND_VERSION MATCHES "3.0" OR VRJuggler_FIND_VERSION MATCHES "30") + set(VRJUGGLER_FIND_22 FALSE) + endif() + endif() +endif() + +if(VRJUGGLER_FIND_30) + if(NOT VRJUGGLER30_ROOT_DIR) + set(VRJUGGLER30_ROOT_DIR ${VRJUGGLER_ROOT_DIR}) + endif() + find_package(VRJuggler30 COMPONENTS ${VRJuggler_FIND_COMPONENTS}) + if(VRJUGGLER30_FOUND) + set(VRJUGGLER_FOUND TRUE) + + set(VRJUGGLER_LIBRARIES ${VRJUGGLER30_LIBRARIES}) + set(VRJUGGLER_INCLUDE_DIRS ${VRJUGGLER30_INCLUDE_DIRS}) + set(VRJUGGLER_LIBRARY_DIRS ${VRJUGGLER30_LIBRARY_DIRS}) + + set(VRJUGGLER_ENVIRONMENT ${VRJUGGLER30_ENVIRONMENT}) + set(VRJUGGLER_RUNTIME_LIBRARY_DIRS ${VRJUGGLER30_RUNTIME_LIBRARY_DIRS}) + + set(VRJUGGLER_CXX_FLAGS ${VRJUGGLER30_CXX_FLAGS}) + set(VRJUGGLER_DEFINITIONS ${VRJUGGLER30_DEFINITIONS}) + set(VRJUGGLER_BUNDLE_PLUGINS ${VRJUGGLER30_BUNDLE_PLUGINS}) + set(VRJUGGLER_VJ_BASE_DIR ${VRJUGGLER30_VJ_BASE_DIR}) + set(VRJUGGLER_VERSION 3.0) + + macro(install_vrjuggler_data_files prefix) + install_vrjuggler30_data_files("${prefix}" ${ARGN}) + endmacro() + + macro(install_vrjuggler_plugins prefix varForFilenames) + install_vrjuggler30_plugins("${prefix}" ${varForFilenames} ${ARGN}) + endmacro() + endif() +endif() + +if(VRJUGGLER_FIND_22 AND (NOT VRJUGGLER_FOUND)) + + if(NOT VRJUGGLER22_ROOT_DIR) + set(VRJUGGLER22_ROOT_DIR ${VRJUGGLER_ROOT_DIR}) + endif() + find_package(VRJuggler22 COMPONENTS ${VRJuggler_FIND_COMPONENTS}) + if(VRJUGGLER22_FOUND) + set(VRJUGGLER_FOUND TRUE) + + set(VRJUGGLER_LIBRARIES ${VRJUGGLER22_LIBRARIES}) + set(VRJUGGLER_INCLUDE_DIRS ${VRJUGGLER22_INCLUDE_DIRS}) + set(VRJUGGLER_LIBRARY_DIRS ${VRJUGGLER22_LIBRARY_DIRS}) + + set(VRJUGGLER_ENVIRONMENT ${VRJUGGLER22_ENVIRONMENT}) + set(VRJUGGLER_RUNTIME_LIBRARY_DIRS ${VRJUGGLER22_RUNTIME_LIBRARY_DIRS}) + + set(VRJUGGLER_CXX_FLAGS ${VRJUGGLER22_CXX_FLAGS}) + set(VRJUGGLER_DEFINITIONS ${VRJUGGLER22_DEFINITIONS}) + set(VRJUGGLER_BUNDLE_PLUGINS ${VRJUGGLER22_BUNDLE_PLUGINS}) + set(VRJUGGLER_VJ_BASE_DIR ${VRJUGGLER22_VJ_BASE_DIR}) + set(VRJUGGLER_VERSION 2.2) + + macro(install_vrjuggler_data_files prefix) + install_vrjuggler22_data_files("${prefix}" ${ARGN}) + endmacro() + + macro(install_vrjuggler_plugins prefix varForFilenames) + install_vrjuggler22_plugins("${prefix}" ${varForFilenames} ${ARGN}) + endmacro() + endif() +endif() + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(VRJuggler + REQUIRED_VARS + VRJUGGLER_LIBRARIES + VERSION_VAR + VRJUGGLER_VERSION) + +if(VRJUGGLER_FOUND) + mark_as_advanced(VRJUGGLER_ROOT_DIR) + + # Set generic component variables, like VPR_LIBRARIES + if(VRJUGGLER_VERSION VERSION_EQUAL 2.2) + set(_components VRJ22 VRJOGL22 VPR20 TWEEK12 SONIX12 JCCL12) + else() + set(_components VRJ30 VRJOGL30 VPR22 TWEEK14 SONIX14 JCCL14) + endif() + + foreach(comp ${_components}) + string(LENGTH "${comp}" len) + math(EXPR complen "${len} - 2") + string(SUBSTRING "${comp}" 0 ${complen} compshort) + set(${compshort}_LIBRARIES ${${comp}_LIBRARIES}) + set(${compshort}_INCLUDE_DIRS ${${comp}_INCLUDE_DIRS}) + set(${compshort}_LIBRARY_DIRS ${${comp}_LIBRARY_DIRS}) + set(${compshort}_CXX_FLAGS ${${comp}_CXX_FLAGS}) + endforeach() +endif() diff --git a/cmake/cmake-modules/FindVRJuggler22.cmake b/cmake/cmake-modules/FindVRJuggler22.cmake new file mode 100644 index 000000000..db9b3a22e --- /dev/null +++ b/cmake/cmake-modules/FindVRJuggler22.cmake @@ -0,0 +1,503 @@ +# - try to find VRJuggler 2.2-related packages (main finder) +# VRJUGGLER22_LIBRARY_DIRS, library search paths +# VRJUGGLER22_INCLUDE_DIRS, include search paths +# VRJUGGLER22_LIBRARIES, the libraries to link against +# VRJUGGLER22_ENVIRONMENT +# VRJUGGLER22_RUNTIME_LIBRARY_DIRS +# VRJUGGLER22_CXX_FLAGS +# VRJUGGLER22_DEFINITIONS +# VRJUGGLER22_FOUND, If false, do not try to use VR Juggler 2.2. +# +# Components available to search for (uses "VRJOGL22" by default): +# VRJOGL22 +# VRJ22 +# Gadgeteer12 +# JCCL12 +# VPR20 +# Sonix12 +# Tweek12 +# +# Additionally, a full setup requires these packages and their Find_.cmake scripts +# CPPDOM +# GMTL +# +# Optionally uses Flagpoll (and FindFlagpoll.cmake) +# +# Notes on components: +# - All components automatically include their dependencies. +# - You can search for the name above with or without the version suffix. +# - If you do not specify a component, VRJOGL22(the OpenGL view manager) +# will be used by default. +# - Capitalization of component names does not matter, but it's best to +# pretend it does and use the above capitalization. +# - Since this script calls find_package for your requested components and +# their dependencies, you can use any of the variables specified in those +# files in addition to the "summary" ones listed here, for more finely +# controlled building and linking. +# +# This CMake script requires all of the Find*.cmake scripts for the +# components listed above, as it is only a "meta-script" designed to make +# using those scripts more developer-friendly. +# +# Useful configuration variables you might want to add to your cache: +# (CAPS COMPONENT NAME)_ROOT_DIR - A directory prefix to search +# (a path that contains include/ as a subdirectory) +# +# The VJ_BASE_DIR environment variable is also searched (preferentially) +# when seeking any of the above components, as well as Flagpoll, CPPDOM, +# and Boost (from within VPR20), so most sane build environments should +# "just work." +# +# IMPORTANT: Note that you need to manually re-run CMake if you 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> <abiryan@ryand.net> +# http://academic.cleardefinition.com +# Iowa State University HCI Graduate Program/VRAC +# +# Copyright Iowa State University 2009-2010. +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE_1_0.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) + +include(CleanLibraryList) +include(CleanDirectoryList) +include(FindPackageMessage) + +set(VRJUGGLER22_ROOT_DIR + "${VRJUGGLER22_ROOT_DIR}" + CACHE + PATH + "Additional root directory to search for VR Juggler and its dependencies.") +if(NOT VRJUGGLER22_ROOT_DIR) + file(TO_CMAKE_PATH "$ENV{VJ_BASE_DIR}" VRJUGGLER22_ROOT_DIR) +endif() + +# Default required components +if(NOT VRJuggler22_FIND_COMPONENTS) + set(VRJuggler22_FIND_COMPONENTS vrjogl22) +endif() + +if(VRJuggler22_FIND_QUIETLY) + set(_FIND_FLAGS "QUIET") +else() + set(_FIND_FLAGS "") +endif() + +set(VRJUGGLER22_SUBMODULES + VRJ22 + VRJOGL22 + Gadgeteer12 + JCCL12 + VPR20 + Sonix12 + Tweek12) +string(TOUPPER "${VRJUGGLER22_SUBMODULES}" VRJUGGLER22_SUBMODULES_UC) +string(TOUPPER + "${VRJuggler22_FIND_COMPONENTS}" + VRJUGGLER22_FIND_COMPONENTS_UC) + +# Turn a potentially messy components list into a nice one with versions. +set(VRJUGGLER22_REQUESTED_COMPONENTS) +foreach(VRJUGGLER22_LONG_NAME ${VRJUGGLER22_SUBMODULES_UC}) + # Look at requested components + foreach(VRJUGGLER22_REQUEST ${VRJUGGLER22_FIND_COMPONENTS_UC}) + string(REGEX + MATCH + "${VRJUGGLER22_REQUEST}" + VRJUGGLER22_MATCHING + "${VRJUGGLER22_LONG_NAME}") + if(VRJUGGLER22_MATCHING) + list(APPEND + VRJUGGLER22_REQUESTED_COMPONENTS + ${VRJUGGLER22_LONG_NAME}) + list(APPEND + VRJUGGLER22_COMPONENTS_FOUND + ${VRJUGGLER22_LONG_NAME}_FOUND) + endif() + endforeach() +endforeach() + +if(VRJUGGLER22_REQUESTED_COMPONENTS) + list(REMOVE_DUPLICATES VRJUGGLER22_REQUESTED_COMPONENTS) +endif() + +if(VRJUGGLER22_COMPONENTS_FOUND) + list(REMOVE_DUPLICATES VRJUGGLER22_COMPONENTS_FOUND) +endif() + +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() + +if(NOT VRJuggler22_FIND_QUIETLY + AND NOT VRJUGGLER22_FOUND + AND NOT "${_VRJUGGLER22_SEARCH_COMPONENTS}" STREQUAL "${VRJUGGLER22_REQUESTED_COMPONENTS}") + message(STATUS + "Searching for these requested VR Juggler 2.2 components and their dependencies: ${VRJUGGLER22_REQUESTED_COMPONENTS}") +endif() + +# Find components +if("${VRJUGGLER22_REQUESTED_COMPONENTS}" MATCHES "VRJOGL22" AND NOT VRJOGL22_FOUND) + find_package(VRJOGL22 ${_FIND_FLAGS}) +endif() + +if("${VRJUGGLER22_REQUESTED_COMPONENTS}" MATCHES "VRJ22" AND NOT VRJ22_FOUND) + find_package(VRJ22 ${_FIND_FLAGS}) +endif() + +if("${VRJUGGLER22_REQUESTED_COMPONENTS}" MATCHES "JCCL12" AND NOT JCCL12_FOUND) + find_package(JCCL22 ${_FIND_FLAGS}) +endif() + +if("${VRJUGGLER22_REQUESTED_COMPONENTS}" MATCHES "GADGETEER12" AND NOT GADGETEER12_FOUND) + find_package(Gadgeteer12 ${_FIND_FLAGS}) +endif() + +if("${VRJUGGLER22_REQUESTED_COMPONENTS}" MATCHES "SONIX12" AND NOT SONIX12_FOUND) + find_package(Sonix12 ${_FIND_FLAGS}) +endif() + +if("${VRJUGGLER22_REQUESTED_COMPONENTS}" MATCHES "TWEEK12" AND NOT TWEEK12_FOUND) + find_package(Tweek12 ${_FIND_FLAGS}) +endif() + +if("${VRJUGGLER22_REQUESTED_COMPONENTS}" MATCHES "VPR20" AND NOT VPR20_FOUND) + find_package(VPR20 ${_FIND_FLAGS}) +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(VRJuggler22 + DEFAULT_MSG + ${VRJUGGLER22_COMPONENTS_FOUND}) + +if(VRJUGGLER22_FOUND) + foreach(VRJUGGLER22_REQUEST ${VRJUGGLER22_REQUESTED_COMPONENTS}) + list(APPEND VRJUGGLER22_LIBRARIES ${${VRJUGGLER22_REQUEST}_LIBRARIES}) + list(APPEND + VRJUGGLER22_INCLUDE_DIRS + ${${VRJUGGLER22_REQUEST}_INCLUDE_DIRS}) + endforeach() + + clean_library_list(VRJUGGLER22_LIBRARIES) + + clean_directory_list(VRJUGGLER22_INCLUDE_DIRS) + + set(_vjbase) + set(_vjbaseclean) + foreach(_lib + ${VPR20_LIBRARY} + ${VRJ22_LIBRARY} + ${VRJOGL22_LIBRARY} + ${JCCL12_LIBRARY} + ${GADGETEER12_LIBRARY}) + get_filename_component(_libpath "${_lib}" PATH) + get_filename_component(_abspath "${_libpath}/.." ABSOLUTE) + list(APPEND _vjbase "${_abspath}") + endforeach() + + clean_directory_list(_vjbase) + + set(_vrj22_have_base_dir NO) + list(LENGTH _vjbase _vjbaselen) + if("${_vjbaselen}" EQUAL 1 AND NOT VRJUGGLER22_VJ_BASE_DIR) + list(GET _vjbase 0 VRJUGGLER22_VJ_BASE_DIR) + mark_as_advanced(VRJUGGLER22_VJ_BASE_DIR) + if(NOT VRJUGGLER22_VJ_BASE_DIR STREQUAL _vrj22_base_dir) + unset(VRJUGGLER22_VJ_CFG_DIR) + endif() + set(_vrj22_have_base_dir YES) + else() + list(GET _vjbase 0 _calculated_base_dir) + if(NOT + "${_calculated_base_dir}" + STREQUAL + "${VRJUGGLER22_VJ_BASE_DIR}") + message("It looks like you might be mixing VR Juggler versions... ${_vjbaselen} ${_vjbase}") + message("If you are, fix your libraries then remove the VRJUGGLER22_VJ_BASE_DIR variable in CMake, then configure again") + message("If you aren't, set the VRJUGGLER22_VJ_BASE_DIR variable to the desired VJ_BASE_DIR to use when running") + else() + if(NOT VRJUGGLER22_VJ_BASE_DIR STREQUAL _vrj22_base_dir) + unset(VRJUGGLER22_VJ_CFG_DIR) + endif() + set(_vrj22_have_base_dir YES) + endif() + endif() + + set(_vrj22_base_dir "${VRJUGGLER22_VJ_BASE_DIR}") + set(_vrj22_base_dir "${_vrj22_base_dir}" CACHE INTERNAL "" FORCE) + + if(_vrj22_have_base_dir) + find_path(VRJUGGLER22_VJ_CFG_DIR + standalone.jconf + PATHS + ${VRJUGGLER22_VJ_BASE_DIR}/share/vrjuggler-2.2/data/configFiles + ${VRJUGGLER22_VJ_BASE_DIR}/share/vrjuggler/data/configFiles + NO_DEFAULT_PATH) + mark_as_advanced(VRJUGGLER22_VJ_CFG_DIR) + endif() + + set(VRJUGGLER22_VJ_BASE_DIR + "${VRJUGGLER22_VJ_BASE_DIR}" + CACHE + PATH + "Base directory to use as VJ_BASE_DIR when running your app." + FORCE) + set(VRJUGGLER22_ENVIRONMENT + "VJ_BASE_DIR=${VRJUGGLER22_VJ_BASE_DIR}" + "JCCL_BASE_DIR=${VRJUGGLER22_VJ_BASE_DIR}" + "SONIX_BASE_DIR=${VRJUGGLER22_VJ_BASE_DIR}" + "TWEEK_BASE_DIR=${VRJUGGLER22_VJ_BASE_DIR}" + "VJ_CFG_DIR=${VRJUGGLER22_VJ_CFG_DIR}") + + include(GetDirectoryList) + + get_directory_list(VRJUGGLER22_RUNTIME_LIBRARY_DIRS + ${VRJUGGLER22_LIBRARIES}) + if(WIN32) + foreach(dir ${VRJUGGLER22_RUNTIME_LIBRARY_DIRS}) + list(APPEND VRJUGGLER22_RUNTIME_LIBRARY_DIRS "${dir}/../bin") + endforeach() + endif() + + if(MSVC) + # Needed to make linking against boost work with 2.2.1 binaries - rp20091022 + # BOOST_ALL_DYN_LINK + set(VRJUGGLER22_DEFINITIONS + "-DBOOST_ALL_DYN_LINK" + "-DCPPDOM_DYN_LINK" + "-DCPPDOM_AUTO_LINK") + + # Disable these annoying warnings + # 4275: non dll-interface class used as base for dll-interface class + # 4251: needs to have dll-interface to be used by clients of class + # 4100: unused parameter + # 4512: assignment operator could not be generated + # 4127: (Not currently disabled) conditional expression in loop evaluates to constant + + set(VRJUGGLER22_CXX_FLAGS "/wd4275 /wd4251 /wd4100 /wd4512") + elseif(CMAKE_COMPILER_IS_GNUCXX) + # Silence annoying warnings about deprecated hash_map. + set(VRJUGGLER22_CXX_FLAGS "-Wno-deprecated") + + set(VRJUGGLER22_DEFINITIONS "") + endif() + set(VRJUGGLER22_CXX_FLAGS + "${VRJUGGLER22_CXX_FLAGS} ${CPPDOM_CXX_FLAGS}") + + set(_VRJUGGLER22_SEARCH_COMPONENTS + "${VRJUGGLER22_REQUESTED_COMPONENTS}" + CACHE + INTERNAL + "Requested components, used as a flag.") + + + + set(_plugin_dirs) + foreach(_libdir ${VRJUGGLER22_RUNTIME_LIBRARY_DIRS}) + # Find directories of Gadgeteer plugins and drivers + if(EXISTS "${_libdir}/gadgeteer") + list(APPEND + _plugin_dirs + "${_libdir}/gadgeteer/drivers" + "${_libdir}/gadgeteer/plugins") + elseif(EXISTS "${_libdir}/gadgeteer-1.2") + list(APPEND + _plugin_dirs + "${_libdir}/gadgeteer-1.2/drivers" + "${_libdir}/gadgeteer-1.2/plugins") + endif() + + # Find directories of Sonix plugins + if(EXISTS "${_libdir}/sonix") + list(APPEND _plugin_dirs "${_libdir}/sonix/plugins/dbg") + list(APPEND _plugin_dirs "${_libdir}/sonix/plugins/opt") + elseif(EXISTS "${_libdir}/sonix-1.2") + list(APPEND _plugin_dirs "${_libdir}/sonix-1.2/plugins/dbg") + list(APPEND _plugin_dirs "${_libdir}/sonix-1.2/plugins/opt") + endif() + endforeach() + + # Grab the actual plugins + foreach(_libdir ${_plugin_dirs}) + if(EXISTS "${_libdir}") + list(APPEND VRJUGGLER22_RUNTIME_LIBRARY_DIRS "${_libdir}") + file(GLOB _plugins "${_libdir}/*${CMAKE_SHARED_LIBRARY_SUFFIX}") + list(APPEND VRJUGGLER22_BUNDLE_PLUGINS ${_plugins}) + endif() + endforeach() + + mark_as_advanced(VRJUGGLER22_ROOT_DIR) +endif() + +mark_as_advanced(VRJUGGLER22_DEFINITIONS) + +function(install_vrjuggler22_data_files prefix) + set(base "${VRJUGGLER22_VJ_CFG_DIR}/..") + get_filename_component(base "${base}" ABSOLUTE) + file(RELATIVE_PATH reldest "${VRJUGGLER22_VJ_BASE_DIR}" "${base}") + if(prefix STREQUAL "" OR prefix STREQUAL "." OR prefix STREQUAL "./") + set(DEST "${reldest}") + else() + set(DEST "${prefix}/${reldest}") + endif() + + # configFiles *.jconf + file(GLOB + _vj_config_files + "${base}/configFiles/*.jconf") + install(FILES ${_vj_config_files} DESTINATION "${DEST}/configFiles/") + + # definitions *.jdef + file(GLOB + _vj_defs_files + "${base}/definitions/*.jdef") + install(FILES ${_vj_defs_files} DESTINATION "${DEST}/definitions/") + + # models *.flt + file(GLOB + _vj_model_files + "${base}/models/*.flt") + install(FILES ${_vj_model_files} DESTINATION "${DEST}/models/") + + # sounds *.wav + file(GLOB + _vj_sound_files + "${base}/sounds/*.wav") + install(FILES ${_vj_sound_files} DESTINATION "${DEST}/sounds/") + + # calibration.table - needed? + file(GLOB + _vj_config_files + "${base}/configFiles/*.jconf") + install(FILES "${base}/calibration.table" DESTINATION "${DEST}") +endfunction() + +function(install_vrjuggler22_plugins prefix varForFilenames) + set(DEST "${prefix}") + + set(out) + foreach(plugin ${VRJUGGLER22_BUNDLE_PLUGINS}) + get_filename_component(full "${plugin}" ABSOLUTE) + file(RELATIVE_PATH relloc "${VRJUGGLER22_VJ_BASE_DIR}" "${full}") + set(filedest "${DEST}/${relloc}") + get_filename_component(path "${filedest}" PATH) + list(APPEND out "${filedest}") + install(FILES "${full}" DESTINATION "${path}") + endforeach() + + set(${varForFilenames} ${out} PARENT_SCOPE) + +endfunction() + +function(get_vrjuggler_bundle_sources _target_sources) + if(APPLE) + set(_bundledir "${VRJUGGLER22_VJ_CFG_DIR}/../bundle") + get_filename_component(_bundledir "${_bundledir}" ABSOLUTE) + + set(_vj_base_dir .) + set(_vj_data_dir ${vj_base_dir}/share/vrjuggler-2.2) + + # Append Mac-specific sources to source list + set(_vj_bundle_src + ${_bundledir}/vrjuggler.icns + ${_bundledir}/vrjuggler.plist + ${_bundledir}/en.lproj/MainMenu.nib/classes.nib + ${_bundledir}/MainMenu.nib/info.nib + ${_bundledir}/MainMenu.nib/keyedobjects.nib) + + message(STATUS "vjbundlesrc: ${_vj_bundle_src}") + set(${_target_sources} + ${${_target_sources}} + ${_vj_bundle_src} + PARENT_SCOPE) + + # Set destination of nib files + set_source_files_properties(${_bundledir}/MainMenu.nib/classes.nib + ${_bundledir}/MainMenu.nib/info.nib + ${_bundledir}/MainMenu.nib/keyedobjects.nib + PROPERTIES + MACOSX_PACKAGE_LOCATION + Resources/en.lproj/MainMenu.nib/) + + # Set destination of Resources + set_source_files_properties(${_bundledir}/vrjuggler.icns + ${_bundledir}/vrjuggler.plist + PROPERTIES + MACOSX_PACKAGE_LOCATION + Resources/) + endif() +endfunction() + +get_filename_component(_vrjuggler22moddir + ${CMAKE_CURRENT_LIST_FILE} + PATH) +function(fixup_vrjuggler_app_bundle + _target + _targetInstallDest + _extralibs + _libdirs) + + if(NOT VRJUGGLER22_FOUND) + return() + endif() + + set(PACKAGE_DIR ${_vrjuggler22moddir}/package) + set(MACOSX_PACKAGE_DIR ${PACKAGE_DIR}/macosx) + + set(TARGET_LOCATION + "${_targetInstallDest}/${_target}${CMAKE_EXECUTABLE_SUFFIX}") + if(APPLE) + set(TARGET_LOCATION "${TARGET_LOCATION}.app") + endif() + + set_target_properties(${_target} + PROPERTIES + MACOSX_BUNDLE_INFO_PLIST + ${MACOSX_PACKAGE_DIR}/VRJuggler22BundleInfo.plist.in + MACOSX_BUNDLE_ICON_FILE + vrjuggler.icns + MACOSX_BUNDLE_INFO_STRING + "${PROJECT_NAME} (VR Juggler Application) version ${CPACK_PACKAGE_VERSION}, created by ${CPACK_PACKAGE_VENDOR}" + MACOSX_BUNDLE_GUI_IDENTIFIER + org.vrjuggler.${PROJECT_NAME} + MACOSX_BUNDLE_SHORT_VERSION_STRING + ${CPACK_PACKAGE_VERSION} + MACOSX_BUNDLE_BUNDLE_VERSION + ${CPACK_PACKAGE_VERSION}) + + if(WIN32) + list(APPEND _libdirs "${VRJUGGLER22_VJ_BASE_DIR}/bin") + endif() + + set(BUNDLE_LIBS ${_extralibs}) + set(BUNDLE_LIB_DIRS "${VRJUGGLER22_VJ_BASE_DIR}" ${_libdirs}) + + configure_file(${PACKAGE_DIR}/fixupbundle.cmake.in + ${CMAKE_CURRENT_BINARY_DIR}/${_target}-fixupbundle-juggler.cmake + @ONLY) + install(SCRIPT + "${CMAKE_CURRENT_BINARY_DIR}/${_target}-fixupbundle-juggler.cmake") +endfunction() diff --git a/cmake/cmake-modules/FindVRJuggler30.cmake b/cmake/cmake-modules/FindVRJuggler30.cmake new file mode 100644 index 000000000..4d28f015b --- /dev/null +++ b/cmake/cmake-modules/FindVRJuggler30.cmake @@ -0,0 +1,531 @@ +# - try to find VRJuggler 3.0-related packages (main finder) +# VRJUGGLER30_LIBRARY_DIRS, library search paths +# VRJUGGLER30_INCLUDE_DIRS, include search paths +# VRJUGGLER30_LIBRARIES, the libraries to link against +# VRJUGGLER30_ENVIRONMENT +# VRJUGGLER30_RUNTIME_LIBRARY_DIRS +# VRJUGGLER30_CXX_FLAGS +# VRJUGGLER30_DEFINITIONS +# VRJUGGLER30_FOUND, If false, do not try to use VR Juggler 3.0. +# +# Components available to search for (uses "VRJOGL30" by default): +# VRJOGL30 +# VRJ30 +# Gadgeteer20 +# JCCL14 +# VPR22 +# Sonix14 +# Tweek14 +# +# Additionally, a full setup requires these packages and their Find_.cmake scripts +# CPPDOM +# GMTL +# +# Optionally uses Flagpoll (and FindFlagpoll.cmake) +# +# Notes on components: +# - All components automatically include their dependencies. +# - You can search for the name above with or without the version suffix. +# - If you do not specify a component, VRJOGL30(the OpenGL view manager) +# will be used by default. +# - Capitalization of component names does not matter, but it's best to +# pretend it does and use the above capitalization. +# - Since this script calls find_package for your requested components and +# their dependencies, you can use any of the variables specified in those +# files in addition to the "summary" ones listed here, for more finely +# controlled building and linking. +# +# This CMake script requires all of the Find*.cmake scripts for the +# components listed above, as it is only a "meta-script" designed to make +# using those scripts more developer-friendly. +# +# Useful configuration variables you might want to add to your cache: +# (CAPS COMPONENT NAME)_ROOT_DIR - A directory prefix to search +# (a path that contains include/ as a subdirectory) +# +# The VJ_BASE_DIR environment variable is also searched (preferentially) +# when seeking any of the above components, as well as Flagpoll, CPPDOM, +# and Boost (from within VPR22), so most sane build environments should +# "just work." +# +# IMPORTANT: Note that you need to manually re-run CMake if you change +# this environment variable, because it cannot auto-detect this change +# and trigger an automatic re-run. +# +# Original Author: +# 2009-2011 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> +# http://academic.cleardefinition.com +# Iowa State University HCI Graduate Program/VRAC +# Updated for VR Juggler 3.0 by: +# Brandon Newendorp <brandon@newendorp.com> and Ryan Pavlik +# +# Copyright Iowa State University 2009-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) + +include(CleanLibraryList) +include(CleanDirectoryList) +include(FindPackageMessage) + +set(VRJUGGLER30_ROOT_DIR + "${VRJUGGLER30_ROOT_DIR}" + CACHE + PATH + "Additional root directory to search for VR Juggler and its dependencies.") +if(NOT VRJUGGLER30_ROOT_DIR) + file(TO_CMAKE_PATH "$ENV{VJ_BASE_DIR}" VRJUGGLER30_ROOT_DIR) +endif() + +# Default required components +if(NOT VRJuggler30_FIND_COMPONENTS) + set(VRJuggler30_FIND_COMPONENTS vrjogl30) +endif() + +if(VRJuggler30_FIND_QUIETLY) + set(_FIND_FLAGS "QUIET") +else() + set(_FIND_FLAGS "") +endif() + +set(VRJUGGLER30_SUBMODULES + VRJ30 + VRJOGL30 + Gadgeteer20 + JCCL14 + VPR22 + Sonix14 + Tweek14) +string(TOUPPER "${VRJUGGLER30_SUBMODULES}" VRJUGGLER30_SUBMODULES_UC) +string(TOUPPER + "${VRJuggler30_FIND_COMPONENTS}" + VRJUGGLER30_FIND_COMPONENTS_UC) + +# Turn a potentially messy components list into a nice one with versions. +set(VRJUGGLER30_REQUESTED_COMPONENTS) +foreach(VRJUGGLER30_LONG_NAME ${VRJUGGLER30_SUBMODULES_UC}) + # Look at requested components + foreach(VRJUGGLER30_REQUEST ${VRJUGGLER30_FIND_COMPONENTS_UC}) + string(REGEX + MATCH + "${VRJUGGLER30_REQUEST}" + VRJUGGLER30_MATCHING + "${VRJUGGLER30_LONG_NAME}") + if(VRJUGGLER30_MATCHING) + list(APPEND + VRJUGGLER30_REQUESTED_COMPONENTS + ${VRJUGGLER30_LONG_NAME}) + list(APPEND + VRJUGGLER30_COMPONENTS_FOUND + ${VRJUGGLER30_LONG_NAME}_FOUND) + endif() + endforeach() +endforeach() + +if(VRJUGGLER30_REQUESTED_COMPONENTS) + list(REMOVE_DUPLICATES VRJUGGLER30_REQUESTED_COMPONENTS) +endif() + +if(VRJUGGLER30_COMPONENTS_FOUND) + list(REMOVE_DUPLICATES VRJUGGLER30_COMPONENTS_FOUND) +endif() + +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() + +if(NOT VRJUGGLER30_FIND_QUIETLY + AND NOT VRJUGGLER30_FOUND + AND NOT "${_VRJUGGLER30_SEARCH_COMPONENTS}" STREQUAL "${VRJUGGLER30_REQUESTED_COMPONENTS}") + message(STATUS + "Searching for these requested VR Juggler 3.0 components and their dependencies: ${VRJUGGLER30_REQUESTED_COMPONENTS}") +endif() + +# Find components +if("${VRJUGGLER30_REQUESTED_COMPONENTS}" MATCHES "VRJOGL30" AND NOT VRJOGL30_FOUND) + find_package(VRJOGL30 ${_FIND_FLAGS}) +endif() + +if("${VRJUGGLER30_REQUESTED_COMPONENTS}" MATCHES "VRJ30" AND NOT VRJ30_FOUND) + find_package(VRJ30 ${_FIND_FLAGS}) +endif() + +if("${VRJUGGLER30_REQUESTED_COMPONENTS}" MATCHES "JCCL14" AND NOT JCCL14_FOUND) + find_package(JCCL14 ${_FIND_FLAGS}) +endif() + +if("${VRJUGGLER30_REQUESTED_COMPONENTS}" MATCHES "GADGETEER20" AND NOT GADGETEER20_FOUND) + find_package(Gadgeteer20 ${_FIND_FLAGS}) +endif() + +if("${VRJUGGLER30_REQUESTED_COMPONENTS}" MATCHES "SONIX14" AND NOT SONIX14_FOUND) + find_package(Sonix14 ${_FIND_FLAGS}) +endif() + +if("${VRJUGGLER30_REQUESTED_COMPONENTS}" MATCHES "TWEEK14" AND NOT TWEEK14_FOUND) + find_package(Tweek14 ${_FIND_FLAGS}) +endif() + +if("${VRJUGGLER30_REQUESTED_COMPONENTS}" MATCHES "VPR22" AND NOT VPR22_FOUND) + find_package(VPR22 ${_FIND_FLAGS}) +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(VRJuggler30 + DEFAULT_MSG + ${VRJUGGLER30_COMPONENTS_FOUND}) + +if(VRJUGGLER30_FOUND) + foreach(VRJUGGLER30_REQUEST ${VRJUGGLER30_REQUESTED_COMPONENTS}) + list(APPEND VRJUGGLER30_LIBRARIES ${${VRJUGGLER30_REQUEST}_LIBRARIES}) + list(APPEND + VRJUGGLER30_INCLUDE_DIRS + ${${VRJUGGLER30_REQUEST}_INCLUDE_DIRS}) + endforeach() + + clean_library_list(VRJUGGLER30_LIBRARIES) + + clean_directory_list(VRJUGGLER30_INCLUDE_DIRS) + + set(_vjbase) + set(_vjbaseclean) + foreach(_component VPR22 VRJ30 VRJOGL30 JCCL14 GADGETEER20) + + # Find the common parent directory of the include dir and the library dir + get_filename_component(_absincpath "${${_component}_INCLUDE_DIR}" PATH) + if(${_component}_INCLUDE_DIR) + get_filename_component(_curpath "${${_component}_LIBRARY_RELEASE}" PATH) + get_filename_component(_nextpath "${_curpath}/.." ABSOLUTE) + while(NOT _curpath STREQUAL _nextpath) + set(_curpath "${_nextpath}") + string(LENGTH "${_curpath}" _pathlen) + if("${_absincpath}" MATCHES "^${_curpath}.*") + list(APPEND _vjbase "${_curpath}") + break() + endif() + get_filename_component(_nextpath "${_curpath}/.." ABSOLUTE) + endwhile() + endif() + endforeach() + + clean_directory_list(_vjbase) + + set(_vrj30_have_base_dir NO) + list(LENGTH _vjbase _vjbaselen) + if("${_vjbaselen}" EQUAL 1 AND NOT VRJUGGLER30_VJ_BASE_DIR) + list(GET _vjbase 0 VRJUGGLER30_VJ_BASE_DIR) + mark_as_advanced(VRJUGGLER30_VJ_BASE_DIR) + if(NOT VRJUGGLER30_VJ_BASE_DIR STREQUAL _vrj30_base_dir) + unset(VRJUGGLER30_VJ_CFG_DIR) + endif() + set(_vrj30_have_base_dir YES) + else() + list(GET _vjbase 0 _calculated_base_dir) + if(NOT + "${_calculated_base_dir}" + STREQUAL + "${VRJUGGLER30_VJ_BASE_DIR}") + message("It looks like you might be mixing VR Juggler versions... ${_vjbaselen} ${_vjbase}") + message("If you are, fix your libraries then remove the VRJUGGLER30_VJ_BASE_DIR variable in CMake, then configure again") + message("If you aren't, set the VRJUGGLER30_VJ_BASE_DIR variable to the desired VJ_BASE_DIR to use when running") + else() + if(NOT VRJUGGLER30_VJ_BASE_DIR STREQUAL _vrj30_base_dir) + unset(VRJUGGLER30_VJ_CFG_DIR) + endif() + set(_vrj30_have_base_dir YES) + endif() + endif() + + set(_vrj30_base_dir "${VRJUGGLER30_VJ_BASE_DIR}") + set(_vrj30_base_dir "${_vrj30_base_dir}" CACHE INTERNAL "" FORCE) + + if(_vrj30_have_base_dir) + find_path(VRJUGGLER30_VJ_CFG_DIR + standalone.jconf + PATHS + ${VRJUGGLER30_VJ_BASE_DIR}/share/vrjuggler-3.0/data/configFiles + ${VRJUGGLER30_VJ_BASE_DIR}/share/vrjuggler/data/configFiles + NO_DEFAULT_PATH) + mark_as_advanced(VRJUGGLER30_VJ_CFG_DIR) + endif() + + set(VRJUGGLER30_VJ_BASE_DIR + "${VRJUGGLER30_VJ_BASE_DIR}" + CACHE + PATH + "Base directory to use as VJ_BASE_DIR when running your app." + FORCE) + set(VRJUGGLER30_ENVIRONMENT + "VJ_BASE_DIR=${VRJUGGLER30_VJ_BASE_DIR}" + "JCCL_BASE_DIR=${VRJUGGLER30_VJ_BASE_DIR}" + "SONIX_BASE_DIR=${VRJUGGLER30_VJ_BASE_DIR}" + "TWEEK_BASE_DIR=${VRJUGGLER30_VJ_BASE_DIR}" + "VJ_CFG_DIR=${VRJUGGLER30_VJ_CFG_DIR}") + + include(GetDirectoryList) + + get_directory_list(VRJUGGLER30_RUNTIME_LIBRARY_DIRS + ${VRJUGGLER30_LIBRARIES}) + if(WIN32) + foreach(dir ${VRJUGGLER30_RUNTIME_LIBRARY_DIRS}) + list(APPEND VRJUGGLER30_RUNTIME_LIBRARY_DIRS "${dir}/../bin") + endforeach() + endif() + + if(MSVC) + # BOOST_ALL_DYN_LINK + set(VRJUGGLER30_DEFINITIONS + "-DBOOST_ALL_DYN_LINK" + "-DCPPDOM_DYN_LINK" + "-DCPPDOM_AUTO_LINK") + + # Disable these annoying warnings + # 4275: non dll-interface class used as base for dll-interface class + # 4251: needs to have dll-interface to be used by clients of class + # 4100: unused parameter + # 4512: assignment operator could not be generated + # 4127: (Not currently disabled) conditional expression in loop evaluates to constant + + set(VRJUGGLER30_CXX_FLAGS "/wd4275 /wd4251 /wd4100 /wd4512") + elseif(CMAKE_COMPILER_IS_GNUCXX) + # Silence annoying warnings about deprecated hash_map. + set(VRJUGGLER30_CXX_FLAGS "-Wno-deprecated") + + set(VRJUGGLER30_DEFINITIONS "") + endif() + set(VRJUGGLER30_CXX_FLAGS + "${VRJUGGLER30_CXX_FLAGS} ${CPPDOM_CXX_FLAGS}") + + set(_VRJUGGLER30_SEARCH_COMPONENTS + "${VRJUGGLER30_REQUESTED_COMPONENTS}" + CACHE + INTERNAL + "Requested components, used as a flag.") + + + + set(_plugin_dirs) + foreach(_libdir ${VRJUGGLER30_RUNTIME_LIBRARY_DIRS}) + # Find directories of Gadgeteer plugins and drivers + if(EXISTS "${_libdir}/gadgeteer") + list(APPEND + _plugin_dirs + "${_libdir}/gadgeteer/drivers" + "${_libdir}/gadgeteer/plugins") + elseif(EXISTS "${_libdir}/gadgeteer-1.4") + list(APPEND + _plugin_dirs + "${_libdir}/gadgeteer-1.4/drivers" + "${_libdir}/gadgeteer-1.4/plugins") + endif() + + # Find directories of Sonix plugins + if(EXISTS "${_libdir}/sonix") + list(APPEND _plugin_dirs "${_libdir}/sonix/plugins/dbg") + list(APPEND _plugin_dirs "${_libdir}/sonix/plugins/opt") + elseif(EXISTS "${_libdir}/sonix-1.4") + 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 + foreach(_libdir ${_plugin_dirs}) + if(EXISTS "${_libdir}") + list(APPEND VRJUGGLER30_RUNTIME_LIBRARY_DIRS "${_libdir}") + file(GLOB _plugins "${_libdir}/*${CMAKE_SHARED_LIBRARY_SUFFIX}") + 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() + + mark_as_advanced(VRJUGGLER30_ROOT_DIR) +endif() + +mark_as_advanced(VRJUGGLER30_DEFINITIONS) + +function(install_vrjuggler30_data_files prefix) + set(base "${VRJUGGLER30_VJ_CFG_DIR}/..") + get_filename_component(base "${base}" ABSOLUTE) + file(RELATIVE_PATH reldest "${VRJUGGLER30_VJ_BASE_DIR}" "${base}") + if(prefix STREQUAL "" OR prefix STREQUAL "." OR prefix STREQUAL "./") + set(DEST "${reldest}") + else() + set(DEST "${prefix}/${reldest}") + endif() + + # configFiles *.jconf + file(GLOB + _vj_config_files + "${base}/configFiles/*.jconf") + install(FILES ${_vj_config_files} DESTINATION "${DEST}/configFiles/") + + # definitions *.jdef + file(GLOB + _vj_defs_files + "${base}/definitions/*.jdef") + install(FILES ${_vj_defs_files} DESTINATION "${DEST}/definitions/") + + # models *.flt + file(GLOB + _vj_model_files + "${base}/models/*.flt") + install(FILES ${_vj_model_files} DESTINATION "${DEST}/models/") + + # sounds *.wav + file(GLOB + _vj_sound_files + "${base}/sounds/*.wav") + install(FILES ${_vj_sound_files} DESTINATION "${DEST}/sounds/") +endfunction() + +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}" ${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() + +function(get_vrjuggler_bundle_sources _target_sources) + if(APPLE) + set(_bundledir "${VRJUGGLER30_VJ_CFG_DIR}/../bundle") + get_filename_component(_bundledir "${_bundledir}" ABSOLUTE) + + set(_vj_base_dir .) + set(_vj_data_dir ${vj_base_dir}/share/vrjuggler-3.0) + + # Append Mac-specific sources to source list + set(_vj_bundle_src + ${_bundledir}/vrjuggler.icns + ${_bundledir}/vrjuggler.plist + ${_bundledir}/en.lproj/MainMenu.nib/classes.nib + ${_bundledir}/MainMenu.nib/info.nib + ${_bundledir}/MainMenu.nib/keyedobjects.nib) + + message(STATUS "vjbundlesrc: ${_vj_bundle_src}") + set(${_target_sources} + ${${_target_sources}} + ${_vj_bundle_src} + PARENT_SCOPE) + + # Set destination of nib files + set_source_files_properties(${_bundledir}/MainMenu.nib/classes.nib + ${_bundledir}/MainMenu.nib/info.nib + ${_bundledir}/MainMenu.nib/keyedobjects.nib + PROPERTIES + MACOSX_PACKAGE_LOCATION + Resources/en.lproj/MainMenu.nib/) + + # Set destination of Resources + set_source_files_properties(${_bundledir}/vrjuggler.icns + ${_bundledir}/vrjuggler.plist + PROPERTIES + MACOSX_PACKAGE_LOCATION + Resources/) + endif() +endfunction() + +get_filename_component(_vrjuggler30moddir + ${CMAKE_CURRENT_LIST_FILE} + PATH) +function(fixup_vrjuggler_app_bundle + _target + _targetInstallDest + _extralibs + _libdirs) + + if(NOT VRJUGGLER30_FOUND) + return() + endif() + + + set(PACKAGE_DIR ${_vrjuggler30moddir}/package) + set(MACOSX_PACKAGE_DIR ${PACKAGE_DIR}/macosx) + + set(TARGET_LOCATION + "${_targetInstallDest}/${_target}${CMAKE_EXECUTABLE_SUFFIX}") + if(APPLE) + set(TARGET_LOCATION "${TARGET_LOCATION}.app") + endif() + + set_target_properties(${_target} + PROPERTIES + MACOSX_BUNDLE_INFO_PLIST + ${MACOSX_PACKAGE_DIR}/VRJuggler30BundleInfo.plist.in + MACOSX_BUNDLE_ICON_FILE + vrjuggler.icns + MACOSX_BUNDLE_INFO_STRING + "${PROJECT_NAME} (VR Juggler Application) version ${CPACK_PACKAGE_VERSION}, created by ${CPACK_PACKAGE_VENDOR}" + MACOSX_BUNDLE_GUI_IDENTIFIER + org.vrjuggler.${PROJECT_NAME} + MACOSX_BUNDLE_SHORT_VERSION_STRING + ${CPACK_PACKAGE_VERSION} + MACOSX_BUNDLE_BUNDLE_VERSION + ${CPACK_PACKAGE_VERSION}) + + if(WIN32) + list(APPEND _libdirs "${VRJUGGLER30_VJ_BASE_DIR}/bin") + endif() + + set(BUNDLE_LIBS ${_extralibs}) + set(BUNDLE_LIB_DIRS "${VRJUGGLER30_VJ_BASE_DIR}" ${_libdirs}) + + configure_file(${PACKAGE_DIR}/fixupbundle.cmake.in + ${CMAKE_CURRENT_BINARY_DIR}/${_target}-fixupbundle-juggler.cmake + @ONLY) + install(SCRIPT + "${CMAKE_CURRENT_BINARY_DIR}/${_target}-fixupbundle-juggler.cmake") +endfunction() diff --git a/cmake/cmake-modules/FindVRPN.cmake b/cmake/cmake-modules/FindVRPN.cmake new file mode 100644 index 000000000..641b62b70 --- /dev/null +++ b/cmake/cmake-modules/FindVRPN.cmake @@ -0,0 +1,156 @@ +# - try to find VRPN library +# +# Cache Variables: +# VRPN_LIBRARY +# VRPN_SERVER_LIBRARY +# VRPN_INCLUDE_DIR +# +# Non-cache variables you might use in your CMakeLists.txt: +# VRPN_FOUND +# 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 +# +# Requires these CMake modules: +# FindPackageHandleStandardArgs (known included with CMake >=2.6.2) +# +# 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-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(VRPN_ROOT_DIR + "${VRPN_ROOT_DIR}" + CACHE + PATH + "Root directory to search for VRPN") + +if("${CMAKE_SIZEOF_VOID_P}" MATCHES "8") + set(_libsuffixes lib64 lib) + + # 64-bit dir: only set on win64 + file(TO_CMAKE_PATH "$ENV{ProgramW6432}" _progfiles) +else() + set(_libsuffixes lib) + set(_PF86 "ProgramFiles(x86)") + if(NOT "$ENV{${_PF86}}" STREQUAL "") + # 32-bit dir: only set on win64 + file(TO_CMAKE_PATH "$ENV{${_PF86}}" _progfiles) + else() + # 32-bit dir on win32, useless to us on win64 + file(TO_CMAKE_PATH "$ENV{ProgramFiles}" _progfiles) + endif() +endif() + +set(_vrpn_quiet) +if(VRPN_FIND_QUIETLY) + set(_vrpn_quiet QUIET) +endif() + +### +# Configure VRPN +### + +find_path(VRPN_INCLUDE_DIR + NAMES + vrpn_Connection.h + PATH_SUFFIXES + include + include/vrpn + HINTS + "${VRPN_ROOT_DIR}" + PATHS + "${_progfiles}/VRPN" + C:/usr/local + /usr/local) + +find_library(VRPN_LIBRARY + NAMES + vrpn + PATH_SUFFIXES + ${_libsuffixes} + HINTS + "${VRPN_ROOT_DIR}" + PATHS + "${_progfiles}/VRPN" + C:/usr/local + /usr/local) + +find_library(VRPN_SERVER_LIBRARY + NAMES + vrpnserver + PATH_SUFFIXES + ${_libsuffixes} + HINTS + "${VRPN_ROOT_DIR}" + PATHS + "${_progfiles}/VRPN" + C:/usr/local + /usr/local) + +### +# Dependencies +### +set(_deps_libs) +set(_deps_includes) +set(_deps_check) + +find_package(quatlib ${_vrpn_quiet}) +list(APPEND _deps_libs ${QUATLIB_LIBRARIES}) +list(APPEND _deps_includes ${QUATLIB_INCLUDE_DIRS}) +list(APPEND _deps_check QUATLIB_FOUND) + +if(NOT WIN32) + find_package(Threads ${_vrpn_quiet}) + list(APPEND _deps_libs ${CMAKE_THREAD_LIBS_INIT}) + list(APPEND _deps_check CMAKE_HAVE_THREADS_LIBRARY) +endif() + +if(WIN32) + find_package(Libusb1 QUIET) + if(LIBUSB1_FOUND) + list(APPEND _deps_libs ${LIBUSB1_LIBRARIES}) + list(APPEND _deps_includes ${LIBUSB1_INCLUDE_DIRS}) + endif() +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(VRPN + DEFAULT_MSG + VRPN_LIBRARY + VRPN_INCLUDE_DIR + ${_deps_check}) + +if(VRPN_FOUND) + set(VRPN_INCLUDE_DIRS "${VRPN_INCLUDE_DIR}" ${_deps_includes}) + 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) diff --git a/cmake/cmake-modules/FindViewPoint.cmake b/cmake/cmake-modules/FindViewPoint.cmake new file mode 100644 index 000000000..a18b6145d --- /dev/null +++ b/cmake/cmake-modules/FindViewPoint.cmake @@ -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) diff --git a/cmake/cmake-modules/FindVirtuoseAPI.cmake b/cmake/cmake-modules/FindVirtuoseAPI.cmake new file mode 100644 index 000000000..639d00dd4 --- /dev/null +++ b/cmake/cmake-modules/FindVirtuoseAPI.cmake @@ -0,0 +1,93 @@ +# - try to find Haption VirtuoseAPI library and include files +# +# VIRTUOSEAPI_INCLUDE_DIRS, where to find headers +# VIRTUOSEAPI_LIBRARIES, the libraries to link against +# VIRTUOSEAPI_FOUND, If false, do not try to use this library +# VIRTUOSEAPI_RUNTIME_LIBRARY_DIRS, path to DLL/SO for runtime use. +# VIRTUOSEAPI_RUNTIME_LIBRARIES, runtime libraries you might want to install + +set(VIRTUOSEAPI_ROOT_DIR + "${VIRTUOSEAPI_ROOT_DIR}" + CACHE + PATH + "Path to search for VirtuoseAPI") + +set(_dirs) +if(WIN32) + include(ProgramFilesGlob) + program_files_fallback_glob(_dirs "/VirtuoseAPI_v*/") +endif() + +find_path(VIRTUOSEAPI_INCLUDE_DIR + virtuoseAPI.h + VirtuoseAPI.h + PATHS + ${_dirs} + HINTS + "${VIRTUOSEAPI_ROOT_DIR}") + +set(_suffixes) +if(WIN32) + set(_lib_name virtuoseDLL) + set(_runtime_name virtuoseAPI.dll) + + if(CMAKE_SIZEOF_VOID_P EQUAL 8) + set(_suffixes win64) + else() + set(_suffixes win32) + endif() +elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux") + set(_lib_name virtuose) + set(_runtime_name virtuoseAPI.so) + + if(CMAKE_SIZEOF_VOID_P EQUAL 8) + set(_suffixes linux-64b) + else() + set(_suffixes linux linux-2.6) + endif() +endif() + +if(_suffixes) + find_library(VIRTUOSEAPI_LIBRARY + NAMES + ${_lib_name} + PATHS + ${_dirs} + HINTS + "${VIRTUOSEAPI_ROOT_DIR}" + PATH_SUFFIXES + ${_suffixes}) + find_file(VIRTUOSEAPI_RUNTIME_LIBRARY + NAMES + ${_runtime_name} + PATHS + ${_dirs} + HINTS + "${VIRTUOSEAPI_ROOT_DIR}" + PATH_SUFFIXES + ${_suffixes}) +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(VirtuoseAPI + DEFAULT_MSG + VIRTUOSEAPI_LIBRARY + VIRTUOSEAPI_RUNTIME_LIBRARY + VIRTUOSEAPI_INCLUDE_DIR) + +if(VIRTUOSEAPI_FOUND) + set(VIRTUOSEAPI_LIBRARIES "${VIRTUOSEAPI_LIBRARY}") + set(VIRTUOSEAPI_RUNTIME_LIBRARIES "${VIRTUOSEAPI_RUNTIME_LIBRARY}") + set(VIRTUOSEAPI_INCLUDE_DIRS "${VIRTUOSEAPI_INCLUDE_DIR}") + get_filename_component(VIRTUOSEAPI_RUNTIME_LIBRARY_DIRS + "${VIRTUOSEAPI_RUNTIME_LIBRARY}" + PATH) + + mark_as_advanced(VIRTUOSEAPI_ROOT_DIR) +endif() + +mark_as_advanced(VIRTUOSEAPI_LIBRARY + VIRTUOSEAPI_RUNTIME_LIBRARY + VIRTUOSEAPI_INCLUDE_DIR) diff --git a/cmake/cmake-modules/FindVirtuoseVPP.cmake b/cmake/cmake-modules/FindVirtuoseVPP.cmake new file mode 100644 index 000000000..0cd45fc1e --- /dev/null +++ b/cmake/cmake-modules/FindVirtuoseVPP.cmake @@ -0,0 +1,49 @@ +# - try to find Haption VirtuoseAPI C++ wrapper include files +# +# Use of this header depends on the VirtuoseAPI, so we search for that too. +# +# VIRTUOSEVPP_INCLUDE_DIRS, where to find headers +# VIRTUOSEVPP_LIBRARIES, the libraries to link against +# VIRTUOSEVPP_FOUND, If false, do not try to use this library +# VIRTUOSEVPP_RUNTIME_LIBRARY_DIRS, path to DLL/SO for runtime use. +# VIRTUOSEAPI_RUNTIME_LIBRARIES, runtime libraries you might want to install + +set(VIRTUOSEVPP_ROOT_DIR + "${VIRTUOSEVPP_ROOT_DIR}" + CACHE + PATH + "Path to search for VirtuoseAPI VPP wrapper") + +find_package(VirtuoseAPI) + +find_path(VIRTUOSEVPP_INCLUDE_DIR + vpp.h + PATHS + ${_dirs} + HINTS + "${VIRTUOSEVPP_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(VirtuoseVPP + DEFAULT_MSG + VIRTUOSEVPP_INCLUDE_DIR + VIRTUOSEAPI_LIBRARY + VIRTUOSEAPI_RUNTIME_LIBRARIES + VIRTUOSEAPI_RUNTIME_LIBRARY_DIRS + VIRTUOSEAPI_INCLUDE_DIR) + +if(VIRTUOSEVPP_FOUND) + set(VIRTUOSEVPP_LIBRARIES "${VIRTUOSEAPI_LIBRARY}") + set(VIRTUOSEVPP_INCLUDE_DIRS + "${VIRTUOSEAPI_INCLUDE_DIR}" + "${VIRTUOSEVPP_INCLUDE_DIR}") + set(VIRTUOSEVPP_RUNTIME_LIBRARIES "${VIRTUOSEAPI_RUNTIME_LIBRARIES}") + set(VIRTUOSEVPP_RUNTIME_LIBRARY_DIRS + "${VIRTUOSEAPI_RUNTIME_LIBRARY_DIRS}") + + mark_as_advanced(VIRTUOSEVPP_ROOT_DIR) +endif() + +mark_as_advanced(VIRTUOSEVPP_INCLUDE_DIR) diff --git a/cmake/cmake-modules/FindWayland.cmake b/cmake/cmake-modules/FindWayland.cmake new file mode 100644 index 000000000..80aff5d3a --- /dev/null +++ b/cmake/cmake-modules/FindWayland.cmake @@ -0,0 +1,45 @@ +# - Try to Find Wayland +# +# Copyright 2015 Vlad Zagorodniy +# 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) +# +# Will be defined: +# WAYLAND_FOUND +# WAYLAND_CLIENT_FOUND +# WAYLAND_SERVER_FOUND +# WAYLAND_CLIENT_INCLUDE_DIR +# WAYLAND_SERVER_INCLUDE_DIR +# WAYLAND_CLIENT_LIBRARIES +# WAYLAND_SERVER_LIBRARIES +# + +find_package(PkgConfig) +pkg_check_modules(PKG_WAYLAND_CLIENT REQUIRED wayland-client) +pkg_check_modules(PKG_WAYLAND_SERVER REQUIRED wayland-server) + +if (NOT PKG_WAYLAND_CLIENT_FOUND) + message(FATAL_ERROR "No wayland-client") +endif(NOT PKG_WAYLAND_CLIENT_FOUND) + +if (NOT PKG_WAYLAND_SERVER_FOUND) + message(FATAL_ERROR "No wayland-server") +endif(NOT PKG_WAYLAND_SERVER_FOUND) + +# find include paths +find_path(WAYLAND_CLIENT_INCLUDE_DIR wayland-client.h ${PKG_WAYLAND_CLIENT_INCLUDE_DIRS}) +find_path(WAYLAND_SERVER_INCLUDE_DIR wayland-server.h ${PKG_WAYLAND_SERVER_INCLUDE_DIRS}) + +# find libs +find_library(WAYLAND_CLIENT_LIBRARIES NAMES wayland-client PATHS ${PKG_WAYLAND_CLIENT_LIBRARY_DIRS}) +find_library(WAYLAND_SERVER_LIBRARIES NAMES wayland-server PATHS ${PKG_WAYLAND_SERVER_LIBRARY_DIRS}) + +# set _FOUND vars +set(WAYLAND_CLIENT_FOUND TRUE) +set(WAYLAND_SERVER_FOUND TRUE) + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(WAYLAND DEFAULT_MSG WAYLAND_CLIENT_INCLUDE_DIR WAYLAND_CLIENT_LIBRARIES + WAYLAND_SERVER_INCLUDE_DIR WAYLAND_SERVER_LIBRARIES) +mark_as_advanced(WAYLAND_CLIENT_INCLUDE_DIR WAYLAND_CLIENT_LIBRARIES + WAYLAND_SERVER_INCLUDE_DIR WAYLAND_SERVER_LIBRARIES) diff --git a/cmake/cmake-modules/FindWiiSCAAT.cmake b/cmake/cmake-modules/FindWiiSCAAT.cmake new file mode 100644 index 000000000..0b0dd1638 --- /dev/null +++ b/cmake/cmake-modules/FindWiiSCAAT.cmake @@ -0,0 +1,79 @@ +# - try to find the Wii SCAAT library +# +# Users may optionally supply: +# WIISCAAT_ROOT_DIR - a prefix to start searching for the headers. +# +# Cache Variables: (probably not for direct use in your scripts) +# WIISCAAT_INCLUDE_DIR +# WIISCAAT_LIBRARY +# +# Non-cache variables you might use in your CMakeLists.txt: +# WIISCAAT_FOUND +# WIISCAAT_INCLUDE_DIRS +# WIISCAAT_LIBRARIES +# +# Requires these CMake modules: +# FindPackageHandleStandardArgs (known included with CMake >=2.6.2) +# +# Original Author: +# 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> +# http://academic.cleardefinition.com +# Iowa State University HCI Graduate Program/VRAC +# +# Copyright Iowa State University 2009-2010. +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE_1_0.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) + +set(WIISCAAT_ROOT_DIR + "${WIISCAAT_ROOT_DIR}" + CACHE + PATH + "Path to search for Wii SCAAT module") + +### +# Prereq: tag +### +if(NOT TOONTAG_ROOT_DIR) + set(TOONTAG_ROOT_DIR "${WIISCAAT_ROOT_DIR}") +endif() +find_package(TooNtag QUIET) + +### +# Configure tag +### +find_path(WIISCAAT_INCLUDE_DIR + NAMES + HeadCollection.h + HINTS + "${WIISCAAT_ROOT_DIR}" + PATH_SUFFIXES + include) +mark_as_advanced(WIISCAAT_INCLUDE_DIR) + +find_library(WIISCAAT_LIBRARY + NAMES + wiiscaattracker + HINTS + "${WIISCAAT_ROOT_DIR}" + PATH_SUFFIXES + lib + lib64) +mark_as_advanced(WIISCAAT_LIBRARY) + +# 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(WiiSCAAT + DEFAULT_MSG + WIISCAAT_LIBRARY + WIISCAAT_INCLUDE_DIR + TOONTAG_FOUND) + +if(WIISCAAT_FOUND) + set(WIISCAAT_INCLUDE_DIRS + "${WIISCAAT_INCLUDE_DIR}" + ${TOONTAG_INCLUDE_DIRS}) + set(WIISCAAT_LIBRARIES "${WIISCAAT_LIBRARY}" ${TOONTAG_LIBRARIES}) + mark_as_advanced(WIISCAAT_ROOT_DIR) +endif() diff --git a/cmake/cmake-modules/FindWiiUse.cmake b/cmake/cmake-modules/FindWiiUse.cmake new file mode 100644 index 000000000..2657cbb60 --- /dev/null +++ b/cmake/cmake-modules/FindWiiUse.cmake @@ -0,0 +1,99 @@ +# - try to find WiiUse library +# +# Cache Variables: (probably not for direct use in your scripts) +# WIIUSE_INCLUDE_DIR +# WIIUSE_LIBRARY +# +# Non-cache variables you might use in your CMakeLists.txt: +# WIIUSE_FOUND +# WIIUSE_INCLUDE_DIRS +# WIIUSE_LIBRARIES +# WIIUSE_RUNTIME_LIBRARIES - aka the dll for installing +# WIIUSE_RUNTIME_LIBRARY_DIRS +# +# Requires these CMake modules: +# FindPackageHandleStandardArgs (known included with CMake >=2.6.2) +# +# Original Author: +# 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> +# http://academic.cleardefinition.com +# Iowa State University HCI Graduate Program/VRAC +# +# Copyright Iowa State University 2009-2010. +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE_1_0.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) + +set(WIIUSE_ROOT_DIR + "${WIIUSE_ROOT_DIR}" + CACHE + PATH + "Directory to search for WiiUse") + +if(CMAKE_SIZEOF_VOID_P MATCHES "8") + set(_LIBSUFFIXES /lib64 /lib) +else() + set(_LIBSUFFIXES /lib) +endif() + +find_library(WIIUSE_LIBRARY + NAMES + wiiuse + PATHS + "${WIIUSE_ROOT_DIR}" + PATH_SUFFIXES + "${_LIBSUFFIXES}") + +get_filename_component(_libdir "${WIIUSE_LIBRARY}" PATH) + +find_path(WIIUSE_INCLUDE_DIR + NAMES + wiiuse.h + HINTS + "${_libdir}" + "${_libdir}/.." + PATHS + "${WIIUSE_ROOT_DIR}" + PATH_SUFFIXES + include/) + +set(_deps_check) +if(WIN32) + find_file(WIIUSE_RUNTIME_LIBRARY + NAMES + wiiuse.dll + HINTS + "${_libdir}" + "${_libdir}/.." + PATH_SUFFIXES + bin) + + set(WIIUSE_RUNTIME_LIBRARIES "${WIIUSE_RUNTIME_LIBRARY}") + get_filename_component(WIIUSE_RUNTIME_LIBRARY_DIRS + "${WIIUSE_RUNTIME_LIBRARY}" + 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) +endif() + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(WiiUse + DEFAULT_MSG + WIIUSE_LIBRARY + WIIUSE_INCLUDE_DIR + ${_deps_check}) + +if(WIIUSE_FOUND) + set(WIIUSE_LIBRARIES "${WIIUSE_LIBRARY}") + set(WIIUSE_INCLUDE_DIRS "${WIIUSE_INCLUDE_DIR}") + mark_as_advanced(WIIUSE_ROOT_DIR) +endif() + +mark_as_advanced(WIIUSE_INCLUDE_DIR + WIIUSE_LIBRARY + WIIUSE_RUNTIME_LIBRARY) diff --git a/cmake/cmake-modules/FindWinHID.cmake b/cmake/cmake-modules/FindWinHID.cmake new file mode 100644 index 000000000..7dd057214 --- /dev/null +++ b/cmake/cmake-modules/FindWinHID.cmake @@ -0,0 +1,288 @@ +# - try to find Windows HID support, part of the WDK/DDK +# +# Cache Variables: (probably not for direct use in your scripts) +# WINHID_INCLUDE_DIR +# WINHID_CRT_INCLUDE_DIR +# WINHID_LIBRARY +# +# Non-cache variables you might use in your CMakeLists.txt: +# WINHID_FOUND +# WINHID_INCLUDE_DIRS +# WINHID_LIBRARIES +# +# Requires these CMake modules: +# FindPackageHandleStandardArgs (known included with CMake >=2.6.2) +# PrefixListGlob +# CleanDirectoryList +# MinGWSearchPathExtras +# FindWindowsSDK +# +# Original Author: +# 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> +# http://academic.cleardefinition.com +# Iowa State University HCI Graduate Program/VRAC +# +# Copyright Iowa State University 2009-2010. +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE_1_0.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) + +if(NOT WIN32) + find_package_handle_standard_args(WinHID + "Skipping search for Windows HID on non-Windows platform" + WIN32) + return() +endif() + +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}" + CACHE + PATH + "Directory to search") + +set(_deps_check) +set(_need_crt_dir) +if(MSVC) + + find_package(WindowsSDK) + set(WINSDK_LIBDIRS) + if(WINDOWSSDK_FOUND) + get_windowssdk_library_dirs_multiple(WINSDK_LIBDIRS ${WINDOWSSDK_PREFERRED_FIRST_DIRS}) + foreach(WINSDKDIR ${WINDOWSSDK_DIRS}) + get_windowssdk_library_dirs(${WINSDKDIR} WINSDK_CURRENT_LIBDIRS) + list(APPEND WINSDK_LIBDIRS ${WINSDK_CURRENT_LIBDIRS}) + endforeach() + endif() + + if(CMAKE_SIZEOF_VOID_P MATCHES "8") + set(_arch amd64) # what the architecture used to be called + set(_arch8 x64) # what the WDK for Win8+ calls this architecture + else() + set(_arch i386) # what the architecture used to be called + set(_arch8 x86) # what the WDK for Win8+ calls this architecture + endif() + include(PrefixListGlob) + include(CleanDirectoryList) + prefix_list_glob(_prefixed + "*/" + "$ENV{SYSTEMDRIVE}/WinDDK/" + "$ENV{ProgramFiles}/Windows Kits/" + "c:/WinDDK/") + clean_directory_list(_prefixed) + find_library(WINHID_LIBRARY + NAMES + hid + libhid + PATHS + "${WINHID_ROOT_DIR}" + ${WINSDK_LIBDIRS} + ${_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/wlh/um/${_arch8}" # Win Vista ("Long Horn") min requirement + "lib/win7/${_arch}" # Win 7 min requirement + "lib/win7/um/${_arch8}" # Win 7 min requirement + "lib/win8/${_arch}" # Win 8 min requirement + "lib/win8/um/${_arch8}" # Win 8 min requirement + ) + # Might want to look close to the library first for the includes. + if(WINHID_LIBRARY) + get_filename_component(WINHID_LIBRARY_DIR "${WINHID_LIBRARY}" PATH) + if(WINDOWSSDK_FOUND) + get_windowssdk_from_component("${WINHID_LIBRARY}" _USED_WINSDK) + set(WINHID_LIBRARY_FROM_WINDOWSSDK ON) + get_windowssdk_include_dirs(${_USED_WINSDK} WINHID_INCLUDE_HINTS) + endif() + endif() + + find_library(WINHID_SETUPAPI_LIBRARY + NAMES + setupapi + HINTS + "${WINHID_LIBRARY_DIR}" + PATHS + "${WINHID_ROOT_DIR}" + ${WINSDK_LIBDIRS} + ${_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/wlh/um/${_arch8}" # Win Vista ("Long Horn") min requirement + "lib/win7/${_arch}" # Win 7 min requirement + "lib/win7/um/${_arch8}" # Win 7 min requirement + "lib/win8/${_arch}" # Win 8 min requirement + "lib/win8/um/${_arch8}" # Win 8 min requirement + ) + + if(WINHID_LIBRARY AND NOT WINHID_LIBRARY_FROM_WINDOWSSDK) + set(_basedir "${WINHID_LIBRARY_DIR}") + set(_prevdir) + while(NOT IS_DIRECTORY "${_basedir}/lib" AND NOT (_basedir STREQUAL _prevdir)) + set(_prevdir "${_basedir}") + get_filename_component(_basedir "${_basedir}/.." ABSOLUTE) + endwhile() + + set(WINHID_INCLUDE_HINTS "${_basedir}") + + if(EXISTS "${_basedir}/inc") + 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) + list(APPEND _deps_check WINHID_CRT_INCLUDE_DIR) + set(_need_crt_dir ON) + endif() + endif() + find_path(WINHID_INCLUDE_DIR + NAMES + hidsdi.h + HINTS + ${WINHID_INCLUDE_HINTS} + PATHS + "${WINHID_ROOT_DIR}" + PATH_SUFFIXES + inc/ddk + inc/api + inc/w2k + inc/wxp + inc/wnet + include/shared) +else() + # This is the non-MSVC path. + if(MINGW) + include(MinGWSearchPathExtras) + + find_library(WINHID_LIBRARY + NAMES + libhid + HINTS + "${WINHID_ROOT_DIR}" + ${MINGWSEARCH_LIBRARY_DIRS} + /mingw + PATH_SUFFIXES + lib + lib/w32api) + find_library(WINHID_SETUPAPI_LIBRARY + NAMES + libsetupapi + HINTS + "${WINHID_ROOT_DIR}" + ${MINGWSEARCH_LIBRARY_DIRS} + /mingw + PATH_SUFFIXES + lib + lib/w32api) + else() + find_library(WINHID_LIBRARY + NAMES + hid + libhid + HINTS + "${WINHID_ROOT_DIR}" + /mingw + PATH_SUFFIXES + lib + lib/w32api) + find_library(WINHID_SETUPAPI_LIBRARY + NAMES + setupapi + libsetupapi + HINTS + "${WINHID_ROOT_DIR}" + /mingw + PATH_SUFFIXES + lib + lib/w32api) + endif() + find_path(WINHID_INCLUDE_DIR + NAMES + hidsdi.h + PATHS + "${WINHID_ROOT_DIR}" + ${MINGWSEARCH_INCLUDE_DIRS} + /mingw + PATH_SUFFIXES + include/w32api/ddk + include/ddk + ddk) +endif() + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(WinHID + DEFAULT_MSG + WINHID_LIBRARY + WINHID_SETUPAPI_LIBRARY + WINHID_INCLUDE_DIR + ${_deps_check}) + +if(WINHID_FOUND) + if(MSVC) + set(_winreq) + if(WINHID_LIBRARY MATCHES "[Ll]ib/w2k") + set(_winreq "Windows 2000") + elseif(WINHID_LIBRARY MATCHES "[Ll]ib/wxp") + set(_winreq "Windows XP") + elseif(WINHID_LIBRARY MATCHES "[Ll]ib/wnet") + set(_winreq "Windows Server 2003") + elseif(WINHID_LIBRARY MATCHES "[Ll]ib/wlh") + set(_winreq "Windows Vista") + elseif(WINHID_LIBRARY MATCHES "[Ll]ib/win7") + set(_winreq "Windows 7") + elseif(WINHID_LIBRARY MATCHES "[Ll]ib/win8") + set(_winreq "Windows 8") + set(_winreq_uncertain ON) + elseif(WINHID_LIBRARY MATCHES "[Ll]ib/winv6.3") + set(_winreq "Windows 8.1") + set(_winreq_uncertain ON) + elseif(WINHID_LIBRARY MATCHES "[Ll]ib/10.0") + set(_winreq "Windows 10") + set(_winreq_uncertain ON) + endif() + if(NOT "${WINHID_MIN_WINDOWS_VER}" STREQUAL "${_winreq}") + if(NOT WinHID_FIND_QUIETLY) + if(NOT _winreq) + message("Couldn't determine if the WINHID_LIBRARY would result in a minimum version compatibility requirement.") + elseif(_winreq_uncertain) + message(STATUS + "Found WINHID_LIBRARY in the Windows SDK for ${_winreq} , which may or may not affect minimum compatible Windows version.") + else() + message(STATUS + "Linking against WINHID_LIBRARY will enforce this minimum version: ${_winreq}") + endif() + endif() + set(WINHID_MIN_WINDOWS_VER "${_winreq}" CACHE INTERNAL "" FORCE) + endif() + endif() + set(WINHID_LIBRARIES "${WINHID_LIBRARY}" "${WINHID_SETUPAPI_LIBRARY}") + if(_need_crt_dir) + set(WINHID_INCLUDE_DIRS + "${WINHID_CRT_INCLUDE_DIR}" + "${WINHID_INCLUDE_DIR}") + else() + # Don't need that CRT include dir for WDK 8+ + set(WINHID_INCLUDE_DIRS + "${WINHID_INCLUDE_DIR}") + endif() + mark_as_advanced(WINHID_ROOT_DIR) +endif() + +mark_as_advanced(WINHID_INCLUDE_DIR + WINHID_CRT_INCLUDE_DIR + WINHID_LIBRARY) diff --git a/cmake/cmake-modules/FindWindowsSDK.cmake b/cmake/cmake-modules/FindWindowsSDK.cmake new file mode 100644 index 000000000..e2fa6fcff --- /dev/null +++ b/cmake/cmake-modules/FindWindowsSDK.cmake @@ -0,0 +1,627 @@ +# - Find the Windows SDK aka Platform SDK +# +# Relevant Wikipedia article: http://en.wikipedia.org/wiki/Microsoft_Windows_SDK +# +# Pass "COMPONENTS tools" to ignore Visual Studio version checks: in case +# you just want the tool binaries to run, rather than the libraries and headers +# for compiling. +# +# 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. +# +# windowssdk_build_lookup(<directory> <output variable>) - Find the build version number 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. +# +# get_windowssdk_from_component(<file or dir> <output variable>) - Given a library or include dir, +# find the Windows SDK root dir corresponding to it, or NOTFOUND if unrecognized. +# +# get_windowssdk_library_dirs(<directory> <output variable>) - Find the architecture-appropriate +# library directories corresponding to the SDK directory you pass in (or NOTFOUND if none) +# +# get_windowssdk_library_dirs_multiple(<output variable> <directory> ...) - Find the architecture-appropriate +# library directories corresponding to the SDK directories you pass in, in order, skipping those not found. NOTFOUND if none at all. +# Good for passing WINDOWSSDK_DIRS or WINDOWSSDK_DIRS to if you really just want a file and don't care where from. +# +# get_windowssdk_include_dirs(<directory> <output variable>) - Find the +# include directories corresponding to the SDK directory you pass in (or NOTFOUND if none) +# +# get_windowssdk_include_dirs_multiple(<output variable> <directory> ...) - Find the +# include directories corresponding to the SDK directories you pass in, in order, skipping those not found. NOTFOUND if none at all. +# Good for passing WINDOWSSDK_DIRS or WINDOWSSDK_DIRS to if you really just want a file and don't care where from. +# +# 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) # pre-output +set(_win_sdk_dirs) # pre-output +set(_win_sdk_versanddirs) # pre-output +set(_win_sdk_buildsanddirs) # pre-output +set(_winsdk_vistaonly) # search parameters +set(_winsdk_kits) # search parameters + + +set(_WINDOWSSDK_ANNOUNCE OFF) +if(NOT WINDOWSSDK_FOUND AND (NOT WindowsSDK_FIND_QUIETLY)) + set(_WINDOWSSDK_ANNOUNCE ON) +endif() +macro(_winsdk_announce) + if(_WINSDK_ANNOUNCE) + message(STATUS ${ARGN}) + endif() +endmacro() + +set(_winsdk_win10vers + 10.0.15063.0 # Redstone 2 aka Win10 1703 "Creators' Update" + 10.0.14393.0 # Redstone aka Win10 1607 "Anniversary Update" + 10.0.10586.0 # TH2 aka Win10 1511 + 10.0.10240.0 # Win10 RTM + 10.0.10150.0 # just ucrt + 10.0.10056.0 +) + +if(WindowsSDK_FIND_COMPONENTS MATCHES "tools") + set(_WINDOWSSDK_IGNOREMSVC ON) + _winsdk_announce("Checking for tools from Windows/Platform SDKs...") +else() + set(_WINDOWSSDK_IGNOREMSVC OFF) + _winsdk_announce("Checking for Windows/Platform SDKs...") +endif() + +# Appends to the three main pre-output lists used only if the path exists +# and is not already in the list. +function(_winsdk_conditional_append _vername _build _path) + if(("${_path}" MATCHES "registry") OR (NOT EXISTS "${_path}")) + # Path invalid - do not add + return() + endif() + list(FIND _win_sdk_dirs "${_path}" _win_sdk_idx) + if(_win_sdk_idx GREATER -1) + # Path already in list - do not add + return() + endif() + _winsdk_announce( " - ${_vername}, Build ${_build} @ ${_path}") + # Not yet in the list, so we'll add it + list(APPEND _win_sdk_dirs "${_path}") + set(_win_sdk_dirs "${_win_sdk_dirs}" CACHE INTERNAL "" FORCE) + list(APPEND + _win_sdk_versanddirs + "${_vername}" + "${_path}") + set(_win_sdk_versanddirs "${_win_sdk_versanddirs}" CACHE INTERNAL "" FORCE) + list(APPEND + _win_sdk_buildsanddirs + "${_build}" + "${_path}") + set(_win_sdk_buildsanddirs "${_win_sdk_buildsanddirs}" CACHE INTERNAL "" FORCE) +endfunction() + +# Appends to the "preferred SDK" lists only if the path exists +function(_winsdk_conditional_append_preferred _info _path) + if(("${_path}" MATCHES "registry") OR (NOT EXISTS "${_path}")) + # Path invalid - do not add + return() + endif() + + get_filename_component(_path "${_path}" ABSOLUTE) + + list(FIND _win_sdk_preferred_sdk_dirs "${_path}" _win_sdk_idx) + if(_win_sdk_idx GREATER -1) + # Path already in list - do not add + return() + endif() + _winsdk_announce( " - Found \"preferred\" SDK ${_info} @ ${_path}") + # Not yet in the list, so we'll add it + list(APPEND _win_sdk_preferred_sdk_dirs "${_path}") + set(_win_sdk_preferred_sdk_dirs "${_win_sdk_dirs}" CACHE INTERNAL "" FORCE) + + # Just in case we somehow missed it: + _winsdk_conditional_append("${_info}" "" "${_path}") +endfunction() + +# Given a version like v7.0A, looks for an SDK in the registry under "Microsoft SDKs". +# If the given version might be in both HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Microsoft SDKs\\Windows +# and HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows Kits\\Installed Roots aka "Windows Kits", +# use this macro first, since these registry keys usually have more information. +# +# Pass a "default" build number as an extra argument in case we can't find it. +function(_winsdk_check_microsoft_sdks_registry _winsdkver) + set(SDKKEY "HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Microsoft SDKs\\Windows\\${_winsdkver}") + get_filename_component(_sdkdir + "[${SDKKEY};InstallationFolder]" + ABSOLUTE) + + set(_sdkname "Windows SDK ${_winsdkver}") + + # Default build number passed as extra argument + set(_build ${ARGN}) + # See if the registry holds a Microsoft-mutilated, err, designated, product name + # (just using get_filename_component to execute the registry lookup) + get_filename_component(_sdkproductname + "[${SDKKEY};ProductName]" + NAME) + if(NOT "${_sdkproductname}" MATCHES "registry") + # Got a product name + set(_sdkname "${_sdkname} (${_sdkproductname})") + endif() + + # try for a version to augment our name + # (just using get_filename_component to execute the registry lookup) + get_filename_component(_sdkver + "[${SDKKEY};ProductVersion]" + NAME) + if(NOT "${_sdkver}" MATCHES "registry" AND NOT MATCHES) + # Got a version + if(NOT "${_sdkver}" MATCHES "\\.\\.") + # and it's not an invalid one with two dots in it: + # use to override the default build + set(_build ${_sdkver}) + if(NOT "${_sdkname}" MATCHES "${_sdkver}") + # Got a version that's not already in the name, let's use it to improve our name. + set(_sdkname "${_sdkname} (${_sdkver})") + endif() + endif() + endif() + _winsdk_conditional_append("${_sdkname}" "${_build}" "${_sdkdir}") +endfunction() + +# Given a name for identification purposes, the build number, and a key (technically a "value name") +# corresponding to a Windows SDK packaged as a "Windows Kit", look for it +# in HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows Kits\\Installed Roots +# Note that the key or "value name" tends to be something weird like KitsRoot81 - +# no easy way to predict, just have to observe them in the wild. +# Doesn't hurt to also try _winsdk_check_microsoft_sdks_registry for these: +# sometimes you get keys in both parts of the registry (in the wow64 portion especially), +# and the non-"Windows Kits" location is often more descriptive. +function(_winsdk_check_windows_kits_registry _winkit_name _winkit_build _winkit_key) + get_filename_component(_sdkdir + "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows Kits\\Installed Roots;${_winkit_key}]" + ABSOLUTE) + _winsdk_conditional_append("${_winkit_name}" "${_winkit_build}" "${_sdkdir}") +endfunction() + +# Given a name for identification purposes and the build number +# corresponding to a Windows 10 SDK packaged as a "Windows Kit", look for it +# in HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows Kits\\Installed Roots +# Doesn't hurt to also try _winsdk_check_microsoft_sdks_registry for these: +# sometimes you get keys in both parts of the registry (in the wow64 portion especially), +# and the non-"Windows Kits" location is often more descriptive. +function(_winsdk_check_win10_kits _winkit_build) + get_filename_component(_sdkdir + "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows Kits\\Installed Roots;KitsRoot10]" + ABSOLUTE) + if(("${_sdkdir}" MATCHES "registry") OR (NOT EXISTS "${_sdkdir}")) + return() # not found + endif() + if(EXISTS "${_sdkdir}/Include/${_winkit_build}/um") + _winsdk_conditional_append("Windows Kits 10 (Build ${_winkit_build})" "${_winkit_build}" "${_sdkdir}") + endif() +endfunction() + +# Given a name for indentification purposes, the build number, and the associated package GUID, +# look in the registry under both HKLM and HKCU in \\SOFTWARE\\Microsoft\\MicrosoftSDK\\InstalledSDKs\\ +# for that guid and the SDK it points to. +function(_winsdk_check_platformsdk_registry _platformsdkname _build _platformsdkguid) + foreach(_winsdk_hive HKEY_LOCAL_MACHINE HKEY_CURRENT_USER) + get_filename_component(_sdkdir + "[${_winsdk_hive}\\SOFTWARE\\Microsoft\\MicrosoftSDK\\InstalledSDKs\\${_platformsdkguid};Install Dir]" + ABSOLUTE) + _winsdk_conditional_append("${_platformsdkname} (${_build})" "${_build}" "${_sdkdir}") + endforeach() +endfunction() + +### +# Detect toolchain information: to know whether it's OK to use Vista+ only SDKs +### +set(_winsdk_vistaonly_ok OFF) +if(MSVC AND NOT _WINDOWSSDK_IGNOREMSVC) + # VC 10 and older has broad target support + if(MSVC_VERSION LESS 1700) + # VC 11 by default targets Vista and later only, so we can add a few more SDKs that (might?) only work on vista+ + elseif("${CMAKE_VS_PLATFORM_TOOLSET}" MATCHES "_xp") + # This is the XP-compatible v110+ toolset + elseif("${CMAKE_VS_PLATFORM_TOOLSET}" STREQUAL "v100" OR "${CMAKE_VS_PLATFORM_TOOLSET}" STREQUAL "v90") + # This is the VS2010/VS2008 toolset + else() + # OK, we're VC11 or newer and not using a backlevel or XP-compatible toolset. + # These versions have no XP (and possibly Vista pre-SP1) support + set(_winsdk_vistaonly_ok ON) + if(_WINDOWSSDK_ANNOUNCE AND NOT _WINDOWSSDK_VISTAONLY_PESTERED) + set(_WINDOWSSDK_VISTAONLY_PESTERED ON CACHE INTERNAL "" FORCE) + message(STATUS "FindWindowsSDK: Detected Visual Studio 2012 or newer, not using the _xp toolset variant: including SDK versions that drop XP support in search!") + endif() + endif() +endif() +if(_WINDOWSSDK_IGNOREMSVC) + set(_winsdk_vistaonly_ok ON) +endif() + +### +# MSVC version checks - keeps messy conditionals in one place +# (messy because of _WINDOWSSDK_IGNOREMSVC) +### +set(_winsdk_msvc_greater_1200 OFF) +if(_WINDOWSSDK_IGNOREMSVC OR (MSVC AND (MSVC_VERSION GREATER 1200))) + set(_winsdk_msvc_greater_1200 ON) +endif() +# Newer than VS .NET/VS Toolkit 2003 +set(_winsdk_msvc_greater_1310 OFF) +if(_WINDOWSSDK_IGNOREMSVC OR (MSVC AND (MSVC_VERSION GREATER 1310))) + set(_winsdk_msvc_greater_1310 ON) +endif() + +# VS2005/2008 +set(_winsdk_msvc_less_1600 OFF) +if(_WINDOWSSDK_IGNOREMSVC OR (MSVC AND (MSVC_VERSION LESS 1600))) + set(_winsdk_msvc_less_1600 ON) +endif() + +# VS2013+ +set(_winsdk_msvc_not_less_1800 OFF) +if(_WINDOWSSDK_IGNOREMSVC OR (MSVC AND (NOT MSVC_VERSION LESS 1800))) + set(_winsdk_msvc_not_less_1800 ON) +endif() + +### +# START body of find module +### +if(_winsdk_msvc_greater_1310) # Newer than VS .NET/VS Toolkit 2003 + ### + # Look for "preferred" SDKs + ### + + # Environment variable for SDK dir + if(EXISTS "$ENV{WindowsSDKDir}" AND (NOT "$ENV{WindowsSDKDir}" STREQUAL "")) + _winsdk_conditional_append_preferred("WindowsSDKDir environment variable" "$ENV{WindowsSDKDir}") + endif() + + if(_winsdk_msvc_less_1600) + # Per-user current Windows SDK for VS2005/2008 + get_filename_component(_sdkdir + "[HKEY_CURRENT_USER\\Software\\Microsoft\\Microsoft SDKs\\Windows;CurrentInstallFolder]" + ABSOLUTE) + _winsdk_conditional_append_preferred("Per-user current Windows SDK" "${_sdkdir}") + + # System-wide current Windows SDK for VS2005/2008 + get_filename_component(_sdkdir + "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Microsoft SDKs\\Windows;CurrentInstallFolder]" + ABSOLUTE) + _winsdk_conditional_append_preferred("System-wide current Windows SDK" "${_sdkdir}") + endif() + + ### + # Begin the massive list of SDK searching! + ### + if(_winsdk_vistaonly_ok AND _winsdk_msvc_not_less_1800) + # These require at least Visual Studio 2013 (VC12) + + _winsdk_check_microsoft_sdks_registry(v10.0A) + + # Windows Software Development Kit (SDK) for Windows 10 + # Several different versions living in the same directory - if nothing else we can assume RTM (10240) + _winsdk_check_microsoft_sdks_registry(v10.0 10.0.10240.0) + foreach(_win10build ${_winsdk_win10vers}) + _winsdk_check_win10_kits(${_win10build}) + endforeach() + endif() # vista-only and 2013+ + + # Included in Visual Studio 2013 + # Includes the v120_xp toolset + _winsdk_check_microsoft_sdks_registry(v8.1A 8.1.51636) + + if(_winsdk_vistaonly_ok AND _winsdk_msvc_not_less_1800) + # Windows Software Development Kit (SDK) for Windows 8.1 + # http://msdn.microsoft.com/en-gb/windows/desktop/bg162891 + _winsdk_check_microsoft_sdks_registry(v8.1 8.1.25984.0) + _winsdk_check_windows_kits_registry("Windows Kits 8.1" 8.1.25984.0 KitsRoot81) + endif() # vista-only and 2013+ + + if(_winsdk_vistaonly_ok) + # Included in Visual Studio 2012 + _winsdk_check_microsoft_sdks_registry(v8.0A 8.0.50727) + + # Microsoft Windows SDK for Windows 8 and .NET Framework 4.5 + # This is the first version to also include the DirectX SDK + # http://msdn.microsoft.com/en-US/windows/desktop/hh852363.aspx + _winsdk_check_microsoft_sdks_registry(v8.0 6.2.9200.16384) + _winsdk_check_windows_kits_registry("Windows Kits 8.0" 6.2.9200.16384 KitsRoot) + endif() # vista-only + + # Included with VS 2012 Update 1 or later + # Introduces v110_xp toolset + _winsdk_check_microsoft_sdks_registry(v7.1A 7.1.51106) + if(_winsdk_vistaonly_ok) + # Microsoft Windows SDK for Windows 7 and .NET Framework 4 + # http://www.microsoft.com/downloads/en/details.aspx?FamilyID=6b6c21d2-2006-4afa-9702-529fa782d63b + _winsdk_check_microsoft_sdks_registry(v7.1 7.1.7600.0.30514) + endif() # vista-only + + # Included with VS 2010 + _winsdk_check_microsoft_sdks_registry(v7.0A 6.1.7600.16385) + + # Windows SDK for Windows 7 and .NET Framework 3.5 SP1 + # Works with VC9 + # http://www.microsoft.com/en-us/download/details.aspx?id=18950 + _winsdk_check_microsoft_sdks_registry(v7.0 6.1.7600.16385) + + # Two versions call themselves "v6.1": + # Older: + # Windows Vista Update & .NET 3.0 SDK + # http://www.microsoft.com/en-us/download/details.aspx?id=14477 + + # Newer: + # Windows Server 2008 & .NET 3.5 SDK + # may have broken VS9SP1? they recommend v7.0 instead, or a KB... + # http://www.microsoft.com/en-us/download/details.aspx?id=24826 + _winsdk_check_microsoft_sdks_registry(v6.1 6.1.6000.16384.10) + + # Included in VS 2008 + _winsdk_check_microsoft_sdks_registry(v6.0A 6.1.6723.1) + + # Microsoft Windows Software Development Kit for Windows Vista and .NET Framework 3.0 Runtime Components + # http://blogs.msdn.com/b/stanley/archive/2006/11/08/microsoft-windows-software-development-kit-for-windows-vista-and-net-framework-3-0-runtime-components.aspx + _winsdk_check_microsoft_sdks_registry(v6.0 6.0.6000.16384) +endif() + +# Let's not forget the Platform SDKs, which sometimes are useful! +if(_winsdk_msvc_greater_1200) + _winsdk_check_platformsdk_registry("Microsoft Platform SDK for Windows Server 2003 R2" "5.2.3790.2075.51" "D2FF9F89-8AA2-4373-8A31-C838BF4DBBE1") + _winsdk_check_platformsdk_registry("Microsoft Platform SDK for Windows Server 2003 SP1" "5.2.3790.1830.15" "8F9E5EF3-A9A5-491B-A889-C58EFFECE8B3") +endif() +### +# Finally, look for "preferred" SDKs +### +if(_winsdk_msvc_greater_1310) # Newer than VS .NET/VS Toolkit 2003 + + + # Environment variable for SDK dir + if(EXISTS "$ENV{WindowsSDKDir}" AND (NOT "$ENV{WindowsSDKDir}" STREQUAL "")) + _winsdk_conditional_append_preferred("WindowsSDKDir environment variable" "$ENV{WindowsSDKDir}") + endif() + + if(_winsdk_msvc_less_1600) + # Per-user current Windows SDK for VS2005/2008 + get_filename_component(_sdkdir + "[HKEY_CURRENT_USER\\Software\\Microsoft\\Microsoft SDKs\\Windows;CurrentInstallFolder]" + ABSOLUTE) + _winsdk_conditional_append_preferred("Per-user current Windows SDK" "${_sdkdir}") + + # System-wide current Windows SDK for VS2005/2008 + get_filename_component(_sdkdir + "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Microsoft SDKs\\Windows;CurrentInstallFolder]" + ABSOLUTE) + _winsdk_conditional_append_preferred("System-wide current Windows SDK" "${_sdkdir}") + endif() +endif() + + +function(windowssdk_name_lookup _dir _outvar) + list(FIND _win_sdk_versanddirs "${_dir}" _diridx) + math(EXPR _idx "${_diridx} - 1") + if(${_idx} GREATER -1) + list(GET _win_sdk_versanddirs ${_idx} _ret) + else() + set(_ret "NOTFOUND") + endif() + set(${_outvar} "${_ret}" PARENT_SCOPE) +endfunction() + +function(windowssdk_build_lookup _dir _outvar) + list(FIND _win_sdk_buildsanddirs "${_dir}" _diridx) + math(EXPR _idx "${_diridx} - 1") + if(${_idx} GREATER -1) + list(GET _win_sdk_buildsanddirs ${_idx} _ret) + else() + set(_ret "NOTFOUND") + endif() + set(${_outvar} "${_ret}" PARENT_SCOPE) +endfunction() + +# If we found something... +if(_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}) + + # Fallback, in case no preference found. + 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() + +# If we found indications of a user preference... +if(_win_sdk_preferred_sdk_dirs) + list(GET _win_sdk_preferred_sdk_dirs 0 WINDOWSSDK_PREFERRED_DIR) + windowssdk_name_lookup("${WINDOWSSDK_PREFERRED_DIR}" + WINDOWSSDK_PREFERRED_NAME) + set(WINDOWSSDK_PREFERRED_FIRST_DIRS + ${_win_sdk_preferred_sdk_dirs} + ${_win_sdk_dirs}) + list(REMOVE_DUPLICATES WINDOWSSDK_PREFERRED_FIRST_DIRS) + set(WINDOWSSDK_FOUND_PREFERENCE ON) +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) + # Internal: Architecture-appropriate library directory names. + if("${CMAKE_VS_PLATFORM_NAME}" STREQUAL "ARM") + if(CMAKE_SIZEOF_VOID_P MATCHES "8") + # Only supported in Win10 SDK and up. + set(_winsdk_arch8 arm64) # what the WDK for Win8+ calls this architecture + else() + set(_winsdk_archbare /arm) # what the architecture used to be called in oldest SDKs + set(_winsdk_arch arm) # what the architecture used to be called + set(_winsdk_arch8 arm) # what the WDK for Win8+ calls this architecture + endif() + else() + if(CMAKE_SIZEOF_VOID_P MATCHES "8") + set(_winsdk_archbare /x64) # what the architecture used to be called in oldest SDKs + set(_winsdk_arch amd64) # what the architecture used to be called + set(_winsdk_arch8 x64) # what the WDK for Win8+ calls this architecture + else() + set(_winsdk_archbare ) # what the architecture used to be called in oldest SDKs + set(_winsdk_arch i386) # what the architecture used to be called + set(_winsdk_arch8 x86) # what the WDK for Win8+ calls this architecture + endif() + endif() + + function(get_windowssdk_from_component _component _var) + get_filename_component(_component "${_component}" ABSOLUTE) + file(TO_CMAKE_PATH "${_component}" _component) + foreach(_sdkdir ${WINDOWSSDK_DIRS}) + get_filename_component(_sdkdir "${_sdkdir}" ABSOLUTE) + string(LENGTH "${_sdkdir}" _sdklen) + file(RELATIVE_PATH _rel "${_sdkdir}" "${_component}") + # If we don't have any "parent directory" items... + if(NOT "${_rel}" MATCHES "[.][.]") + set(${_var} "${_sdkdir}" PARENT_SCOPE) + return() + endif() + endforeach() + # Fail. + set(${_var} "NOTFOUND" PARENT_SCOPE) + endfunction() + function(get_windowssdk_library_dirs _winsdk_dir _var) + set(_dirs) + set(_suffixes + "lib${_winsdk_archbare}" # SDKs like 7.1A + "lib/${_winsdk_arch}" # just because some SDKs have x86 dir and root dir + "lib/w2k/${_winsdk_arch}" # Win2k min requirement + "lib/wxp/${_winsdk_arch}" # WinXP min requirement + "lib/wnet/${_winsdk_arch}" # Win Server 2003 min requirement + "lib/wlh/${_winsdk_arch}" + "lib/wlh/um/${_winsdk_arch8}" # Win Vista ("Long Horn") min requirement + "lib/win7/${_winsdk_arch}" + "lib/win7/um/${_winsdk_arch8}" # Win 7 min requirement + ) + foreach(_ver + wlh # Win Vista ("Long Horn") min requirement + win7 # Win 7 min requirement + win8 # Win 8 min requirement + winv6.3 # Win 8.1 min requirement + ) + + list(APPEND _suffixes + "lib/${_ver}/${_winsdk_arch}" + "lib/${_ver}/um/${_winsdk_arch8}" + "lib/${_ver}/km/${_winsdk_arch8}" + ) + endforeach() + + # Look for WDF libraries in Win10+ SDK + foreach(_mode umdf kmdf) + file(GLOB _wdfdirs RELATIVE "${_winsdk_dir}" "${_winsdk_dir}/lib/wdf/${_mode}/${_winsdk_arch8}/*") + if(_wdfdirs) + list(APPEND _suffixes ${_wdfdirs}) + endif() + endforeach() + + # Look in each Win10+ SDK version for the components + foreach(_win10ver ${_winsdk_win10vers}) + foreach(_component um km ucrt mmos) + list(APPEND _suffixes "lib/${_win10ver}/${_component}/${_winsdk_arch8}") + endforeach() + endforeach() + + foreach(_suffix ${_suffixes}) + # Check to see if a library actually exists here. + file(GLOB _libs "${_winsdk_dir}/${_suffix}/*.lib") + if(_libs) + list(APPEND _dirs "${_winsdk_dir}/${_suffix}") + endif() + endforeach() + if("${_dirs}" STREQUAL "") + set(_dirs NOTFOUND) + else() + list(REMOVE_DUPLICATES _dirs) + endif() + set(${_var} ${_dirs} PARENT_SCOPE) + endfunction() + function(get_windowssdk_include_dirs _winsdk_dir _var) + set(_dirs) + + set(_subdirs shared um winrt km wdf mmos ucrt) + set(_suffixes Include) + + foreach(_dir ${_subdirs}) + list(APPEND _suffixes "Include/${_dir}") + endforeach() + + foreach(_ver ${_winsdk_win10vers}) + foreach(_dir ${_subdirs}) + list(APPEND _suffixes "Include/${_ver}/${_dir}") + endforeach() + endforeach() + + foreach(_suffix ${_suffixes}) + # Check to see if a header file actually exists here. + file(GLOB _headers "${_winsdk_dir}/${_suffix}/*.h") + if(_headers) + list(APPEND _dirs "${_winsdk_dir}/${_suffix}") + endif() + endforeach() + if("${_dirs}" STREQUAL "") + set(_dirs NOTFOUND) + else() + list(REMOVE_DUPLICATES _dirs) + endif() + set(${_var} ${_dirs} PARENT_SCOPE) + endfunction() + function(get_windowssdk_library_dirs_multiple _var) + set(_dirs) + foreach(_sdkdir ${ARGN}) + get_windowssdk_library_dirs("${_sdkdir}" _current_sdk_libdirs) + if(_current_sdk_libdirs) + list(APPEND _dirs ${_current_sdk_libdirs}) + endif() + endforeach() + if("${_dirs}" STREQUAL "") + set(_dirs NOTFOUND) + else() + list(REMOVE_DUPLICATES _dirs) + endif() + set(${_var} ${_dirs} PARENT_SCOPE) + endfunction() + function(get_windowssdk_include_dirs_multiple _var) + set(_dirs) + foreach(_sdkdir ${ARGN}) + get_windowssdk_include_dirs("${_sdkdir}" _current_sdk_incdirs) + if(_current_sdk_libdirs) + list(APPEND _dirs ${_current_sdk_incdirs}) + endif() + endforeach() + if("${_dirs}" STREQUAL "") + set(_dirs NOTFOUND) + else() + list(REMOVE_DUPLICATES _dirs) + endif() + set(${_var} ${_dirs} PARENT_SCOPE) + endfunction() +endif() diff --git a/cmake/cmake-modules/FindXrandr.cmake b/cmake/cmake-modules/FindXrandr.cmake new file mode 100644 index 000000000..965c42dba --- /dev/null +++ b/cmake/cmake-modules/FindXrandr.cmake @@ -0,0 +1,78 @@ +# - try to find the Xrandr library +# +# Cache Variables: (probably not for direct use in your scripts) +# XRANDR_INCLUDE_DIR +# XRANDR_SOURCE_DIR +# XRANDR_LIBRARY +# +# Non-cache variables you might use in your CMakeLists.txt: +# XRANDR_FOUND +# XRANDR_INCLUDE_DIRS +# XRANDR_LIBRARIES +# +# Requires these CMake modules: +# FindPackageHandleStandardArgs (known included with CMake >=2.6.2) +# +# Original Author: +# 2014 Kevin M. Godby <kevin@godby.org> +# +# 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(XRANDR_ROOT_DIR + "${XRANDR_ROOT_DIR}" + CACHE + PATH + "Directory to search for Xrandr") + +find_package(PkgConfig QUIET) +if(PKG_CONFIG_FOUND) + pkg_check_modules(PC_LIBXRANDR xrandr) +endif() + +find_library(XRANDR_LIBRARY + NAMES + Xrandr + PATHS + ${PC_LIBXRANDR_LIBRARY_DIRS} + ${PC_LIBXRANDR_LIBDIR} + HINTS + "${XRANDR_ROOT_DIR}" + PATH_SUFFIXES + lib + ) + +get_filename_component(_libdir "${XRANDR_LIBRARY}" PATH) + +find_path(XRANDR_INCLUDE_DIR + NAMES + Xrandr.h + PATHS + ${PC_LIBXRANDR_INCLUDE_DIRS} + ${PC_LIBXRANDR_INCLUDEDIR} + HINTS + "${_libdir}" + "${_libdir}/.." + "${XRANDR_ROOT_DIR}" + PATH_SUFFIXES + X11 + X11/extensions + ) + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(XRANDR + DEFAULT_MSG + XRANDR_LIBRARY + XRANDR_INCLUDE_DIR + ) + +if(XRANDR_FOUND) + list(APPEND XRANDR_LIBRARIES ${XRANDR_LIBRARY}) + list(APPEND XRANDR_INCLUDE_DIRS ${XRANDR_INCLUDE_DIR}) + mark_as_advanced(XRANDR_ROOT_DIR) +endif() + +mark_as_advanced(XRANDR_INCLUDE_DIR + XRANDR_LIBRARY) + diff --git a/cmake/cmake-modules/Findargp.cmake b/cmake/cmake-modules/Findargp.cmake new file mode 100644 index 000000000..140144d42 --- /dev/null +++ b/cmake/cmake-modules/Findargp.cmake @@ -0,0 +1,81 @@ +# - try to find the argp library/component of glibc +# +# Users may optionally supply: +# ARGP_ROOT_DIR - a prefix to start searching. +# +# Cache Variables: (probably not for direct use in your scripts) +# ARGP_INCLUDE_DIR +# ARGP_LIBRARY, only defined if linking to an extra library is required +# +# Non-cache variables you might use in your CMakeLists.txt: +# ARGP_FOUND +# ARGP_INCLUDE_DIRS +# ARGP_LIBRARIES +# +# Requires these CMake modules: +# FindPackageHandleStandardArgs (known included with CMake >=2.6.2) +# +# Original Author: +# 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> +# http://academic.cleardefinition.com +# Iowa State University HCI Graduate Program/VRAC +# +# Copyright Iowa State University 2009-2010. +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE_1_0.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) + +set(ARGP_ROOT_DIR + "${ARGP_ROOT_DIR}" + CACHE + PATH + "Path to search for ARGP library") + +### +# Configure ARGP +### +set(_check ARGP_INCLUDE_DIR) + +find_path(ARGP_INCLUDE_DIR + NAMES + argp.h + HINTS + "${ARGP_ROOT_DIR}" + PATHS + /usr/local + /opt/local + /sw) +mark_as_advanced(ARGP_INCLUDE_DIR) + +include(CheckFunctionExists) +check_function_exists(argp_parse ARGP_BUILTIN) + +if(NOT ARGP_BUILTIN) + find_library(ARGP_LIBRARY + NAMES + argp + HINTS + "${ARGP_ROOT_DIR}" + PATH_SUFFIXES + lib + lib64 + PATHS + /usr/local + /opt/local + /sw) + list(APPEND _check ARGP_LIBRARY) + mark_as_advanced(ARGP_LIBRARY) +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(argp + DEFAULT_MSG + ${_check}) + +if(ARGP_FOUND) + set(ARGP_INCLUDE_DIRS "${ARGP_INCLUDE_DIR}") + set(ARGP_LIBRARIES "${ARGP_LIBRARY}") + mark_as_advanced(ARGP_ROOT_DIR) +endif() diff --git a/cmake/cmake-modules/Findcppcheck.cmake b/cmake/cmake-modules/Findcppcheck.cmake new file mode 100644 index 000000000..3f13a6b3b --- /dev/null +++ b/cmake/cmake-modules/Findcppcheck.cmake @@ -0,0 +1,173 @@ +# - try to find cppcheck tool +# +# Cache Variables: +# CPPCHECK_EXECUTABLE +# +# Non-cache variables you might use in your CMakeLists.txt: +# CPPCHECK_FOUND +# CPPCHECK_VERSION +# CPPCHECK_POSSIBLEERROR_ARG +# CPPCHECK_UNUSEDFUNC_ARG +# CPPCHECK_STYLE_ARG +# CPPCHECK_QUIET_ARG +# CPPCHECK_INCLUDEPATH_ARG +# CPPCHECK_FAIL_REGULAR_EXPRESSION +# CPPCHECK_WARN_REGULAR_EXPRESSION +# CPPCHECK_MARK_AS_ADVANCED - whether to mark our vars as advanced even +# if we don't find this program. +# +# Requires these CMake modules: +# FindPackageHandleStandardArgs (known included with CMake >=2.6.2) +# +# Original Author: +# 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> +# http://academic.cleardefinition.com +# Iowa State University HCI Graduate Program/VRAC +# +# Copyright Iowa State University 2009-2010. +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE_1_0.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) + +file(TO_CMAKE_PATH "${CPPCHECK_ROOT_DIR}" CPPCHECK_ROOT_DIR) +set(CPPCHECK_ROOT_DIR + "${CPPCHECK_ROOT_DIR}" + CACHE + PATH + "Path to search for cppcheck") + +# cppcheck app bundles on Mac OS X are GUI, we want command line only +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 + NAMES + cppcheck + cli + PATHS + "${CPPCHECK_ROOT_DIR}" + PATH_SUFFIXES + cli + NO_DEFAULT_PATH) +endif() + +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) + + # Check for the two types of command line arguments by just trying them + _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=unusedFunction") + _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[)]") + set(CPPCHECK_WARN_REGULAR_EXPRESSION "[(]style[)]") + elseif(CMAKE_COMPILER_IS_GNUCXX) + set(CPPCHECK_TEMPLATE_ARG --template gcc) + set(CPPCHECK_FAIL_REGULAR_EXPRESSION " error: ") + set(CPPCHECK_WARN_REGULAR_EXPRESSION " style: ") + else() + set(CPPCHECK_TEMPLATE_ARG --template gcc) + set(CPPCHECK_FAIL_REGULAR_EXPRESSION " error: ") + set(CPPCHECK_WARN_REGULAR_EXPRESSION " style: ") + endif() + elseif("${CPPCHECK_STYLE_ARG}" STREQUAL "--style") + # Old arguments + _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() + # No idea - some other issue must be getting in the way + message(STATUS + "WARNING: Can't detect whether CPPCHECK wants new or old-style arguments!") + endif() + + set(CPPCHECK_QUIET_ARG "--quiet") + set(CPPCHECK_INCLUDEPATH_ARG "-I") + +endif() + +set(CPPCHECK_ALL + "${CPPCHECK_EXECUTABLE} ${CPPCHECK_POSSIBLEERROR_ARG} ${CPPCHECK_UNUSEDFUNC_ARG} ${CPPCHECK_STYLE_ARG} ${CPPCHECK_QUIET_ARG} ${CPPCHECK_INCLUDEPATH_ARG} some/include/path") + +execute_process(COMMAND "${CPPCHECK_EXECUTABLE}" --version + OUTPUT_VARIABLE CPPCHECK_VERSION OUTPUT_STRIP_TRAILING_WHITESPACE) +string(REGEX REPLACE ".* ([0-9]\\.([0-9]\\.[0-9])?)" "\\1" + CPPCHECK_VERSION "${CPPCHECK_VERSION}") + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(cppcheck + DEFAULT_MSG + CPPCHECK_ALL + CPPCHECK_EXECUTABLE + CPPCHECK_POSSIBLEERROR_ARG + CPPCHECK_UNUSEDFUNC_ARG + CPPCHECK_STYLE_ARG + CPPCHECK_INCLUDEPATH_ARG + CPPCHECK_QUIET_ARG) + +if(CPPCHECK_FOUND OR CPPCHECK_MARK_AS_ADVANCED) + mark_as_advanced(CPPCHECK_ROOT_DIR) +endif() + +mark_as_advanced(CPPCHECK_EXECUTABLE) diff --git a/cmake/cmake-modules/Findcppcheck.cpp b/cmake/cmake-modules/Findcppcheck.cpp new file mode 100644 index 000000000..84350db47 --- /dev/null +++ b/cmake/cmake-modules/Findcppcheck.cpp @@ -0,0 +1,16 @@ +/** + * \file Findcppcheck.cpp + * \brief Dummy C++ source file used by CMake module Findcppcheck.cmake + * + * \author + * Ryan Pavlik, 2009-2010 + * <rpavlik@iastate.edu> + * http://academic.cleardefinition.com/ + * + */ + + + +int main(int argc, char* argv[]) { + return 0; +} diff --git a/cmake/cmake-modules/Findcppunit.cmake b/cmake/cmake-modules/Findcppunit.cmake new file mode 100644 index 000000000..69150167e --- /dev/null +++ b/cmake/cmake-modules/Findcppunit.cmake @@ -0,0 +1,75 @@ +# - try to find cppunit library +# +# Cache Variables: (probably not for direct use in your scripts) +# CPPUNIT_INCLUDE_DIR +# CPPUNIT_LIBRARY +# +# Non-cache variables you might use in your CMakeLists.txt: +# CPPUNIT_FOUND +# CPPUNIT_INCLUDE_DIRS +# CPPUNIT_LIBRARIES +# +# Requires these CMake modules: +# SelectLibraryConfigurations (included with CMake >= 2.8.0) +# FindPackageHandleStandardArgs (known included with CMake >=2.6.2) +# +# Original Author: +# 2009-2011 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> +# http://academic.cleardefinition.com +# Iowa State University HCI Graduate Program/VRAC +# +# Copyright Iowa State University 2009-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(CPPUNIT_ROOT_DIR + "${CPPUNIT_ROOT_DIR}" + CACHE + PATH + "Directory to search") + +find_library(CPPUNIT_LIBRARY_RELEASE + NAMES + cppunit + HINTS + "${CPPUNIT_ROOT_DIR}") + +find_library(CPPUNIT_LIBRARY_DEBUG + NAMES + cppunitd + HINTS + "${CPPUNIT_ROOT_DIR}") + +include(SelectLibraryConfigurations) +select_library_configurations(CPPUNIT) + +# Might want to look close to the library first for the includes. +get_filename_component(_libdir "${CPPUNIT_LIBRARY_RELEASE}" PATH) + +find_path(CPPUNIT_INCLUDE_DIR + NAMES + cppunit/TestCase.h + HINTS + "${_libdir}/.." + PATHS + "${CPPUNIT_ROOT_DIR}" + PATH_SUFFIXES + include/) + + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(cppunit + DEFAULT_MSG + CPPUNIT_LIBRARY + CPPUNIT_INCLUDE_DIR) + +if(CPPUNIT_FOUND) + set(CPPUNIT_LIBRARIES ${CPPUNIT_LIBRARY} ${CMAKE_DL_LIBS}) + set(CPPUNIT_INCLUDE_DIRS "${CPPUNIT_INCLUDE_DIR}") + mark_as_advanced(CPPUNIT_ROOT_DIR) +endif() + +mark_as_advanced(CPPUNIT_INCLUDE_DIR + CPPUNIT_LIBRARY_RELEASE + CPPUNIT_LIBRARY_DEBUG) diff --git a/cmake/cmake-modules/Findcutil.cmake b/cmake/cmake-modules/Findcutil.cmake new file mode 100644 index 000000000..495f2840a --- /dev/null +++ b/cmake/cmake-modules/Findcutil.cmake @@ -0,0 +1,56 @@ +# - find NVIDIA CUDA and source for the cutil library, building cutil if needed. +# +# CUTIL_LIBRARIES - Libraries to link against to use CUTIL +# CUTIL_INCLUDE_DIRS - Include directories to add before building a CUTIL app. +# +# Functions: +# install_cutil({RUNTIME_LIBRARY_DESTINATION}) - Install the CUTIL shared lib if created. +# +# Original Author: +# 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> +# http://academic.cleardefinition.com +# Iowa State University HCI Graduate Program/VRAC +# +# Copyright Iowa State University 2009-2010. +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE_1_0.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) + + +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) +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) + +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}" + LIBRARY DESTINATION "${dest}") + endfunction() +else() + function(install_cutil) + message(FATAL_ERROR "Can't install cutil - didn't find it!") + endfunction() +endif() diff --git a/cmake/cmake-modules/Finddb2pdf.cmake b/cmake/cmake-modules/Finddb2pdf.cmake new file mode 100644 index 000000000..e3ad03a2b --- /dev/null +++ b/cmake/cmake-modules/Finddb2pdf.cmake @@ -0,0 +1,73 @@ +# - Try to find db2pdf, and define a custom command to turn docbook into pdf +# +# Once done, this will define: +# DB2PDF_FOUND - system has LyX +# DB2PDF_COMMAND - the command to run +# +# and the following function: +# docbook_to_pdf(<output-variable> <docbook files>) +# +# Useful configuration variables you might want to add to your cache: +# DB2PDF_ROOT_DIR - A directory prefix to search +# +# Original Author: +# 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> +# http://academic.cleardefinition.com +# Iowa State University HCI Graduate Program/VRAC +# +# Copyright Iowa State University 2009-2010. +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE_1_0.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) + + +set(DB2PDF_ROOT_DIR + "${DB2PDF_ROOT_DIR}" + CACHE + PATH + "Directory to start our search in") + +find_program(DB2PDF_COMMAND + NAMES + db2pdf + HINTS + "${DB2PDF_ROOT_DIR}" + PATH_SUFFIXES + bin) + +# 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(db2pdf DEFAULT_MSG DB2PDF_COMMAND) + +if(DB2PDF_FOUND) + mark_as_advanced(DB2PDF_ROOT_DIR) +endif() + +mark_as_advanced(DB2PDF_COMMAND) + +function(docbook_to_pdf _outvar) + set(INPUT ${ARGN}) + set(_out) + set(_outname) + + foreach(_file ${INPUT}) + get_filename_component(_base "${_file}" NAME_WE) + set(_outname "${CMAKE_CURRENT_BINARY_DIR}/${_base}.pdf") + list(APPEND _out "${_outname}") + if(DB2PDF_COMMAND) + add_custom_command(OUTPUT + "${_outname}" + COMMAND + ${DB2PDF_COMMAND} + -o + "${CMAKE_CURRENT_BINARY_DIR}" + "${_file}" + WORKING_DIRECTORY + "${CMAKE_CURRENT_SOURCE_DIR}" + MAIN_DEPENDENCY + "${_file}") + endif() + endforeach() + set(${_outvar} ${_out} PARENT_SCOPE) +endfunction() diff --git a/cmake/cmake-modules/FindosgLua.cmake b/cmake/cmake-modules/FindosgLua.cmake new file mode 100644 index 000000000..d6a682e64 --- /dev/null +++ b/cmake/cmake-modules/FindosgLua.cmake @@ -0,0 +1,71 @@ +# - try to find osgLua +# +# Users may optionally supply: +# OSGLUA_ROOT_DIR - a prefix to start searching +# +# Non-cache variables you might use in your CMakeLists.txt: +# OSGLUA_FOUND +# OSGLUA_INCLUDE_DIRS +# OSGLUA_LIBRARIES +# +# Requires these CMake modules: +# FindPackageHandleStandardArgs (known included with CMake >=2.6.2) +# +# Original Author: +# 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> +# http://academic.cleardefinition.com +# Iowa State University HCI Graduate Program/VRAC +# +# Copyright Iowa State University 2009-2010. +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE_1_0.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) + +set(OSGLUA_ROOT_DIR + "${OSGLUA_ROOT_DIR}" + CACHE + PATH + "Path to search for osgLua") + +### +# Dependencies +### +find_package(Lua51 QUIET) + +### +# Configure Luabind +### +find_path(OSGLUA_INCLUDE_DIR + NAMES + osgLua/Script + HINTS + "${OSGLUA_ROOT_DIR}" + PATH_SUFFIXES + include) +mark_as_advanced(OSGLUA_INCLUDE_DIR) + +find_library(OSGLUA_LIBRARY + NAMES + osgLua + HINTS + "${OSGLUA_ROOT_DIR}" + PATH_SUFFIXES + lib64 + lib) +mark_as_advanced(OSGLUA_LIBRARY) + +# 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(osgLua + DEFAULT_MSG + OSGLUA_LIBRARY + OSGLUA_INCLUDE_DIR + LUA_LIBRARIES + LUA_INCLUDE_DIR) + +if(OSGLUA_FOUND) + set(OSGLUA_INCLUDE_DIRS "${OSGLUA_INCLUDE_DIR}" "${LUA_INCLUDE_DIR}") + set(OSGLUA_LIBRARIES "${OSGLUA_LIBRARY}" ${LUA_LIBRARIES}) + mark_as_advanced(OSGLUA_ROOT_DIR) +endif() diff --git a/cmake/cmake-modules/Findquatlib.cmake b/cmake/cmake-modules/Findquatlib.cmake new file mode 100644 index 000000000..efca27f70 --- /dev/null +++ b/cmake/cmake-modules/Findquatlib.cmake @@ -0,0 +1,104 @@ +# - Find quatlib +# Find the quatlib headers and libraries. +# +# QUATLIB_INCLUDE_DIRS - where to find quat.h +# QUATLIB_LIBRARIES - List of libraries when using quatlib. +# QUATLIB_FOUND - True if quatlib found. +# +# Original Author: +# 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> +# http://academic.cleardefinition.com +# Iowa State University HCI Graduate Program/VRAC +# +# Copyright Iowa State University 2009-2010. +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE_1_0.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) + +if(TARGET quat) + # Look for the header file. + find_path(QUATLIB_INCLUDE_DIR NAMES quat.h + PATHS ${quatlib_SOURCE_DIR}) + + set(QUATLIB_LIBRARY "quat") + +else() + set(QUATLIB_ROOT_DIR + "${QUATLIB_ROOT_DIR}" + CACHE + PATH + "Root directory to search for quatlib") + if(DEFINED VRPN_ROOT_DIR AND NOT QUATLIB_ROOT_DIR) + set(QUATLIB_ROOT_DIR "${VRPN_ROOT_DIR}") + mark_as_advanced(QUATLIB_ROOT_DIR) + endif() + + if("${CMAKE_SIZEOF_VOID_P}" MATCHES "8") + set(_libsuffixes lib64 lib) + + # 64-bit dir: only set on win64 + file(TO_CMAKE_PATH "$ENV{ProgramW6432}" _progfiles) + else() + set(_libsuffixes lib) + set(_PF86 "ProgramFiles(x86)") + if(NOT "$ENV{${_PF86}}" STREQUAL "") + # 32-bit dir: only set on win64 + file(TO_CMAKE_PATH "$ENV{${_PF86}}" _progfiles) + else() + # 32-bit dir on win32, useless to us on win64 + file(TO_CMAKE_PATH "$ENV{ProgramFiles}" _progfiles) + endif() + endif() + + # Look for the header file. + find_path(QUATLIB_INCLUDE_DIR + NAMES + quat.h + HINTS + "${QUATLIB_ROOT_DIR}" + PATH_SUFFIXES + include + PATHS + "${_progfiles}/VRPN" + "${_progfiles}/quatlib" + C:/usr/local + /usr/local) + + # Look for the library. + find_library(QUATLIB_LIBRARY + NAMES + quat.lib + libquat.a + HINTS + "${QUATLIB_ROOT_DIR}" + PATH_SUFFIXES + ${_libsuffixes} + PATHS + "${_progfiles}/VRPN" + "${_progfiles}/quatlib" + C:/usr/local + /usr/local) +endif() + +# handle the QUIETLY and REQUIRED arguments and set QUATLIB_FOUND to TRUE if +# all listed variables are TRUE +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(quatlib + DEFAULT_MSG + QUATLIB_LIBRARY + QUATLIB_INCLUDE_DIR) + +if(QUATLIB_FOUND) + set(QUATLIB_LIBRARIES ${QUATLIB_LIBRARY}) + if(NOT WIN32) + list(APPEND QUATLIB_LIBRARIES m) + endif() + set(QUATLIB_INCLUDE_DIRS ${QUATLIB_INCLUDE_DIR}) + + mark_as_advanced(QUATLIB_ROOT_DIR) +else() + set(QUATLIB_LIBRARIES) + set(QUATLIB_INCLUDE_DIRS) +endif() + +mark_as_advanced(QUATLIB_LIBRARY QUATLIB_INCLUDE_DIR) diff --git a/cmake/cmake-modules/Findudev.cmake b/cmake/cmake-modules/Findudev.cmake new file mode 100644 index 000000000..ce454d576 --- /dev/null +++ b/cmake/cmake-modules/Findudev.cmake @@ -0,0 +1,77 @@ +# - try to find the udev library +# +# Cache Variables: (probably not for direct use in your scripts) +# UDEV_INCLUDE_DIR +# UDEV_SOURCE_DIR +# UDEV_LIBRARY +# +# Non-cache variables you might use in your CMakeLists.txt: +# UDEV_FOUND +# UDEV_INCLUDE_DIRS +# UDEV_LIBRARIES +# +# Requires these CMake modules: +# FindPackageHandleStandardArgs (known included with CMake >=2.6.2) +# +# Original Author: +# 2014 Kevin M. Godby <kevin@godby.org> +# +# 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(UDEV_ROOT_DIR + "${UDEV_ROOT_DIR}" + CACHE + PATH + "Directory to search for udev") + +find_package(PkgConfig QUIET) +if(PKG_CONFIG_FOUND) + pkg_check_modules(PC_LIBUDEV libudev) +endif() + +find_library(UDEV_LIBRARY + NAMES + udev + PATHS + ${PC_LIBUDEV_LIBRARY_DIRS} + ${PC_LIBUDEV_LIBDIR} + HINTS + "${UDEV_ROOT_DIR}" + PATH_SUFFIXES + lib + ) + +get_filename_component(_libdir "${UDEV_LIBRARY}" PATH) + +find_path(UDEV_INCLUDE_DIR + NAMES + libudev.h + PATHS + ${PC_LIBUDEV_INCLUDE_DIRS} + ${PC_LIBUDEV_INCLUDEDIR} + HINTS + "${_libdir}" + "${_libdir}/.." + "${UDEV_ROOT_DIR}" + PATH_SUFFIXES + include + ) + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(UDEV + DEFAULT_MSG + UDEV_LIBRARY + UDEV_INCLUDE_DIR + ) + +if(UDEV_FOUND) + list(APPEND UDEV_LIBRARIES ${UDEV_LIBRARY}) + list(APPEND UDEV_INCLUDE_DIRS ${UDEV_INCLUDE_DIR}) + mark_as_advanced(UDEV_ROOT_DIR) +endif() + +mark_as_advanced(UDEV_INCLUDE_DIR + UDEV_LIBRARY) + diff --git a/cmake/cmake-modules/GenerateCompatibilityVersionFile.cmake b/cmake/cmake-modules/GenerateCompatibilityVersionFile.cmake new file mode 100644 index 000000000..7ac28ed5f --- /dev/null +++ b/cmake/cmake-modules/GenerateCompatibilityVersionFile.cmake @@ -0,0 +1,83 @@ +#.rst: +# .. command:: generate_compatibility_version_file +# +# Create a version file for a project:: +# +# generate_compatibility_version_file(<filename> +# [VERSION <major.minor.patch>] +# COMPATIBILITY <AnyNewerVersion|SameMajorVersion|ExactVersion> +# [C_ABI] +# [CXX_LAYOUT] +# [CXX_ABI]) + +#============================================================================= +# Copyright 2015 Sensics, Inc. <ryan@sensics.com> +# Copyright 2012 Alexander Neundorf <neundorf@kde.org> +# +# Distributed under the OSI-approved BSD License (the "License"); +# see accompanying file Copyright.txt for details. +# +# This software is distributed WITHOUT ANY WARRANTY; without even the +# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the License for more information. +#============================================================================= +# (To distribute this file outside of CMake, substitute the full +# License text for the above reference.) + + +include(CMakeParseArguments) +include(CMakePackageConfigHelpers) + +set(GCVF_DIR "${CMAKE_CURRENT_LIST_DIR}" CACHE INTERNAL "" FORCE) + +function(generate_compatibility_version_file _filename) + + set(options C_ABI CXX_LAYOUT CXX_ABI) + set(oneValueArgs VERSION COMPATIBILITY ) + set(multiValueArgs ) + cmake_parse_arguments(GCVF "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN}) + + if(GCVF_UNPARSED_ARGUMENTS) + message(FATAL_ERROR "Unknown keywords given to generate_compatibility_version_file(): ${GCVF_UNPARSED_ARGUMENTS}") + endif() + set(versionTemplateFile "${CMAKE_ROOT}/Modules/BasicConfigVersion-${GCVF_COMPATIBILITY}.cmake.in") + if(NOT EXISTS "${versionTemplateFile}") + message(FATAL_ERROR "Bad COMPATIBILITY value used for generate_compatibility_version_file(): \"${GCVF_COMPATIBILITY}\"") + endif() + + if(GCVF_CXX_ABI) + set(GCVF_CXX_LAYOUT TRUE) + endif() + if(GCVF_CXX_LAYOUT) + set(GCVF_C_ABI TRUE) + endif() + + if("${GCVF_VERSION}" STREQUAL "") + if("${PROJECT_VERSION}" STREQUAL "") + message(FATAL_ERROR "No VERSION specified for generate_compatibility_version_file()") + else() + set(GCVF_VERSION ${PROJECT_VERSION}) + endif() + endif() + + set(GCVF_WIN_CXXLAYOUT) + if(MSVC) + set(GCVF_WIN_CXXLAYOUT "MSVC") + elseif(MINGW) + set(GCVF_WIN_CXXLAYOUT "MinGW") + elseif(WIN32) + set(GCVF_WIN_CXXLAYOUT "other") + endif() + + set(PREV_FILE "${_filename}.cmakeversion") + write_basic_package_version_file("${PREV_FILE}" VERSION ${GCVF_VERSION} COMPATIBILITY ${GCVF_COMPATIBILITY}) + set(GCVF_BASIC TRUE) + foreach(level BASIC C_ABI CXX_LAYOUT CXX_ABI) + if(GCVF_${level}) + file(READ "${PREV_FILE}" GCVF_PREVIOUS_FILE) + set(PREV_FILE "${_filename}.${level}") + configure_file("${GCVF_DIR}/CompatibilityVersionFile-${level}.cmake.in" "${PREV_FILE}" @ONLY) + endif() + endforeach() + configure_file("${PREV_FILE}" "${_filename}" COPYONLY) +endfunction() \ No newline at end of file diff --git a/cmake/cmake-modules/GetCPUDetails.cmake b/cmake/cmake-modules/GetCPUDetails.cmake new file mode 100644 index 000000000..b29013c99 --- /dev/null +++ b/cmake/cmake-modules/GetCPUDetails.cmake @@ -0,0 +1,201 @@ +# - Set a number of variables to indicate things about the current CPU and OS +# +# CPU_COUNT +# CPU_INTEL +# CPU_EXE_64BIT +# CPU_EXE_32BIT +# CPU_HAS_SSE +# CPU_HAS_SSE2 +# CPU_HAS_SSE3 +# CPU_HAS_SSSE3 +# CPU_HAS_SSE4_1 +# CPU_HAS_SSE4_2 +# +# Requires these CMake modules: +# no additional modules required +# +# Original Author: +# 2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> +# http://academic.cleardefinition.com +# Iowa State University HCI Graduate Program/VRAC +# +# Copyright Iowa State University 2009-2010. +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE_1_0.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) +# + + +if(__get_cpu_details) + return() +endif() +set(__get_cpu_details YES) + +function(get_cpu_details) + option(CPUDETAILS_VERBOSE + "Should we display results of the CPU info check?" + NO) + mark_as_advanced(CPUDETAILS_VERBOSE) + + ### See http://www.kitware.com/blog/home/post/63 + if(NOT DEFINED CPU_COUNT) + # Unknown: + set(CPU_COUNT 1) + # Linux: + set(cpuinfo_file "/proc/cpuinfo") + if(EXISTS "${cpuinfo_file}") + file(STRINGS "${cpuinfo_file}" procs REGEX "^processor.: [0-9]+$") + list(LENGTH procs CPU_COUNT) + endif() + # Mac: + if(APPLE) + find_program(cmd_sys_pro "system_profiler") + if(cmd_sys_pro) + execute_process(COMMAND ${cmd_sys_pro} OUTPUT_VARIABLE info) + string(REGEX REPLACE "^.*Total Number Of Cores: ([0-9]+).*$" "\\1" + CPU_COUNT "${info}") + endif() + endif() + # Windows: + if(WIN32) + set(CPU_COUNT "$ENV{NUMBER_OF_PROCESSORS}") + endif() + endif() + + ### + # CPU_INTEL + + if("${CMAKE_SYSTEM_PROCESSOR}" MATCHES "x86_64" OR "${CMAKE_SYSTEM_PROCESSOR}" MATCHES "i[3456]86") + set(CPU_INTEL YES) + elseif(APPLE) + # Mac Intel boxes return i386 in 10.5 - so assume this is a PPC + set(CPU_INTEL NO) + else() + # TODO: Assuming yes in case of doubt - probably not a great idea + set(CPU_INTEL YES) + endif() + + set(CPU_INTEL + ${CPU_INTEL} + CACHE + INTERNAL + "Intel x86 or x86_64 architecture machine?") + + ### + # CPU_EXE_64BIT/32BIT + if(CMAKE_SIZEOF_VOID_P EQUAL 8) + set(CPU_EXE_64BIT ON) + set(CPU_EXE_32BIT OFF) + else() + set(CPU_EXE_64BIT OFF) + set(CPU_EXE_32BIT ON) + endif() + + ### + # CPU_HAS_SSE/SSE2/SSE3/SSSE3/SSE4.1/SSE4.2 + if(CPU_INTEL) + if(CMAKE_SYSTEM_NAME STREQUAL "Linux") + # Use /proc/cpuinfo to find this out. + file(STRINGS "/proc/cpuinfo" _cpuinfo) + if(_cpuinfo MATCHES "(sse)|(xmm)") + set(CPU_HAS_SSE YES) + else() + set(CPU_HAS_SSE NO) + endif() + + if(_cpuinfo MATCHES "(sse2)|(xmm2)") + set(CPU_HAS_SSE2 YES) + else() + set(CPU_HAS_SSE2 NO) + endif() + + if(_cpuinfo MATCHES "(sse3)|(xmm3)") + set(CPU_HAS_SSE3 YES) + else() + set(CPU_HAS_SSE3 NO) + endif() + + if(_cpuinfo MATCHES "ssse3") + set(CPU_HAS_SSSE3 YES) + else() + set(CPU_HAS_SSSE3 NO) + endif() + + if(_cpuinfo MATCHES "(sse4_1)|(xmm4_1)") + set(CPU_HAS_SSE4_1 YES) + else() + set(CPU_HAS_SSE4_1 NO) + endif() + + if(_cpuinfo MATCHES "(sse4_2)|(xmm4_2)") + set(CPU_HAS_SSE4_2 YES) + else() + set(CPU_HAS_SSE4_2 NO) + endif() + + elseif(APPLE) + # Mac OS X Intel requires SSE3 + set(CPU_HAS_SSE YES) + set(CPU_HAS_SSE2 YES) + set(CPU_HAS_SSE3 YES) + set(CPU_HAS_SSSE3 NO) + set(CPU_HAS_SSE4_1 NO) + set(CPU_HAS_SSE4_2 NO) + elseif(WIN32) + if(CPU_EXE_64BIT) + #TODO: Assume only common-denominator for 64-bit machines, + # since I don't know how to check. + set(CPU_HAS_SSE YES) + set(CPU_HAS_SSE2 YES) + set(CPU_HAS_SSE3 NO) + set(CPU_HAS_SSSE3 NO) + set(CPU_HAS_SSE4_1 NO) + set(CPU_HAS_SSE4_2 NO) + else() + #TODO: Assume no SSE, since I don't know how to check. + set(CPU_HAS_SSE NO) + set(CPU_HAS_SSE2 NO) + set(CPU_HAS_SSE3 NO) + set(CPU_HAS_SSSE3 NO) + set(CPU_HAS_SSE4_1 NO) + set(CPU_HAS_SSE4_2 NO) + endif() + endif() + endif() + + set(CPU_INTEL + ${CPU_INTEL} + CACHE + INTERNAL + "Intel x86 or x86_64 architecture machine?") + + foreach(_var + CPU_COUNT + CPU_EXE_64BIT + CPU_EXE_32BIT + CPU_HAS_SSE + CPU_HAS_SSE2 + CPU_HAS_SSE3 + CPU_HAS_SSSE3 + CPU_HAS_SSE4_1 + CPU_HAS_SSE4_2) + set(${_var} ${${_var}} CACHE INTERNAL "") + endforeach() + + if(CPUDETAILS_VERBOSE) + foreach(_var + CPU_COUNT + CPU_INTEL + CPU_EXE_64BIT + CPU_EXE_32BIT + CPU_HAS_SSE + CPU_HAS_SSE2 + CPU_HAS_SSE3 + CPU_HAS_SSSE3 + CPU_HAS_SSE4_1 + CPU_HAS_SSE4_2) + get_property(_help CACHE ${_var} PROPERTY HELPSTRING) + message(STATUS "[get_cpu_details] ${_var} (${_help}): ${${_var}}") + endforeach() + endif() +endfunction() diff --git a/cmake/cmake-modules/GetCompilerInfoString.cmake b/cmake/cmake-modules/GetCompilerInfoString.cmake new file mode 100644 index 000000000..1ee5b1f5a --- /dev/null +++ b/cmake/cmake-modules/GetCompilerInfoString.cmake @@ -0,0 +1,179 @@ +# - Utility function to return a human-useful-only string ID'ing the compiler +# +# get_compiler_info_string(<resultvar>) +# +# and some helper functions: +# get_gcc_version(<resultvar>) +# get_vs_short_version_string(<generator> <resultvar>) +# +# You might consider using it when setting up CTest options, for example: +# include(GetCompilerInfoString) +# get_compiler_info_string(COMPILERID) +# set(CTEST_BUILD_NAME "${CMAKE_SYSTEM}-${CMAKE_SYSTEM_PROCESSOR}-${COMPILERID}") +# +# Requires these CMake modules: +# no additional modules required +# +# Original Author: +# 2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> +# http://academic.cleardefinition.com +# Iowa State University HCI Graduate Program/VRAC +# +# Copyright Iowa State University 2009-2010. +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE_1_0.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) +# +# Some functions based on cmake-2.8.0 modules FindBoost.cmake and CTest.cmake +#============================================================================= +# Copyright 2006-2009 Kitware, Inc. +# Copyright 2006-2008 Andreas Schneider <mail@cynapses.org> +# Copyright 2007 Wengo +# Copyright 2007 Mike Jackson +# Copyright 2008 Andreas Pakulat <apaku@gmx.de> +# Copyright 2008-2009 Philip Lowman <philip@yhbt.com> +# Copyright 2010 Iowa State University (Ryan Pavlik <abiryan@ryand.net>) +# +# Distributed under the OSI-approved BSD License (the "License"); +# see accompanying file Copyright.txt for details. +# +# This software is distributed WITHOUT ANY WARRANTY; without even the +# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the License for more information. +#============================================================================= +# CMake - Cross Platform Makefile Generator +# Copyright 2000-2009 Kitware, Inc., Insight Software Consortium +# All rights reserved. +# +# 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. +#============================================================================= + +if(__get_compiler_info_string) + return() +endif() +set(__get_compiler_info_string YES) + + +function(get_compiler_info_string _var) + set(_out) + + if(CTEST_CMAKE_GENERATOR AND NOT CMAKE_GENERATOR) + # We're running in CTest - use that generator. + set(CMAKE_GENERATOR ${CTEST_CMAKE_GENERATOR}) + endif() + + if(NOT CMAKE_CXX_COMPILER) + # Also for use in CTest scripts + include(CMakeDetermineCXXCompiler) + endif() + + if(MSVC) + # Parse version for Visual Studio + get_vs_short_version_string("${CMAKE_GENERATOR}" _verstring) + if(${CMAKE_GENERATOR} MATCHES "Win64") + set(_verstring "${_verstring}win64") + endif() + + elseif(CMAKE_COMPILER_IS_GNUCXX) + # Parse version for GCC + get_gcc_version(_gccver) + set(_verstring "gcc${_gccver}") + + else() + # Some other compiler we don't handle in more detail yet. + string(REGEX REPLACE " " "_" _verstring "${CMAKE_GENERATOR}") + set(_verstring "${CMAKE_CXX_COMPILER_ID}:generator:${_verstring}") + endif() + + # Return _verstring + set(${_var} "${_verstring}" PARENT_SCOPE) +endfunction() + +## Based on a function in FindBoost.cmake from CMake 2.8.0 +#------------------------------------------------------------------------------- +# +# Runs compiler with "-dumpversion" and parses major/minor +# version with a regex. +# +function(get_gcc_version _var) + exec_program(${CMAKE_CXX_COMPILER} + ARGS + ${CMAKE_CXX_COMPILER_ARG1} + -dumpversion + OUTPUT_VARIABLE + _compilerinfo_COMPILER_VERSION) + + string(REGEX + MATCH + "([.0-9]+)" + "\\1" + _compilerinfo_COMPILER_VERSION + "${_compilerinfo_COMPILER_VERSION}") + + set(${_var} ${_compilerinfo_COMPILER_VERSION} PARENT_SCOPE) +endfunction() + +## Based on a function in CTest.cmake from CMake 2.8.0 +#------------------------------------------------------------------------------- +# +# function to turn generator name into a version string +# like vs7 vs71 vs8 vs9 +# +function(get_vs_short_version_string _generator _var) + set(_ver_string) + if("${_generator}" MATCHES "Visual Studio") + string(REGEX + REPLACE + "Visual Studio ([0-9][0-9]?)($|.*)" + "\\1" + _vsver + "${_generator}") + if("${_generator}" MATCHES "Visual Studio 7 .NET 2003") + # handle the weird one + set(_ver_string "vs71") + else() + set(_ver_string "vs${_vsver}") + endif() + elseif(MSVC) + if(MSVC71) + set(_ver_string "vs71") + else() + foreach(_ver 6 7 8 9 10) + if(MSVC${_ver}0) + set(_ver_string "vs${_ver}") + break() + endif() + endforeach() + endif() + endif() + + if(_ver_string) + set(${_var} ${_ver_string} PARENT_SCOPE) + endif() +endfunction() diff --git a/cmake/cmake-modules/GetDefineString.cmake b/cmake/cmake-modules/GetDefineString.cmake new file mode 100644 index 000000000..832fea8d1 --- /dev/null +++ b/cmake/cmake-modules/GetDefineString.cmake @@ -0,0 +1,58 @@ +# - Script to get the value of a preprocessor definition that is a string, +# after including the given files +# Requires that the associated source file be present: GetDefineString.cpp.in. +# +# get_define_string(NAME <define_name> [INCLUDES <files>] RESULT <variable> +# [FLAGS <compile-flags>] +# [INCLUDE_DIRS <include-dirs>] +# [DEFINES] <-Ddefinitions>) +# Original Author: +# 2014 Ryan Pavlik <ryan@sensics.com> <abiryan@ryand.net> +# +# Copyright Sensics, Inc. 2014. +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE_1_0.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) + + +get_filename_component(_getdefinestring_moddir "${CMAKE_CURRENT_LIST_FILE}" PATH) + +function(get_define_string) + include(CMakeParseArguments) + cmake_parse_arguments(_gds "" "NAME;RESULT" "INCLUDES;FLAGS;INCLUDE_DIRS;DEFINES" ${ARGN}) + if(NOT _gds_NAME) + message(FATAL_ERROR "Must pass NAME to get_define_string!") + endif() + if(NOT _gds_RESULT) + message(FATAL_ERROR "Must pass RESULT to get_define_string!") + endif() + if(NOT DEFINED "${_gds_RESULT}_CHECKED" OR (NOT "${${_gds_RESULT}_CHECKED}" STREQUAL "${ARGN}")) + set(${_gds_RESULT}_CHECKED "${ARGN}" CACHE INTERNAL "" FORCE) + set(GET_DEFINE_STRING_NAME ${_gds_NAME}) + set(_INCLUDES) + if(_gds_INCLUDE_DIRS) + set(_INCLUDES "-DINCLUDE_DIRECTORIES:STRING=${_gds_INCLUDE_DIRS}") + endif() + set(GET_DEFINE_STRING_INCLUDES) + foreach(_file ${_gds_INCLUDES}) + set(GET_DEFINE_STRING_INCLUDES "${GET_DEFINE_STRING_INCLUDES}#include <${_file}>\n") + endforeach() + set(_src "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/GetDefineString${_gds_RESULT}.cpp") + set(_out "${CMAKE_CURRENT_BINARY_DIR}/GetDefineString${_gds_RESULT}.out") + configure_file("${_getdefinestring_moddir}/GetDefineString.cpp.in" "${_src}") + try_compile(_result "${CMAKE_CURRENT_BINARY_DIR}" SOURCES "${_src}" + CMAKE_FLAGS ${_INCLUDES} + COMPILE_DEFINITIONS ${_gds_DEFINES} + OUTPUT_VARIABLE OUTPUT + COPY_FILE "${_out}") + if(_result) + file(STRINGS "${_out}" _result_string REGEX "INFO:[A-Za-z0-9_]+\\[[^]]*\\]") + if("${_result_string}" MATCHES "INFO:define\\[([^]\"]*)\\]") + set(${_gds_RESULT}_CACHED "${CMAKE_MATCH_1}" CACHE INTERNAL "" FORCE) + endif() + else() + set(${_gds_RESULT}_CACHED NOTFOUND) + endif() + endif() + set(${_gds_RESULT} ${${_gds_RESULT}_CACHED} PARENT_SCOPE) +endfunction() \ No newline at end of file diff --git a/cmake/cmake-modules/GetDefineString.cpp.in b/cmake/cmake-modules/GetDefineString.cpp.in new file mode 100644 index 000000000..99cbbbc9d --- /dev/null +++ b/cmake/cmake-modules/GetDefineString.cpp.in @@ -0,0 +1,10 @@ +@GET_DEFINE_STRING_INCLUDES@ + +char const * info = "INFO" ":" "define[" @GET_DEFINE_STRING_NAME@ "]"; + +int main(int argc, char * argv[]) { + int require = 0; + require += info[argc]; + (void)argv; + return require; +} \ No newline at end of file diff --git a/cmake/cmake-modules/GetDirectoryList.cmake b/cmake/cmake-modules/GetDirectoryList.cmake new file mode 100644 index 000000000..60f2a0136 --- /dev/null +++ b/cmake/cmake-modules/GetDirectoryList.cmake @@ -0,0 +1,49 @@ +# - Returns a list of the parent directories of all files passed +# +# get_directory_list(<listvar> <file path> [<additional file paths>...]) +# +# Requires CMake 2.6 or newer (uses the 'function' command) +# +# Original Author: +# 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> +# http://academic.cleardefinition.com +# Iowa State University HCI Graduate Program/VRAC +# +# Copyright Iowa State University 2009-2010. +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE_1_0.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) + +if(__get_directory_list) + return() +endif() +set(__get_directory_list YES) + +function(get_directory_list _var) + # combine variable's current value with additional list items + set(_in ${ARGN}) + + if(_in) + # Initial list cleaning + list(REMOVE_DUPLICATES _in) + + # Grab the absolute path of each actual directory + set(_out) + foreach(_file ${_in}) + get_filename_component(_dir "${_file}" PATH) + if(IS_DIRECTORY "${_dir}") + get_filename_component(_dir "${_dir}" ABSOLUTE) + file(TO_CMAKE_PATH "${_dir}" _dir) + list(APPEND _out "${_dir}") + endif() + endforeach() + + if(_out) + # Clean up the output list now + list(REMOVE_DUPLICATES _out) + endif() + + # return _out + set(${_var} "${_out}" PARENT_SCOPE) + endif() +endfunction() diff --git a/cmake/cmake-modules/GetFileList.cmake b/cmake/cmake-modules/GetFileList.cmake new file mode 100644 index 000000000..2e0c3791e --- /dev/null +++ b/cmake/cmake-modules/GetFileList.cmake @@ -0,0 +1,45 @@ +# - Returns a list of the file names of all files passed +# +# get_file_list(<listvar> <file path> [<additional file paths>...]) +# +# Requires CMake 2.6 or newer (uses the 'function' command) +# +# Original Author: +# 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> +# http://academic.cleardefinition.com +# Iowa State University HCI Graduate Program/VRAC +# +# Copyright Iowa State University 2009-2010. +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE_1_0.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) + +if(__get_file_list) + return() +endif() +set(__get_file_list YES) + +function(get_file_list _var) + # combine variable's current value with additional list items + set(_in ${ARGN}) + + if(_in) + # Initial list cleaning + list(REMOVE_DUPLICATES _in) + + # Grab the absolute path of each actual directory + set(_out) + foreach(_file ${_in}) + get_filename_component(_fn "${_file}" FILE) + list(APPEND _out "${_fn}") + endforeach() + + if(_out) + # Clean up the output list now + list(REMOVE_DUPLICATES _out) + endif() + + # return _out + set(${_var} "${_out}" PARENT_SCOPE) + endif() +endfunction() diff --git a/cmake/cmake-modules/GetForceIncludeDefinitions.cmake b/cmake/cmake-modules/GetForceIncludeDefinitions.cmake new file mode 100644 index 000000000..efcca047b --- /dev/null +++ b/cmake/cmake-modules/GetForceIncludeDefinitions.cmake @@ -0,0 +1,44 @@ +# - Get the platform-appropriate flags to add to force inclusion of a file +# +# The most common use of this is to use a generated config.h-type file +# placed out of the source tree in all files. +# +# get_force_include_definitions(var forcedincludefiles...) - +# where var is the name of your desired output variable, and everything +# else is a source file to forcibly include. +# a list item to be filtered. +# +# Original Author: +# 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> +# http://academic.cleardefinition.com +# Iowa State University HCI Graduate Program/VRAC +# +# Copyright Iowa State University 2009-2010. +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE_1_0.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) + +if(__get_force_include_definitions) + return() +endif() +set(__get_force_include_definitions YES) + +function(get_force_include_definitions var) + set(_flagprefix) + if(CMAKE_COMPILER_IS_GNUCXX) + set(_flag "-include") + elseif(MSVC) + set(_flag "/FI") + else() + message(SEND_ERROR "You don't seem to be using MSVC or GCC, but") + message(SEND_ERROR "the project called get_force_include_definitions.") + message(SEND_ERROR "Contact this project with the name of your") + message(FATAL_ERROR "compiler and preferably the flag to force includes") + endif() + + set(_out) + foreach(_item ${ARGN}) + list(APPEND _out "${_flag} \"${_item}\"") + endforeach() + set(${var} "${_out}" PARENT_SCOPE) +endfunction() diff --git a/cmake/cmake-modules/GetGitRevisionDescription.cmake b/cmake/cmake-modules/GetGitRevisionDescription.cmake new file mode 100644 index 000000000..8ab03bc5f --- /dev/null +++ b/cmake/cmake-modules/GetGitRevisionDescription.cmake @@ -0,0 +1,168 @@ +# - Returns a version string from Git +# +# These functions force a re-configure on each git commit so that you can +# trust the values of the variables in your build system. +# +# get_git_head_revision(<refspecvar> <hashvar> [<additional arguments to git describe> ...]) +# +# Returns the refspec and sha hash of the current head revision +# +# git_describe(<var> [<additional arguments to git describe> ...]) +# +# Returns the results of git describe on the source tree, and adjusting +# the output so that it tests false if an error occurs. +# +# git_get_exact_tag(<var> [<additional arguments to git describe> ...]) +# +# Returns the results of git describe --exact-match on the source tree, +# and adjusting the output so that it tests false if there was no exact +# matching tag. +# +# git_local_changes(<var>) +# +# Returns either "CLEAN" or "DIRTY" with respect to uncommitted changes. +# Uses the return code of "git diff-index --quiet HEAD --". +# Does not regard untracked files. +# +# Requires CMake 2.6 or newer (uses the 'function' command) +# +# Original Author: +# 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> +# http://academic.cleardefinition.com +# Iowa State University HCI Graduate Program/VRAC +# +# Copyright Iowa State University 2009-2010. +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE_1_0.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) + +if(__get_git_revision_description) + return() +endif() +set(__get_git_revision_description YES) + +# We must run the following at "include" time, not at function call time, +# to find the path to this module rather than the path to a calling list file +get_filename_component(_gitdescmoddir ${CMAKE_CURRENT_LIST_FILE} PATH) + +function(get_git_head_revision _refspecvar _hashvar) + set(GIT_PARENT_DIR "${CMAKE_CURRENT_SOURCE_DIR}") + set(GIT_DIR "${GIT_PARENT_DIR}/.git") + while(NOT EXISTS "${GIT_DIR}") # .git dir not found, search parent directories + set(GIT_PREVIOUS_PARENT "${GIT_PARENT_DIR}") + get_filename_component(GIT_PARENT_DIR ${GIT_PARENT_DIR} PATH) + if(GIT_PARENT_DIR STREQUAL GIT_PREVIOUS_PARENT) + # We have reached the root directory, we are not in git + set(${_refspecvar} "GITDIR-NOTFOUND" PARENT_SCOPE) + set(${_hashvar} "GITDIR-NOTFOUND" PARENT_SCOPE) + return() + endif() + set(GIT_DIR "${GIT_PARENT_DIR}/.git") + endwhile() + # check if this is a submodule + if(NOT IS_DIRECTORY ${GIT_DIR}) + file(READ ${GIT_DIR} submodule) + string(REGEX REPLACE "gitdir: (.*)\n$" "\\1" GIT_DIR_RELATIVE ${submodule}) + get_filename_component(SUBMODULE_DIR ${GIT_DIR} PATH) + get_filename_component(GIT_DIR ${SUBMODULE_DIR}/${GIT_DIR_RELATIVE} ABSOLUTE) + endif() + set(GIT_DATA "${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/git-data") + if(NOT EXISTS "${GIT_DATA}") + file(MAKE_DIRECTORY "${GIT_DATA}") + endif() + + if(NOT EXISTS "${GIT_DIR}/HEAD") + return() + endif() + set(HEAD_FILE "${GIT_DATA}/HEAD") + configure_file("${GIT_DIR}/HEAD" "${HEAD_FILE}" COPYONLY) + + configure_file("${_gitdescmoddir}/GetGitRevisionDescription.cmake.in" + "${GIT_DATA}/grabRef.cmake" + @ONLY) + include("${GIT_DATA}/grabRef.cmake") + + set(${_refspecvar} "${HEAD_REF}" PARENT_SCOPE) + set(${_hashvar} "${HEAD_HASH}" PARENT_SCOPE) +endfunction() + +function(git_describe _var) + if(NOT GIT_FOUND) + find_package(Git QUIET) + endif() + get_git_head_revision(refspec hash) + if(NOT GIT_FOUND) + set(${_var} "GIT-NOTFOUND" PARENT_SCOPE) + return() + endif() + if(NOT hash) + set(${_var} "HEAD-HASH-NOTFOUND" PARENT_SCOPE) + return() + endif() + + # TODO sanitize + #if((${ARGN}" MATCHES "&&") OR + # (ARGN MATCHES "||") OR + # (ARGN MATCHES "\\;")) + # message("Please report the following error to the project!") + # message(FATAL_ERROR "Looks like someone's doing something nefarious with git_describe! Passed arguments ${ARGN}") + #endif() + + #message(STATUS "Arguments to execute_process: ${ARGN}") + + execute_process(COMMAND + "${GIT_EXECUTABLE}" + describe + ${hash} + ${ARGN} + WORKING_DIRECTORY + "${CMAKE_CURRENT_SOURCE_DIR}" + RESULT_VARIABLE + res + OUTPUT_VARIABLE + out + ERROR_QUIET + OUTPUT_STRIP_TRAILING_WHITESPACE) + if(NOT res EQUAL 0) + set(out "${out}-${res}-NOTFOUND") + endif() + + set(${_var} "${out}" PARENT_SCOPE) +endfunction() + +function(git_get_exact_tag _var) + git_describe(out --exact-match ${ARGN}) + set(${_var} "${out}" PARENT_SCOPE) +endfunction() + +function(git_local_changes _var) + if(NOT GIT_FOUND) + find_package(Git QUIET) + endif() + get_git_head_revision(refspec hash) + if(NOT GIT_FOUND) + set(${_var} "GIT-NOTFOUND" PARENT_SCOPE) + return() + endif() + if(NOT hash) + set(${_var} "HEAD-HASH-NOTFOUND" PARENT_SCOPE) + return() + endif() + + execute_process(COMMAND + "${GIT_EXECUTABLE}" + diff-index --quiet HEAD -- + WORKING_DIRECTORY + "${CMAKE_CURRENT_SOURCE_DIR}" + RESULT_VARIABLE + res + OUTPUT_VARIABLE + out + ERROR_QUIET + OUTPUT_STRIP_TRAILING_WHITESPACE) + if(res EQUAL 0) + set(${_var} "CLEAN" PARENT_SCOPE) + else() + set(${_var} "DIRTY" PARENT_SCOPE) + endif() +endfunction() diff --git a/cmake/cmake-modules/GetGitRevisionDescription.cmake.in b/cmake/cmake-modules/GetGitRevisionDescription.cmake.in new file mode 100644 index 000000000..6d8b708ef --- /dev/null +++ b/cmake/cmake-modules/GetGitRevisionDescription.cmake.in @@ -0,0 +1,41 @@ +# +# Internal file for GetGitRevisionDescription.cmake +# +# Requires CMake 2.6 or newer (uses the 'function' command) +# +# Original Author: +# 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> +# http://academic.cleardefinition.com +# Iowa State University HCI Graduate Program/VRAC +# +# Copyright Iowa State University 2009-2010. +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE_1_0.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) + +set(HEAD_HASH) + +file(READ "@HEAD_FILE@" HEAD_CONTENTS LIMIT 1024) + +string(STRIP "${HEAD_CONTENTS}" HEAD_CONTENTS) +if(HEAD_CONTENTS MATCHES "ref") + # named branch + string(REPLACE "ref: " "" HEAD_REF "${HEAD_CONTENTS}") + if(EXISTS "@GIT_DIR@/${HEAD_REF}") + configure_file("@GIT_DIR@/${HEAD_REF}" "@GIT_DATA@/head-ref" COPYONLY) + else() + configure_file("@GIT_DIR@/packed-refs" "@GIT_DATA@/packed-refs" COPYONLY) + file(READ "@GIT_DATA@/packed-refs" PACKED_REFS) + if(${PACKED_REFS} MATCHES "([0-9a-z]*) ${HEAD_REF}") + set(HEAD_HASH "${CMAKE_MATCH_1}") + endif() + endif() +else() + # detached HEAD + configure_file("@GIT_DIR@/HEAD" "@GIT_DATA@/head-ref" COPYONLY) +endif() + +if(NOT HEAD_HASH) + file(READ "@GIT_DATA@/head-ref" HEAD_HASH LIMIT 1024) + string(STRIP "${HEAD_HASH}" HEAD_HASH) +endif() diff --git a/cmake/cmake-modules/GetMSVCVersion.cmake b/cmake/cmake-modules/GetMSVCVersion.cmake new file mode 100644 index 000000000..48d7b7c17 --- /dev/null +++ b/cmake/cmake-modules/GetMSVCVersion.cmake @@ -0,0 +1,127 @@ +#.rst: +# GetMSVCVersion +# -------------- +# +# +# +# get_msvc_major_version(<var>) +# get_msvc_minor_version(<var>) +# get_msvc_combined_major_minor_version(<var>) +# get_msvc_major_minor_version(<major_var> <minor_var>) +# get_msvc_unique_decimal_version(<var>) +# +# This family of functions is designed to be used to convert +# MSVC_VERSION from the compiler version number to the Visual Studio +# decimal version number (2012 is 11.0, 2015 is 14.0). All take a name +# of a variable in <var> to return their results in. +# +# Consider Visual Studio 2013, which reports 1800 in MSVC_VERSION (and +# the _MSC_VER preprocessor macro). It is also known as VS 12 or 12.0. +# (Minor versions are rarely used, except in the case of 7.1 aka +# VS.NET 2003) The functions would return this output for 2013: +# +# get_msvc_major_version: 12 +# get_msvc_minor_version: 0 +# get_msvc_combined_major_minor_version: 120 +# get_msvc_major_minor_version: 12 in <major_var>, 0 in <minor_var> +# get_msvc_unique_decimal_version: 12 (this returns with a decimal and +# minor when needed to be precise, e.g. 7.1) +# +# The variable is not modified if not building with MSVC. + +#============================================================================= +# Copyright 2015 Ryan Pavlik <ryan.pavlik@gmail.com> +# +# 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. +#============================================================================= + +# This function serves as the main implementation, with the others just +# tweaking the result. +function(get_msvc_combined_major_minor_version _var) + if(NOT MSVC) + return() + endif() + math(EXPR _vs_ver "${MSVC_VERSION} / 10 - 60") + + # VS 2015 changed the pattern because they skipped VS 13 + if(_vs_ver GREATER 120) + math(EXPR _vs_ver "${_vs_ver} + 10") + endif() + set(${_var} ${_vs_ver} PARENT_SCOPE) +endfunction() + +# This function is also used as backend to some implementation, though +# its contents are simpler, no real business logic to speak of. +function(get_msvc_major_minor_version _major_var _minor_var) + if(NOT MSVC) + return() + endif() + get_msvc_combined_major_minor_version(_vs_ver) + + math(EXPR _vs_minor "${_vs_ver} % 10") + math(EXPR _vs_major "(${_vs_ver} - ${_vs_minor}) / 10") + set(${_major_var} ${_vs_major} PARENT_SCOPE) + set(${_minor_var} ${_vs_minor} PARENT_SCOPE) +endfunction() + +function(get_msvc_major_version _var) + if(NOT MSVC) + return() + endif() + get_msvc_major_minor_version(_vs_ver _dummy) + set(${_var} ${_vs_ver} PARENT_SCOPE) +endfunction() + +function(get_msvc_minor_version _var) + if(NOT MSVC) + return() + endif() + get_msvc_major_minor_version(_dummy _vs_ver) + set(${_var} ${_vs_ver} PARENT_SCOPE) +endfunction() + +function(get_msvc_unique_decimal_version _var) + if(NOT MSVC) + return() + endif() + get_msvc_major_minor_version(_vs_major _vs_minor) + set(_vs_ver ${_vs_major}) + if(_vs_minor GREATER 0) + set(_vs_ver "${_vs_ver}.${_vs_minor}") + endif() + set(${_var} ${_vs_ver} PARENT_SCOPE) +endfunction() diff --git a/cmake/cmake-modules/GetSubprojectStatus.cmake b/cmake/cmake-modules/GetSubprojectStatus.cmake new file mode 100644 index 000000000..888a2caec --- /dev/null +++ b/cmake/cmake-modules/GetSubprojectStatus.cmake @@ -0,0 +1,31 @@ +# - Returns whether the current project is on its own or within another project's build +# +# get_subproject_status(<resultvar>) - resultvar will be YES if we are +# included in another project, or NO if we are being built separately +# +# Requires CMake 2.6 or newer (uses the 'function' command) +# +# Original Author: +# 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> +# http://academic.cleardefinition.com +# Iowa State University HCI Graduate Program/VRAC +# +# Copyright Iowa State University 2009-2010. +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE_1_0.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) + +if(__get_subproject_status) + return() +endif() +set(__get_subproject_status YES) + +function(get_subproject_status _var) + if("${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_CURRENT_SOURCE_DIR}") + # Base source dir is our source dir - we are top-level + set(${_var} NO PARENT_SCOPE) + else() + # Base source dir is not our source dir - we are a subproject + set(${_var} YES PARENT_SCOPE) + endif() +endfunction() diff --git a/cmake/cmake-modules/InstallDebugSymbols.cmake b/cmake/cmake-modules/InstallDebugSymbols.cmake new file mode 100644 index 000000000..25cd6bae8 --- /dev/null +++ b/cmake/cmake-modules/InstallDebugSymbols.cmake @@ -0,0 +1,85 @@ +# Defines a function to install the symbols for a target +# +# install_debug_symbols(TARGETS <target_name> [...] [DESTINATION <dest>] +# [CONFIGURATIONS <configname> [...]] [PASSTHRU <arg to pass to INSTALL> [...]]) +# +# DESTINATION is only optional if CMAKE_INSTALL_BINDIR and CMAKE_INSTALL_LIBDIR are set, +# then it will use CMAKE_INSTALL_BINDIR for executables (and DLLs) and CMAKE_INSTALL_LIBDIR +# for libraries (static libraries only on DLL platforms). +# +# CONFIGURATIONS are the config names for which symbols (PDB files) are expected - +# the default of RelWithDebInfo Debug is correct unless you've dramatically changed +# the set of configs. +# +# Anything after PASSTHRU is passed directly to the install( command after the arguments +# that the function generates. +# +# Currently a no-op if using CMake pre-3.2 (can't use generator expressions before then +# to get symbol location) or if not using MSVC (MSVC keeps its symbols separate in PDB files +# necessitating this function in the first place). +# +# Original Author: +# 2015, 2017 Ryan Pavlik <ryan@sensics.com> <abiryan@ryand.net> +# http://ryanpavlik.com +# +# Copyright Sensics, Inc. 2015, 2017. +# 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(MSVC AND NOT CMAKE_VERSION VERSION_LESS 3.2) + include(CMakeParseArguments) + # debug symbols for MSVC: supported on CMake 3.2 and up where there's a + # generator expression for a target's PDB file + function(install_debug_symbols) + set(options) + set(oneValueArgs DESTINATION) + set(multiValueArgs TARGETS CONFIGURATIONS PASSTHRU) + cmake_parse_arguments(INSTALLSYMS "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN}) + + if(NOT INSTALLSYMS_DESTINATION AND NOT CMAKE_INSTALL_BINDIR AND NOT CMAKE_INSTALL_LIBDIR) + message(SEND_ERROR "install_debug_symbols call missing required DESTINATION argument") + return() + endif() + if(NOT INSTALLSYMS_TARGETS) + message(SEND_ERROR "install_debug_symbols call missing required TARGETS argument") + return() + endif() + if(NOT INSTALLSYMS_CONFIGURATIONS) + set(INSTALLSYMS_CONFIGURATIONS RelWithDebInfo Debug) + endif() + + # Wrap each config in a generator expression + set(HAS_SYMBOLS_CONDITION) + foreach(_config ${INSTALLSYMS_CONFIGURATIONS}) + list(APPEND HAS_SYMBOLS_CONDITION "$<CONFIG:${_config}>") + endif() + # make list comma separated + string(REPLACE ";" "," HAS_SYMBOLS_CONDITION "${HAS_SYMBOLS_CONDITION}") + # Wrap in an "OR" generator expression + set(HAS_SYMBOLS_CONDITION "$<OR:${HAS_SYMBOLS_CONDITION}>") + + set(EXTRA_INSTALL_ARGS ${INSTALLSYMS_PASSTHRU} ${INSTALLSYMS_UNPARSED_ARGUMENTS}) + if(INSTALLSYMS_DESTINATION) + set(DEST ${INSTALLSYMS_DESTINATION}) + endif() + foreach(_target ${INSTALLSYMS_TARGETS}) + if(NOT INSTALLSYMS_DESTINATION) + get_target_property(_target_type ${_target} TYPE) + if("${_target_type}" STREQUAL "EXECUTABLE" OR "${_target_type}" STREQUAL "SHARED_LIBRARY") + # exe or dll: put it alongside the runtime component + set(DEST ${CMAKE_INSTALL_BINDIR}) + else() + set(DEST ${CMAKE_INSTALL_LIBDIR}) + endif() + endif() + install(FILES $<${HAS_SYMBOLS_CONDITION}:$<TARGET_PDB_FILE:${_target}>> + DESTINATION ${DEST} + ${EXTRA_INSTALL_ARGS}) + endforeach() + endfunction() +else() + function(install_debug_symbols) + # do nothing if too old of CMake or not MSVC. + endfunction() +endif() diff --git a/cmake/cmake-modules/LICENSE_1_0.txt b/cmake/cmake-modules/LICENSE_1_0.txt new file mode 100644 index 000000000..36b7cd93c --- /dev/null +++ b/cmake/cmake-modules/LICENSE_1_0.txt @@ -0,0 +1,23 @@ +Boost Software License - Version 1.0 - August 17th, 2003 + +Permission is hereby granted, free of charge, to any person or organization +obtaining a copy of the software and accompanying documentation covered by +this license (the "Software") to use, reproduce, display, distribute, +execute, and transmit the Software, and to prepare derivative works of the +Software, and to permit third-parties to whom the Software is furnished to +do so, all subject to the following: + +The copyright notices in the Software and this entire statement, including +the above license grant, this restriction and the following disclaimer, +must be included in all copies of the Software, in whole or in part, and +all derivative works of the Software, unless such copies or derivative +works are solely in the form of machine-executable object code generated by +a source language processor. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT +SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE +FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +DEALINGS IN THE SOFTWARE. diff --git a/cmake/cmake-modules/Licensing.cmake b/cmake/cmake-modules/Licensing.cmake new file mode 100644 index 000000000..dae8e8b5a --- /dev/null +++ b/cmake/cmake-modules/Licensing.cmake @@ -0,0 +1,133 @@ +# - Building a licensing description file +# +# Original Author: +# 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> +# http://academic.cleardefinition.com +# Iowa State University HCI Graduate Program/VRAC +# +# Copyright Iowa State University 2009-2010. +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE_1_0.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) + +define_property(GLOBAL + PROPERTY + PROPRIETARY_LICENSES + BRIEF_DOCS + "Text for proprietary licenses" + FULL_DOCS + "Text for proprietary licenses") +define_property(GLOBAL + PROPERTY + SHAREALIKE_LICENSES + BRIEF_DOCS + "Text for share-alike licenses" + FULL_DOCS + "Text for share-alike licenses (e.g. GPL)") +define_property(GLOBAL + PROPERTY + PERMISSIVE_LICENSES + BRIEF_DOCS + "Text for permissive licenses" + FULL_DOCS + "Text for permissive licenses (e.g. BSD, MIT, X11)") +define_property(GLOBAL + PROPERTY + PACKAGES_LICENSED + BRIEF_DOCS + "List of all packages whose licenses are registered here" + FULL_DOCS + "List of all packages whose licenses are registered here") +define_property(GLOBAL + PROPERTY + REDISTRIBUTION_WARNINGS + BRIEF_DOCS + "Text for important redistribution warnings" + FULL_DOCS + "Text for important redistribution warnings, such as 'This is not redistributable!'") + + +function(add_license LICENSE_TYPE_PROPERTY package license) + get_property(def GLOBAL PROPERTY LICENSE_PACKAGE_${package} DEFINED) + if(NOT def) + define_property(GLOBAL + PROPERTY + LICENSE_PACKAGE_${package} + BRIEF_DOCS + "Flag to indicate the addition of the license for ${package}" + FULL_DOCS + "Flag to indicate the addition of the license for ${package}") + get_property(existing GLOBAL PROPERTY ${LICENSE_TYPE_PROPERTY}) + set_property(GLOBAL + PROPERTY + ${LICENSE_TYPE_PROPERTY} + "${existing}${license}\n\n") + + if(ARGN) + define_property(GLOBAL + PROPERTY + LICENSE_EXTRAS_PACKAGE_${package} + BRIEF_DOCS + "Extras (like URL) for the license for ${package}" + FULL_DOCS + "Extras (like URL) for the license for ${package}") + set_property(GLOBAL + PROPERTY + LICENSE_EXTRAS_PACKAGE_${package} + "${ARGN}") + endif() + + get_property(allpackages GLOBAL PROPERTY PACKAGES_LICENSED) + list(APPEND allpackages "${package}") + set_property(GLOBAL PROPERTY PACKAGES_LICENSED "${allpackages}") + endif() +endfunction() + +function(add_proprietary_license package license) + add_license(PROPRIETARY_LICENSES "${package}" "${license}" ${ARGN}) +endfunction() + +function(add_sharealike_license package license) + add_license(SHAREALIKE_LICENSES "${package}" "${license}" ${ARGN}) +endfunction() + +function(add_permissive_license package license) + add_license(PERMISSIVE_LICENSES "${package}" "${license}" ${ARGN}) +endfunction() + +function(add_redistribution_warning warning) + get_property(existing GLOBAL PROPERTY REDISTRIBUTION_WARNINGS) + set_property(GLOBAL + PROPERTY + REDISTRIBUTION_WARNINGS + "${warning} ${existing}") +endfunction() + +function(configure_license_file input output) + get_property(PACKAGES_LICENSED GLOBAL PROPERTY PACKAGES_LICENSED) + if(PACKAGES_LICENSED) + list(SORT PACKAGES_LICENSED) + set(PACKAGES_LICENSED_BULLETED) + foreach(package ${PACKAGES_LICENSED}) + set(EXTRAS) + get_property(package_extras + GLOBAL + PROPERTY + "LICENSE_EXTRAS_PACKAGE_${package}") + if(package_extras) + set(EXTRAS " ${package_extras}") + endif() + set(PACKAGES_LICENSED_BULLETED + "${PACKAGES_LICENSED_BULLETED} * ${package}${EXTRAS}\n") + endforeach() + endif() + get_property(REDISTRIBUTION_WARNINGS + GLOBAL + PROPERTY + REDISTRIBUTION_WARNINGS) + get_property(PROPRIETARY_LICENSES GLOBAL PROPERTY PROPRIETARY_LICENSES) + get_property(SHAREALIKE_LICENSES GLOBAL PROPERTY SHAREALIKE_LICENSES) + get_property(PERMISSIVE_LICENSES GLOBAL PROPERTY PERMISSIVE_LICENSES) + configure_file("${input}" "${output}" ${ARGN}) +endfunction() + diff --git a/cmake/cmake-modules/ListCombinations.cmake b/cmake/cmake-modules/ListCombinations.cmake new file mode 100644 index 000000000..4321f624a --- /dev/null +++ b/cmake/cmake-modules/ListCombinations.cmake @@ -0,0 +1,53 @@ +# - Combine lists of prefixes and suffixes in all combinations +# +# list_combinations(var PREFIXES listitems... SUFFIXES listitems...) - +# where var is the name of your desired output variable and PREFIXES +# and SUFFIXES are special arguments that indicate the start of your +# list of prefixes or suffixes respectively. +# +# Original Author: +# 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> +# http://academic.cleardefinition.com +# Iowa State University HCI Graduate Program/VRAC +# +# Copyright Iowa State University 2009-2010. +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE_1_0.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) + +if(__list_combinations) + return() +endif() +set(__list_combinations YES) + +function(list_combinations var) + # Parse arguments + set(_prefixes) + set(_suffixes) + set(_nowhere) + set(_curdest _nowhere) + foreach(_element ${ARGN}) + if("${_element}" STREQUAL "PREFIXES") + set(_curdest _prefixes) + elseif("${_element}" STREQUAL "SUFFIXES") + set(_curdest _suffixes) + else() + list(APPEND ${_curdest} "${_element}") + endif() + endforeach() + if(_nowhere) + message(STATUS "_prefixes ${_prefixes}") + message(STATUS "_prefixes ${_suffixes}") + message(STATUS "_prefixes ${_nowhere}") + message(FATAL_ERROR + "Syntax error in use of ${CMAKE_CURRENT_LIST_FILE}") + endif() + + foreach(_prefix ${_prefixes}) + foreach(_suffix ${_suffixes}) + list(APPEND _out "${_prefix}${_suffix}") + endforeach() + endforeach() + + set(${var} "${_out}" PARENT_SCOPE) +endfunction() diff --git a/cmake/cmake-modules/ListFilter.cmake b/cmake/cmake-modules/ListFilter.cmake new file mode 100644 index 000000000..037859520 --- /dev/null +++ b/cmake/cmake-modules/ListFilter.cmake @@ -0,0 +1,50 @@ +# - List filtering functions +# +# list_filter(var regex listitems...) - where var is the name of +# your desired output variable, regex is the regex whose matching items +# WILL be put in the output variable, and everything else is considered +# a list item to be filtered. +# +# list_filter_out(var regex listitems...) - where var is the name of +# your desired output variable, regex is the regex whose matching items +# will NOT be put in the output variable, and everything else is considered +# a list item to be filtered. +# +# Original Author: +# 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> +# http://academic.cleardefinition.com +# Iowa State University HCI Graduate Program/VRAC +# +# Copyright Iowa State University 2009-2010. +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE_1_0.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) + +if(__list_filter_out) + return() +endif() +set(__list_filter_out YES) + +function(list_filter_out var regex) + set(_out) + foreach(_item ${ARGN}) + set(_re) + string(REGEX MATCH "${regex}" _re "${_item}") + if(NOT _re) + list(APPEND _out "${_item}") + endif() + endforeach() + set(${var} "${_out}" PARENT_SCOPE) +endfunction() + +function(list_filter var regex) + set(_out) + foreach(_item ${ARGN}) + set(_re) + string(REGEX MATCH "${regex}" _re "${_item}") + if(_re) + list(APPEND _out "${_item}") + endif() + endforeach() + set(${var} "${_out}" PARENT_SCOPE) +endfunction() diff --git a/cmake/cmake-modules/LuaTargets.cmake b/cmake/cmake-modules/LuaTargets.cmake new file mode 100644 index 000000000..040f6b44a --- /dev/null +++ b/cmake/cmake-modules/LuaTargets.cmake @@ -0,0 +1,108 @@ +# - Copy/parse lua source files as a custom target +# +# include(LuaTargets) +# add_lua_target(<target_name> <directory to copy to> [<luafile> <luafile>]) +# Relative paths for the destination directory are considered with +# with respect to CMAKE_CURRENT_BINARY_DIR +# +# install_lua_target(<target_name> [arguments to INSTALL(PROGRAMS ...) ]) +# +# Set this variable to specify location of luac, if it is not a target: +# LUA_TARGET_LUAC_EXECUTABLE +# +# Requires CMake 2.6 or newer (uses the 'function' command) +# +# Original Author: +# 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> +# http://academic.cleardefinition.com +# Iowa State University HCI Graduate Program/VRAC +# +# Copyright Iowa State University 2009-2010. +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE_1_0.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) + +if(__add_lua) + return() +endif() +set(__add_lua YES) + +include(FileCopyTargets) + +function(add_lua_target _target _dest) + + if(NOT ARGN) + message(WARNING + "In add_lua_target call for target ${_target}, no source files were specified!") + return() + endif() + + 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) + 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}") + endif() + mark_as_advanced(LUA_TARGET_LUAC_EXECUTABLE) + + 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() + + # Clean up output file name + get_filename_component(absout "${_dest}/${fn}" ABSOLUTE) + + add_custom_command(OUTPUT "${absout}" + COMMAND + ${CMAKE_COMMAND} + ARGS -E make_directory "${_dest}" + COMMAND + ${CMAKE_COMMAND} + ARGS -E copy "${fullpath}" "${_dest}" + COMMAND + "${LUA_TARGET_LUAC_EXECUTABLE}" + ARGS -p "${fullpath}" + MAIN_DEPENDENCY "${fullpath}" + VERBATIM + COMMENT "Copying ${fn} to ${absout} and parsing...") + list(APPEND SOURCES "${fullpath}") + list(APPEND ALLFILES "${absout}") + endforeach() + + # Custom target depending on all the file copy commands + add_custom_target(${_target} + SOURCES ${SOURCES} + DEPENDS ${ALLFILES}) + if(TARGET "${LUA_TARGET_LUAC_EXECUTABLE}") + get_property(_luac_imported + TARGET + "${LUA_TARGET_LUAC_EXECUTABLE}" + PROPERTY + IMPORTED) + if(NOT _luac_imported) + add_dependencies(${_target} ${LUA_TARGET_LUAC_EXECUTABLE}) + endif() + endif() + + set_property(TARGET ${_target} PROPERTY FILE_COPY_TARGET YES) +endfunction() + +function(install_lua_target) + install_file_copy_target(${ARGN}) +endfunction() diff --git a/cmake/cmake-modules/MSVCMultipleProcessCompile.cmake b/cmake/cmake-modules/MSVCMultipleProcessCompile.cmake new file mode 100644 index 000000000..aad4eabde --- /dev/null +++ b/cmake/cmake-modules/MSVCMultipleProcessCompile.cmake @@ -0,0 +1,31 @@ +# - Compile with multiple processes on MSVC +# +# include(MSVCMultipleProcessCompile) +# +# Requires these CMake modules: +# ListCombinations.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-2010. +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE_1_0.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) + +if(MSVC AND NOT "${MSVC_VERSION}" LESS 1400) + # Only available in VS 2005 and newer + string(TOUPPER "${CMAKE_CONFIGURATION_TYPES}" _conftypesUC) + include(ListCombinations) + list_combinations(_varnames + PREFIXES + CMAKE_C_FLAGS_ + CMAKE_CXX_FLAGS_ + SUFFIXES + ${_conftypesUC}) + foreach(_var ${_varnames}) + set(${_var} "${${_var}} /MP") + endforeach() +endif() diff --git a/cmake/cmake-modules/MSVCStaticRuntime.cmake b/cmake/cmake-modules/MSVCStaticRuntime.cmake new file mode 100644 index 000000000..e4ceea6f9 --- /dev/null +++ b/cmake/cmake-modules/MSVCStaticRuntime.cmake @@ -0,0 +1,33 @@ +# - Modify compile flags to use the static runtimes of MSVC +# +# include(MSVCStaticRuntime) +# +# Requires these CMake modules: +# ListCombinations.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-2010. +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE_1_0.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) + +if(MSVC) + string(TOUPPER "${CMAKE_CONFIGURATION_TYPES}" _conftypesUC) + include(ListCombinations) + list_combinations(_varnames + PREFIXES + CMAKE_C_FLAGS_ + CMAKE_CXX_FLAGS_ + SUFFIXES + ${_conftypesUC}) + foreach(_var ${_varnames}) + string(REPLACE "/MDd" "/MTd" ${_var} "${${_var}}") + string(REPLACE "/MD" "/MT" ${_var} "${${_var}}") + endforeach() +endif() + +set(Boost_USE_STATIC_LIBS ON) diff --git a/cmake/cmake-modules/MSVCVerboseLinking.cmake b/cmake/cmake-modules/MSVCVerboseLinking.cmake new file mode 100644 index 000000000..84d4a2278 --- /dev/null +++ b/cmake/cmake-modules/MSVCVerboseLinking.cmake @@ -0,0 +1,48 @@ +# - Add appropriate linker flags to show link details on Visual Studio +# +# include(MSVCVerboseLinking) - to add the flags automaticlly if applicable +# +# Be sure to include this module _BEFORE_ adding your targets, or the targets +# won't pick up the updated flags. +# +# Requires these CMake modules: +# - none +# +# Original Author: +# 2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> +# http://academic.cleardefinition.com +# Iowa State University HCI Graduate Program/VRAC +# +# Copyright Iowa State University 2009-2010. +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE_1_0.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) + +if(MSVC) + if(NOT DEFINED MSVC_LINK_REALLY_VERBOSE) + if(IN_DASHBOARD_SCRIPT) + set(MSVC_LINK_REALLY_VERBOSE TRUE) + else() + set(MSVC_LINK_REALLY_VERBOSE FALSE) + endif() + endif() + set(MSVC_LINK_REALLY_VERBOSE + "${MSVC_LINK_REALLY_VERBOSE}" + CACHE + BOOL + "Provide maximum linker messages?") + mark_as_advanced(MSVC_LINK_REALLY_VERBOSE) + + if(MSVC_LINK_REALLY_VERBOSE) + set(_verbose_flag "/VERBOSE") + else() + set(_verbose_flag "/VERBOSE:LIB") + endif() + + set(CMAKE_EXE_LINKER_FLAGS + "${CMAKE_EXE_LINKER_FLAGS} ${_verbose_flag}") + set(CMAKE_MODULE_LINKER_FLAGS + "${CMAKE_MODULE_LINKER_FLAGS} ${_verbose_flag}") + set(CMAKE_SHARED_LINKER_FLAGS + "${CMAKE_SHARED_LINKER_FLAGS} ${_verbose_flag}") +endif() diff --git a/cmake/cmake-modules/MapImportedReleaseVariants.cmake b/cmake/cmake-modules/MapImportedReleaseVariants.cmake new file mode 100644 index 000000000..cd4ce93fc --- /dev/null +++ b/cmake/cmake-modules/MapImportedReleaseVariants.cmake @@ -0,0 +1,21 @@ +# Sets CMAKE_MAP_IMPORTED_CONFIG_* so that if there isn't a perfect match between +# the current project's build type and the imported build, but they're both some +# kind of "Release" variant, things will just work. +# +# Original Author: +# 2015 Ryan Pavlik <ryan@sensics.com> <abiryan@ryand.net> +# http://academic.cleardefinition.com +# +# Copyright Sensics, Inc. 2015. +# 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) + +# RelWithDebInfo falls back to Release, then MinSizeRel +set(CMAKE_MAP_IMPORTED_CONFIG_RELWITHDEBINFO RelWithDebInfo Release MinSizeRel NoConfig) + +# MinSizeRel falls back to Release, then RelWithDebInfo +set(CMAKE_MAP_IMPORTED_CONFIG_MINSIZEREL MinSizeRel Release RelWithDebInfo NoConfig) + +# Release falls back to RelWithDebInfo, then MinSizeRel +set(CMAKE_MAP_IMPORTED_CONFIG_RELEASE Release RelWithDebInfo MinSizeRel NoConfig) diff --git a/cmake/cmake-modules/MinGWSearchPathExtras.cmake b/cmake/cmake-modules/MinGWSearchPathExtras.cmake new file mode 100644 index 000000000..cd9fe69bb --- /dev/null +++ b/cmake/cmake-modules/MinGWSearchPathExtras.cmake @@ -0,0 +1,94 @@ +# - Additional help finding search paths on MinGW distributions, including MSYS2. +# +# Much of this is really more in the purview of CMake or the packages of CMake for +# those distributions, but if I can centralize/simplify the pain here, it's worth doing. +# +# Variables: (all are internal cache variables) +# MINGWSEARCH_INCLUDE_DIRS - use under PATHS in your find_path() commands +# MINGWSEARCH_LIBRARY_DIRS - use under PATHS in your find_library() commands +# MINGWSEARCH_PREFIXES - suitable for temporary use in CMAKE_FIND_ROOT_PATH or CMAKE_PREFIX_PATH. +# MINGWSEARCH_TARGET_TRIPLE - something like x86_64-w64-mingw32 or i686-w64-mingw32, use as you see fit. +# +# Original Author: +# 2016 Ryan Pavlik <ryan@sensics.com> <ryan.pavlik@gmail.com> +# +# Copyright Sensics, Inc. 2016. +# 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(MINGW AND NOT MINGWSEARCH_COMPLETED) + ### + # Helper function + ### + function(_mingwsearch_conditional_add _var _path) + #message(STATUS "conditional add to ${_var}: ${_path}") + if(("${_path}" MATCHES "registry") OR (NOT IS_DIRECTORY "${_path}")) + # Path invalid - do not add + return() + endif() + list(FIND ${_var} "${_path}" _idx) + if(_idx GREATER -1) + # Path already in list - do not add + return() + endif() + # Not yet in the list, so we'll add it + list(APPEND ${_var} "${_path}") + set(${_var} ${${_var}} PARENT_SCOPE) + endfunction() + + # Clear the working variables. + set(MINGWSEARCH_INCLUDE_DIRS_WORK) + set(MINGWSEARCH_LIBRARY_DIRS_WORK) + set(MINGWSEARCH_PREFIXES_WORK) + set(_mingw_target_triple) + + # Try to find the string like x86_64-w64-mingw32 by parsing the implicit link directories... + # TODO this is a hack that either should be resolved in CMake or in MSYS2's package of CMake. + foreach(_link_dir ${CMAKE_CXX_IMPLICIT_LINK_DIRECTORIES}) + _mingwsearch_conditional_add(MINGWSEARCH_LIBRARY_DIRS_WORK "${_link_dir}") + if("${_link_dir}" MATCHES "/([^/]*-mingw32)/lib") + set(_mingw_target_triple ${CMAKE_MATCH_1}) + get_filename_component(_mingw_internal_basedir "${_link_dir}" PATH) + # Try adding the parallel include dir + if(IS_DIRECTORY "${_mingw_internal_basedir}/include") + _mingwsearch_conditional_add(MINGWSEARCH_INCLUDE_DIRS_WORK "${_mingw_internal_basedir}/include") + _mingwsearch_conditional_add(MINGWSEARCH_PREFIXES_WORK "${_mingw_internal_basedir}") + endif() + if(NOT CMAKE_CROSSCOMPILING) + # Try going up a level, since the directory with the target is usually a sibling to the main prefix. + get_filename_component(_mingw_main_basedir_candidate "${_mingw_internal_basedir}/.." ABSOLUTE) + if(IS_DIRECTORY "${_mingw_main_basedir_candidate}/include" AND NOT ("${_mingw_main_basedir_candidate}" STREQUAL "${_mingw_internal_basedir}")) + # If we could go up a level, add that include dir too. + _mingwsearch_conditional_add(MINGWSEARCH_INCLUDE_DIRS_WORK "${_mingw_main_basedir_candidate}/include") + _mingwsearch_conditional_add(MINGWSEARCH_PREFIXES_WORK "${_mingw_main_basedir_candidate}") + endif() + endif() + endif() + endforeach() + + ### + # Output results. + ### + if(MINGWSEARCH_INCLUDE_DIRS_WORK) + set(MINGWSEARCH_INCLUDE_DIRS "${MINGWSEARCH_INCLUDE_DIRS_WORK}" CACHE INTERNAL "" FORCE) + #message(STATUS "MINGWSEARCH_INCLUDE_DIRS ${MINGWSEARCH_INCLUDE_DIRS}") + endif() + + if(MINGWSEARCH_LIBRARY_DIRS_WORK) + set(MINGWSEARCH_LIBRARY_DIRS "${MINGWSEARCH_LIBRARY_DIRS_WORK}" CACHE INTERNAL "" FORCE) + #message(STATUS "MINGWSEARCH_LIBRARY_DIRS ${MINGWSEARCH_LIBRARY_DIRS}") + endif() + + if(MINGWSEARCH_PREFIXES_WORK) + set(MINGWSEARCH_PREFIXES "${MINGWSEARCH_PREFIXES_WORK}" CACHE INTERNAL "" FORCE) + #message(STATUS "MINGWSEARCH_PREFIXES ${MINGWSEARCH_PREFIXES}") + endif() + + if(_mingw_target_triple) + set(MINGWSEARCH_TARGET_TRIPLE ${_mingw_target_triple} CACHE INTERNAL "" FORCE) + #message(STATUS "MINGWSEARCH_TARGET_TRIPLE ${MINGWSEARCH_TARGET_TRIPLE}") + endif() + + set(MINGWSEARCH_COMPLETED TRUE CACHE INTERNAL "" FORCE) +endif() diff --git a/cmake/cmake-modules/OptionRequires.cmake b/cmake/cmake-modules/OptionRequires.cmake new file mode 100644 index 000000000..662121f57 --- /dev/null +++ b/cmake/cmake-modules/OptionRequires.cmake @@ -0,0 +1,53 @@ +# - Add an option that depends on one or more variables being true. +# +# option_requires(<option_name> <description> <variable_name> [<variable_name>...]) +# +# Original Author: +# 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> +# http://academic.cleardefinition.com +# Iowa State University HCI Graduate Program/VRAC +# +# Copyright Iowa State University 2009-2010. +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE_1_0.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) + +function(option_requires name desc) + set(args ${ARGN}) + + set(OFF_BY_DEFAULT false) + list(FIND args "OFF_BY_DEFAULT" _off_found) + if(NOT _off_found EQUAL -1) + list(REMOVE_AT args ${_off_found}) + set(OFF_BY_DEFAULT true) + endif() + + set(found) + set(missing) + foreach(var ${args}) + if(${var}) + list(APPEND found ${var}) + else() + 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}") + endif() + +endfunction() diff --git a/cmake/cmake-modules/PlatformDefinitions.cmake b/cmake/cmake-modules/PlatformDefinitions.cmake new file mode 100644 index 000000000..17f71e6b0 --- /dev/null +++ b/cmake/cmake-modules/PlatformDefinitions.cmake @@ -0,0 +1,45 @@ +# Defines a series of preprocessor variables based on the current platform. +# +# Usage: define_platform_macros(PREFIX) +# +# where PREFIX is the macro prefix (i.e., if PREFIX is XYZZY then the macros +# will be named XYZZY_LINUX, XYZZY_WINDOWS, etc.). +# +# Author: +# Kevin M. Godby <kevin@godby.org> +# +# 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) +# + +function(_define_platform_macros_impl prefix platform_string variable_name) + if (${CMAKE_SYSTEM_NAME} MATCHES "${platform_string}") + string(TOUPPER "${prefix}_${variable_name}" _varname) + set(${_varname} TRUE PARENT_SCOPE) + endif() +endfunction() + +macro(define_platform_macros _prefix) + _define_platform_macros_impl(${_prefix} "AIX" AIX) + _define_platform_macros_impl(${_prefix} "Android" ANDROID) + _define_platform_macros_impl(${_prefix} "BS/DOS" BSDOS) + _define_platform_macros_impl(${_prefix} "FreeBSD" FREEBSD) + _define_platform_macros_impl(${_prefix} "HP-UX" HPUX) + _define_platform_macros_impl(${_prefix} "IRIX" IRIX) + _define_platform_macros_impl(${_prefix} "Linux" LINUX) + _define_platform_macros_impl(${_prefix} "GNU/kFreeBSD" KFREEBSD) + _define_platform_macros_impl(${_prefix} "NetBSD" NETBSD) + _define_platform_macros_impl(${_prefix} "OpenBSD" OPENBSD) + _define_platform_macros_impl(${_prefix} "OFS1" OFS1) + _define_platform_macros_impl(${_prefix} "SCO_SV" SCO_SV) + _define_platform_macros_impl(${_prefix} "UnixWare" UNIXWARE) + _define_platform_macros_impl(${_prefix} "Xenix" XENIX) + _define_platform_macros_impl(${_prefix} "SunOS" SUNOS) + _define_platform_macros_impl(${_prefix} "Tru64" TRU64) + _define_platform_macros_impl(${_prefix} "ULTRIX" ULTRIX) + _define_platform_macros_impl(${_prefix} "CYGWIN" CYGWIN) + _define_platform_macros_impl(${_prefix} "Darwin" MACOSX) + _define_platform_macros_impl(${_prefix} "Windows" WINDOWS) +endmacro() + diff --git a/cmake/cmake-modules/PrefixListGlob.cmake b/cmake/cmake-modules/PrefixListGlob.cmake new file mode 100644 index 000000000..3b1bb6460 --- /dev/null +++ b/cmake/cmake-modules/PrefixListGlob.cmake @@ -0,0 +1,36 @@ +# - For each given prefix in a list, glob using the prefix+pattern +# +# +# Original Author: +# 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> +# http://academic.cleardefinition.com +# Iowa State University HCI Graduate Program/VRAC +# +# Copyright Iowa State University 2009-2010. +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE_1_0.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) + +if(__prefix_list_glob) + return() +endif() +set(__prefix_list_glob YES) + +function(prefix_list_glob var pattern) + set(_out) + set(_result) + foreach(prefix ${ARGN}) + file(GLOB _globbed ${prefix}${pattern}) + if(_globbed) + list(SORT _globbed) + list(REVERSE _globbed) + list(APPEND _out ${_globbed}) + endif() + endforeach() + foreach(_name ${_out}) + get_filename_component(_name "${_name}" ABSOLUTE) + list(APPEND _result "${_name}") + endforeach() + + set(${var} "${_result}" PARENT_SCOPE) +endfunction() diff --git a/cmake/cmake-modules/ProgramFilesGlob.cmake b/cmake/cmake-modules/ProgramFilesGlob.cmake new file mode 100644 index 000000000..9d7a9cc50 --- /dev/null +++ b/cmake/cmake-modules/ProgramFilesGlob.cmake @@ -0,0 +1,85 @@ +# - Find bit-appropriate program files directories matching a given pattern +# +# Requires these CMake modules: +# CleanDirectoryList +# PrefixListGlob +# +# Original Author: +# 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> +# http://academic.cleardefinition.com +# Iowa State University HCI Graduate Program/VRAC +# +# Copyright Iowa State University 2009-2010. +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE_1_0.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) + +include(PrefixListGlob) +include(CleanDirectoryList) + +if(__program_files_glob) + return() +endif() +set(__program_files_glob YES) + +macro(_program_files_glob_var_prep) + # caution - ENV{ProgramFiles} on Win64 is adjusted to point to the arch + # of the running executable which, since CMake is 32-bit on Windows as + # I write this, will always be = $ENV{ProgramFiles(x86)}. + # Thus, we only use this environment variable if we are on a 32 machine + + # 32-bit dir on win32, useless to us on win64 + file(TO_CMAKE_PATH "$ENV{ProgramFiles}" _PROG_FILES) + + # 32-bit dir: only set on win64 + set(_PF86 "ProgramFiles(x86)") + file(TO_CMAKE_PATH "$ENV{${_PF86}}" _PROG_FILES_X86) + + # 64-bit dir: only set on win64 + file(TO_CMAKE_PATH "$ENV{ProgramW6432}" _PROG_FILES_W6432) +endmacro() + +function(program_files_glob var pattern) + _program_files_glob_var_prep() + if(CMAKE_SIZEOF_VOID_P MATCHES "8") + # 64-bit build on win64 + set(_PROGFILESDIRS "${_PROG_FILES_W6432}") + else() + if(_PROG_FILES_W6432) + # 32-bit build on win64 + set(_PROGFILESDIRS "${_PROG_FILES_X86}") + else() + # 32-bit build on win32 + set(_PROGFILESDIRS "${_PROG_FILES}") + endif() + endif() + + prefix_list_glob(_prefixed "${pattern}" ${_PROGFILESDIRS}) + clean_directory_list(_prefixed) + set(${var} ${_prefixed} PARENT_SCOPE) +endfunction() + +function(program_files_fallback_glob var pattern) + _program_files_glob_var_prep() + if(CMAKE_SIZEOF_VOID_P MATCHES "8") + # 64-bit build on win64 + # look in the "32 bit" (c:\program files (x86)\) directory as a + # fallback in case of weird/poorly written installers, like those + # that put both 64- and 32-bit libs in the same program files directory + set(_PROGFILESDIRS "${_PROG_FILES_W6432}" "${_PROG_FILES_X86}") + else() + if(_PROG_FILES_W6432) + # 32-bit build on win64 + # look in the "64 bit" (c:\program files\) directory as a fallback + # in case of old/weird/poorly written installers + set(_PROGFILESDIRS "${_PROG_FILES_X86}" "${_PROG_FILES_W6432}") + else() + # 32-bit build on win32 + set(_PROGFILESDIRS "${_PROG_FILES}") + endif() + endif() + + prefix_list_glob(_prefixed "${pattern}" ${_PROGFILESDIRS}) + clean_directory_list(_prefixed) + set(${var} ${_prefixed} PARENT_SCOPE) +endfunction() diff --git a/cmake/cmake-modules/README.markdown b/cmake/cmake-modules/README.markdown new file mode 100644 index 000000000..81ec9b22d --- /dev/null +++ b/cmake/cmake-modules/README.markdown @@ -0,0 +1,107 @@ +Ryan's CMake Modules +==================== + +Ryan A. Pavlik, Ph.D. + +<ryan.pavlik@gmail.com> <abiryan@ryand.net> +<http://academic.cleardefinition.com> + +Introduction +------------ + +This is a collection of CMake modules that I've produced during the course +of a variety of software development. There are a number of find modules, +especially for virtual reality and physical simulation packages, some utility +modules of more general interest, and some patches or workarounds for +CMake itself. + +Each module is generally documented, and depending on how busy I was +when I created it, the documentation can be fairly complete. + +By now, it also includes contributions both from open-source projects I work on, +as well as friendly strangers on the Internet contributing their modules. I am +very grateful for improvements/fixes/pull requests! + +How to Integrate +---------------- + +These modules are probably best placed wholesale into a `cmake` subdirectory +of your project source. + +If you use Git, try installing [git-subtree][1] (included by default on +Git for Windows and perhaps for your Linux distro, especially post-1.9.1), so +you can easily use this repository for subtree merges, updating simply. + +For the initial checkout: + + cd projectdir + + git subtree add --squash --prefix=cmake https://github.com/rpavlik/cmake-modules.git master + +For updates: + + cd projectdir + + git subtree pull --squash --prefix=cmake https://github.com/rpavlik/cmake-modules.git master + +If you originally installed this by just copying the files, you'll sadly have +to delete the directory, commit that, then do the `git subtree add`. Annoying, +but I don't know a workaround. + +If you use some other version control, you can export a copy of this directory +without the git metadata by calling: + + ./export-to-directory.sh yourprojectdir/cmake + +You might also consider exporting to a temp directory and merging changes, since +this will not overwrite by default. You can pass -f to overwrite existing files. + +How to Use +---------- + +At the minimum, all you have to do is add a line like this near the top +of your root CMakeLists.txt file (but not before your `project()` call): + + list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake") + +You might also want the extra automatic features/fixes included with the +modules, for that, just add another line following the first one: + + include(UseBackportedModules) + +Look at `module-help.html`/`.txt` (generated by `update-help.sh` on a unix-like shell with a pre-3.0 version of CMake.) +either in this directory or online at <http://github.com/rpavlik/cmake-modules/blob/master/module-help.txt> +for more information on individual modules. Since it requires an older CMake for generation, +the docs might get out of date, sorry - but you can always look at the files themselves. + + +Licenses +-------- + +The modules that I wrote myself are all subject to this license: + +> Copyright Iowa State University 2009-2014, +> or Copyright Sensics, Inc. 2014-2015, +> or Copyright Ryan A. Pavlik 2009-2015 +> +> 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>) + +Modules based on those included with CMake are under the OSI-approved +BSD license, which is included in each of those modules. A few other modules +are modified from other sources - when in doubt, look at the `.cmake`. + +If you'd like to contribute, that would be great! Just make sure to include +the license boilerplate in your module, and send a pull request. + +Important License Note! +----------------------- + +If you find this file inside of another project, rather at the top-level +directory, you're in a separate project that is making use of these modules. +That separate project can (and probably does) have its own license specifics. + + +[1]: http://github.com/apenwarr/git-subtree "Git Subtree master" diff --git a/cmake/cmake-modules/ResetConfigurations.cmake b/cmake/cmake-modules/ResetConfigurations.cmake new file mode 100644 index 000000000..8c13fdf66 --- /dev/null +++ b/cmake/cmake-modules/ResetConfigurations.cmake @@ -0,0 +1,31 @@ +# - Re-set the available configurations to just RelWithDebInfo, Release, and Debug +# +# Requires these CMake modules: +# no additional modules required +# +# Original Author: +# 2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> +# http://academic.cleardefinition.com +# Iowa State University HCI Graduate Program/VRAC +# +# Copyright Iowa State University 2009-2010. +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE_1_0.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) +# + + +if(__reset_configurations) + return() +endif() +set(__reset_configurations YES) + +if(CMAKE_CONFIGURATION_TYPES) + set(CMAKE_CONFIGURATION_TYPES "RelWithDebInfo;Release;Debug") + set(CMAKE_CONFIGURATION_TYPES + "${CMAKE_CONFIGURATION_TYPES}" + CACHE + STRING + "Reset the configurations to what we need" + FORCE) +endif() diff --git a/cmake/cmake-modules/SearchProgramFilesForOpenSceneGraph.cmake b/cmake/cmake-modules/SearchProgramFilesForOpenSceneGraph.cmake new file mode 100644 index 000000000..aa7165ef5 --- /dev/null +++ b/cmake/cmake-modules/SearchProgramFilesForOpenSceneGraph.cmake @@ -0,0 +1,66 @@ +# - Use some smarts to try to find OpenSceneGraph in the Program Files dirs +# +# Also uses the OSGHOME environment variable as OSG_DIR, if it's found. +# +# Usage: +# include(SearchProgramFilesForOpenSceneGraph OPTIONAL) +# +# Requires these CMake modules: +# ListFilter +# ProgramFilesGlob +# +# Original Author: +# 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> +# http://academic.cleardefinition.com +# Iowa State University HCI Graduate Program/VRAC +# +# Copyright Iowa State University 2009-2010. +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE_1_0.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) + +include(ListFilter) +include(ProgramFilesGlob) +include(CleanDirectoryList) + +# Try to find an OSG installation +set(_osgpaths) +if(WIN32) + program_files_glob(_osgpaths "/OpenSceneGraph*") + if(_osgpaths) + if(MSVC80) + list_filter_out(_osgpaths "[vV][cC]9" ${_osgpaths}) + elseif(MSVC90) + list_filter_out(_osgpaths "[vV][cC]8" ${_osgpaths}) + endif() + if(_osgpaths) + list(SORT _osgpaths) + list(REVERSE _osgpaths) + endif() + endif() +else() + prefix_list_glob(_osgpaths "/OpenSceneGraph*" /usr /usr/local /opt) + if(_osgpaths) + clean_directory_list(_osgpaths) + if(_osgpaths) + list(SORT _osgpaths) + list(REVERSE _osgpaths) + endif() + endif() +endif() + + +if(_osgpaths) + # Want them in reverse order so newer versions come up first + list(SORT _osgpaths) + list(REVERSE _osgpaths) + + # Use the environment variable to override + set(_osgpaths "$ENV{OSGHOME}" ${_osgpaths}) + clean_directory_list(_osgpaths) + + list(APPEND CMAKE_PREFIX_PATH ${_osgpaths}) +endif() + +# Not completely related +set(OpenSceneGraph_MARK_AS_ADVANCED TRUE) diff --git a/cmake/cmake-modules/SetDefaultBuildType.cmake b/cmake/cmake-modules/SetDefaultBuildType.cmake new file mode 100644 index 000000000..cd29e32ac --- /dev/null +++ b/cmake/cmake-modules/SetDefaultBuildType.cmake @@ -0,0 +1,31 @@ +# - Set a developer-chosen default build type +# +# Requires these CMake modules: +# no additional modules required +# +# Original Author: +# 2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> +# http://academic.cleardefinition.com +# Iowa State University HCI Graduate Program/VRAC +# +# Copyright Iowa State University 2009-2010. +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE_1_0.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) +# + + +if(__set_default_build_type) + return() +endif() +set(__set_default_build_type YES) + +function(set_default_build_type _type) + #if(DEFINED CMAKE_BUILD_TYPE AND NOT CMAKE_BUILD_TYPE) + if("${CMAKE_GENERATOR}" MATCHES "Makefiles" AND NOT CMAKE_BUILD_TYPE) + if(NOT __DEFAULT_BUILD_TYPE_SET) + set(CMAKE_BUILD_TYPE "${_type}" CACHE STRING "" FORCE) + set(__DEFAULT_BUILD_TYPE_SET YES CACHE INTERNAL "") + endif() + endif() +endfunction() diff --git a/cmake/cmake-modules/SplitLibraryList.cmake b/cmake/cmake-modules/SplitLibraryList.cmake new file mode 100644 index 000000000..c6e1a3442 --- /dev/null +++ b/cmake/cmake-modules/SplitLibraryList.cmake @@ -0,0 +1,40 @@ +# - Given a list of libraries with OPTIMIZED, DEBUG, etc. +# +# split_library_list(_generalvar _releasevar _debugvar) +# +# Requires CMake 2.6 or newer (uses the 'function' command) +# +# Original Author: +# 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> +# http://academic.cleardefinition.com +# Iowa State University HCI Graduate Program/VRAC +# +# Copyright Iowa State University 2009-2010. +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE_1_0.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) + + +function(split_library_list _generalvar _releasevar _debugvar) + set(_general) + set(_debug) + set(_release) + set(_dest _general) + + foreach(item ${ARGN}) + if(${item} MATCHES "[dD][eE][bB][uU][gG]") + set(_dest _debug) + elseif(${item} MATCHES "[oO][pP][tT][iI][mM][iI][zZ][eE][dD]") + set(_dest _release) + elseif(${item} MATCHES "[gG][eE][nN][eE][rR][aA][lL]") + set(_dest _general) + else() + list(APPEND ${_dest} "${item}") + set(_dest _general) + endif() + endforeach() + + set(${_releasevar} ${_release} PARENT_SCOPE) + set(${_debugvar} ${_debug} PARENT_SCOPE) + set(${_generalvar} ${_general} PARENT_SCOPE) +endfunction() diff --git a/cmake/cmake-modules/StampSourcesWithVersion.cmake b/cmake/cmake-modules/StampSourcesWithVersion.cmake new file mode 100644 index 000000000..147fed8fc --- /dev/null +++ b/cmake/cmake-modules/StampSourcesWithVersion.cmake @@ -0,0 +1,180 @@ +# - When enabled, stamp the current version on C/C++ sources +# +# To set up your source code for proper stamping, start your file +# with a Doxygen-style comment block, starting with /* and ending with */ +# On a line by itself, with unimportant whitespace, add the standard Doxygen +# "version" command: +# @version xxx +# or +# \version xxx +# +# To make sure it works, please do actually put xxx as the current version: +# when you save, add one of the command below to your cmake build, and run +# cmake, it should replace xxx with the current version. (It replaces anything +# between the end of the whitespace after \version and the end of the line +# with the version that you pass in your build script, so put nothing else +# on that line!) +# +# For <version>, I recommend passing the value of a CMake variable like +# ${CPACK_PACKAGE_VERSION} +# Remember, reduced duplication of information means reduced errors! +# +# WARNING! +# This does edit your source directory, but will only execute if the +# (hidden/advanced, default OFF) variable ENABLE_VERSION_STAMPING is on. +# +# Additionally, it tries to be very careful: +# - It will not edit files that are outside your source tree +# - It will only attempt a substitution within the first C-style comment block +# of your code (that is, the first /* */), but only if // is not found first +# +# stamp_target_with_version(<version> <target_name> [HEADERS_ONLY | <source>...]) - +# If no source file is specified, all will be processed. +# +# stamp_sources_with_version(<version> <source> [<source> ...]) - +# Use for files not directly associated with a target. +# +# Original Author: +# 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> +# http://academic.cleardefinition.com +# Iowa State University HCI Graduate Program/VRAC +# +# Copyright Iowa State University 2009-2010. +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE_1_0.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) + +if(__stamp_sources_with_version) + return() +endif() +set(__stamp_sources_with_version YES) + +if(NOT APPLE) + option(ENABLE_VERSION_STAMPING + "Modify source files to update the version in the comment header. Maintainers only!" + OFF) + mark_as_advanced(ENABLE_VERSION_STAMPING) +endif() + +# Stash where our data is, at include() time +get_filename_component(_sswv_mod_dir ${CMAKE_CURRENT_LIST_FILE} PATH) + + +# Internal utility function - not for outside use +function(_stamp_file_with_version version filename) + if(NOT SED_EXECUTABLE) + find_program(SED_EXECUTABLE sed) + mark_as_advanced(SED_EXECUTABLE) + endif() + # TODO: fix the sed script on Mac + if(SED_EXECUTABLE AND ENABLE_VERSION_STAMPING AND NOT APPLE) + get_source_file_property(_abs "${filename}" LOCATION) + if(NOT _abs) + get_filename_component(_abs "${filename}" ABSOLUTE) + endif() + file(RELATIVE_PATH _rel "${CMAKE_SOURCE_DIR}" "${_abs}") + if(NOT "${_rel}" MATCHES "[.][.]") + # Only if this file is in the source tree + get_filename_component(_name "${filename}" NAME) + set(_in_source_dir YES) + # Create the sed script + configure_file("${_sswv_mod_dir}/StampSourcesWithVersion.sed.in" + "${CMAKE_CURRENT_BINARY_DIR}/stamp-${_name}.sed" + @ONLY) + + if(APPLE) + set(extendedre_arg -E) + else() + set(extendedre_arg -r) + endif() + + set(sedargs + ${extendedre_arg} + -f + "${CMAKE_CURRENT_BINARY_DIR}/stamp-${_name}.sed" + ${filename}) + + # Run the sed script + execute_process(COMMAND + ${SED_EXECUTABLE} + ${sedargs} + OUTPUT_FILE + "${CMAKE_CURRENT_BINARY_DIR}/stampedoutput-${_name}.out" + WORKING_DIRECTORY + "${CMAKE_CURRENT_SOURCE_DIR}") + + # Check to see if changes were made + execute_process(COMMAND + ${CMAKE_COMMAND} + -E + compare_files + "${CMAKE_CURRENT_BINARY_DIR}/stampedoutput-${_name}.out" + ${filename} + WORKING_DIRECTORY + "${CMAKE_CURRENT_SOURCE_DIR}" + RESULT_VARIABLE + files_different + OUTPUT_QUIET + ERROR_QUIET) + + # if so, run it again, but in-place this time + if(files_different) + message(STATUS "Stamping file ${_rel} with version ${version}") + execute_process(COMMAND + ${SED_EXECUTABLE} + -i + ${sedargs} + OUTPUT_FILE + "${CMAKE_CURRENT_BINARY_DIR}/stampedoutput-${_name}.out" + WORKING_DIRECTORY + "${CMAKE_CURRENT_SOURCE_DIR}") + else() + message(STATUS "Version stamp up-to-date on file ${_rel}") + endif() + endif() + endif() +endfunction() + +function(stamp_sources_with_version version) + foreach(_file ${ARGN}) + _stamp_file_with_version("${version}" "${_file}") + endforeach() +endfunction() + +function(stamp_target_with_version version target_name) + + set(_target_stampables) + + get_target_property(_target_sources ${target_name} SOURCES) + foreach(_source ${_target_sources}) + get_source_file_property(_lang "${_source}" LANGUAGE) + get_source_file_property(_loc "${_source}" LOCATION) + if("${_lang}" MATCHES "CXX" OR "${_lang}" MATCHES "C") + list(APPEND _target_stampables "${_loc}") + endif() + endforeach() + + set(_src_to_stamp) + if("${ARGN}" STREQUAL "HEADERS_ONLY") + # We were passed HEADERS_ONLY + foreach(_file ${_target_stampables}) + get_filename_component(_ext "${_file}" EXT) + if("${_ext}" MATCHES "[.]([hH]|hpp|HPP|hxx|HXX)$" OR NOT _ext) + list(APPEND _src_to_stamp "${_file}") + endif() + endforeach() + + elseif(ARGN) + # We were passed a list of files + set(_src_to_stamp ${ARGN}) + + else() + # We were passed only a target - process all source in the source tree. + set(_src_to_stamp ${_target_stampables}) + endif() + + stamp_sources_with_version(${version} ${_src_to_stamp}) +endfunction() + + + diff --git a/cmake/cmake-modules/StampSourcesWithVersion.sed.in b/cmake/cmake-modules/StampSourcesWithVersion.sed.in new file mode 100644 index 000000000..6fddf90b4 --- /dev/null +++ b/cmake/cmake-modules/StampSourcesWithVersion.sed.in @@ -0,0 +1,13 @@ +# Line by line summary: +# Until we find the first */ or // { +# In sections between /* and */ (that is, a block comment) { +# substitute @version WHATEVER with @version and the +# cmake-substituted version string. +# } +# } + +0,/[*/][/]/ { + /\/\*/,/\*\// { + s_([@\\])version(\s*).*$_\1version\2@version@_1g + } +} \ No newline at end of file diff --git a/cmake/cmake-modules/StashMapConfig.cmake b/cmake/cmake-modules/StashMapConfig.cmake new file mode 100644 index 000000000..d052028ee --- /dev/null +++ b/cmake/cmake-modules/StashMapConfig.cmake @@ -0,0 +1,86 @@ +# Manipulate CMAKE_MAP_IMPORTED_CONFIG_ cautiously and reversibly. +# +# In all usage docs, <config> is a configuration name in all caps (RELEASE, DEBUG, +# RELWITHDEBINFO, MINSIZEREL, and NONE are the ones made by default - NONE is how +# targets are exported from single-config generators where CMAKE_BUILD_TYPE isn't set.) +# +# stash_map_config(<config> <new list of configs for map imported>) and unstash_map_config(<config>) +# +# Saves+changes and restores the value (or unset-ness) of CMAKE_MAP_IMPORTED_CONFIG_${config}. +# Re-entrant calls OK - this does actually "push" and "pop" +# +# stash_common_map_config() and unstash_common_map_config() +# +# Calls stash_map_config/unstash_map_config for each configuration with sensible +# defaults based on the platform. +# +# Original Author: +# 2015, 2017 Ryan Pavlik <ryan@sensics.com> <abiryan@ryand.net> +# http://ryanpavlik.com +# +# Copyright Sensics, Inc. 2015, 2017. +# 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) + +macro(stash_map_config config) + string(TOUPPER "${config}" smc_config) + string(TOUPPER "${ARGN}" smc_new) + # Re-entrancy protection - push an entry onto a list + list(APPEND smc_IN_MAP_CONFIG_STASH_${smc_config} yes) + list(LENGTH smc_IN_MAP_CONFIG_STASH_${smc_config} smc_IN_MAP_CONFIG_STASH_LEN) + + # Actually perform the saving and replacement of CMAKE_MAP_IMPORTED_CONFIG_${config} + set(smc_var smc_OLD_CMAKE_MAP_IMPORTED_CONFIG_${smc_config}_${smc_IN_MAP_CONFIG_STASH_LEN}) + message(STATUS "Stashing to ${smc_var}") + if(DEFINED CMAKE_MAP_IMPORTED_CONFIG_${smc_config}) + set(${smc_var} ${CMAKE_MAP_IMPORTED_CONFIG_${smc_config}}) + else() + unset(${smc_var}) + endif() + set(CMAKE_MAP_IMPORTED_CONFIG_${smc_config} ${smc_new}) +endmacro() + +macro(unstash_map_config config) + string(TOUPPER "${config}" smc_config) + if(NOT DEFINED smc_IN_MAP_CONFIG_STASH_${smc_config}) + # Nobody actually called the matching stash... + return() + endif() + # Get stack size so we know which entries to restore. + list(LENGTH smc_IN_MAP_CONFIG_STASH_${smc_config} smc_IN_MAP_CONFIG_STASH_LEN) + # Other half of re-entrancy protection - pop an entry off a list + list(REMOVE_AT smc_IN_MAP_CONFIG_STASH_${smc_config} -1) + + # Restoration of CMAKE_MAP_IMPORTED_CONFIG_${config} + set(smc_var smc_OLD_CMAKE_MAP_IMPORTED_CONFIG_${smc_config}_${smc_IN_MAP_CONFIG_STASH_LEN}) + if(DEFINED ${smc_var}) + set(CMAKE_MAP_IMPORTED_CONFIG_${smc_config} ${${smc_var}}) + unset(${smc_var}) + else() + unset(CMAKE_MAP_IMPORTED_CONFIG_${smc_config}) + endif() +endmacro() + +macro(stash_common_map_config) + if(MSVC) + # Can't do this - different runtimes, incompatible ABI, etc. + set(smc_DEBUG_FALLBACK) + stash_map_config(DEBUG DEBUG) + else() + set(smc_DEBUG_FALLBACK DEBUG) + stash_map_config(DEBUG DEBUG RELWITHDEBINFO RELEASE MINSIZEREL NONE) + endif() + stash_map_config(RELEASE RELEASE RELWITHDEBINFO MINSIZEREL NONE ${smc_DEBUG_FALLBACK}) + stash_map_config(RELWITHDEBINFO RELWITHDEBINFO RELEASE MINSIZEREL NONE ${smc_DEBUG_FALLBACK}) + stash_map_config(MINSIZEREL MINSIZEREL RELEASE RELWITHDEBINFO NONE ${smc_DEBUG_FALLBACK}) + stash_map_config(NONE NONE RELEASE RELWITHDEBINFO MINSIZEREL ${smc_DEBUG_FALLBACK}) +endmacro() + +macro(unstash_common_map_config) + unstash_map_config(DEBUG) + unstash_map_config(RELEASE) + unstash_map_config(RELWITHDEBINFO) + unstash_map_config(MINSIZEREL) + unstash_map_config(NONE) +endmacro() diff --git a/cmake/cmake-modules/TCHARWorkaround.cmake b/cmake/cmake-modules/TCHARWorkaround.cmake new file mode 100644 index 000000000..3edcd6a76 --- /dev/null +++ b/cmake/cmake-modules/TCHARWorkaround.cmake @@ -0,0 +1,38 @@ +# - Script to compile Win32-developed sources using tchar without modifying the code +# Requires that ${CMAKE_SOURCE_DIR}/cmake/workarounds/tchar/ be present. +# +# TCHAR_WORKAROUND, automatically set to on when not on win32 +# TCHAR_INCLUDE_DIR, location of our fake tchar.h file +# +# Original Author: +# 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> +# http://academic.cleardefinition.com +# Iowa State University HCI Graduate Program/VRAC +# +# Copyright Iowa State University 2009-2010. +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE_1_0.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) + +if(NOT WIN32) + option(TCHAR_WORKAROUND "Work around missing tchar error" on) +else() + option(TCHAR_WORKAROUND "Work around missing tchar error" off) +endif() + +mark_as_advanced(TCHAR_WORKAROUND) + +if(TCHAR_WORKAROUND) + find_path(TCHAR_INCLUDE_DIR + tchar.h + PATHS + ${CMAKE_SOURCE_DIR}/cmake/workarounds/tchar/ + ./workarounds/tchar/ + PATH_SUFFIXES + workarounds/ + workarounds/tchar/) + if(TCHAR_INCLUDE_DIR) + include_directories(${TCHAR_INCLUDE_DIR}) + mark_as_advanced(TCHAR_INCLUDE_DIR) + endif() +endif() diff --git a/cmake/cmake-modules/UseBackportedModules.cmake b/cmake/cmake-modules/UseBackportedModules.cmake new file mode 100644 index 000000000..7ad3baac3 --- /dev/null +++ b/cmake/cmake-modules/UseBackportedModules.cmake @@ -0,0 +1,114 @@ +# - Do a version-dependent check and auto-include backported modules dirs +# +# Name your module directories cmake-*-modules where * is the full +# (maj.min.patch) version number that they came from. You can use +# subdirectories within those directories, if you like - all directories +# inside of a cmake-*-modules dir for a newer version of CMake that what +# we're running, that contain one or more .cmake files, will be appended +# to the CMAKE_MODULE_PATH. +# +# When backporting modules, be sure to test them and follow copyright +# instructions (usually updating copyright notices) +# +# Requires these CMake modules: +# CleanDirectoryList +# +# Original Author: +# 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> +# http://academic.cleardefinition.com +# Iowa State University HCI Graduate Program/VRAC +# +# Copyright Iowa State University 2009-2010. +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE_1_0.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) + +if(NOT CMAKE_VERSION) # defined in >=2.6.3 + set(_cmver + "${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}") +else() + set(_cmver "${CMAKE_VERSION}") +endif() + +include(CleanDirectoryList) + +# No debugging output please +set(USE_BACKPORTED_MODULES_VERBOSE NO) + +get_filename_component(_moddir ${CMAKE_CURRENT_LIST_FILE} PATH) +file(GLOB _globbed "${_moddir}/cmake-*-modules") + +if(USE_BACKPORTED_MODULES_VERBOSE) + message(STATUS + "UseBackportedModules: Detected use of CMake version ${_cmver}") + message(STATUS "Checking these base directories: ${_globbed}") +endif() + +foreach(_dir ${_globbed}) + string(REGEX + MATCH + "cmake-[0-9].[0-9].[0-9]-modules" + _dirname + "${_dir}") + string(REGEX + REPLACE + "cmake-([0-9].[0-9].[0-9])-modules" + "\\1" + _ver + "${_dirname}") + string(REGEX + REPLACE + "cmake-([0-9]).([0-9]).([0-9])-modules" + "\\1_\\2_\\3" + _ver_clean + "${_dirname}") + + if(USE_BACKPORTED_MODULES_VERBOSE) + message(STATUS "${_dir}: ${_ver} ${_ver_clean}") + endif() + + if("${_cmver}" VERSION_LESS "${_ver}") + list(APPEND _upgradever "${_ver_clean}") + file(GLOB_RECURSE _modules "${_dir}/*.cmake") + + foreach(_mod ${_modules}) + get_filename_component(_path "${_mod}" PATH) + list(APPEND _paths_${_ver_clean} "${_path}") + endforeach() + + endif() +endforeach() + + +# Autoinclude files from oldest version to newest version +if(_upgradever) + set(_save_cmake_module_path ${CMAKE_MODULE_PATH}) + list(REMOVE_DUPLICATES _upgradever) + list(SORT _upgradever) + foreach(_ver_clean ${_upgradever}) + clean_directory_list(_paths_${_ver_clean}) + foreach(_dir ${_paths_${_ver_clean}}) + set(CMAKE_MODULE_PATH ${_dir} ${_save_cmake_module_path}) + include("${_dir}/autoinclude.cmake" OPTIONAL RESULT_VARIABLE _result) + if(USE_BACKPORTED_MODULES_VERBOSE) + message(STATUS "${_dir} - Autoincluded: ${_result}") + endif() + endforeach() + endforeach() + set(CMAKE_MODULE_PATH ${_save_cmake_module_path}) +endif() + +# Add the module path from newest version to oldest version +set(_added_module_path) +if(_upgradever) + list(REVERSE _upgradever) + foreach(_ver_clean ${_upgradever}) + list(APPEND _added_module_path ${_paths_${_ver_clean}}) + endforeach() +endif() + +list(APPEND CMAKE_MODULE_PATH ${_added_module_path}) + +if(USE_BACKPORTED_MODULES_VERBOSE) + message(STATUS "New module path: ${CMAKE_MODULE_PATH}") +endif() diff --git a/cmake/cmake-modules/UseFolders.cmake b/cmake/cmake-modules/UseFolders.cmake new file mode 100644 index 000000000..4fd5dfb17 --- /dev/null +++ b/cmake/cmake-modules/UseFolders.cmake @@ -0,0 +1,34 @@ +# - Contains a function to sensibly and easily enable the "USE_FOLDERS" global property +# without burning people using old MSVC Express Editions. +# +# use_folders([option_name]) - Creates an option (default name if you don't pass +# one: BUILD_WITH_PROJECT_FOLDERS) that controls the USE_FOLDERS global property. +# It has intelligently-set defaults that err on the side of caution (disabling) +# on old MSVC versions, since solutions generated with USE_FOLDERS set to ON +# cannot be used in some older MSVC Express Editions, so it's explicit opt-in there. +# +# Original Author: +# 2015 Ryan Pavlik <ryan@sensics.com> <abiryan@ryand.net> +# http://academic.cleardefinition.com +# +# Copyright Sensics, Inc. 2015. +# 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) + +function(use_folders) + set(_option_name BUILD_WITH_PROJECT_FOLDERS) + if(ARGV0) + set(_option_name ${ARGV0}) + endif() + # Nitpicky TODO: This unnecessarily defaults to project folders off when using + # an older toolset in a newer IDE... + if(MSVC_IDE AND MSVC_VERSION LESS 1600) + # VS 2012 Express and newer has folder support... + option(${_option_name} "Enable project folders in the IDE. May only work in non-Express Editions!" OFF) + else() + option(${_option_name} "Enable project folders in the IDE." ON) + endif() + set_property(GLOBAL PROPERTY + USE_FOLDERS ${${_option_name}}) +endfunction() \ No newline at end of file diff --git a/cmake/cmake-modules/UseMarkdown.cmake b/cmake/cmake-modules/UseMarkdown.cmake new file mode 100644 index 000000000..3853167ea --- /dev/null +++ b/cmake/cmake-modules/UseMarkdown.cmake @@ -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() diff --git a/cmake/cmake-modules/UseTR1.cmake b/cmake/cmake-modules/UseTR1.cmake new file mode 100644 index 000000000..c7f020a66 --- /dev/null +++ b/cmake/cmake-modules/UseTR1.cmake @@ -0,0 +1,28 @@ +# - Use settings to enable access to C++ TR1 +# +# This calls include_directories and link_directories as needed to +# permit TR1 support. +# +# Original Author: +# 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> +# http://academic.cleardefinition.com +# Iowa State University HCI Graduate Program/VRAC +# +# Copyright Iowa State University 2009-2010. +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE_1_0.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) + +if(__use_tr1) + return() +endif() +set(__use_tr1 YES) + + +if(TR1_INCLUDE_DIRS) + include_directories(${TR1_INCLUDE_DIRS}) +endif() + +if(TR1_LIBRARY_DIRS) + link_directories(${TR1_LIBRARY_DIRS}) +endif() diff --git a/cmake/cmake-modules/WarningDev.cmake b/cmake/cmake-modules/WarningDev.cmake new file mode 100644 index 000000000..851b5f5e8 --- /dev/null +++ b/cmake/cmake-modules/WarningDev.cmake @@ -0,0 +1,24 @@ +# - Print a developer warning, using author_warning if we have cmake 2.8 +# +# warning_dev("your desired message") +# +# Original Author: +# 2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> +# http://academic.cleardefinition.com +# Iowa State University HCI Graduate Program/VRAC +# +# Copyright Iowa State University 2009-2010. +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE_1_0.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) + +function(warning_dev _yourmsg) + if("1.${CMAKE_VERSION}" VERSION_LESS "1.2.8.0") + # CMake version <2.8.0 + message(STATUS + "The following is a developer warning - end users may ignore it") + message(STATUS "Dev Warning: ${_yourmsg}") + else() + message(AUTHOR_WARNING "${_yourmsg}") + endif() +endfunction() diff --git a/cmake/cmake-modules/cmake-2.8.0-modules/features/SelectLibraryConfigurations.cmake b/cmake/cmake-modules/cmake-2.8.0-modules/features/SelectLibraryConfigurations.cmake new file mode 100644 index 000000000..ee1220ccd --- /dev/null +++ b/cmake/cmake-modules/cmake-2.8.0-modules/features/SelectLibraryConfigurations.cmake @@ -0,0 +1,108 @@ +# select_library_configurations( basename ) +# +# This macro takes a library base name as an argument, and will choose good +# values for basename_LIBRARY, basename_LIBRARIES, basename_LIBRARY_DEBUG, and +# basename_LIBRARY_RELEASE depending on what has been found and set. If only +# basename_LIBRARY_RELEASE is defined, basename_LIBRARY, basename_LIBRARY_DEBUG, +# and basename_LIBRARY_RELEASE will be set to the release value. If only +# basename_LIBRARY_DEBUG is defined, then basename_LIBRARY, +# basename_LIBRARY_DEBUG and basename_LIBRARY_RELEASE will take the debug value. +# +# If the generator supports configuration types, then basename_LIBRARY and +# basename_LIBRARIES will be set with debug and optimized flags specifying the +# library to be used for the given configuration. If no build type has been set +# or the generator in use does not support configuration types, then +# basename_LIBRARY and basename_LIBRARIES will take only the release values. + +#============================================================================= +# Copyright 2009 Kitware, Inc. +# Copyright 2009 Will Dicharry <wdicharry@stellarscience.com> +# Copyright 2005-2009 Kitware, Inc. +# +# 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. +#============================================================================= +# This macro was adapted from the FindQt4 CMake module and is maintained by Will +# Dicharry <wdicharry@stellarscience.com>. + +# Utility macro to check if one variable exists while another doesn't, and set +# one that doesn't exist to the one that exists. +macro( _set_library_name basename GOOD BAD ) + if( ${basename}_LIBRARY_${GOOD} AND NOT ${basename}_LIBRARY_${BAD} ) + set( ${basename}_LIBRARY_${BAD} ${${basename}_LIBRARY_${GOOD}} ) + set( ${basename}_LIBRARY ${${basename}_LIBRARY_${GOOD}} ) + set( ${basename}_LIBRARIES ${${basename}_LIBRARY_${GOOD}} ) + endif( ${basename}_LIBRARY_${GOOD} AND NOT ${basename}_LIBRARY_${BAD} ) +endmacro( _set_library_name ) + +macro( select_library_configurations basename ) + # if only the release version was found, set the debug to be the release + # version. + _set_library_name( ${basename} RELEASE DEBUG ) + # if only the debug version was found, set the release value to be the + # debug value. + _set_library_name( ${basename} DEBUG RELEASE ) + if (${basename}_LIBRARY_DEBUG AND ${basename}_LIBRARY_RELEASE ) + # if the generator supports configuration types or CMAKE_BUILD_TYPE + # is set, then set optimized and debug options. + if( CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE ) + set( ${basename}_LIBRARY + optimized ${${basename}_LIBRARY_RELEASE} + debug ${${basename}_LIBRARY_DEBUG} ) + set( ${basename}_LIBRARIES + optimized ${${basename}_LIBRARY_RELEASE} + debug ${${basename}_LIBRARY_DEBUG} ) + else( CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE ) + # If there are no configuration types or build type, just use + # the release version + set( ${basename}_LIBRARY ${${basename}_LIBRARY_RELEASE} ) + set( ${basename}_LIBRARIES ${${basename}_LIBRARY_RELEASE} ) + endif( CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE ) + endif( ${basename}_LIBRARY_DEBUG AND ${basename}_LIBRARY_RELEASE ) + + set( ${basename}_LIBRARY ${${basename}_LIBRARY} CACHE FILEPATH + "The ${basename} library" ) + + if( ${basename}_LIBRARY ) + set( ${basename}_FOUND TRUE ) + endif( ${basename}_LIBRARY ) + + mark_as_advanced( ${basename}_LIBRARY + ${basename}_LIBRARY_RELEASE + ${basename}_LIBRARY_DEBUG + ) +endmacro( select_library_configurations ) + diff --git a/cmake/cmake-modules/cmake-2.8.0-modules/osg/FindOpenSceneGraph.cmake b/cmake/cmake-modules/cmake-2.8.0-modules/osg/FindOpenSceneGraph.cmake new file mode 100644 index 000000000..a86d8edb1 --- /dev/null +++ b/cmake/cmake-modules/cmake-2.8.0-modules/osg/FindOpenSceneGraph.cmake @@ -0,0 +1,273 @@ +# - Find OpenSceneGraph +# This module searches for the OpenSceneGraph core "osg" library as well as +# OpenThreads, and whatever additional COMPONENTS (nodekits) that you specify. +# See http://www.openscenegraph.org +# +# NOTE: To use this module effectively you must either require CMake >= 2.6.3 +# with cmake_minimum_required(VERSION 2.6.3) or download and place +# FindOpenThreads.cmake, Findosg_functions.cmake, Findosg.cmake, +# and Find<etc>.cmake files into your CMAKE_MODULE_PATH. +# +#================================== +# +# This module accepts the following variables (note mixed case) +# +# OpenSceneGraph_DEBUG - Enable debugging output +# +# OpenSceneGraph_MARK_AS_ADVANCED - Mark cache variables as advanced +# automatically +# +# The following environment variables are also respected for finding the OSG +# and it's various components. CMAKE_PREFIX_PATH can also be used for this +# (see find_library() CMake documentation). +# +# <MODULE>_DIR (where MODULE is of the form "OSGVOLUME" and there is a FindosgVolume.cmake file) +# OSG_DIR +# OSGDIR +# OSG_ROOT +# +# This module defines the following output variables: +# +# OPENSCENEGRAPH_FOUND - Was the OSG and all of the specified components found? +# +# OPENSCENEGRAPH_VERSION - The version of the OSG which was found +# +# OPENSCENEGRAPH_INCLUDE_DIRS - Where to find the headers +# +# OPENSCENEGRAPH_LIBRARIES - The OSG libraries +# +#================================== +# Example Usage: +# +# find_package(OpenSceneGraph 2.0.0 REQUIRED osgDB osgUtil) +# # libOpenThreads & libosg automatically searched +# include_directories(${OPENSCENEGRAPH_INCLUDE_DIRS}) +# +# add_executable(foo foo.cc) +# target_link_libraries(foo ${OPENSCENEGRAPH_LIBRARIES}) +# + +#============================================================================= +# Copyright 2009 Kitware, Inc. +# Copyright 2009 Philip Lowman <philip@yhbt.com> +# +# 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. +#============================================================================= + +# +# Naming convention: +# Local variables of the form _osg_foo +# Input variables of the form OpenSceneGraph_FOO +# Output variables of the form OPENSCENEGRAPH_FOO +# + +include(Findosg_functions) + +set(_osg_modules_to_process) +foreach(_osg_component ${OpenSceneGraph_FIND_COMPONENTS}) + list(APPEND _osg_modules_to_process ${_osg_component}) +endforeach() +list(APPEND _osg_modules_to_process "osg" "OpenThreads") +list(REMOVE_DUPLICATES _osg_modules_to_process) + +if(OpenSceneGraph_DEBUG) + message("[ FindOpenSceneGraph.cmake:${CMAKE_CURRENT_LIST_LINE} ] " + "Components = ${_osg_modules_to_process}") +endif() + +# +# First we need to find and parse osg/Version +# +OSG_FIND_PATH(OSG osg/Version) +if(OpenSceneGraph_MARK_AS_ADVANCED) + OSG_MARK_AS_ADVANCED(OSG) +endif() + +# Try to ascertain the version... +if(OSG_INCLUDE_DIR) + if(OpenSceneGraph_DEBUG) + message("[ FindOpenSceneGraph.cmake:${CMAKE_CURRENT_LIST_LINE} ] " + "Detected OSG_INCLUDE_DIR = ${OSG_INCLUDE_DIR}") + endif() + + set(_osg_Version_file "${OSG_INCLUDE_DIR}/osg/Version") + if("${OSG_INCLUDE_DIR}" MATCHES "\\.framework$" AND NOT EXISTS "${_osg_Version_file}") + set(_osg_Version_file "${OSG_INCLUDE_DIR}/Headers/Version") + endif() + + if(EXISTS "${_osg_Version_file}") + file(READ "${_osg_Version_file}" _osg_Version_contents) + else() + set(_osg_Version_contents "unknown") + endif() + + string(REGEX MATCH ".*#define OSG_VERSION_MAJOR[ \t]+[0-9]+.*" + _osg_old_defines "${_osg_Version_contents}") + string(REGEX MATCH ".*#define OPENSCENEGRAPH_MAJOR_VERSION[ \t]+[0-9]+.*" + _osg_new_defines "${_osg_Version_contents}") + if(_osg_old_defines) + string(REGEX REPLACE ".*#define OSG_VERSION_MAJOR[ \t]+([0-9]+).*" + "\\1" _osg_VERSION_MAJOR ${_osg_Version_contents}) + string(REGEX REPLACE ".*#define OSG_VERSION_MINOR[ \t]+([0-9]+).*" + "\\1" _osg_VERSION_MINOR ${_osg_Version_contents}) + string(REGEX REPLACE ".*#define OSG_VERSION_PATCH[ \t]+([0-9]+).*" + "\\1" _osg_VERSION_PATCH ${_osg_Version_contents}) + elseif(_osg_new_defines) + string(REGEX REPLACE ".*#define OPENSCENEGRAPH_MAJOR_VERSION[ \t]+([0-9]+).*" + "\\1" _osg_VERSION_MAJOR ${_osg_Version_contents}) + string(REGEX REPLACE ".*#define OPENSCENEGRAPH_MINOR_VERSION[ \t]+([0-9]+).*" + "\\1" _osg_VERSION_MINOR ${_osg_Version_contents}) + string(REGEX REPLACE ".*#define OPENSCENEGRAPH_PATCH_VERSION[ \t]+([0-9]+).*" + "\\1" _osg_VERSION_PATCH ${_osg_Version_contents}) + else() + message("[ FindOpenSceneGraph.cmake:${CMAKE_CURRENT_LIST_LINE} ] " + "Failed to parse version number, please report this as a bug") + endif() + + set(OPENSCENEGRAPH_VERSION "${_osg_VERSION_MAJOR}.${_osg_VERSION_MINOR}.${_osg_VERSION_PATCH}" + CACHE INTERNAL "The version of OSG which was detected") + if(OpenSceneGraph_DEBUG) + message("[ FindOpenSceneGraph.cmake:${CMAKE_CURRENT_LIST_LINE} ] " + "Detected version ${OPENSCENEGRAPH_VERSION}") + endif() +endif() + +# +# Version checking +# +if(OpenSceneGraph_FIND_VERSION AND OPENSCENEGRAPH_VERSION) + if(OpenSceneGraph_FIND_VERSION_EXACT) + if(NOT OPENSCENEGRAPH_VERSION VERSION_EQUAL ${OpenSceneGraph_FIND_VERSION}) + set(_osg_version_not_exact TRUE) + endif() + else() + # version is too low + if(NOT OPENSCENEGRAPH_VERSION VERSION_EQUAL ${OpenSceneGraph_FIND_VERSION} AND + NOT OPENSCENEGRAPH_VERSION VERSION_GREATER ${OpenSceneGraph_FIND_VERSION}) + set(_osg_version_not_high_enough TRUE) + endif() + endif() +endif() + +set(_osg_quiet) +if(OpenSceneGraph_FIND_QUIETLY) + set(_osg_quiet "QUIET") +endif() +# +# Here we call FIND_PACKAGE() on all of the components +# +foreach(_osg_module ${_osg_modules_to_process}) + if(OpenSceneGraph_DEBUG) + message("[ FindOpenSceneGraph.cmake:${CMAKE_CURRENT_LIST_LINE} ] " + "Calling find_package(${_osg_module} ${_osg_required} ${_osg_quiet})") + endif() + find_package(${_osg_module} ${_osg_quiet}) + + string(TOUPPER ${_osg_module} _osg_module_UC) + list(APPEND OPENSCENEGRAPH_INCLUDE_DIR ${${_osg_module_UC}_INCLUDE_DIR}) + list(APPEND OPENSCENEGRAPH_LIBRARIES ${${_osg_module_UC}_LIBRARIES}) + + if(OpenSceneGraph_MARK_AS_ADVANCED) + OSG_MARK_AS_ADVANCED(${_osg_module}) + endif() +endforeach() + +if(OPENSCENEGRAPH_INCLUDE_DIR) + list(REMOVE_DUPLICATES OPENSCENEGRAPH_INCLUDE_DIR) +endif() + +# +# Inform the users with an error message based on +# what version they have vs. what version was +# required. +# +if(OpenSceneGraph_FIND_REQUIRED) + set(_osg_version_output_type FATAL_ERROR) +else() + set(_osg_version_output_type STATUS) +endif() +if(_osg_version_not_high_enough) + set(_osg_EPIC_FAIL TRUE) + if(NOT OpenSceneGraph_FIND_QUIETLY) + message(${_osg_version_output_type} + "ERROR: Version ${OpenSceneGraph_FIND_VERSION} or higher of the OSG " + "is required. Version ${OPENSCENEGRAPH_VERSION} was found.") + endif() +elseif(_osg_version_not_exact) + set(_osg_EPIC_FAIL TRUE) + if(NOT OpenSceneGraph_FIND_QUIETLY) + message(${_osg_version_output_type} + "ERROR: Version ${OpenSceneGraph_FIND_VERSION} of the OSG is required " + "(exactly), version ${OPENSCENEGRAPH_VERSION} was found.") + endif() +else() + + # + # Check each module to see if it's found + # + if(OpenSceneGraph_FIND_REQUIRED) + set(_osg_missing_message) + foreach(_osg_module ${_osg_modules_to_process}) + string(TOUPPER ${_osg_module} _osg_module_UC) + if(NOT ${_osg_module_UC}_FOUND) + set(_osg_missing_nodekit_fail true) + set(_osg_missing_message "${_osg_missing_message} ${_osg_module}") + endif() + endforeach() + + if(_osg_missing_nodekit_fail) + message(FATAL_ERROR "ERROR: Missing the following osg " + "libraries: ${_osg_missing_message}.\n" + "Consider using CMAKE_PREFIX_PATH or the OSG_DIR " + "environment variable. See the " + "${CMAKE_CURRENT_LIST_FILE} for more details.") + endif() + endif() + + include(FindPackageHandleStandardArgs) + FIND_PACKAGE_HANDLE_STANDARD_ARGS(OpenSceneGraph DEFAULT_MSG OPENSCENEGRAPH_LIBRARIES OPENSCENEGRAPH_INCLUDE_DIR) +endif() + +if(_osg_EPIC_FAIL) + # Zero out everything, we didn't meet version requirements + set(OPENSCENEGRAPH_FOUND FALSE) + set(OPENSCENEGRAPH_LIBRARIES) + set(OPENSCENEGRAPH_INCLUDE_DIR) +endif() + +set(OPENSCENEGRAPH_INCLUDE_DIRS ${OPENSCENEGRAPH_INCLUDE_DIR}) + diff --git a/cmake/cmake-modules/cmake-2.8.0-modules/osg/FindOpenThreads.cmake b/cmake/cmake-modules/cmake-2.8.0-modules/osg/FindOpenThreads.cmake new file mode 100644 index 000000000..b94688921 --- /dev/null +++ b/cmake/cmake-modules/cmake-2.8.0-modules/osg/FindOpenThreads.cmake @@ -0,0 +1,150 @@ +# OpenThreads is a C++ based threading library. Its largest userbase +# seems to OpenSceneGraph so you might notice I accept OSGDIR as an +# environment path. +# I consider this part of the Findosg* suite used to find OpenSceneGraph +# components. +# Each component is separate and you must opt in to each module. +# +# Locate OpenThreads +# This module defines +# OPENTHREADS_LIBRARY +# OPENTHREADS_FOUND, if false, do not try to link to OpenThreads +# OPENTHREADS_INCLUDE_DIR, where to find the headers +# +# $OPENTHREADS_DIR is an environment variable that would +# correspond to the ./configure --prefix=$OPENTHREADS_DIR +# used in building osg. +# +# Created by Eric Wing. + +#============================================================================= +# Copyright 2007-2009 Kitware, Inc. +# +# 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. +#============================================================================= + +# Header files are presumed to be included like +# #include <OpenThreads/Thread> + +# To make it easier for one-step automated configuration/builds, +# we leverage environmental paths. This is preferable +# to the -DVAR=value switches because it insulates the +# users from changes we may make in this script. +# It also offers a little more flexibility than setting +# the CMAKE_*_PATH since we can target specific components. +# However, the default CMake behavior will search system paths +# before anything else. This is problematic in the cases +# where you have an older (stable) version installed, but +# are trying to build a newer version. +# CMake doesn't offer a nice way to globally control this behavior +# so we have to do a nasty "double FIND_" in this module. +# The first FIND disables the CMAKE_ search paths and only checks +# the environmental paths. +# If nothing is found, then the second find will search the +# standard install paths. +# Explicit -DVAR=value arguments should still be able to override everything. + +find_path(OPENTHREADS_INCLUDE_DIR OpenThreads/Thread + HINTS + # enough environment variables? + $ENV{OPENTHREADS_INCLUDE_DIR} + $ENV{OPENTHREADS_DIR} + $ENV{OSG_INCLUDE_DIR} + $ENV{OSG_DIR} + $ENV{OSGDIR} + $ENV{OpenThreads_ROOT} + $ENV{OSG_ROOT} + PATHS + /sw # Fink + /opt/local # DarwinPorts + /opt/csw # Blastwave + /opt + /usr/freeware + PATH_SUFFIXES include +) + + +find_library(OPENTHREADS_LIBRARY + NAMES OpenThreads OpenThreadsWin32 + HINTS + $ENV{OPENTHREADS_LIBRARY_DIR} + $ENV{OPENTHREADS_DIR} + $ENV{OSG_LIBRARY_DIR} + $ENV{OSG_DIR} + $ENV{OSGDIR} + $ENV{OpenThreads_ROOT} + $ENV{OSG_ROOT} + PATHS + /sw + /opt/local + /opt/csw + /opt + /usr/freeware + PATH_SUFFIXES lib64 lib +) + +find_library(OPENTHREADS_LIBRARY_DEBUG + NAMES OpenThreadsd OpenThreadsWin32d + HINTS + $ENV{OPENTHREADS_DEBUG_LIBRARY_DIR} + $ENV{OPENTHREADS_LIBRARY_DIR} + $ENV{OPENTHREADS_DIR} + $ENV{OSG_LIBRARY_DIR} + $ENV{OSG_DIR} + $ENV{OSGDIR} + $ENV{OpenThreads_ROOT} + $ENV{OSG_ROOT} + PATHS + /sw + /opt/local + /opt/csw + /opt + /usr/freeware + PATH_SUFFIXES lib64 lib +) + +if(OPENTHREADS_LIBRARY_DEBUG) + set(OPENTHREADS_LIBRARIES + optimized ${OPENTHREADS_LIBRARY} + debug ${OPENTHREADS_LIBRARY_DEBUG}) +else() + set(OPENTHREADS_LIBRARIES ${OPENTHREADS_LIBRARY}) +endif() + +include(FindPackageHandleStandardArgs) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(OpenThreads DEFAULT_MSG + OPENTHREADS_LIBRARY OPENTHREADS_INCLUDE_DIR) diff --git a/cmake/cmake-modules/cmake-2.8.0-modules/osg/Findosg.cmake b/cmake/cmake-modules/cmake-2.8.0-modules/osg/Findosg.cmake new file mode 100644 index 000000000..b9591a21f --- /dev/null +++ b/cmake/cmake-modules/cmake-2.8.0-modules/osg/Findosg.cmake @@ -0,0 +1,81 @@ +# +# NOTE: It is highly recommended that you use the new FindOpenSceneGraph.cmake +# introduced in CMake 2.6.3 and not use this Find module directly. +# +# This is part of the Findosg* suite used to find OpenSceneGraph components. +# Each component is separate and you must opt in to each module. You must +# also opt into OpenGL and OpenThreads (and Producer if needed) as these +# modules won't do it for you. This is to allow you control over your own +# system piece by piece in case you need to opt out of certain components +# or change the Find behavior for a particular module (perhaps because the +# default FindOpenGL.cmake module doesn't work with your system as an +# example). +# If you want to use a more convenient module that includes everything, +# use the FindOpenSceneGraph.cmake instead of the Findosg*.cmake modules. +# +# Locate osg +# This module defines +# +# OSG_FOUND - Was the Osg found? +# OSG_INCLUDE_DIR - Where to find the headers +# OSG_LIBRARIES - The libraries to link against for the OSG (use this) +# +# OSG_LIBRARY - The OSG library +# OSG_LIBRARY_DEBUG - The OSG debug library +# +# $OSGDIR is an environment variable that would +# correspond to the ./configure --prefix=$OSGDIR +# used in building osg. +# +# Created by Eric Wing. + +#============================================================================= +# Copyright 2007-2009 Kitware, Inc. +# +# 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. +#============================================================================= + +# Header files are presumed to be included like +# #include <osg/PositionAttitudeTransform> +# #include <osgUtil/SceneView> + +include(Findosg_functions) +OSG_FIND_PATH (OSG osg/PositionAttitudeTransform) +OSG_FIND_LIBRARY(OSG osg) + +include(FindPackageHandleStandardArgs) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(osg DEFAULT_MSG OSG_LIBRARY OSG_INCLUDE_DIR) diff --git a/cmake/cmake-modules/cmake-2.8.0-modules/osg/FindosgAnimation.cmake b/cmake/cmake-modules/cmake-2.8.0-modules/osg/FindosgAnimation.cmake new file mode 100644 index 000000000..57bd5d805 --- /dev/null +++ b/cmake/cmake-modules/cmake-2.8.0-modules/osg/FindosgAnimation.cmake @@ -0,0 +1,78 @@ +# This is part of the Findosg* suite used to find OpenSceneGraph components. +# Each component is separate and you must opt in to each module. You must +# also opt into OpenGL and OpenThreads (and Producer if needed) as these +# modules won't do it for you. This is to allow you control over your own +# system piece by piece in case you need to opt out of certain components +# or change the Find behavior for a particular module (perhaps because the +# default FindOpenGL.cmake module doesn't work with your system as an +# example). +# If you want to use a more convenient module that includes everything, +# use the FindOpenSceneGraph.cmake instead of the Findosg*.cmake modules. +# +# Locate osgAnimation +# This module defines +# +# OSGANIMATION_FOUND - Was osgAnimation found? +# OSGANIMATION_INCLUDE_DIR - Where to find the headers +# OSGANIMATION_LIBRARIES - The libraries to link against for the OSG (use this) +# +# OSGANIMATION_LIBRARY - The OSG library +# OSGANIMATION_LIBRARY_DEBUG - The OSG debug library +# +# $OSGDIR is an environment variable that would +# correspond to the ./configure --prefix=$OSGDIR +# used in building osg. +# +# Created by Eric Wing. + +#============================================================================= +# Copyright 2007-2009 Kitware, Inc. +# +# 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. +#============================================================================= + +# Header files are presumed to be included like +# #include <osg/PositionAttitudeTransform> +# #include <osgAnimation/Animation> + +include(Findosg_functions) +OSG_FIND_PATH (OSGANIMATION osgAnimation/Animation) +OSG_FIND_LIBRARY(OSGANIMATION osgAnimation) + +include(FindPackageHandleStandardArgs) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(osgAnimation DEFAULT_MSG + OSGANIMATION_LIBRARY OSGANIMATION_INCLUDE_DIR) diff --git a/cmake/cmake-modules/cmake-2.8.0-modules/osg/FindosgDB.cmake b/cmake/cmake-modules/cmake-2.8.0-modules/osg/FindosgDB.cmake new file mode 100644 index 000000000..990089670 --- /dev/null +++ b/cmake/cmake-modules/cmake-2.8.0-modules/osg/FindosgDB.cmake @@ -0,0 +1,78 @@ +# This is part of the Findosg* suite used to find OpenSceneGraph components. +# Each component is separate and you must opt in to each module. You must +# also opt into OpenGL and OpenThreads (and Producer if needed) as these +# modules won't do it for you. This is to allow you control over your own +# system piece by piece in case you need to opt out of certain components +# or change the Find behavior for a particular module (perhaps because the +# default FindOpenGL.cmake module doesn't work with your system as an +# example). +# If you want to use a more convenient module that includes everything, +# use the FindOpenSceneGraph.cmake instead of the Findosg*.cmake modules. +# +# Locate osgDB +# This module defines +# +# OSGDB_FOUND - Was osgDB found? +# OSGDB_INCLUDE_DIR - Where to find the headers +# OSGDB_LIBRARIES - The libraries to link against for the osgDB (use this) +# +# OSGDB_LIBRARY - The osgDB library +# OSGDB_LIBRARY_DEBUG - The osgDB debug library +# +# $OSGDIR is an environment variable that would +# correspond to the ./configure --prefix=$OSGDIR +# used in building osg. +# +# Created by Eric Wing. + +#============================================================================= +# Copyright 2007-2009 Kitware, Inc. +# +# 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. +#============================================================================= + +# Header files are presumed to be included like +# #include <osg/PositionAttitudeTransform> +# #include <osgDB/DatabasePager> + +include(Findosg_functions) +OSG_FIND_PATH (OSGDB osgDB/DatabasePager) +OSG_FIND_LIBRARY(OSGDB osgDB) + +include(FindPackageHandleStandardArgs) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(osgDB DEFAULT_MSG + OSGDB_LIBRARY OSGDB_INCLUDE_DIR) diff --git a/cmake/cmake-modules/cmake-2.8.0-modules/osg/FindosgFX.cmake b/cmake/cmake-modules/cmake-2.8.0-modules/osg/FindosgFX.cmake new file mode 100644 index 000000000..8fb222549 --- /dev/null +++ b/cmake/cmake-modules/cmake-2.8.0-modules/osg/FindosgFX.cmake @@ -0,0 +1,78 @@ +# This is part of the Findosg* suite used to find OpenSceneGraph components. +# Each component is separate and you must opt in to each module. You must +# also opt into OpenGL and OpenThreads (and Producer if needed) as these +# modules won't do it for you. This is to allow you control over your own +# system piece by piece in case you need to opt out of certain components +# or change the Find behavior for a particular module (perhaps because the +# default FindOpenGL.cmake module doesn't work with your system as an +# example). +# If you want to use a more convenient module that includes everything, +# use the FindOpenSceneGraph.cmake instead of the Findosg*.cmake modules. +# +# Locate osgFX +# This module defines +# +# OSGFX_FOUND - Was osgFX found? +# OSGFX_INCLUDE_DIR - Where to find the headers +# OSGFX_LIBRARIES - The libraries to link against for the osgFX (use this) +# +# OSGFX_LIBRARY - The osgFX library +# OSGFX_LIBRARY_DEBUG - The osgFX debug library +# +# $OSGDIR is an environment variable that would +# correspond to the ./configure --prefix=$OSGDIR +# used in building osg. +# +# Created by Eric Wing. + +#============================================================================= +# Copyright 2007-2009 Kitware, Inc. +# +# 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. +#============================================================================= + +# Header files are presumed to be included like +# #include <osg/PositionAttitudeTransform> +# #include <osgFX/BumpMapping> + +include(Findosg_functions) +OSG_FIND_PATH (OSGFX osgFX/BumpMapping) +OSG_FIND_LIBRARY(OSGFX osgFX) + +include(FindPackageHandleStandardArgs) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(osgFX DEFAULT_MSG + OSGFX_LIBRARY OSGFX_INCLUDE_DIR) diff --git a/cmake/cmake-modules/cmake-2.8.0-modules/osg/FindosgGA.cmake b/cmake/cmake-modules/cmake-2.8.0-modules/osg/FindosgGA.cmake new file mode 100644 index 000000000..1e0f06e27 --- /dev/null +++ b/cmake/cmake-modules/cmake-2.8.0-modules/osg/FindosgGA.cmake @@ -0,0 +1,78 @@ +# This is part of the Findosg* suite used to find OpenSceneGraph components. +# Each component is separate and you must opt in to each module. You must +# also opt into OpenGL and OpenThreads (and Producer if needed) as these +# modules won't do it for you. This is to allow you control over your own +# system piece by piece in case you need to opt out of certain components +# or change the Find behavior for a particular module (perhaps because the +# default FindOpenGL.cmake module doesn't work with your system as an +# example). +# If you want to use a more convenient module that includes everything, +# use the FindOpenSceneGraph.cmake instead of the Findosg*.cmake modules. +# +# Locate osgGA +# This module defines +# +# OSGGA_FOUND - Was osgGA found? +# OSGGA_INCLUDE_DIR - Where to find the headers +# OSGGA_LIBRARIES - The libraries to link against for the osgGA (use this) +# +# OSGGA_LIBRARY - The osgGA library +# OSGGA_LIBRARY_DEBUG - The osgGA debug library +# +# $OSGDIR is an environment variable that would +# correspond to the ./configure --prefix=$OSGDIR +# used in building osg. +# +# Created by Eric Wing. + +#============================================================================= +# Copyright 2007-2009 Kitware, Inc. +# +# 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. +#============================================================================= + +# Header files are presumed to be included like +# #include <osg/PositionAttitudeTransform> +# #include <osgGA/FlightManipulator> + +include(Findosg_functions) +OSG_FIND_PATH (OSGGA osgGA/FlightManipulator) +OSG_FIND_LIBRARY(OSGGA osgGA) + +include(FindPackageHandleStandardArgs) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(osgGA DEFAULT_MSG + OSGGA_LIBRARY OSGGA_INCLUDE_DIR) diff --git a/cmake/cmake-modules/cmake-2.8.0-modules/osg/FindosgIntrospection.cmake b/cmake/cmake-modules/cmake-2.8.0-modules/osg/FindosgIntrospection.cmake new file mode 100644 index 000000000..0ebb45f2e --- /dev/null +++ b/cmake/cmake-modules/cmake-2.8.0-modules/osg/FindosgIntrospection.cmake @@ -0,0 +1,78 @@ +# This is part of the Findosg* suite used to find OpenSceneGraph components. +# Each component is separate and you must opt in to each module. You must +# also opt into OpenGL and OpenThreads (and Producer if needed) as these +# modules won't do it for you. This is to allow you control over your own +# system piece by piece in case you need to opt out of certain components +# or change the Find behavior for a particular module (perhaps because the +# default FindOpenGL.cmake module doesn't work with your system as an +# example). +# If you want to use a more convenient module that includes everything, +# use the FindOpenSceneGraph.cmake instead of the Findosg*.cmake modules. +# +# Locate osgINTROSPECTION +# This module defines +# +# OSGINTROSPECTION_FOUND - Was osgIntrospection found? +# OSGINTROSPECTION_INCLUDE_DIR - Where to find the headers +# OSGINTROSPECTION_LIBRARIES - The libraries to link for osgIntrospection (use this) +# +# OSGINTROSPECTION_LIBRARY - The osgIntrospection library +# OSGINTROSPECTION_LIBRARY_DEBUG - The osgIntrospection debug library +# +# $OSGDIR is an environment variable that would +# correspond to the ./configure --prefix=$OSGDIR +# used in building osg. +# +# Created by Eric Wing. + +#============================================================================= +# Copyright 2007-2009 Kitware, Inc. +# +# 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. +#============================================================================= + +# Header files are presumed to be included like +# #include <osg/PositionAttitudeTransform> +# #include <osgIntrospection/Reflection> + +include(Findosg_functions) +OSG_FIND_PATH (OSGINTROSPECTION osgIntrospection/Reflection) +OSG_FIND_LIBRARY(OSGINTROSPECTION osgIntrospection) + +include(FindPackageHandleStandardArgs) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(osgIntrospection DEFAULT_MSG + OSGINTROSPECTION_LIBRARY OSGINTROSPECTION_INCLUDE_DIR) diff --git a/cmake/cmake-modules/cmake-2.8.0-modules/osg/FindosgManipulator.cmake b/cmake/cmake-modules/cmake-2.8.0-modules/osg/FindosgManipulator.cmake new file mode 100644 index 000000000..b2362aab6 --- /dev/null +++ b/cmake/cmake-modules/cmake-2.8.0-modules/osg/FindosgManipulator.cmake @@ -0,0 +1,78 @@ +# This is part of the Findosg* suite used to find OpenSceneGraph components. +# Each component is separate and you must opt in to each module. You must +# also opt into OpenGL and OpenThreads (and Producer if needed) as these +# modules won't do it for you. This is to allow you control over your own +# system piece by piece in case you need to opt out of certain components +# or change the Find behavior for a particular module (perhaps because the +# default FindOpenGL.cmake module doesn't work with your system as an +# example). +# If you want to use a more convenient module that includes everything, +# use the FindOpenSceneGraph.cmake instead of the Findosg*.cmake modules. +# +# Locate osgManipulator +# This module defines +# +# OSGMANIPULATOR_FOUND - Was osgManipulator found? +# OSGMANIPULATOR_INCLUDE_DIR - Where to find the headers +# OSGMANIPULATOR_LIBRARIES - The libraries to link for osgManipulator (use this) +# +# OSGMANIPULATOR_LIBRARY - The osgManipulator library +# OSGMANIPULATOR_LIBRARY_DEBUG - The osgManipulator debug library +# +# $OSGDIR is an environment variable that would +# correspond to the ./configure --prefix=$OSGDIR +# used in building osg. +# +# Created by Eric Wing. + +#============================================================================= +# Copyright 2007-2009 Kitware, Inc. +# +# 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. +#============================================================================= + +# Header files are presumed to be included like +# #include <osg/PositionAttitudeTransform> +# #include <osgManipulator/TrackballDragger> + +include(Findosg_functions) +OSG_FIND_PATH (OSGMANIPULATOR osgManipulator/TrackballDragger) +OSG_FIND_LIBRARY(OSGMANIPULATOR osgManipulator) + +include(FindPackageHandleStandardArgs) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(osgManipulator DEFAULT_MSG + OSGMANIPULATOR_LIBRARY OSGMANIPULATOR_INCLUDE_DIR) diff --git a/cmake/cmake-modules/cmake-2.8.0-modules/osg/FindosgParticle.cmake b/cmake/cmake-modules/cmake-2.8.0-modules/osg/FindosgParticle.cmake new file mode 100644 index 000000000..c668739ba --- /dev/null +++ b/cmake/cmake-modules/cmake-2.8.0-modules/osg/FindosgParticle.cmake @@ -0,0 +1,78 @@ +# This is part of the Findosg* suite used to find OpenSceneGraph components. +# Each component is separate and you must opt in to each module. You must +# also opt into OpenGL and OpenThreads (and Producer if needed) as these +# modules won't do it for you. This is to allow you control over your own +# system piece by piece in case you need to opt out of certain components +# or change the Find behavior for a particular module (perhaps because the +# default FindOpenGL.cmake module doesn't work with your system as an +# example). +# If you want to use a more convenient module that includes everything, +# use the FindOpenSceneGraph.cmake instead of the Findosg*.cmake modules. +# +# Locate osgParticle +# This module defines +# +# OSGPARTICLE_FOUND - Was osgParticle found? +# OSGPARTICLE_INCLUDE_DIR - Where to find the headers +# OSGPARTICLE_LIBRARIES - The libraries to link for osgParticle (use this) +# +# OSGPARTICLE_LIBRARY - The osgParticle library +# OSGPARTICLE_LIBRARY_DEBUG - The osgParticle debug library +# +# $OSGDIR is an environment variable that would +# correspond to the ./configure --prefix=$OSGDIR +# used in building osg. +# +# Created by Eric Wing. + +#============================================================================= +# Copyright 2007-2009 Kitware, Inc. +# +# 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. +#============================================================================= + +# Header files are presumed to be included like +# #include <osg/PositionAttitudeTransform> +# #include <osgParticle/FireEffect> + +include(Findosg_functions) +OSG_FIND_PATH (OSGPARTICLE osgParticle/FireEffect) +OSG_FIND_LIBRARY(OSGPARTICLE osgParticle) + +include(FindPackageHandleStandardArgs) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(osgParticle DEFAULT_MSG + OSGPARTICLE_LIBRARY OSGPARTICLE_INCLUDE_DIR) diff --git a/cmake/cmake-modules/cmake-2.8.0-modules/osg/FindosgProducer.cmake b/cmake/cmake-modules/cmake-2.8.0-modules/osg/FindosgProducer.cmake new file mode 100644 index 000000000..dd28b1634 --- /dev/null +++ b/cmake/cmake-modules/cmake-2.8.0-modules/osg/FindosgProducer.cmake @@ -0,0 +1,78 @@ +# This is part of the Findosg* suite used to find OpenSceneGraph components. +# Each component is separate and you must opt in to each module. You must +# also opt into OpenGL and OpenThreads (and Producer if needed) as these +# modules won't do it for you. This is to allow you control over your own +# system piece by piece in case you need to opt out of certain components +# or change the Find behavior for a particular module (perhaps because the +# default FindOpenGL.cmake module doesn't work with your system as an +# example). +# If you want to use a more convenient module that includes everything, +# use the FindOpenSceneGraph.cmake instead of the Findosg*.cmake modules. +# +# Locate osgProducer +# This module defines +# +# OSGPRODUCER_FOUND - Was osgProducer found? +# OSGPRODUCER_INCLUDE_DIR - Where to find the headers +# OSGPRODUCER_LIBRARIES - The libraries to link for osgProducer (use this) +# +# OSGPRODUCER_LIBRARY - The osgProducer library +# OSGPRODUCER_LIBRARY_DEBUG - The osgProducer debug library +# +# $OSGDIR is an environment variable that would +# correspond to the ./configure --prefix=$OSGDIR +# used in building osg. +# +# Created by Eric Wing. + +#============================================================================= +# Copyright 2007-2009 Kitware, Inc. +# +# 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. +#============================================================================= + +# Header files are presumed to be included like +# #include <osg/PositionAttitudeTransform> +# #include <osgProducer/OsgSceneHandler> + +include(Findosg_functions) +OSG_FIND_PATH (OSGPRODUCER osgProducer/OsgSceneHandler) +OSG_FIND_LIBRARY(OSGPRODUCER osgProducer) + +include(FindPackageHandleStandardArgs) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(osgProducer DEFAULT_MSG + OSGPRODUCER_LIBRARY OSGPRODUCER_INCLUDE_DIR) diff --git a/cmake/cmake-modules/cmake-2.8.0-modules/osg/FindosgShadow.cmake b/cmake/cmake-modules/cmake-2.8.0-modules/osg/FindosgShadow.cmake new file mode 100644 index 000000000..60da582a7 --- /dev/null +++ b/cmake/cmake-modules/cmake-2.8.0-modules/osg/FindosgShadow.cmake @@ -0,0 +1,78 @@ +# This is part of the Findosg* suite used to find OpenSceneGraph components. +# Each component is separate and you must opt in to each module. You must +# also opt into OpenGL and OpenThreads (and Producer if needed) as these +# modules won't do it for you. This is to allow you control over your own +# system piece by piece in case you need to opt out of certain components +# or change the Find behavior for a particular module (perhaps because the +# default FindOpenGL.cmake module doesn't work with your system as an +# example). +# If you want to use a more convenient module that includes everything, +# use the FindOpenSceneGraph.cmake instead of the Findosg*.cmake modules. +# +# Locate osgShadow +# This module defines +# +# OSGSHADOW_FOUND - Was osgShadow found? +# OSGSHADOW_INCLUDE_DIR - Where to find the headers +# OSGSHADOW_LIBRARIES - The libraries to link for osgShadow (use this) +# +# OSGSHADOW_LIBRARY - The osgShadow library +# OSGSHADOW_LIBRARY_DEBUG - The osgShadow debug library +# +# $OSGDIR is an environment variable that would +# correspond to the ./configure --prefix=$OSGDIR +# used in building osg. +# +# Created by Eric Wing. + +#============================================================================= +# Copyright 2007-2009 Kitware, Inc. +# +# 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. +#============================================================================= + +# Header files are presumed to be included like +# #include <osg/PositionAttitudeTransform> +# #include <osgShadow/ShadowTexture> + +include(Findosg_functions) +OSG_FIND_PATH (OSGSHADOW osgShadow/ShadowTexture) +OSG_FIND_LIBRARY(OSGSHADOW osgShadow) + +include(FindPackageHandleStandardArgs) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(osgShadow DEFAULT_MSG + OSGSHADOW_LIBRARY OSGSHADOW_INCLUDE_DIR) diff --git a/cmake/cmake-modules/cmake-2.8.0-modules/osg/FindosgSim.cmake b/cmake/cmake-modules/cmake-2.8.0-modules/osg/FindosgSim.cmake new file mode 100644 index 000000000..14c390983 --- /dev/null +++ b/cmake/cmake-modules/cmake-2.8.0-modules/osg/FindosgSim.cmake @@ -0,0 +1,78 @@ +# This is part of the Findosg* suite used to find OpenSceneGraph components. +# Each component is separate and you must opt in to each module. You must +# also opt into OpenGL and OpenThreads (and Producer if needed) as these +# modules won't do it for you. This is to allow you control over your own +# system piece by piece in case you need to opt out of certain components +# or change the Find behavior for a particular module (perhaps because the +# default FindOpenGL.cmake module doesn't work with your system as an +# example). +# If you want to use a more convenient module that includes everything, +# use the FindOpenSceneGraph.cmake instead of the Findosg*.cmake modules. +# +# Locate osgSim +# This module defines +# +# OSGSIM_FOUND - Was osgSim found? +# OSGSIM_INCLUDE_DIR - Where to find the headers +# OSGSIM_LIBRARIES - The libraries to link for osgSim (use this) +# +# OSGSIM_LIBRARY - The osgSim library +# OSGSIM_LIBRARY_DEBUG - The osgSim debug library +# +# $OSGDIR is an environment variable that would +# correspond to the ./configure --prefix=$OSGDIR +# used in building osg. +# +# Created by Eric Wing. + +#============================================================================= +# Copyright 2007-2009 Kitware, Inc. +# +# 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. +#============================================================================= + +# Header files are presumed to be included like +# #include <osg/PositionAttitudeTransform> +# #include <osgSim/ImpostorSprite> + +include(Findosg_functions) +OSG_FIND_PATH (OSGSIM osgSim/ImpostorSprite) +OSG_FIND_LIBRARY(OSGSIM osgSim) + +include(FindPackageHandleStandardArgs) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(osgSim DEFAULT_MSG + OSGSIM_LIBRARY OSGSIM_INCLUDE_DIR) diff --git a/cmake/cmake-modules/cmake-2.8.0-modules/osg/FindosgTerrain.cmake b/cmake/cmake-modules/cmake-2.8.0-modules/osg/FindosgTerrain.cmake new file mode 100644 index 000000000..20cf56901 --- /dev/null +++ b/cmake/cmake-modules/cmake-2.8.0-modules/osg/FindosgTerrain.cmake @@ -0,0 +1,78 @@ +# This is part of the Findosg* suite used to find OpenSceneGraph components. +# Each component is separate and you must opt in to each module. You must +# also opt into OpenGL and OpenThreads (and Producer if needed) as these +# modules won't do it for you. This is to allow you control over your own +# system piece by piece in case you need to opt out of certain components +# or change the Find behavior for a particular module (perhaps because the +# default FindOpenGL.cmake module doesn't work with your system as an +# example). +# If you want to use a more convenient module that includes everything, +# use the FindOpenSceneGraph.cmake instead of the Findosg*.cmake modules. +# +# Locate osgTerrain +# This module defines +# +# OSGTERRAIN_FOUND - Was osgTerrain found? +# OSGTERRAIN_INCLUDE_DIR - Where to find the headers +# OSGTERRAIN_LIBRARIES - The libraries to link for osgTerrain (use this) +# +# OSGTERRAIN_LIBRARY - The osgTerrain library +# OSGTERRAIN_LIBRARY_DEBUG - The osgTerrain debug library +# +# $OSGDIR is an environment variable that would +# correspond to the ./configure --prefix=$OSGDIR +# used in building osg. +# +# Created by Eric Wing. + +#============================================================================= +# Copyright 2007-2009 Kitware, Inc. +# +# 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. +#============================================================================= + +# Header files are presumed to be included like +# #include <osg/PositionAttitudeTransform> +# #include <osgTerrain/Terrain> + +include(Findosg_functions) +OSG_FIND_PATH (OSGTERRAIN osgTerrain/Terrain) +OSG_FIND_LIBRARY(OSGTERRAIN osgTerrain) + +include(FindPackageHandleStandardArgs) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(osgTerrain DEFAULT_MSG + OSGTERRAIN_LIBRARY OSGTERRAIN_INCLUDE_DIR) diff --git a/cmake/cmake-modules/cmake-2.8.0-modules/osg/FindosgText.cmake b/cmake/cmake-modules/cmake-2.8.0-modules/osg/FindosgText.cmake new file mode 100644 index 000000000..81f9740ab --- /dev/null +++ b/cmake/cmake-modules/cmake-2.8.0-modules/osg/FindosgText.cmake @@ -0,0 +1,78 @@ +# This is part of the Findosg* suite used to find OpenSceneGraph components. +# Each component is separate and you must opt in to each module. You must +# also opt into OpenGL and OpenThreads (and Producer if needed) as these +# modules won't do it for you. This is to allow you control over your own +# system piece by piece in case you need to opt out of certain components +# or change the Find behavior for a particular module (perhaps because the +# default FindOpenGL.cmake module doesn't work with your system as an +# example). +# If you want to use a more convenient module that includes everything, +# use the FindOpenSceneGraph.cmake instead of the Findosg*.cmake modules. +# +# Locate osgText +# This module defines +# +# OSGTEXT_FOUND - Was osgText found? +# OSGTEXT_INCLUDE_DIR - Where to find the headers +# OSGTEXT_LIBRARIES - The libraries to link for osgText (use this) +# +# OSGTEXT_LIBRARY - The osgText library +# OSGTEXT_LIBRARY_DEBUG - The osgText debug library +# +# $OSGDIR is an environment variable that would +# correspond to the ./configure --prefix=$OSGDIR +# used in building osg. +# +# Created by Eric Wing. + +#============================================================================= +# Copyright 2007-2009 Kitware, Inc. +# +# 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. +#============================================================================= + +# Header files are presumed to be included like +# #include <osg/PositionAttitudeTransform> +# #include <osgText/Text> + +include(Findosg_functions) +OSG_FIND_PATH (OSGTEXT osgText/Text) +OSG_FIND_LIBRARY(OSGTEXT osgText) + +include(FindPackageHandleStandardArgs) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(osgText DEFAULT_MSG + OSGTEXT_LIBRARY OSGTEXT_INCLUDE_DIR) diff --git a/cmake/cmake-modules/cmake-2.8.0-modules/osg/FindosgUtil.cmake b/cmake/cmake-modules/cmake-2.8.0-modules/osg/FindosgUtil.cmake new file mode 100644 index 000000000..088409640 --- /dev/null +++ b/cmake/cmake-modules/cmake-2.8.0-modules/osg/FindosgUtil.cmake @@ -0,0 +1,78 @@ +# This is part of the Findosg* suite used to find OpenSceneGraph components. +# Each component is separate and you must opt in to each module. You must +# also opt into OpenGL and OpenThreads (and Producer if needed) as these +# modules won't do it for you. This is to allow you control over your own +# system piece by piece in case you need to opt out of certain components +# or change the Find behavior for a particular module (perhaps because the +# default FindOpenGL.cmake module doesn't work with your system as an +# example). +# If you want to use a more convenient module that includes everything, +# use the FindOpenSceneGraph.cmake instead of the Findosg*.cmake modules. +# +# Locate osgUtil +# This module defines +# +# OSGUTIL_FOUND - Was osgUtil found? +# OSGUTIL_INCLUDE_DIR - Where to find the headers +# OSGUTIL_LIBRARIES - The libraries to link for osgUtil (use this) +# +# OSGUTIL_LIBRARY - The osgUtil library +# OSGUTIL_LIBRARY_DEBUG - The osgUtil debug library +# +# $OSGDIR is an environment variable that would +# correspond to the ./configure --prefix=$OSGDIR +# used in building osg. +# +# Created by Eric Wing. + +#============================================================================= +# Copyright 2007-2009 Kitware, Inc. +# +# 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. +#============================================================================= + +# Header files are presumed to be included like +# #include <osg/PositionAttitudeTransform> +# #include <osgUtil/SceneView> + +include(Findosg_functions) +OSG_FIND_PATH (OSGUTIL osgUtil/SceneView) +OSG_FIND_LIBRARY(OSGUTIL osgUtil) + +include(FindPackageHandleStandardArgs) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(osgUtil DEFAULT_MSG + OSGUTIL_LIBRARY OSGUTIL_INCLUDE_DIR) diff --git a/cmake/cmake-modules/cmake-2.8.0-modules/osg/FindosgViewer.cmake b/cmake/cmake-modules/cmake-2.8.0-modules/osg/FindosgViewer.cmake new file mode 100644 index 000000000..04df41334 --- /dev/null +++ b/cmake/cmake-modules/cmake-2.8.0-modules/osg/FindosgViewer.cmake @@ -0,0 +1,78 @@ +# This is part of the Findosg* suite used to find OpenSceneGraph components. +# Each component is separate and you must opt in to each module. You must +# also opt into OpenGL and OpenThreads (and Producer if needed) as these +# modules won't do it for you. This is to allow you control over your own +# system piece by piece in case you need to opt out of certain components +# or change the Find behavior for a particular module (perhaps because the +# default FindOpenGL.cmake module doesn't work with your system as an +# example). +# If you want to use a more convenient module that includes everything, +# use the FindOpenSceneGraph.cmake instead of the Findosg*.cmake modules. +# +# Locate osgViewer +# This module defines +# +# OSGVIEWER_FOUND - Was osgViewer found? +# OSGVIEWER_INCLUDE_DIR - Where to find the headers +# OSGVIEWER_LIBRARIES - The libraries to link for osgViewer (use this) +# +# OSGVIEWER_LIBRARY - The osgViewer library +# OSGVIEWER_LIBRARY_DEBUG - The osgViewer debug library +# +# $OSGDIR is an environment variable that would +# correspond to the ./configure --prefix=$OSGDIR +# used in building osg. +# +# Created by Eric Wing. + +#============================================================================= +# Copyright 2007-2009 Kitware, Inc. +# +# 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. +#============================================================================= + +# Header files are presumed to be included like +# #include <osg/PositionAttitudeTransform> +# #include <osgViewer/Viewer> + +include(Findosg_functions) +OSG_FIND_PATH (OSGVIEWER osgViewer/Viewer) +OSG_FIND_LIBRARY(OSGVIEWER osgViewer) + +include(FindPackageHandleStandardArgs) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(osgViewer DEFAULT_MSG + OSGVIEWER_LIBRARY OSGVIEWER_INCLUDE_DIR) diff --git a/cmake/cmake-modules/cmake-2.8.0-modules/osg/FindosgVolume.cmake b/cmake/cmake-modules/cmake-2.8.0-modules/osg/FindosgVolume.cmake new file mode 100644 index 000000000..6c666c47b --- /dev/null +++ b/cmake/cmake-modules/cmake-2.8.0-modules/osg/FindosgVolume.cmake @@ -0,0 +1,78 @@ +# This is part of the Findosg* suite used to find OpenSceneGraph components. +# Each component is separate and you must opt in to each module. You must +# also opt into OpenGL and OpenThreads (and Producer if needed) as these +# modules won't do it for you. This is to allow you control over your own +# system piece by piece in case you need to opt out of certain components +# or change the Find behavior for a particular module (perhaps because the +# default FindOpenGL.cmake module doesn't work with your system as an +# example). +# If you want to use a more convenient module that includes everything, +# use the FindOpenSceneGraph.cmake instead of the Findosg*.cmake modules. +# +# Locate osgVolume +# This module defines +# +# OSGVOLUME_FOUND - Was osgVolume found? +# OSGVOLUME_INCLUDE_DIR - Where to find the headers +# OSGVOLUME_LIBRARIES - The libraries to link for osgVolume (use this) +# +# OSGVOLUME_LIBRARY - The osgVolume library +# OSGVOLUME_LIBRARY_DEBUG - The osgVolume debug library +# +# $OSGDIR is an environment variable that would +# correspond to the ./configure --prefix=$OSGDIR +# used in building osg. +# +# Created by Eric Wing. + +#============================================================================= +# Copyright 2007-2009 Kitware, Inc. +# +# 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. +#============================================================================= + +# Header files are presumed to be included like +# #include <osg/PositionAttitudeTransform> +# #include <osgVolume/Volume> + +include(Findosg_functions) +OSG_FIND_PATH (OSGVOLUME osgVolume/Volume) +OSG_FIND_LIBRARY(OSGVOLUME osgVolume) + +include(FindPackageHandleStandardArgs) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(osgVolume DEFAULT_MSG + OSGVOLUME_LIBRARY OSGVOLUME_INCLUDE_DIR) diff --git a/cmake/cmake-modules/cmake-2.8.0-modules/osg/FindosgWidget.cmake b/cmake/cmake-modules/cmake-2.8.0-modules/osg/FindosgWidget.cmake new file mode 100644 index 000000000..227bbce40 --- /dev/null +++ b/cmake/cmake-modules/cmake-2.8.0-modules/osg/FindosgWidget.cmake @@ -0,0 +1,78 @@ +# This is part of the Findosg* suite used to find OpenSceneGraph components. +# Each component is separate and you must opt in to each module. You must +# also opt into OpenGL and OpenThreads (and Producer if needed) as these +# modules won't do it for you. This is to allow you control over your own +# system piece by piece in case you need to opt out of certain components +# or change the Find behavior for a particular module (perhaps because the +# default FindOpenGL.cmake module doesn't work with your system as an +# example). +# If you want to use a more convenient module that includes everything, +# use the FindOpenSceneGraph.cmake instead of the Findosg*.cmake modules. +# +# Locate osgWidget +# This module defines +# +# OSGWIDGET_FOUND - Was osgWidget found? +# OSGWIDGET_INCLUDE_DIR - Where to find the headers +# OSGWIDGET_LIBRARIES - The libraries to link for osgWidget (use this) +# +# OSGWIDGET_LIBRARY - The osgWidget library +# OSGWIDGET_LIBRARY_DEBUG - The osgWidget debug library +# +# $OSGDIR is an environment variable that would +# correspond to the ./configure --prefix=$OSGDIR +# used in building osg. +# +# FindosgWidget.cmake tweaked from Findosg* suite as created by Eric Wing. + +#============================================================================= +# Copyright 2007-2009 Kitware, Inc. +# +# 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. +#============================================================================= + +# Header files are presumed to be included like +# #include <osg/PositionAttitudeTransform> +# #include <osgWidget/Widget> + +include(Findosg_functions) +OSG_FIND_PATH (OSGWIDGET osgWidget/Widget) +OSG_FIND_LIBRARY(OSGWIDGET osgWidget) + +include(FindPackageHandleStandardArgs) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(osgWidget DEFAULT_MSG + OSGWIDGET_LIBRARY OSGWIDGET_INCLUDE_DIR) diff --git a/cmake/cmake-modules/cmake-2.8.0-modules/osg/Findosg_functions.cmake b/cmake/cmake-modules/cmake-2.8.0-modules/osg/Findosg_functions.cmake new file mode 100644 index 000000000..19f180350 --- /dev/null +++ b/cmake/cmake-modules/cmake-2.8.0-modules/osg/Findosg_functions.cmake @@ -0,0 +1,132 @@ +# +# This CMake file contains two macros to assist with searching for OSG +# libraries and nodekits. +# + +#============================================================================= +# Copyright 2009 Kitware, Inc. +# Copyright 2009 Philip Lowman <philip@yhbt.com> +# +# 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. +#============================================================================= + +# +# OSG_FIND_PATH +# +function(OSG_FIND_PATH module header) + string(TOUPPER ${module} module_uc) + + # Try the user's environment request before anything else. + find_path(${module_uc}_INCLUDE_DIR ${header} + HINTS + $ENV{${module_uc}_DIR} + $ENV{OSG_DIR} + $ENV{OSGDIR} + $ENV{OSG_ROOT} + PATH_SUFFIXES include + PATHS + /sw # Fink + /opt/local # DarwinPorts + /opt/csw # Blastwave + /opt + /usr/freeware + ) +endfunction(OSG_FIND_PATH module header) + + +# +# OSG_FIND_LIBRARY +# +function(OSG_FIND_LIBRARY module library) + string(TOUPPER ${module} module_uc) + + find_library(${module_uc}_LIBRARY + NAMES ${library} + HINTS + $ENV{${module_uc}_DIR} + $ENV{OSG_DIR} + $ENV{OSGDIR} + $ENV{OSG_ROOT} + PATH_SUFFIXES lib64 lib + PATHS + /sw # Fink + /opt/local # DarwinPorts + /opt/csw # Blastwave + /opt + /usr/freeware + ) + + find_library(${module_uc}_LIBRARY_DEBUG + NAMES ${library}d + HINTS + $ENV{${module_uc}_DIR} + $ENV{OSG_DIR} + $ENV{OSGDIR} + $ENV{OSG_ROOT} + PATH_SUFFIXES lib64 lib + PATHS + /sw # Fink + /opt/local # DarwinPorts + /opt/csw # Blastwave + /opt + /usr/freeware + ) + + if(NOT ${module_uc}_LIBRARY_DEBUG) + # They don't have a debug library + set(${module_uc}_LIBRARY_DEBUG ${${module_uc}_LIBRARY} PARENT_SCOPE) + set(${module_uc}_LIBRARIES ${${module_uc}_LIBRARY} PARENT_SCOPE) + else() + # They really have a FOO_LIBRARY_DEBUG + set(${module_uc}_LIBRARIES + optimized ${${module_uc}_LIBRARY} + debug ${${module_uc}_LIBRARY_DEBUG} + PARENT_SCOPE + ) + endif() +endfunction(OSG_FIND_LIBRARY module library) + +# +# OSG_MARK_AS_ADVANCED +# Just a convenience function for calling MARK_AS_ADVANCED +# +function(OSG_MARK_AS_ADVANCED _module) + string(TOUPPER ${_module} _module_UC) + mark_as_advanced(${_module_UC}_INCLUDE_DIR) + mark_as_advanced(${_module_UC}_LIBRARY) + mark_as_advanced(${_module_UC}_LIBRARY_DEBUG) +endfunction() diff --git a/cmake/cmake-modules/cmake-2.8.1-modules/patchctestbug10149/CTest.cmake b/cmake/cmake-modules/cmake-2.8.1-modules/patchctestbug10149/CTest.cmake new file mode 100644 index 000000000..0c5aaf4e0 --- /dev/null +++ b/cmake/cmake-modules/cmake-2.8.1-modules/patchctestbug10149/CTest.cmake @@ -0,0 +1,363 @@ +# - Configure a project for testing with CTest/CDash +# Include this module in the top CMakeLists.txt file of a project to +# enable testing with CTest and dashboard submissions to CDash: +# project(MyProject) +# ... +# include(CTest) +# The module automatically creates a BUILD_TESTING option that selects +# whether to enable testing support (ON by default). After including +# the module, use code like +# if(BUILD_TESTING) +# # ... CMake code to create tests ... +# endif() +# to creating tests when testing is enabled. +# +# To enable submissions to a CDash server, create a CTestConfig.cmake +# file at the top of the project with content such as +# set(CTEST_PROJECT_NAME "MyProject") +# set(CTEST_NIGHTLY_START_TIME "01:00:00 UTC") +# set(CTEST_DROP_METHOD "http") +# set(CTEST_DROP_SITE "my.cdash.org") +# set(CTEST_DROP_LOCATION "/submit.php?project=MyProject") +# set(CTEST_DROP_SITE_CDASH TRUE) +# (the CDash server can provide the file to a project administrator +# who configures 'MyProject'). +# Settings in the config file are shared by both this CTest module and +# the CTest command-line tool's dashboard script mode (ctest -S). +# +# While building a project for submission to CDash, CTest scans the +# build output for errors and warnings and reports them with +# surrounding context from the build log. This generic approach works +# for all build tools, but does not give details about the command +# invocation that produced a given problem. One may get more detailed +# reports by adding +# set(CTEST_USE_LAUNCHERS 1) +# to the CTestConfig.cmake file. When this option is enabled, the +# CTest module tells CMake's Makefile generators to invoke every +# command in the generated build system through a CTest launcher +# program. (Currently the CTEST_USE_LAUNCHERS option is ignored on +# non-Makefile generators.) During a manual build each launcher +# transparently runs the command it wraps. During a CTest-driven +# build for submission to CDash each launcher reports detailed +# information when its command fails or warns. +# (Setting CTEST_USE_LAUNCHERS in CTestConfig.cmake is convenient, but +# also adds the launcher overhead even for manual builds. One may +# instead set it in a CTest dashboard script and add it to the CMake +# cache for the build tree.) + +#============================================================================= +# Copyright 2005-2009 Kitware, Inc. +# +# 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. +#============================================================================= + +option(BUILD_TESTING "Build the testing tree." ON) + +# function to turn generator name into a version string +# like vs7 vs71 vs8 vs9 +function(get_vs_version_string generator var) + string(REGEX + REPLACE + "Visual Studio ([0-9][0-9]?)($|.*)" + "\\1" + NUMBER + "${generator}") + if("${generator}" MATCHES "Visual Studio 7 .NET 2003") + set(ver_string "vs71") + else() + set(ver_string "vs${NUMBER}") + endif() + set(${var} ${ver_string} PARENT_SCOPE) +endfunction() + +if(BUILD_TESTING) + # Setup some auxilary macros + macro(set_if_not_set var val) + if(NOT DEFINED "${var}") + set("${var}" "${val}") + endif() + endmacro() + + macro(set_if_set var val) + if(NOT "${val}" MATCHES "^$") + set("${var}" "${val}") + endif() + endmacro() + + macro(set_if_set_and_not_set var val) + if(NOT "${val}" MATCHES "^$") + set_if_not_set("${var}" "${val}") + endif() + endmacro() + + # Make sure testing is enabled + enable_testing() + + if(EXISTS "${PROJECT_SOURCE_DIR}/CTestConfig.cmake") + include("${PROJECT_SOURCE_DIR}/CTestConfig.cmake") + set_if_set_and_not_set(NIGHTLY_START_TIME + "${CTEST_NIGHTLY_START_TIME}") + set_if_set_and_not_set(DROP_METHOD "${CTEST_DROP_METHOD}") + set_if_set_and_not_set(DROP_SITE "${CTEST_DROP_SITE}") + set_if_set_and_not_set(DROP_SITE_USER "${CTEST_DROP_SITE_USER}") + set_if_set_and_not_set(DROP_SITE_PASSWORD + "${CTEST_DROP_SITE_PASWORD}") + set_if_set_and_not_set(DROP_SITE_MODE "${CTEST_DROP_SITE_MODE}") + set_if_set_and_not_set(DROP_LOCATION "${CTEST_DROP_LOCATION}") + set_if_set_and_not_set(TRIGGER_SITE "${CTEST_TRIGGER_SITE}") + set_if_set_and_not_set(UPDATE_TYPE "${CTEST_UPDATE_TYPE}") + endif() + + # the project can have a DartConfig.cmake file + if(EXISTS "${PROJECT_SOURCE_DIR}/DartConfig.cmake") + include("${PROJECT_SOURCE_DIR}/DartConfig.cmake") + else() + # Dashboard is opened for submissions for a 24 hour period starting at + # the specified NIGHTLY_START_TIME. Time is specified in 24 hour format. + set_if_not_set(NIGHTLY_START_TIME "00:00:00 EDT") + set_if_not_set(DROP_METHOD "http") + set_if_not_set(COMPRESS_SUBMISSION ON) + endif() + set_if_not_set(NIGHTLY_START_TIME "00:00:00 EDT") + + if(NOT UPDATE_TYPE) + if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/CVS") + set(UPDATE_TYPE cvs) + elseif(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/.svn") + set(UPDATE_TYPE svn) + elseif(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/.bzr") + set(UPDATE_TYPE bzr) + elseif(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/.hg") + set(UPDATE_TYPE hg) + elseif(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/.git") + set(UPDATE_TYPE git) + endif() + endif() + + if(NOT UPDATE_TYPE) + if(NOT __CTEST_UPDATE_TYPE_COMPLAINED) + set(__CTEST_UPDATE_TYPE_COMPLAINED + 1 + CACHE + INTERNAL + "Already complained about update type.") + message(STATUS + "CTest cannot determine repository type. Please set UPDATE_TYPE to cvs, svn, bzr, hg, or git. CTest update will not work.") + endif() + endif() + + string(TOLOWER "${UPDATE_TYPE}" _update_type) + if("${_update_type}" STREQUAL "cvs") + find_program(CVSCOMMAND cvs) + set(CVS_UPDATE_OPTIONS + "-d -A -P" + CACHE + STRING + "Options passed to the cvs update command.") + set(UPDATE_COMMAND "${CVSCOMMAND}") + set(UPDATE_OPTIONS "${CVS_UPDATE_OPTIONS}") + + elseif("${_update_type}" STREQUAL "svn") + find_program(SVNCOMMAND svn) + set(UPDATE_COMMAND "${SVNCOMMAND}") + set(UPDATE_OPTIONS "${SVN_UPDATE_OPTIONS}") + + elseif("${_update_type}" STREQUAL "bzr") + find_program(BZRCOMMAND bzr) + set(UPDATE_COMMAND "${BZRCOMMAND}") + set(UPDATE_OPTIONS "${BZR_UPDATE_OPTIONS}") + + elseif("${_update_type}" STREQUAL "hg") + find_program(HGCOMMAND hg) + set(UPDATE_COMMAND "${HGCOMMAND}") + set(UPDATE_OPTIONS "${HG_UPDATE_OPTIONS}") + + elseif("${_update_type}" STREQUAL "git") + find_program(GITCOMMAND git) + set(UPDATE_COMMAND "${GITCOMMAND}") + set(UPDATE_OPTIONS "${GIT_UPDATE_OPTIONS}") + endif() + + set(DART_TESTING_TIMEOUT + 1500 + CACHE + STRING + "Maximum time allowed before CTest will kill the test.") + + find_program(MEMORYCHECK_COMMAND + NAMES + purify + valgrind + boundscheck + PATHS + "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Rational Software\\Purify\\Setup;InstallFolder]" + DOC + "Path to the memory checking command, used for memory error detection.") + find_program(SLURM_SBATCH_COMMAND + sbatch + DOC + "Path to the SLURM sbatch executable") + find_program(SLURM_SRUN_COMMAND + srun + DOC + "Path to the SLURM srun executable") + set(MEMORYCHECK_SUPPRESSIONS_FILE + "" + CACHE + FILEPATH + "File that contains suppressions for the memory checker") + find_program(SCPCOMMAND + scp + DOC + "Path to scp command, used by CTest for submitting results to a Dart server") + find_program(COVERAGE_COMMAND + gcov + DOC + "Path to the coverage program that CTest uses for performing coverage inspection") + + # set the site name + site_name(SITE) + # set the build name + if(NOT BUILDNAME) + set(DART_COMPILER "${CMAKE_CXX_COMPILER}") + + if(NOT DART_COMPILER) + set(DART_COMPILER "${CMAKE_C_COMPILER}") + endif() + + if(NOT DART_COMPILER) + set(DART_COMPILER "unknown") + endif() + + if(WIN32) + set(DART_NAME_COMPONENT "NAME_WE") + else() + set(DART_NAME_COMPONENT "NAME") + endif() + + if(NOT BUILD_NAME_SYSTEM_NAME) + set(BUILD_NAME_SYSTEM_NAME "${CMAKE_SYSTEM_NAME}") + endif() + + if(WIN32) + set(BUILD_NAME_SYSTEM_NAME "Win32") + endif() + + if(UNIX OR BORLAND) + get_filename_component(DART_CXX_NAME + "${CMAKE_CXX_COMPILER}" + ${DART_NAME_COMPONENT}) + else() + get_filename_component(DART_CXX_NAME + "${CMAKE_BUILD_TOOL}" + ${DART_NAME_COMPONENT}) + endif() + + if(DART_CXX_NAME MATCHES "msdev") + set(DART_CXX_NAME "vs60") + endif() + + if(DART_CXX_NAME MATCHES "devenv") + get_vs_version_string("${CMAKE_GENERATOR}" DART_CXX_NAME) + endif() + + set(BUILDNAME "${BUILD_NAME_SYSTEM_NAME}-${DART_CXX_NAME}") + endif() + + # the build command + build_command(MAKECOMMAND CONFIGURATION "\${CTEST_CONFIGURATION_TYPE}") + set(MAKECOMMAND + ${MAKECOMMAND} + CACHE + STRING + "Command to build the project") + + # the default build configuration the ctest build handler will use + # if there is no -C arg given to ctest: + set(DEFAULT_CTEST_CONFIGURATION_TYPE "$ENV{CMAKE_CONFIG_TYPE}") + if(DEFAULT_CTEST_CONFIGURATION_TYPE STREQUAL "") + set(DEFAULT_CTEST_CONFIGURATION_TYPE "Release") + endif() + + if(NOT "${CMAKE_GENERATOR}" MATCHES "Make") + set(CTEST_USE_LAUNCHERS 0) + endif() + + if(CTEST_USE_LAUNCHERS) + set(CTEST_LAUNCH_COMPILE + "\"${CMAKE_CTEST_COMMAND}\" --launch --target-name <TARGET_NAME> --build-dir <CMAKE_CURRENT_BINARY_DIR> --output <OBJECT> --source <SOURCE> --language <LANGUAGE> --") + set(CTEST_LAUNCH_LINK + "\"${CMAKE_CTEST_COMMAND}\" --launch --target-name <TARGET_NAME> --build-dir <CMAKE_CURRENT_BINARY_DIR> --output <TARGET> --target-type <TARGET_TYPE> --language <LANGUAGE> --") + set(CTEST_LAUNCH_CUSTOM + "\"${CMAKE_CTEST_COMMAND}\" --launch --target-name <TARGET_NAME> --build-dir <CMAKE_CURRENT_BINARY_DIR> --output <OUTPUT> --") + set_property(GLOBAL + PROPERTY + RULE_LAUNCH_COMPILE + "${CTEST_LAUNCH_COMPILE}") + set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK "${CTEST_LAUNCH_LINK}") + set_property(GLOBAL + PROPERTY + RULE_LAUNCH_CUSTOM + "${CTEST_LAUNCH_CUSTOM}") + endif() + + mark_as_advanced(COVERAGE_COMMAND + CVSCOMMAND + SVNCOMMAND + BZRCOMMAND + HGCOMMAND + GITCOMMAND + CVS_UPDATE_OPTIONS + SVN_UPDATE_OPTIONS + BZR_UPDATE_OPTIONS + HG_UPDATE_OPTIONS + GIT_UPDATE_OPTIONS + MAKECOMMAND + MEMORYCHECK_COMMAND + MEMORYCHECK_SUPPRESSIONS_FILE + PURIFYCOMMAND + SCPCOMMAND + SLURM_SBATCH_COMMAND + SLURM_SRUN_COMMAND + SITE) + + if(NOT RUN_FROM_DART) + set(RUN_FROM_CTEST_OR_DART 1) + include(CTestTargets) + set(RUN_FROM_CTEST_OR_DART) + endif() +endif() diff --git a/cmake/cmake-modules/cmake-2.8.1-modules/patchctestbug10149/CTestScriptMode.cmake b/cmake/cmake-modules/cmake-2.8.1-modules/patchctestbug10149/CTestScriptMode.cmake new file mode 100644 index 000000000..e6ab6341b --- /dev/null +++ b/cmake/cmake-modules/cmake-2.8.1-modules/patchctestbug10149/CTestScriptMode.cmake @@ -0,0 +1,51 @@ +# This file is read by ctest in script mode (-S) + +#============================================================================= +# Copyright 2009 Kitware, Inc. +# Copyright 2009 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. +#============================================================================= + +# Determine the current system, so this information can be used +# in ctest scripts +include(CMakeDetermineSystem) + +# Also load the system specific file, which sets up e.g. the search paths. +# This makes the FIND_XXX() calls work much better +include(CMakeSystemSpecificInformation) + diff --git a/cmake/cmake-modules/cmake-2.8.1-modules/patchctestbug10149/CTestTargets.cmake b/cmake/cmake-modules/cmake-2.8.1-modules/patchctestbug10149/CTestTargets.cmake new file mode 100644 index 000000000..a964a039f --- /dev/null +++ b/cmake/cmake-modules/cmake-2.8.1-modules/patchctestbug10149/CTestTargets.cmake @@ -0,0 +1,131 @@ + +#============================================================================= +# Copyright 2005-2009 Kitware, Inc. +# +# Distributed under the OSI-approved BSD License (the "License"); +# see accompanying file Copyright.txt for details. +# +# 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. +#============================================================================= + +if(NOT RUN_FROM_CTEST_OR_DART) + message(FATAL_ERROR "Do not incldue CTestTargets.cmake directly") +endif() + +# make directories in the binary tree +file(MAKE_DIRECTORY ${PROJECT_BINARY_DIR}/Testing/Temporary) +get_filename_component(CMAKE_HOST_PATH ${CMAKE_COMMAND} PATH) +set(CMAKE_TARGET_PATH ${EXECUTABLE_OUTPUT_PATH}) +find_program(CMAKE_CTEST_COMMAND + ctest + ${CMAKE_HOST_PATH} + ${CMAKE_TARGET_PATH}) +mark_as_advanced(CMAKE_CTEST_COMMAND) + +# Use CTest +# configure files + +if(CTEST_NEW_FORMAT) + configure_file(${CMAKE_ROOT}/Modules/DartConfiguration.tcl.in + ${PROJECT_BINARY_DIR}/CTestConfiguration.ini) +else() + configure_file(${CMAKE_ROOT}/Modules/DartConfiguration.tcl.in + ${PROJECT_BINARY_DIR}/DartConfiguration.tcl) +endif() + +# +# Section 3: +# +# Custom targets to perform dashboard builds and submissions. +# These should NOT need to be modified from project to project. +# + +set(__conf_types "") +if(CMAKE_CONFIGURATION_TYPES) + # We need to pass the configuration type on the test command line. + set(__conf_types -C "${CMAKE_CFG_INTDIR}") +endif() + +# Add convenience targets. Do this at most once in case of nested +# projects. +define_property(GLOBAL PROPERTY CTEST_TARGETS_ADDED + BRIEF_DOCS "Internal property used by CTestTargets module." + FULL_DOCS "Set by the CTestTargets module to track addition of testing targets.") + +get_property(_CTEST_TARGETS_ADDED GLOBAL PROPERTY CTEST_TARGETS_ADDED) +if(NOT _CTEST_TARGETS_ADDED) + set_property(GLOBAL PROPERTY CTEST_TARGETS_ADDED 1) + + # For all generators add basic testing targets. + foreach(mode Experimental Nightly Continuous NightlyMemoryCheck) + add_custom_target(${mode} + ${CMAKE_CTEST_COMMAND} + ${__conf_types} + -D + ${mode}) + set_property(TARGET ${mode} PROPERTY RULE_LAUNCH_CUSTOM "") + endforeach() + + # For Makefile generators add more granular targets. + if("${CMAKE_GENERATOR}" MATCHES Make) + # Make targets for Experimental builds + foreach(mode Nightly Experimental Continuous) + foreach(testtype + Start + Update + Configure + Build + Test + Coverage + MemCheck + Submit) # missing purify + + add_custom_target(${mode}${testtype} + ${CMAKE_CTEST_COMMAND} + ${__conf_types} + -D + ${mode}${testtype}) + set_property(TARGET + ${mode}${testtype} + PROPERTY + RULE_LAUNCH_CUSTOM + "") + endforeach() + endforeach() + endif() # makefile generators + +endif() diff --git a/cmake/cmake-modules/cmake-2.8.12-modules/CMakePackageConfigHelpers.cmake b/cmake/cmake-modules/cmake-2.8.12-modules/CMakePackageConfigHelpers.cmake new file mode 100644 index 000000000..6ad4aba8a --- /dev/null +++ b/cmake/cmake-modules/cmake-2.8.12-modules/CMakePackageConfigHelpers.cmake @@ -0,0 +1,358 @@ +#.rst: +# CMakePackageConfigHelpers +# ------------------------- +# +# 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] +# [NO_FIND_DEPENDENCY_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 NO_FIND_DEPENDENCY_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() + + get_filename_component(inputFileName "${_inputFile}" NAME) + + set(PACKAGE_INIT " +####### Expanded from @PACKAGE_INIT@ by configure_package_config_file() ####### +####### Any changes to this file will be overwritten by the next CMake run #### +####### The input file was ${inputFileName} ######## + +get_filename_component(PACKAGE_PREFIX_DIR \"\${CMAKE_CURRENT_LIST_DIR}/${PACKAGE_RELATIVE_PATH}\" ABSOLUTE) +") + + if("${absInstallDir}" MATCHES "^(/usr)?/lib(64)?/.+") + # Handle "/usr move" symlinks created by some Linux distros. + set(PACKAGE_INIT "${PACKAGE_INIT} +# Use original install prefix when loaded through a \"/usr move\" +# cross-prefix symbolic link such as /lib -> /usr/lib. +get_filename_component(_realCurr \"\${CMAKE_CURRENT_LIST_DIR}\" REALPATH) +get_filename_component(_realOrig \"${absInstallDir}\" REALPATH) +if(_realCurr STREQUAL _realOrig) + set(PACKAGE_PREFIX_DIR \"${CMAKE_INSTALL_PREFIX}\") +endif() +unset(_realOrig) +unset(_realCurr) +") + endif() + + 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() + + if(NOT CCF_NO_FIND_DEPENDENCY_MACRO) + set(PACKAGE_INIT "${PACKAGE_INIT} +macro(find_dependency dep) + if (NOT \${dep}_FOUND) + if (\${ARGV1}) + set(version \${ARGV1}) + endif() + set(exact_arg) + if(\${CMAKE_FIND_PACKAGE_NAME}_FIND_VERSION_EXACT) + set(exact_arg EXACT) + endif() + set(quiet_arg) + if(\${CMAKE_FIND_PACKAGE_NAME}_FIND_QUIETLY) + set(quiet_arg QUIET) + endif() + set(required_arg) + if(\${CMAKE_FIND_PACKAGE_NAME}_FIND_REQUIRED) + set(required_arg REQUIRED) + endif() + + find_package(\${dep} \${version} \${exact_arg} \${quiet_arg} \${required_arg}) + if (NOT \${dep}_FOUND) + set(\${CMAKE_FIND_PACKAGE_NAME}_NOT_FOUND_MESSAGE \"\${CMAKE_FIND_PACKAGE_NAME} could not be found because dependency \${dep} could not be found.\") + set(\${CMAKE_FIND_PACKAGE_NAME}_FOUND False) + return() + endif() + set(required_arg) + set(quiet_arg) + set(exact_arg) + endif() +endmacro() +") + endif() + + set(PACKAGE_INIT "${PACKAGE_INIT} +####################################################################################") + + configure_file("${_inputFile}" "${_outputFile}" @ONLY) + +endfunction() diff --git a/cmake/cmake-modules/cmake-2.8.12-modules/CMakeParseArguments.cmake b/cmake/cmake-modules/cmake-2.8.12-modules/CMakeParseArguments.cmake new file mode 100644 index 000000000..3c8002272 --- /dev/null +++ b/cmake/cmake-modules/cmake-2.8.12-modules/CMakeParseArguments.cmake @@ -0,0 +1,187 @@ +#.rst: +# CMakeParseArguments +# ------------------- +# +# +# +# CMAKE_PARSE_ARGUMENTS(<prefix> <options> <one_value_keywords> +# <multi_value_keywords> args...) +# +# CMAKE_PARSE_ARGUMENTS() is intended to be used in macros or functions +# for parsing the arguments given to that macro or function. It +# processes the arguments and defines a set of variables which hold the +# values of the respective options. +# +# The <options> argument contains all options for the respective macro, +# i.e. keywords which can be used when calling the macro without any +# value following, like e.g. the OPTIONAL keyword of the install() +# command. +# +# The <one_value_keywords> argument contains all keywords for this macro +# which are followed by one value, like e.g. DESTINATION keyword of the +# install() command. +# +# The <multi_value_keywords> argument contains all keywords for this +# macro which can be followed by more than one value, like e.g. the +# TARGETS or FILES keywords of the install() command. +# +# When done, CMAKE_PARSE_ARGUMENTS() will have defined for each of the +# keywords listed in <options>, <one_value_keywords> and +# <multi_value_keywords> a variable composed of the given <prefix> +# followed by "_" and the name of the respective keyword. These +# variables will then hold the respective value from the argument list. +# For the <options> keywords this will be TRUE or FALSE. +# +# All remaining arguments are collected in a variable +# <prefix>_UNPARSED_ARGUMENTS, this can be checked afterwards to see +# whether your macro was called with unrecognized parameters. +# +# As an example here a my_install() macro, which takes similar arguments +# as the real install() command: +# +# :: +# +# function(MY_INSTALL) +# set(options OPTIONAL FAST) +# set(oneValueArgs DESTINATION RENAME) +# set(multiValueArgs TARGETS CONFIGURATIONS) +# cmake_parse_arguments(MY_INSTALL "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN} ) +# ... +# +# +# +# Assume my_install() has been called like this: +# +# :: +# +# my_install(TARGETS foo bar DESTINATION bin OPTIONAL blub) +# +# +# +# After the cmake_parse_arguments() call the macro will have set the +# following variables: +# +# :: +# +# MY_INSTALL_OPTIONAL = TRUE +# MY_INSTALL_FAST = FALSE (this option was not used when calling my_install() +# MY_INSTALL_DESTINATION = "bin" +# MY_INSTALL_RENAME = "" (was not used) +# MY_INSTALL_TARGETS = "foo;bar" +# MY_INSTALL_CONFIGURATIONS = "" (was not used) +# MY_INSTALL_UNPARSED_ARGUMENTS = "blub" (no value expected after "OPTIONAL" +# +# +# +# You can then continue and process these variables. +# +# Keywords terminate lists of values, e.g. if directly after a +# one_value_keyword another recognized keyword follows, this is +# interpreted as the beginning of the new option. E.g. +# my_install(TARGETS foo DESTINATION OPTIONAL) would result in +# MY_INSTALL_DESTINATION set to "OPTIONAL", but MY_INSTALL_DESTINATION +# would be empty and MY_INSTALL_OPTIONAL would be set to TRUE therefor. + +#============================================================================= +# Copyright 2010 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. +#============================================================================= + + +if(__CMAKE_PARSE_ARGUMENTS_INCLUDED) + return() +endif() +set(__CMAKE_PARSE_ARGUMENTS_INCLUDED TRUE) + + +function(CMAKE_PARSE_ARGUMENTS prefix _optionNames _singleArgNames _multiArgNames) + # first set all result variables to empty/FALSE + foreach(arg_name ${_singleArgNames} ${_multiArgNames}) + set(${prefix}_${arg_name}) + endforeach() + + foreach(option ${_optionNames}) + set(${prefix}_${option} FALSE) + endforeach() + + set(${prefix}_UNPARSED_ARGUMENTS) + + set(insideValues FALSE) + set(currentArgName) + + # now iterate over all arguments and fill the result variables + foreach(currentArg ${ARGN}) + list(FIND _optionNames "${currentArg}" optionIndex) # ... then this marks the end of the arguments belonging to this keyword + list(FIND _singleArgNames "${currentArg}" singleArgIndex) # ... then this marks the end of the arguments belonging to this keyword + list(FIND _multiArgNames "${currentArg}" multiArgIndex) # ... then this marks the end of the arguments belonging to this keyword + + if(${optionIndex} EQUAL -1 AND ${singleArgIndex} EQUAL -1 AND ${multiArgIndex} EQUAL -1) + if(insideValues) + if("${insideValues}" STREQUAL "SINGLE") + set(${prefix}_${currentArgName} ${currentArg}) + set(insideValues FALSE) + elseif("${insideValues}" STREQUAL "MULTI") + list(APPEND ${prefix}_${currentArgName} ${currentArg}) + endif() + else() + list(APPEND ${prefix}_UNPARSED_ARGUMENTS ${currentArg}) + endif() + else() + if(NOT ${optionIndex} EQUAL -1) + set(${prefix}_${currentArg} TRUE) + set(insideValues FALSE) + elseif(NOT ${singleArgIndex} EQUAL -1) + set(currentArgName ${currentArg}) + set(${prefix}_${currentArgName}) + set(insideValues "SINGLE") + elseif(NOT ${multiArgIndex} EQUAL -1) + set(currentArgName ${currentArg}) + set(${prefix}_${currentArgName}) + set(insideValues "MULTI") + endif() + endif() + + endforeach() + + # propagate the result variables to the caller: + foreach(arg_name ${_singleArgNames} ${_multiArgNames} ${_optionNames}) + set(${prefix}_${arg_name} ${${prefix}_${arg_name}} PARENT_SCOPE) + endforeach() + set(${prefix}_UNPARSED_ARGUMENTS ${${prefix}_UNPARSED_ARGUMENTS} PARENT_SCOPE) + +endfunction() diff --git a/cmake/cmake-modules/cmake-2.8.3-modules/FixWinInstallPrefix.cmake b/cmake/cmake-modules/cmake-2.8.3-modules/FixWinInstallPrefix.cmake new file mode 100644 index 000000000..ceb180baa --- /dev/null +++ b/cmake/cmake-modules/cmake-2.8.3-modules/FixWinInstallPrefix.cmake @@ -0,0 +1,78 @@ +# - Automatically fix CMAKE_INSTALL_PREFIX to be bit-appropriate on Win +# +# This is a workaround for CMake bug #9992 in <2.8.3 - see +# http://public.kitware.com/Bug/view.php?id=9992 +# +# It runs automatically when included on a Windows build (passes if(WIN32)) - +# include after setting your project name (and your module search path, +# obviously) +# +# Original Author: +# 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> +# http://academic.cleardefinition.com +# Iowa State University HCI Graduate Program/VRAC +# +# Copyright Iowa State University 2009-2010. +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file ../LICENSE_1_0.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) + +if(WIN32) + # caution - ENV{ProgramFiles} on Win64 is adjusted to point to the arch + # of the running executable which, since CMake is 32-bit on Windows as + # I write this, will always be = $ENV{ProgramFiles(x86)}. + # Thus, we only use this environment variable if we are on a 32 machine + + # 32-bit dir on win32, useless to us on win64 + file(TO_CMAKE_PATH "$ENV{ProgramFiles}" _PROG_FILES) + + # 32-bit dir: only set on win64 + set(_PF86 "ProgramFiles(x86)") + file(TO_CMAKE_PATH "$ENV{${_PF86}}" _PROG_FILES_X86) + + # 64-bit dir: only set on win64 + file(TO_CMAKE_PATH "$ENV{ProgramW6432}" _PROG_FILES_W6432) + + if(CMAKE_SIZEOF_VOID_P MATCHES "8") + # 64-bit build on win64 + set(_PROGFILESDIR "${_PROG_FILES_W6432}") + else() + if(_PROG_FILES_W6432) + # 32-bit build on win64 + set(_PROGFILESDIR "${_PROG_FILES_X86}") + else() + # 32-bit build on win32 + set(_PROGFILESDIR "${_PROG_FILES}") + endif() + endif() + + if(NOT FIXWININSTALLPREFIX_PREFIX) + set(_needsfix yes) + elseif(NOT + "${FIXWININSTALLPREFIX_PREFIX}" + STREQUAL + "${CMAKE_INSTALL_PREFIX}") + set(_needsfix yes) + else() + set(_needsfix) + endif() + + if(_needsfix) + if("${CMAKE_INSTALL_PREFIX}" + STREQUAL + "${_PROG_FILES}/${CMAKE_PROJECT_NAME}") + # The user didn't change this yet - it's the potentially broken default + set(CMAKE_INSTALL_PREFIX + "${_PROGFILESDIR}/${CMAKE_PROJECT_NAME}" + CACHE + PATH + "Where to install the project - has been adjusted by FixWinInstallPrefix" + FORCE) + endif() + set(FIXWININSTALLPREFIX_PREFIX + "${CMAKE_INSTALL_PREFIX}" + CACHE + INTERNAL + "We've fixed the prefix.") + endif() +endif() diff --git a/cmake/cmake-modules/cmake-2.8.3-modules/autoinclude.cmake b/cmake/cmake-modules/cmake-2.8.3-modules/autoinclude.cmake new file mode 100644 index 000000000..64d8f62b9 --- /dev/null +++ b/cmake/cmake-modules/cmake-2.8.3-modules/autoinclude.cmake @@ -0,0 +1,13 @@ +# - Autoinclude these policies automatically +# +# Original Author: +# 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> +# http://academic.cleardefinition.com +# Iowa State University HCI Graduate Program/VRAC +# +# Copyright Iowa State University 2009-2010. +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file ../LICENSE_1_0.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) + +include(FixWinInstallPrefix) diff --git a/cmake/cmake-modules/cmake-2.8.4-modules/ImproveEclipseGCCErrors.cmake b/cmake/cmake-modules/cmake-2.8.4-modules/ImproveEclipseGCCErrors.cmake new file mode 100644 index 000000000..2f7f3170d --- /dev/null +++ b/cmake/cmake-modules/cmake-2.8.4-modules/ImproveEclipseGCCErrors.cmake @@ -0,0 +1,19 @@ +# - Add a GCC flag so that the errors are more suitable to parsing by Eclipse +# +# include(ImproveEclipseGCCErrors) +# +# +# Original Author: +# 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> +# http://academic.cleardefinition.com +# Iowa State University HCI Graduate Program/VRAC +# +# Copyright Iowa State University 2009-2010. +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file ../LICENSE_1_0.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) + +if("${CMAKE_GENERATOR}" MATCHES "Eclipse" AND CMAKE_COMPILER_IS_GNUCXX) + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fmessage-length=0") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fmessage-length=0") +endif() diff --git a/cmake/cmake-modules/cmake-2.8.4-modules/autoinclude.cmake b/cmake/cmake-modules/cmake-2.8.4-modules/autoinclude.cmake new file mode 100644 index 000000000..2c98e2499 --- /dev/null +++ b/cmake/cmake-modules/cmake-2.8.4-modules/autoinclude.cmake @@ -0,0 +1,13 @@ +# - Autoinclude these policies automatically +# +# Original Author: +# 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> +# http://academic.cleardefinition.com +# Iowa State University HCI Graduate Program/VRAC +# +# Copyright Iowa State University 2009-2010. +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file ../LICENSE_1_0.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) + +include(ImproveEclipseGCCErrors) diff --git a/cmake/cmake-modules/cmake-2.8.4-modules/boost/FindBoost.cmake b/cmake/cmake-modules/cmake-2.8.4-modules/boost/FindBoost.cmake new file mode 100644 index 000000000..9dbfb8023 --- /dev/null +++ b/cmake/cmake-modules/cmake-2.8.4-modules/boost/FindBoost.cmake @@ -0,0 +1,1171 @@ +# - Try to find Boost include dirs and libraries +# Usage of this module as follows: +# +# NOTE: Take note of the Boost_ADDITIONAL_VERSIONS variable below. +# Due to Boost naming conventions and limitations in CMake this find +# module is NOT future safe with respect to Boost version numbers, +# and may break. +# +# == Using Header-Only libraries from within Boost: == +# +# find_package( Boost 1.36.0 ) +# if(Boost_FOUND) +# include_directories(${Boost_INCLUDE_DIRS}) +# add_executable(foo foo.cc) +# endif() +# +# +# == Using actual libraries from within Boost: == +# +# set(Boost_USE_STATIC_LIBS ON) +# set(Boost_USE_MULTITHREADED ON) +# set(Boost_USE_STATIC_RUNTIME OFF) +# find_package( Boost 1.36.0 COMPONENTS date_time filesystem system ... ) +# +# if(Boost_FOUND) +# include_directories(${Boost_INCLUDE_DIRS}) +# add_executable(foo foo.cc) +# target_link_libraries(foo ${Boost_LIBRARIES}) +# endif() +# +# +# The components list needs to contain actual names of boost libraries only, +# such as "date_time" for "libboost_date_time". If you're using parts of +# Boost that contain header files only (e.g. foreach) you do not need to +# specify COMPONENTS. +# +# You should provide a minimum version number that should be used. If you provide this +# version number and specify the REQUIRED attribute, this module will fail if it +# can't find the specified or a later version. If you specify a version number this is +# automatically put into the considered list of version numbers and thus doesn't need +# to be specified in the Boost_ADDITIONAL_VERSIONS variable (see below). +# +# NOTE for Visual Studio Users: +# Automatic linking is used on MSVC & Borland compilers by default when +# #including things in Boost. It's important to note that setting +# Boost_USE_STATIC_LIBS to OFF is NOT enough to get you dynamic linking, +# should you need this feature. Automatic linking typically uses static +# libraries with a few exceptions (Boost.Python is one). +# +# Please see the section below near Boost_LIB_DIAGNOSTIC_DEFINITIONS for +# more details. Adding a TARGET_LINK_LIBRARIES() as shown in the example +# above appears to cause VS to link dynamically if Boost_USE_STATIC_LIBS +# gets set to OFF. It is suggested you avoid automatic linking since it +# will make your application less portable. +# +# =========== The mess that is Boost_ADDITIONAL_VERSIONS (sorry?) ============ +# +# OK, so the Boost_ADDITIONAL_VERSIONS variable can be used to specify a list of +# boost version numbers that should be taken into account when searching +# for Boost. Unfortunately boost puts the version number into the +# actual filename for the libraries, so this variable will certainly be needed +# in the future when new Boost versions are released. +# +# Currently this module searches for the following version numbers: +# 1.33, 1.33.0, 1.33.1, 1.34, 1.34.0, 1.34.1, 1.35, 1.35.0, 1.35.1, +# 1.36, 1.36.0, 1.36.1, 1.37, 1.37.0, 1.38, 1.38.0, 1.39, 1.39.0, +# 1.40, 1.40.0, 1.41, 1.41.0, 1.42, 1.42.0, 1.43, 1.43.0, 1.44, 1.44.0, +# 1.45, 1.45.0, 1.46, 1.46.0 +# +# NOTE: If you add a new major 1.x version in Boost_ADDITIONAL_VERSIONS you should +# add both 1.x and 1.x.0 as shown above. Official Boost include directories +# omit the 3rd version number from include paths if it is 0 although not all +# binary Boost releases do so. +# +# SET(Boost_ADDITIONAL_VERSIONS "1.78" "1.78.0" "1.79" "1.79.0") +# +# ===================================== ============= ======================== +# +# Variables used by this module, they can change the default behaviour and +# need to be set before calling find_package: +# +# Boost_USE_MULTITHREADED Can be set to OFF to use the non-multithreaded +# boost libraries. If not specified, defaults +# to ON. +# +# Boost_USE_STATIC_LIBS Can be set to ON to force the use of the static +# boost libraries. Defaults to OFF. +# +# Boost_NO_SYSTEM_PATHS Set to TRUE to suppress searching in system +# paths (or other locations outside of BOOST_ROOT +# or BOOST_INCLUDEDIR). Useful when specifying +# BOOST_ROOT. Defaults to OFF. +# [Since CMake 2.8.3] +# +# Boost_USE_STATIC_RUNTIME If enabled, searches for boost libraries +# linked against a static C++ standard library +# ('s' ABI tag). This option should be set to +# ON or OFF because the default behavior +# if not specified is platform dependent +# for backwards compatibility. +# [Since CMake 2.8.3] +# +# Boost_USE_DEBUG_PYTHON If enabled, searches for boost libraries +# compiled against a special debug build of +# Python ('y' ABI tag). Defaults to OFF. +# [Since CMake 2.8.3] +# +# Boost_USE_STLPORT If enabled, searches for boost libraries +# compiled against the STLPort standard +# library ('p' ABI tag). Defaults to OFF. +# [Since CMake 2.8.3] +# +# Boost_USE_STLPORT_DEPRECATED_NATIVE_IOSTREAMS +# If enabled, searches for boost libraries +# compiled against the deprecated STLPort +# "native iostreams" feature ('n' ABI tag). +# Defaults to OFF. +# [Since CMake 2.8.3] +# +# Other Variables used by this module which you may want to set. +# +# Boost_ADDITIONAL_VERSIONS A list of version numbers to use for searching +# the boost include directory. Please see +# the documentation above regarding this +# annoying, but necessary variable :( +# +# Boost_DEBUG Set this to TRUE to enable debugging output +# of FindBoost.cmake if you are having problems. +# Please enable this before filing any bug +# reports. +# +# Boost_DETAILED_FAILURE_MSG FindBoost doesn't output detailed information +# about why it failed or how to fix the problem +# unless this is set to TRUE or the REQUIRED +# keyword is specified in find_package(). +# [Since CMake 2.8.0] +# +# Boost_COMPILER Set this to the compiler suffix used by Boost +# (e.g. "-gcc43") if FindBoost has problems finding +# the proper Boost installation +# +# Boost_THREADAPI When building boost.thread, sometimes the name of the +# library contains an additional "pthread" or "win32" +# string known as the threadapi. This can happen when +# compiling against pthreads on Windows or win32 threads +# on Cygwin. You may specify this variable and if set +# when FindBoost searches for the Boost threading library +# it will first try to match the threadapi you specify. +# For Example: libboost_thread_win32-mgw45-mt-1_43.a +# might be found if you specified "win32" here before +# falling back on libboost_thread-mgw45-mt-1_43.a. +# [Since CMake 2.8.3] +# +# Boost_REALPATH Resolves symbolic links for discovered boost libraries +# to assist with packaging. For example, instead of +# Boost_SYSTEM_LIBRARY_RELEASE being resolved to +# "/usr/lib/libboost_system.so" it would be +# "/usr/lib/libboost_system.so.1.42.0" instead. +# This does not affect linking and should not be +# enabled unless the user needs this information. +# [Since CMake 2.8.3] +# + + +# +# These last three variables are available also as environment variables: +# +# BOOST_ROOT or BOOSTROOT The preferred installation prefix for searching for +# Boost. Set this if the module has problems finding +# the proper Boost installation. To prevent falling +# back on the system paths, set Boost_NO_SYSTEM_PATHS +# to true. +# +# BOOST_INCLUDEDIR Set this to the include directory of Boost, if the +# module has problems finding the proper Boost installation +# +# BOOST_LIBRARYDIR Set this to the lib directory of Boost, if the +# module has problems finding the proper Boost installation +# +# Variables defined by this module: +# +# Boost_FOUND System has Boost, this means the include dir was +# found, as well as all the libraries specified in +# the COMPONENTS list. +# +# Boost_INCLUDE_DIRS Boost include directories: not cached +# +# Boost_INCLUDE_DIR This is almost the same as above, but this one is +# cached and may be modified by advanced users +# +# Boost_LIBRARIES Link to these to use the Boost libraries that you +# specified: not cached +# +# Boost_LIBRARY_DIRS The path to where the Boost library files are. +# +# Boost_VERSION The version number of the boost libraries that +# have been found, same as in version.hpp from Boost +# +# Boost_LIB_VERSION The version number in filename form as +# it's appended to the library filenames +# +# Boost_MAJOR_VERSION major version number of boost +# Boost_MINOR_VERSION minor version number of boost +# Boost_SUBMINOR_VERSION subminor version number of boost +# +# Boost_LIB_DIAGNOSTIC_DEFINITIONS [WIN32 Only] You can call +# add_definitions(${Boost_LIB_DIAGNOSTIC_DEFINITIONS}) +# to have diagnostic information about Boost's +# automatic linking outputted during compilation time. +# +# For each component you specify in find_package(), the following (UPPER-CASE) +# variables are set. You can use these variables if you would like to pick and +# choose components for your targets instead of just using Boost_LIBRARIES. +# +# Boost_${COMPONENT}_FOUND True IF the Boost library "component" was found. +# +# Boost_${COMPONENT}_LIBRARY Contains the libraries for the specified Boost +# "component" (includes debug and optimized keywords +# when needed). + +#============================================================================= +# Copyright 2006-2009 Kitware, Inc. +# Copyright 2006-2008 Andreas Schneider <mail@cynapses.org> +# Copyright 2007 Wengo +# Copyright 2007 Mike Jackson +# Copyright 2008 Andreas Pakulat <apaku@gmx.de> +# Copyright 2008-2010 Philip Lowman <philip@yhbt.com> +# +# 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. +#============================================================================= + +#------------------------------------------------------------------------------- +# FindBoost functions & macros +# +############################################ +# +# Check the existence of the libraries. +# +############################################ +# This macro was taken directly from the FindQt4.cmake file that is included +# with the CMake distribution. This is NOT my work. All work was done by the +# original authors of the FindQt4.cmake file. Only minor modifications were +# made to remove references to Qt and make this file more generally applicable +# And ELSE/ENDIF pairs were removed for readability. +######################################################################### + +MACRO (_Boost_ADJUST_LIB_VARS basename) + IF (Boost_INCLUDE_DIR ) + IF (Boost_${basename}_LIBRARY_DEBUG AND Boost_${basename}_LIBRARY_RELEASE) + # if the generator supports configuration types then set + # optimized and debug libraries, or if the CMAKE_BUILD_TYPE has a value + IF (CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE) + SET(Boost_${basename}_LIBRARY optimized ${Boost_${basename}_LIBRARY_RELEASE} debug ${Boost_${basename}_LIBRARY_DEBUG}) + ELSE() + # if there are no configuration types and CMAKE_BUILD_TYPE has no value + # then just use the release libraries + SET(Boost_${basename}_LIBRARY ${Boost_${basename}_LIBRARY_RELEASE} ) + ENDIF() + # FIXME: This probably should be set for both cases + SET(Boost_${basename}_LIBRARIES optimized ${Boost_${basename}_LIBRARY_RELEASE} debug ${Boost_${basename}_LIBRARY_DEBUG}) + ENDIF() + + # if only the release version was found, set the debug variable also to the release version + IF (Boost_${basename}_LIBRARY_RELEASE AND NOT Boost_${basename}_LIBRARY_DEBUG) + SET(Boost_${basename}_LIBRARY_DEBUG ${Boost_${basename}_LIBRARY_RELEASE}) + SET(Boost_${basename}_LIBRARY ${Boost_${basename}_LIBRARY_RELEASE}) + SET(Boost_${basename}_LIBRARIES ${Boost_${basename}_LIBRARY_RELEASE}) + ENDIF() + + # if only the debug version was found, set the release variable also to the debug version + IF (Boost_${basename}_LIBRARY_DEBUG AND NOT Boost_${basename}_LIBRARY_RELEASE) + SET(Boost_${basename}_LIBRARY_RELEASE ${Boost_${basename}_LIBRARY_DEBUG}) + SET(Boost_${basename}_LIBRARY ${Boost_${basename}_LIBRARY_DEBUG}) + SET(Boost_${basename}_LIBRARIES ${Boost_${basename}_LIBRARY_DEBUG}) + ENDIF() + + IF (Boost_${basename}_LIBRARY) + set(Boost_${basename}_LIBRARY ${Boost_${basename}_LIBRARY} CACHE FILEPATH "The Boost ${basename} library") + + # Remove superfluous "debug" / "optimized" keywords from + # Boost_LIBRARY_DIRS + FOREACH(_boost_my_lib ${Boost_${basename}_LIBRARY}) + GET_FILENAME_COMPONENT(_boost_my_lib_path "${_boost_my_lib}" PATH) + LIST(APPEND Boost_LIBRARY_DIRS ${_boost_my_lib_path}) + ENDFOREACH() + LIST(REMOVE_DUPLICATES Boost_LIBRARY_DIRS) + + set(Boost_LIBRARY_DIRS ${Boost_LIBRARY_DIRS} CACHE FILEPATH "Boost library directory") + SET(Boost_${basename}_FOUND ON CACHE INTERNAL "Whether the Boost ${basename} library found") + ENDIF(Boost_${basename}_LIBRARY) + + ENDIF (Boost_INCLUDE_DIR ) + # Make variables changeble to the advanced user + MARK_AS_ADVANCED( + Boost_${basename}_LIBRARY + Boost_${basename}_LIBRARY_RELEASE + Boost_${basename}_LIBRARY_DEBUG + ) +ENDMACRO (_Boost_ADJUST_LIB_VARS) + +#------------------------------------------------------------------------------- + +# +# Runs compiler with "-dumpversion" and parses major/minor +# version with a regex. +# +FUNCTION(_Boost_COMPILER_DUMPVERSION _OUTPUT_VERSION) + + EXEC_PROGRAM(${CMAKE_CXX_COMPILER} + ARGS ${CMAKE_CXX_COMPILER_ARG1} -dumpversion + OUTPUT_VARIABLE _boost_COMPILER_VERSION + ) + STRING(REGEX REPLACE "([0-9])\\.([0-9])(\\.[0-9])?" "\\1\\2" + _boost_COMPILER_VERSION ${_boost_COMPILER_VERSION}) + + SET(${_OUTPUT_VERSION} ${_boost_COMPILER_VERSION} PARENT_SCOPE) +ENDFUNCTION() + +# +# A convenience function for marking desired components +# as found or not +# +function(_Boost_MARK_COMPONENTS_FOUND _yes_or_no) + foreach(COMPONENT ${Boost_FIND_COMPONENTS}) + string(TOUPPER ${COMPONENT} UPPERCOMPONENT) + set(Boost_${UPPERCOMPONENT}_FOUND ${_yes_or_no} CACHE INTERNAL "Whether the Boost ${COMPONENT} library found" FORCE) + endforeach() +endfunction() + +# +# Take a list of libraries with "thread" in it +# and prepend duplicates with "thread_${Boost_THREADAPI}" +# at the front of the list +# +function(_Boost_PREPEND_LIST_WITH_THREADAPI _output) + set(_orig_libnames ${ARGN}) + string(REPLACE "thread" "thread_${Boost_THREADAPI}" _threadapi_libnames ${_orig_libnames}) + set(${_output} ${_threadapi_libnames} ${_orig_libnames} PARENT_SCOPE) +endfunction() + +# +# If a library is found, replace its cache entry with its REALPATH +# +function(_Boost_SWAP_WITH_REALPATH _library _docstring) + if(${_library}) + get_filename_component(_boost_filepathreal ${${_library}} REALPATH) + unset(${_library} CACHE) + set(${_library} ${_boost_filepathreal} CACHE FILEPATH "${_docstring}") + endif() +endfunction() + +# +# End functions/macros +# +#------------------------------------------------------------------------------- + + + + +IF(NOT DEFINED Boost_USE_MULTITHREADED) + SET(Boost_USE_MULTITHREADED TRUE) +ENDIF() + +if(Boost_FIND_VERSION_EXACT) + # The version may appear in a directory with or without the patch + # level, even when the patch level is non-zero. + set(_boost_TEST_VERSIONS + "${Boost_FIND_VERSION_MAJOR}.${Boost_FIND_VERSION_MINOR}.${Boost_FIND_VERSION_PATCH}" + "${Boost_FIND_VERSION_MAJOR}.${Boost_FIND_VERSION_MINOR}") +else(Boost_FIND_VERSION_EXACT) + # The user has not requested an exact version. Among known + # versions, find those that are acceptable to the user request. + set(_Boost_KNOWN_VERSIONS ${Boost_ADDITIONAL_VERSIONS} + "1.46.0" "1.46" "1.45.0" "1.45" "1.44.0" "1.44" "1.43.0" "1.43" "1.42.0" "1.42" + "1.41.0" "1.41" "1.40.0" "1.40" "1.39.0" "1.39" "1.38.0" "1.38" "1.37.0" "1.37" + "1.36.1" "1.36.0" "1.36" "1.35.1" "1.35.0" "1.35" "1.34.1" "1.34.0" + "1.34" "1.33.1" "1.33.0" "1.33") + set(_boost_TEST_VERSIONS) + if(Boost_FIND_VERSION) + set(_Boost_FIND_VERSION_SHORT "${Boost_FIND_VERSION_MAJOR}.${Boost_FIND_VERSION_MINOR}") + # Select acceptable versions. + foreach(version ${_Boost_KNOWN_VERSIONS}) + if(NOT "${version}" VERSION_LESS "${Boost_FIND_VERSION}") + # This version is high enough. + list(APPEND _boost_TEST_VERSIONS "${version}") + elseif("${version}.99" VERSION_EQUAL "${_Boost_FIND_VERSION_SHORT}.99") + # This version is a short-form for the requested version with + # the patch level dropped. + list(APPEND _boost_TEST_VERSIONS "${version}") + endif() + endforeach(version) + else(Boost_FIND_VERSION) + # Any version is acceptable. + set(_boost_TEST_VERSIONS "${_Boost_KNOWN_VERSIONS}") + endif(Boost_FIND_VERSION) +endif(Boost_FIND_VERSION_EXACT) + +# The reason that we failed to find Boost. This will be set to a +# user-friendly message when we fail to find some necessary piece of +# Boost. +set(Boost_ERROR_REASON) + +SET( _boost_IN_CACHE TRUE) +IF(Boost_INCLUDE_DIR) + + # On versions < 1.35, remove the System library from the considered list + # since it wasn't added until 1.35. + if(Boost_VERSION AND Boost_FIND_COMPONENTS) + if(Boost_VERSION LESS 103500) + list(REMOVE_ITEM Boost_FIND_COMPONENTS system) + endif() + endif() + + FOREACH(COMPONENT ${Boost_FIND_COMPONENTS}) + STRING(TOUPPER ${COMPONENT} COMPONENT) + IF(NOT Boost_${COMPONENT}_FOUND) + SET( _boost_IN_CACHE FALSE) + ENDIF(NOT Boost_${COMPONENT}_FOUND) + ENDFOREACH(COMPONENT) +ELSE(Boost_INCLUDE_DIR) + SET( _boost_IN_CACHE FALSE) +ENDIF(Boost_INCLUDE_DIR) + +IF (_boost_IN_CACHE) + # in cache already + SET(Boost_FOUND TRUE) + FOREACH(COMPONENT ${Boost_FIND_COMPONENTS}) + STRING(TOUPPER ${COMPONENT} COMPONENT) + _Boost_ADJUST_LIB_VARS( ${COMPONENT} ) + SET(Boost_LIBRARIES ${Boost_LIBRARIES} ${Boost_${COMPONENT}_LIBRARY}) + ENDFOREACH(COMPONENT) + SET(Boost_INCLUDE_DIRS ${Boost_INCLUDE_DIR}) + IF(Boost_VERSION AND NOT "${Boost_VERSION}" STREQUAL "0") + MATH(EXPR Boost_MAJOR_VERSION "${Boost_VERSION} / 100000") + MATH(EXPR Boost_MINOR_VERSION "${Boost_VERSION} / 100 % 1000") + MATH(EXPR Boost_SUBMINOR_VERSION "${Boost_VERSION} % 100") + ENDIF(Boost_VERSION AND NOT "${Boost_VERSION}" STREQUAL "0") + if(Boost_DEBUG) + message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] " + "boost ${Boost_MAJOR_VERSION}.${Boost_MINOR_VERSION}.${Boost_SUBMINOR_VERSION} " + "is already in the cache. To view debugging messages, please clear the cache.") + endif() +ELSE (_boost_IN_CACHE) + # Need to search for boost + if(Boost_DEBUG) + message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] " + "Boost not in cache") + # Output some of their choices + message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] " + "_boost_TEST_VERSIONS = ${_boost_TEST_VERSIONS}") + message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] " + "Boost_USE_MULTITHREADED = ${Boost_USE_MULTITHREADED}") + message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] " + "Boost_USE_STATIC_LIBS = ${Boost_USE_STATIC_LIBS}") + message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] " + "Boost_USE_STATIC_RUNTIME = ${Boost_USE_STATIC_RUNTIME}") + message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] " + "Boost_ADDITIONAL_VERSIONS = ${Boost_ADDITIONAL_VERSIONS}") + message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] " + "Boost_NO_SYSTEM_PATHS = ${Boost_NO_SYSTEM_PATHS}") + endif() + + IF(WIN32) + # In windows, automatic linking is performed, so you do not have + # to specify the libraries. If you are linking to a dynamic + # runtime, then you can choose to link to either a static or a + # dynamic Boost library, the default is to do a static link. You + # can alter this for a specific library "whatever" by defining + # BOOST_WHATEVER_DYN_LINK to force Boost library "whatever" to be + # linked dynamically. Alternatively you can force all Boost + # libraries to dynamic link by defining BOOST_ALL_DYN_LINK. + + # This feature can be disabled for Boost library "whatever" by + # defining BOOST_WHATEVER_NO_LIB, or for all of Boost by defining + # BOOST_ALL_NO_LIB. + + # If you want to observe which libraries are being linked against + # then defining BOOST_LIB_DIAGNOSTIC will cause the auto-linking + # code to emit a #pragma message each time a library is selected + # for linking. + SET(Boost_LIB_DIAGNOSTIC_DEFINITIONS + "-DBOOST_LIB_DIAGNOSTIC" CACHE STRING "Boost diagnostic define") + ENDIF(WIN32) + + set(_boost_INCLUDE_SEARCH_DIRS_SYSTEM + C:/boost/include + C:/boost + "$ENV{ProgramFiles}/boost/include" + "$ENV{ProgramFiles}/boost" + /sw/local/include + ) + + # If Boost_ROOT was defined, gently correct the user + if(Boost_ROOT) + message("WARNING: Boost_ROOT was set which is incorrect and is being ignored. " + "You need to use BOOST_ROOT instead. " + "Also, we suggest setting Boost_NO_SYSTEM_PATHS.") + endif() + + # If BOOST_ROOT was defined in the environment, use it. + if (NOT BOOST_ROOT AND NOT $ENV{BOOST_ROOT} STREQUAL "") + set(BOOST_ROOT $ENV{BOOST_ROOT}) + endif(NOT BOOST_ROOT AND NOT $ENV{BOOST_ROOT} STREQUAL "") + + # If BOOSTROOT was defined in the environment, use it. + if (NOT BOOST_ROOT AND NOT $ENV{BOOSTROOT} STREQUAL "") + set(BOOST_ROOT $ENV{BOOSTROOT}) + endif(NOT BOOST_ROOT AND NOT $ENV{BOOSTROOT} STREQUAL "") + + # If BOOST_INCLUDEDIR was defined in the environment, use it. + IF( NOT $ENV{BOOST_INCLUDEDIR} STREQUAL "" ) + set(BOOST_INCLUDEDIR $ENV{BOOST_INCLUDEDIR}) + ENDIF( NOT $ENV{BOOST_INCLUDEDIR} STREQUAL "" ) + + # If BOOST_LIBRARYDIR was defined in the environment, use it. + IF( NOT $ENV{BOOST_LIBRARYDIR} STREQUAL "" ) + set(BOOST_LIBRARYDIR $ENV{BOOST_LIBRARYDIR}) + ENDIF( NOT $ENV{BOOST_LIBRARYDIR} STREQUAL "" ) + + IF( BOOST_ROOT ) + file(TO_CMAKE_PATH ${BOOST_ROOT} BOOST_ROOT) + ENDIF( BOOST_ROOT ) + + if(Boost_DEBUG) + message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] " + "Declared as CMake or Environmental Variables:") + message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] " + " BOOST_ROOT = ${BOOST_ROOT}") + message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] " + " BOOST_INCLUDEDIR = ${BOOST_INCLUDEDIR}") + message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] " + " BOOST_LIBRARYDIR = ${BOOST_LIBRARYDIR}") + message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] " + "_boost_TEST_VERSIONS = ${_boost_TEST_VERSIONS}") + endif() + + if( Boost_NO_SYSTEM_PATHS) + set(_boost_FIND_OPTIONS NO_CMAKE_SYSTEM_PATH) + else() + set(_boost_INCLUDE_SEARCH_DIRS ${_boost_INCLUDE_SEARCH_DIRS_SYSTEM}) + endif() + + if( BOOST_ROOT ) + set(_boost_INCLUDE_SEARCH_DIRS + ${BOOST_ROOT}/include + ${BOOST_ROOT} + ${_boost_INCLUDE_SEARCH_DIRS}) + endif() + + # prepend BOOST_INCLUDEDIR to search path if specified + if( BOOST_INCLUDEDIR ) + file(TO_CMAKE_PATH ${BOOST_INCLUDEDIR} BOOST_INCLUDEDIR) + set(_boost_INCLUDE_SEARCH_DIRS + ${BOOST_INCLUDEDIR} ${_boost_INCLUDE_SEARCH_DIRS}) + endif( BOOST_INCLUDEDIR ) + + # ------------------------------------------------------------------------ + # Search for Boost include DIR + # ------------------------------------------------------------------------ + # Try to find Boost by stepping backwards through the Boost versions + # we know about. + IF( NOT Boost_INCLUDE_DIR ) + # Build a list of path suffixes for each version. + SET(_boost_PATH_SUFFIXES) + FOREACH(_boost_VER ${_boost_TEST_VERSIONS}) + # Add in a path suffix, based on the required version, ideally + # we could read this from version.hpp, but for that to work we'd + # need to know the include dir already + set(_boost_BOOSTIFIED_VERSION) + + # Transform 1.35 => 1_35 and 1.36.0 => 1_36_0 + IF(_boost_VER MATCHES "[0-9]+\\.[0-9]+\\.[0-9]+") + STRING(REGEX REPLACE "([0-9]+)\\.([0-9]+)\\.([0-9]+)" "\\1_\\2_\\3" + _boost_BOOSTIFIED_VERSION ${_boost_VER}) + ELSEIF(_boost_VER MATCHES "[0-9]+\\.[0-9]+") + STRING(REGEX REPLACE "([0-9]+)\\.([0-9]+)" "\\1_\\2" + _boost_BOOSTIFIED_VERSION ${_boost_VER}) + ENDIF() + + list(APPEND _boost_PATH_SUFFIXES "boost-${_boost_BOOSTIFIED_VERSION}") + list(APPEND _boost_PATH_SUFFIXES "boost_${_boost_BOOSTIFIED_VERSION}") + + ENDFOREACH(_boost_VER) + + if(Boost_DEBUG) + message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] " + "Include debugging info:") + message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] " + " _boost_INCLUDE_SEARCH_DIRS = ${_boost_INCLUDE_SEARCH_DIRS}") + message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] " + " _boost_PATH_SUFFIXES = ${_boost_PATH_SUFFIXES}") + endif() + + # Look for a standard boost header file. + FIND_PATH(Boost_INCLUDE_DIR + NAMES boost/config.hpp + HINTS ${_boost_INCLUDE_SEARCH_DIRS} + PATH_SUFFIXES ${_boost_PATH_SUFFIXES} + ${_boost_FIND_OPTIONS} + ) + ENDIF( NOT Boost_INCLUDE_DIR ) + + # ------------------------------------------------------------------------ + # Extract version information from version.hpp + # ------------------------------------------------------------------------ + + IF(Boost_INCLUDE_DIR) + # Extract Boost_VERSION and Boost_LIB_VERSION from version.hpp + # Read the whole file: + # + SET(BOOST_VERSION 0) + SET(BOOST_LIB_VERSION "") + FILE(READ "${Boost_INCLUDE_DIR}/boost/version.hpp" _boost_VERSION_HPP_CONTENTS) + if(Boost_DEBUG) + message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] " + "location of version.hpp: ${Boost_INCLUDE_DIR}/boost/version.hpp") + endif() + + STRING(REGEX REPLACE ".*#define BOOST_VERSION ([0-9]+).*" "\\1" Boost_VERSION "${_boost_VERSION_HPP_CONTENTS}") + STRING(REGEX REPLACE ".*#define BOOST_LIB_VERSION \"([0-9_]+)\".*" "\\1" Boost_LIB_VERSION "${_boost_VERSION_HPP_CONTENTS}") + + SET(Boost_LIB_VERSION ${Boost_LIB_VERSION} CACHE INTERNAL "The library version string for boost libraries") + SET(Boost_VERSION ${Boost_VERSION} CACHE INTERNAL "The version number for boost libraries") + + IF(NOT "${Boost_VERSION}" STREQUAL "0") + MATH(EXPR Boost_MAJOR_VERSION "${Boost_VERSION} / 100000") + MATH(EXPR Boost_MINOR_VERSION "${Boost_VERSION} / 100 % 1000") + MATH(EXPR Boost_SUBMINOR_VERSION "${Boost_VERSION} % 100") + + set(Boost_ERROR_REASON + "${Boost_ERROR_REASON}Boost version: ${Boost_MAJOR_VERSION}.${Boost_MINOR_VERSION}.${Boost_SUBMINOR_VERSION}\nBoost include path: ${Boost_INCLUDE_DIR}") + ENDIF(NOT "${Boost_VERSION}" STREQUAL "0") + if(Boost_DEBUG) + message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] " + "version.hpp reveals boost " + "${Boost_MAJOR_VERSION}.${Boost_MINOR_VERSION}.${Boost_SUBMINOR_VERSION}") + endif() + ELSE(Boost_INCLUDE_DIR) + set(Boost_ERROR_REASON + "${Boost_ERROR_REASON}Unable to find the Boost header files. Please set BOOST_ROOT to the root directory containing Boost or BOOST_INCLUDEDIR to the directory containing Boost's headers.") + ENDIF(Boost_INCLUDE_DIR) + + # ------------------------------------------------------------------------ + # Suffix initialization and compiler suffix detection. + # ------------------------------------------------------------------------ + + # Setting some more suffixes for the library + SET (Boost_LIB_PREFIX "") + if ( WIN32 AND Boost_USE_STATIC_LIBS AND NOT CYGWIN) + SET (Boost_LIB_PREFIX "lib") + endif() + + if (Boost_COMPILER) + set(_boost_COMPILER ${Boost_COMPILER}) + if(Boost_DEBUG) + message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] " + "using user-specified Boost_COMPILER = ${_boost_COMPILER}") + endif() + else(Boost_COMPILER) + # Attempt to guess the compiler suffix + # NOTE: this is not perfect yet, if you experience any issues + # please report them and use the Boost_COMPILER variable + # to work around the problems. + if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Intel" + OR "${CMAKE_CXX_COMPILER}" MATCHES "icl" + OR "${CMAKE_CXX_COMPILER}" MATCHES "icpc") + if(WIN32) + set (_boost_COMPILER "-iw") + else() + set (_boost_COMPILER "-il") + endif() + elseif (MSVC90) + SET (_boost_COMPILER "-vc90") + elseif (MSVC10) + SET (_boost_COMPILER "-vc100") + elseif (MSVC80) + SET (_boost_COMPILER "-vc80") + elseif (MSVC71) + SET (_boost_COMPILER "-vc71") + elseif (MSVC70) # Good luck! + SET (_boost_COMPILER "-vc7") # yes, this is correct + elseif (MSVC60) # Good luck! + SET (_boost_COMPILER "-vc6") # yes, this is correct + elseif (BORLAND) + SET (_boost_COMPILER "-bcb") + elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "SunPro") + set(_boost_COMPILER "-sw") + elseif (MINGW) + if(${Boost_MAJOR_VERSION}.${Boost_MINOR_VERSION} VERSION_LESS 1.34) + SET(_boost_COMPILER "-mgw") # no GCC version encoding prior to 1.34 + else() + _Boost_COMPILER_DUMPVERSION(_boost_COMPILER_VERSION) + SET (_boost_COMPILER "-mgw${_boost_COMPILER_VERSION}") + endif() + elseif (UNIX) + if (CMAKE_COMPILER_IS_GNUCXX) + if(${Boost_MAJOR_VERSION}.${Boost_MINOR_VERSION} VERSION_LESS 1.34) + SET(_boost_COMPILER "-gcc") # no GCC version encoding prior to 1.34 + else() + _Boost_COMPILER_DUMPVERSION(_boost_COMPILER_VERSION) + # Determine which version of GCC we have. + IF(APPLE) + IF(Boost_MINOR_VERSION) + IF(${Boost_MINOR_VERSION} GREATER 35) + # In Boost 1.36.0 and newer, the mangled compiler name used + # on Mac OS X/Darwin is "xgcc". + SET(_boost_COMPILER "-xgcc${_boost_COMPILER_VERSION}") + ELSE(${Boost_MINOR_VERSION} GREATER 35) + # In Boost <= 1.35.0, there is no mangled compiler name for + # the Mac OS X/Darwin version of GCC. + SET(_boost_COMPILER "") + ENDIF(${Boost_MINOR_VERSION} GREATER 35) + ELSE(Boost_MINOR_VERSION) + # We don't know the Boost version, so assume it's + # pre-1.36.0. + SET(_boost_COMPILER "") + ENDIF(Boost_MINOR_VERSION) + ELSE() + SET (_boost_COMPILER "-gcc${_boost_COMPILER_VERSION}") + ENDIF() + endif() + endif (CMAKE_COMPILER_IS_GNUCXX) + endif() + if(Boost_DEBUG) + message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] " + "guessed _boost_COMPILER = ${_boost_COMPILER}") + endif() + endif(Boost_COMPILER) + + set (_boost_MULTITHREADED "-mt") + if( NOT Boost_USE_MULTITHREADED ) + set (_boost_MULTITHREADED "") + endif() + if(Boost_DEBUG) + message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] " + "_boost_MULTITHREADED = ${_boost_MULTITHREADED}") + endif() + + #====================== + # Systematically build up the Boost ABI tag + # http://boost.org/doc/libs/1_41_0/more/getting_started/windows.html#library-naming + set( _boost_RELEASE_ABI_TAG "-") + set( _boost_DEBUG_ABI_TAG "-") + # Key Use this library when: + # s linking statically to the C++ standard library and + # compiler runtime support libraries. + if(Boost_USE_STATIC_RUNTIME) + set( _boost_RELEASE_ABI_TAG "${_boost_RELEASE_ABI_TAG}s") + set( _boost_DEBUG_ABI_TAG "${_boost_DEBUG_ABI_TAG}s") + endif() + # g using debug versions of the standard and runtime + # support libraries + if(WIN32) + if(MSVC OR "${CMAKE_CXX_COMPILER}" MATCHES "icl" + OR "${CMAKE_CXX_COMPILER}" MATCHES "icpc") + set(_boost_DEBUG_ABI_TAG "${_boost_DEBUG_ABI_TAG}g") + endif() + endif() + # y using special debug build of python + if(Boost_USE_DEBUG_PYTHON) + set(_boost_DEBUG_ABI_TAG "${_boost_DEBUG_ABI_TAG}y") + endif() + # d using a debug version of your code + set(_boost_DEBUG_ABI_TAG "${_boost_DEBUG_ABI_TAG}d") + # p using the STLport standard library rather than the + # default one supplied with your compiler + if(Boost_USE_STLPORT) + set( _boost_RELEASE_ABI_TAG "${_boost_RELEASE_ABI_TAG}p") + set( _boost_DEBUG_ABI_TAG "${_boost_DEBUG_ABI_TAG}p") + endif() + # n using the STLport deprecated "native iostreams" feature + if(Boost_USE_STLPORT_DEPRECATED_NATIVE_IOSTREAMS) + set( _boost_RELEASE_ABI_TAG "${_boost_RELEASE_ABI_TAG}n") + set( _boost_DEBUG_ABI_TAG "${_boost_DEBUG_ABI_TAG}n") + endif() + + if(Boost_DEBUG) + message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] " + "_boost_RELEASE_ABI_TAG = ${_boost_RELEASE_ABI_TAG}") + message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] " + "_boost_DEBUG_ABI_TAG = ${_boost_DEBUG_ABI_TAG}") + endif() + + # ------------------------------------------------------------------------ + # Begin finding boost libraries + # ------------------------------------------------------------------------ + + if(BOOST_ROOT) + set(_boost_LIBRARY_SEARCH_DIRS_ALWAYS + ${BOOST_ROOT}/lib + ${BOOST_ROOT}/stage/lib) + endif() + set(_boost_LIBRARY_SEARCH_DIRS_ALWAYS + ${_boost_LIBRARY_SEARCH_DIRS_ALWAYS} + ${Boost_INCLUDE_DIR}/lib + ${Boost_INCLUDE_DIR}/../lib + ${Boost_INCLUDE_DIR}/stage/lib + ) + set(_boost_LIBRARY_SEARCH_DIRS_SYSTEM + C:/boost/lib + C:/boost + "$ENV{ProgramFiles}/boost/boost_${Boost_MAJOR_VERSION}_${Boost_MINOR_VERSION}_${Boost_SUBMINOR_VERSION}/lib" + "$ENV{ProgramFiles}/boost/boost_${Boost_MAJOR_VERSION}_${Boost_MINOR_VERSION}/lib" + "$ENV{ProgramFiles}/boost/lib" + "$ENV{ProgramFiles}/boost" + /sw/local/lib + ) + set(_boost_LIBRARY_SEARCH_DIRS ${_boost_LIBRARY_SEARCH_DIRS_ALWAYS}) + if( Boost_NO_SYSTEM_PATHS ) + set(_boost_FIND_OPTIONS NO_CMAKE_SYSTEM_PATH) + else() + list(APPEND _boost_LIBRARY_SEARCH_DIRS ${_boost_LIBRARY_SEARCH_DIRS_SYSTEM}) + endif() + + # prepend BOOST_LIBRARYDIR to search path if specified + if( BOOST_LIBRARYDIR ) + file(TO_CMAKE_PATH ${BOOST_LIBRARYDIR} BOOST_LIBRARYDIR) + set(_boost_LIBRARY_SEARCH_DIRS + ${BOOST_LIBRARYDIR} ${_boost_LIBRARY_SEARCH_DIRS}) + endif() + + if(Boost_DEBUG) + message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] " + "_boost_LIBRARY_SEARCH_DIRS = ${_boost_LIBRARY_SEARCH_DIRS}") + endif() + + # Support preference of static libs by adjusting CMAKE_FIND_LIBRARY_SUFFIXES + if( Boost_USE_STATIC_LIBS ) + set( _boost_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES}) + if(WIN32) + set(CMAKE_FIND_LIBRARY_SUFFIXES .lib .a ${CMAKE_FIND_LIBRARY_SUFFIXES}) + else() + set(CMAKE_FIND_LIBRARY_SUFFIXES .a ) + endif() + endif() + + # We want to use the tag inline below without risking double dashes + if(_boost_RELEASE_ABI_TAG) + if(${_boost_RELEASE_ABI_TAG} STREQUAL "-") + set(_boost_RELEASE_ABI_TAG "") + endif() + endif() + if(_boost_DEBUG_ABI_TAG) + if(${_boost_DEBUG_ABI_TAG} STREQUAL "-") + set(_boost_DEBUG_ABI_TAG "") + endif() + endif() + + # The previous behavior of FindBoost when Boost_USE_STATIC_LIBS was enabled + # on WIN32 was to: + # 1. Search for static libs compiled against a SHARED C++ standard runtime library (use if found) + # 2. Search for static libs compiled against a STATIC C++ standard runtime library (use if found) + # We maintain this behavior since changing it could break people's builds. + # To disable the ambiguous behavior, the user need only + # set Boost_USE_STATIC_RUNTIME either ON or OFF. + set(_boost_STATIC_RUNTIME_WORKAROUND false) + if(WIN32 AND Boost_USE_STATIC_LIBS) + if(NOT DEFINED Boost_USE_STATIC_RUNTIME) + set(_boost_STATIC_RUNTIME_WORKAROUND true) + endif() + endif() + + + foreach(COMPONENT ${Boost_FIND_COMPONENTS}) + string(TOUPPER ${COMPONENT} UPPERCOMPONENT) + set( Boost_${UPPERCOMPONENT}_LIBRARY "Boost_${UPPERCOMPONENT}_LIBRARY-NOTFOUND" ) + set( Boost_${UPPERCOMPONENT}_LIBRARY_RELEASE "Boost_${UPPERCOMPONENT}_LIBRARY_RELEASE-NOTFOUND" ) + set( Boost_${UPPERCOMPONENT}_LIBRARY_DEBUG "Boost_${UPPERCOMPONENT}_LIBRARY_DEBUG-NOTFOUND") + + set( _boost_docstring_release "Boost ${COMPONENT} library (release)") + set( _boost_docstring_debug "Boost ${COMPONENT} library (debug)") + + # + # Find RELEASE libraries + # + set(_boost_RELEASE_NAMES + ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_COMPILER}${_boost_MULTITHREADED}${_boost_RELEASE_ABI_TAG}-${Boost_LIB_VERSION} + ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_COMPILER}${_boost_MULTITHREADED}${_boost_RELEASE_ABI_TAG} + ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}${_boost_RELEASE_ABI_TAG}-${Boost_LIB_VERSION} + ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}${_boost_RELEASE_ABI_TAG} + ${Boost_LIB_PREFIX}boost_${COMPONENT} ) + if(_boost_STATIC_RUNTIME_WORKAROUND) + set(_boost_RELEASE_STATIC_ABI_TAG "-s${_boost_RELEASE_ABI_TAG}") + list(APPEND _boost_RELEASE_NAMES + ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_COMPILER}${_boost_MULTITHREADED}${_boost_RELEASE_STATIC_ABI_TAG}-${Boost_LIB_VERSION} + ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_COMPILER}${_boost_MULTITHREADED}${_boost_RELEASE_STATIC_ABI_TAG} + ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}${_boost_RELEASE_STATIC_ABI_TAG}-${Boost_LIB_VERSION} + ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}${_boost_RELEASE_STATIC_ABI_TAG} ) + endif() + if(Boost_THREADAPI AND ${COMPONENT} STREQUAL "thread") + _Boost_PREPEND_LIST_WITH_THREADAPI(_boost_RELEASE_NAMES ${_boost_RELEASE_NAMES}) + endif() + if(Boost_DEBUG) + message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] " + "Searching for ${UPPERCOMPONENT}_LIBRARY_RELEASE: ${_boost_RELEASE_NAMES}") + endif() + find_library(Boost_${UPPERCOMPONENT}_LIBRARY_RELEASE + NAMES ${_boost_RELEASE_NAMES} + HINTS ${_boost_LIBRARY_SEARCH_DIRS} + ${_boost_FIND_OPTIONS} + DOC "${_boost_docstring_release}" + ) + + # + # Find DEBUG libraries + # + set(_boost_DEBUG_NAMES + ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_COMPILER}${_boost_MULTITHREADED}${_boost_DEBUG_ABI_TAG}-${Boost_LIB_VERSION} + ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_COMPILER}${_boost_MULTITHREADED}${_boost_DEBUG_ABI_TAG} + ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}${_boost_DEBUG_ABI_TAG}-${Boost_LIB_VERSION} + ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}${_boost_DEBUG_ABI_TAG} + ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED} + ${Boost_LIB_PREFIX}boost_${COMPONENT} ) + if(_boost_STATIC_RUNTIME_WORKAROUND) + set(_boost_DEBUG_STATIC_ABI_TAG "-s${_boost_DEBUG_ABI_TAG}") + list(APPEND _boost_DEBUG_NAMES + ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_COMPILER}${_boost_MULTITHREADED}${_boost_DEBUG_STATIC_ABI_TAG}-${Boost_LIB_VERSION} + ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_COMPILER}${_boost_MULTITHREADED}${_boost_DEBUG_STATIC_ABI_TAG} + ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}${_boost_DEBUG_STATIC_ABI_TAG}-${Boost_LIB_VERSION} + ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}${_boost_DEBUG_STATIC_ABI_TAG} ) + endif() + if(Boost_THREADAPI AND ${COMPONENT} STREQUAL "thread") + _Boost_PREPEND_LIST_WITH_THREADAPI(_boost_DEBUG_NAMES ${_boost_DEBUG_NAMES}) + endif() + if(Boost_DEBUG) + message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] " + "Searching for ${UPPERCOMPONENT}_LIBRARY_DEBUG: ${_boost_DEBUG_NAMES}") + endif() + find_library(Boost_${UPPERCOMPONENT}_LIBRARY_DEBUG + NAMES ${_boost_DEBUG_NAMES} + HINTS ${_boost_LIBRARY_SEARCH_DIRS} + ${_boost_FIND_OPTIONS} + DOC "${_boost_docstring_debug}" + ) + + if(Boost_REALPATH) + _Boost_SWAP_WITH_REALPATH(Boost_${UPPERCOMPONENT}_LIBRARY_RELEASE "${_boost_docstring_release}") + _Boost_SWAP_WITH_REALPATH(Boost_${UPPERCOMPONENT}_LIBRARY_DEBUG "${_boost_docstring_debug}" ) + endif() + + _Boost_ADJUST_LIB_VARS(${UPPERCOMPONENT}) + + endforeach(COMPONENT) + + # Restore the original find library ordering + if( Boost_USE_STATIC_LIBS ) + set(CMAKE_FIND_LIBRARY_SUFFIXES ${_boost_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES}) + endif() + # ------------------------------------------------------------------------ + # End finding boost libraries + # ------------------------------------------------------------------------ + + SET(Boost_INCLUDE_DIRS + ${Boost_INCLUDE_DIR} + ) + + SET(Boost_FOUND FALSE) + IF(Boost_INCLUDE_DIR) + SET( Boost_FOUND TRUE ) + + # Check the version of Boost against the requested version. + if (Boost_FIND_VERSION AND NOT Boost_FIND_VERSION_MINOR) + message(SEND_ERROR "When requesting a specific version of Boost, you must provide at least the major and minor version numbers, e.g., 1.34") + endif (Boost_FIND_VERSION AND NOT Boost_FIND_VERSION_MINOR) + if(Boost_MAJOR_VERSION LESS "${Boost_FIND_VERSION_MAJOR}" ) + set( Boost_FOUND FALSE ) + set(_Boost_VERSION_AGE "old") + elseif(Boost_MAJOR_VERSION EQUAL "${Boost_FIND_VERSION_MAJOR}" ) + if(Boost_MINOR_VERSION LESS "${Boost_FIND_VERSION_MINOR}" ) + set( Boost_FOUND FALSE ) + set(_Boost_VERSION_AGE "old") + elseif(Boost_MINOR_VERSION EQUAL "${Boost_FIND_VERSION_MINOR}" ) + if( Boost_FIND_VERSION_PATCH AND Boost_SUBMINOR_VERSION LESS "${Boost_FIND_VERSION_PATCH}" ) + set( Boost_FOUND FALSE ) + set(_Boost_VERSION_AGE "old") + endif( Boost_FIND_VERSION_PATCH AND Boost_SUBMINOR_VERSION LESS "${Boost_FIND_VERSION_PATCH}" ) + endif( Boost_MINOR_VERSION LESS "${Boost_FIND_VERSION_MINOR}" ) + endif( Boost_MAJOR_VERSION LESS "${Boost_FIND_VERSION_MAJOR}" ) + + if (NOT Boost_FOUND) + _Boost_MARK_COMPONENTS_FOUND(OFF) + endif() + + if (Boost_FOUND AND Boost_FIND_VERSION_EXACT) + # If the user requested an exact version of Boost, check + # that. We already know that the Boost version we have is >= the + # requested version. + set(_Boost_VERSION_AGE "new") + + # If the user didn't specify a patchlevel, it's 0. + if (NOT Boost_FIND_VERSION_PATCH) + set(Boost_FIND_VERSION_PATCH 0) + endif (NOT Boost_FIND_VERSION_PATCH) + + # We'll set Boost_FOUND true again if we have an exact version match. + set(Boost_FOUND FALSE) + _Boost_MARK_COMPONENTS_FOUND(OFF) + if(Boost_MAJOR_VERSION EQUAL "${Boost_FIND_VERSION_MAJOR}" ) + if(Boost_MINOR_VERSION EQUAL "${Boost_FIND_VERSION_MINOR}" ) + if(Boost_SUBMINOR_VERSION EQUAL "${Boost_FIND_VERSION_PATCH}" ) + set( Boost_FOUND TRUE ) + _Boost_MARK_COMPONENTS_FOUND(ON) + endif(Boost_SUBMINOR_VERSION EQUAL "${Boost_FIND_VERSION_PATCH}" ) + endif( Boost_MINOR_VERSION EQUAL "${Boost_FIND_VERSION_MINOR}" ) + endif( Boost_MAJOR_VERSION EQUAL "${Boost_FIND_VERSION_MAJOR}" ) + endif (Boost_FOUND AND Boost_FIND_VERSION_EXACT) + + if(NOT Boost_FOUND) + # State that we found a version of Boost that is too new or too old. + set(Boost_ERROR_REASON + "${Boost_ERROR_REASON}\nDetected version of Boost is too ${_Boost_VERSION_AGE}. Requested version was ${Boost_FIND_VERSION_MAJOR}.${Boost_FIND_VERSION_MINOR}") + if (Boost_FIND_VERSION_PATCH) + set(Boost_ERROR_REASON + "${Boost_ERROR_REASON}.${Boost_FIND_VERSION_PATCH}") + endif (Boost_FIND_VERSION_PATCH) + if (NOT Boost_FIND_VERSION_EXACT) + set(Boost_ERROR_REASON "${Boost_ERROR_REASON} (or newer)") + endif (NOT Boost_FIND_VERSION_EXACT) + set(Boost_ERROR_REASON "${Boost_ERROR_REASON}.") + endif (NOT Boost_FOUND) + + # Always check for missing components + set(_boost_CHECKED_COMPONENT FALSE) + set(_Boost_MISSING_COMPONENTS "") + foreach(COMPONENT ${Boost_FIND_COMPONENTS}) + string(TOUPPER ${COMPONENT} COMPONENT) + set(_boost_CHECKED_COMPONENT TRUE) + if(NOT Boost_${COMPONENT}_FOUND) + string(TOLOWER ${COMPONENT} COMPONENT) + list(APPEND _Boost_MISSING_COMPONENTS ${COMPONENT}) + set( Boost_FOUND FALSE) + endif(NOT Boost_${COMPONENT}_FOUND) + endforeach(COMPONENT) + + if(Boost_DEBUG) + message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] Boost_FOUND = ${Boost_FOUND}") + endif() + + if (_Boost_MISSING_COMPONENTS) + # We were unable to find some libraries, so generate a sensible + # error message that lists the libraries we were unable to find. + set(Boost_ERROR_REASON + "${Boost_ERROR_REASON}\nThe following Boost libraries could not be found:\n") + foreach(COMPONENT ${_Boost_MISSING_COMPONENTS}) + set(Boost_ERROR_REASON + "${Boost_ERROR_REASON} boost_${COMPONENT}\n") + endforeach(COMPONENT) + + list(LENGTH Boost_FIND_COMPONENTS Boost_NUM_COMPONENTS_WANTED) + list(LENGTH _Boost_MISSING_COMPONENTS Boost_NUM_MISSING_COMPONENTS) + if (${Boost_NUM_COMPONENTS_WANTED} EQUAL ${Boost_NUM_MISSING_COMPONENTS}) + set(Boost_ERROR_REASON + "${Boost_ERROR_REASON}No Boost libraries were found. You may need to set Boost_LIBRARYDIR to the directory containing Boost libraries or BOOST_ROOT to the location of Boost.") + else (${Boost_NUM_COMPONENTS_WANTED} EQUAL ${Boost_NUM_MISSING_COMPONENTS}) + set(Boost_ERROR_REASON + "${Boost_ERROR_REASON}Some (but not all) of the required Boost libraries were found. You may need to install these additional Boost libraries. Alternatively, set Boost_LIBRARYDIR to the directory containing Boost libraries or BOOST_ROOT to the location of Boost.") + endif (${Boost_NUM_COMPONENTS_WANTED} EQUAL ${Boost_NUM_MISSING_COMPONENTS}) + endif (_Boost_MISSING_COMPONENTS) + + IF( NOT Boost_LIBRARY_DIRS AND NOT _boost_CHECKED_COMPONENT ) + # Compatibility Code for backwards compatibility with CMake + # 2.4's FindBoost module. + + # Look for the boost library path. + # Note that the user may not have installed any libraries + # so it is quite possible the Boost_LIBRARY_PATH may not exist. + SET(_boost_LIB_DIR ${Boost_INCLUDE_DIR}) + + IF("${_boost_LIB_DIR}" MATCHES "boost-[0-9]+") + GET_FILENAME_COMPONENT(_boost_LIB_DIR ${_boost_LIB_DIR} PATH) + ENDIF ("${_boost_LIB_DIR}" MATCHES "boost-[0-9]+") + + IF("${_boost_LIB_DIR}" MATCHES "/include$") + # Strip off the trailing "/include" in the path. + GET_FILENAME_COMPONENT(_boost_LIB_DIR ${_boost_LIB_DIR} PATH) + ENDIF("${_boost_LIB_DIR}" MATCHES "/include$") + + IF(EXISTS "${_boost_LIB_DIR}/lib") + SET (_boost_LIB_DIR ${_boost_LIB_DIR}/lib) + ELSE(EXISTS "${_boost_LIB_DIR}/lib") + IF(EXISTS "${_boost_LIB_DIR}/stage/lib") + SET(_boost_LIB_DIR ${_boost_LIB_DIR}/stage/lib) + ELSE(EXISTS "${_boost_LIB_DIR}/stage/lib") + SET(_boost_LIB_DIR "") + ENDIF(EXISTS "${_boost_LIB_DIR}/stage/lib") + ENDIF(EXISTS "${_boost_LIB_DIR}/lib") + + IF(_boost_LIB_DIR AND EXISTS "${_boost_LIB_DIR}") + SET(Boost_LIBRARY_DIRS ${_boost_LIB_DIR} CACHE FILEPATH "Boost library directory") + ENDIF(_boost_LIB_DIR AND EXISTS "${_boost_LIB_DIR}") + + ENDIF( NOT Boost_LIBRARY_DIRS AND NOT _boost_CHECKED_COMPONENT ) + + ELSE(Boost_INCLUDE_DIR) + SET( Boost_FOUND FALSE) + ENDIF(Boost_INCLUDE_DIR) + + IF (Boost_FOUND) + IF (NOT Boost_FIND_QUIETLY) + MESSAGE(STATUS "Boost version: ${Boost_MAJOR_VERSION}.${Boost_MINOR_VERSION}.${Boost_SUBMINOR_VERSION}") + if(Boost_FIND_COMPONENTS) + message(STATUS "Found the following Boost libraries:") + endif() + ENDIF(NOT Boost_FIND_QUIETLY) + FOREACH ( COMPONENT ${Boost_FIND_COMPONENTS} ) + STRING( TOUPPER ${COMPONENT} UPPERCOMPONENT ) + IF ( Boost_${UPPERCOMPONENT}_FOUND ) + IF (NOT Boost_FIND_QUIETLY) + MESSAGE (STATUS " ${COMPONENT}") + ENDIF(NOT Boost_FIND_QUIETLY) + SET(Boost_LIBRARIES ${Boost_LIBRARIES} ${Boost_${UPPERCOMPONENT}_LIBRARY}) + ENDIF ( Boost_${UPPERCOMPONENT}_FOUND ) + ENDFOREACH(COMPONENT) + else() + if(Boost_FIND_REQUIRED) + message(SEND_ERROR "Unable to find the requested Boost libraries.\n${Boost_ERROR_REASON}") + else() + if(NOT Boost_FIND_QUIETLY) + # we opt not to automatically output Boost_ERROR_REASON here as + # it could be quite lengthy and somewhat imposing in it's requests + # Since Boost is not always a required dependency we'll leave this + # up to the end-user. + if(Boost_DEBUG OR Boost_DETAILED_FAILURE_MSG) + message(STATUS "Could NOT find Boost\n${Boost_ERROR_REASON}") + else() + message(STATUS "Could NOT find Boost") + endif() + endif() + endif(Boost_FIND_REQUIRED) + endif() + + # show the Boost_INCLUDE_DIRS AND Boost_LIBRARIES variables only in the advanced view + MARK_AS_ADVANCED(Boost_INCLUDE_DIR + Boost_INCLUDE_DIRS + Boost_LIBRARY_DIRS + ) +ENDIF(_boost_IN_CACHE) diff --git a/cmake/cmake-modules/cmake-3.2.0-modules/FindGit.cmake b/cmake/cmake-modules/cmake-3.2.0-modules/FindGit.cmake new file mode 100644 index 000000000..207b424bb --- /dev/null +++ b/cmake/cmake-modules/cmake-3.2.0-modules/FindGit.cmake @@ -0,0 +1,106 @@ +#.rst: +# FindGit +# ------- +# +# +# +# The module defines the following variables: +# +# :: +# +# GIT_EXECUTABLE - path to git command line client +# GIT_FOUND - true if the command line client was found +# GIT_VERSION_STRING - the version of git found (since CMake 2.8.8) +# +# Example usage: +# +# :: +# +# find_package(Git) +# if(GIT_FOUND) +# message("git found: ${GIT_EXECUTABLE}") +# endif() + +#============================================================================= +# Copyright 2010 Kitware, Inc. +# Copyright 2012 Rolf Eike Beer <eike@sf-mail.de> +# +# 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. +#============================================================================= + +# Look for 'git' or 'eg' (easy git) +# +set(git_names git eg) + +# Prefer .cmd variants on Windows unless running in a Makefile +# in the MSYS shell. +# +if(WIN32) + if(NOT CMAKE_GENERATOR MATCHES "MSYS") + set(git_names git.cmd git eg.cmd eg) + # GitHub search path for Windows + set(github_path "$ENV{LOCALAPPDATA}/Github/PortableGit*/bin") + file(GLOB github_path "${github_path}") + endif() +endif() + +find_program(GIT_EXECUTABLE + NAMES ${git_names} + PATHS ${github_path} + PATH_SUFFIXES Git/cmd Git/bin + DOC "git command line client" + ) +mark_as_advanced(GIT_EXECUTABLE) + +if(GIT_EXECUTABLE) + execute_process(COMMAND ${GIT_EXECUTABLE} --version + OUTPUT_VARIABLE git_version + ERROR_QUIET + OUTPUT_STRIP_TRAILING_WHITESPACE) + if (git_version MATCHES "^git version [0-9]") + string(REPLACE "git version " "" GIT_VERSION_STRING "${git_version}") + endif() + unset(git_version) +endif() + +# Handle the QUIETLY and REQUIRED arguments and set GIT_FOUND to TRUE if +# all listed variables are TRUE + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(Git + REQUIRED_VARS GIT_EXECUTABLE + VERSION_VAR GIT_VERSION_STRING) diff --git a/cmake/cmake-modules/cmake-3.3.0-modules/WriteCompilerDetectionHeader.cmake b/cmake/cmake-modules/cmake-3.3.0-modules/WriteCompilerDetectionHeader.cmake new file mode 100644 index 000000000..b40d824b1 --- /dev/null +++ b/cmake/cmake-modules/cmake-3.3.0-modules/WriteCompilerDetectionHeader.cmake @@ -0,0 +1,692 @@ +#.rst: +# WriteCompilerDetectionHeader +# ---------------------------- +# +# This module provides the function write_compiler_detection_header(). +# +# The ``WRITE_COMPILER_DETECTION_HEADER`` function can be used to generate +# a file suitable for preprocessor inclusion which contains macros to be +# used in source code:: +# +# write_compiler_detection_header( +# FILE <file> +# PREFIX <prefix> +# [OUTPUT_FILES_VAR <output_files_var> OUTPUT_DIR <output_dir>] +# COMPILERS <compiler> [...] +# FEATURES <feature> [...] +# [VERSION <version>] +# [PROLOG <prolog>] +# [EPILOG <epilog>] +# ) +# +# The ``write_compiler_detection_header`` function generates the +# file ``<file>`` with macros which all have the prefix ``<prefix>``. +# +# By default, all content is written directly to the ``<file>``. The +# ``OUTPUT_FILES_VAR`` may be specified to cause the compiler-specific +# content to be written to separate files. The separate files are then +# available in the ``<output_files_var>`` and may be consumed by the caller +# for installation for example. The ``OUTPUT_DIR`` specifies a relative +# path from the main ``<file>`` to the compiler-specific files. For example: +# +# .. code-block:: cmake +# +# write_compiler_detection_header( +# FILE climbingstats_compiler_detection.h +# PREFIX ClimbingStats +# OUTPUT_FILES_VAR support_files +# OUTPUT_DIR compilers +# COMPILERS GNU Clang MSVC +# FEATURES cxx_variadic_templates +# ) +# install(FILES +# ${CMAKE_CURRENT_BINARY_DIR}/climbingstats_compiler_detection.h +# DESTINATION include +# ) +# install(FILES +# ${support_files} +# DESTINATION include/compilers +# ) +# +# +# ``VERSION`` may be used to specify the API version to be generated. +# Future versions of CMake may introduce alternative APIs. A given +# API is selected by any ``<version>`` value greater than or equal +# to the version of CMake that introduced the given API and less +# than the version of CMake that introduced its succeeding API. +# The value of the :variable:`CMAKE_MINIMUM_REQUIRED_VERSION` +# variable is used if no explicit version is specified. +# (As of CMake version |release| there is only one API version.) +# +# ``PROLOG`` may be specified as text content to write at the start of the +# header. ``EPILOG`` may be specified as text content to write at the end +# of the header +# +# At least one ``<compiler>`` and one ``<feature>`` must be listed. Compilers +# which are known to CMake, but not specified are detected and a preprocessor +# ``#error`` is generated for them. A preprocessor macro matching +# ``<PREFIX>_COMPILER_IS_<compiler>`` is generated for each compiler +# known to CMake to contain the value ``0`` or ``1``. +# +# Possible compiler identifiers are documented with the +# :variable:`CMAKE_<LANG>_COMPILER_ID` variable. +# Available features in this version of CMake are listed in the +# :prop_gbl:`CMAKE_C_KNOWN_FEATURES` and +# :prop_gbl:`CMAKE_CXX_KNOWN_FEATURES` global properties. +# +# See the :manual:`cmake-compile-features(7)` manual for information on +# compile features. +# +# Feature Test Macros +# =================== +# +# For each compiler, a preprocessor macro is generated matching +# ``<PREFIX>_COMPILER_IS_<compiler>`` which has the content either ``0`` +# or ``1``, depending on the compiler in use. Preprocessor macros for +# compiler version components are generated matching +# ``<PREFIX>_COMPILER_VERSION_MAJOR`` ``<PREFIX>_COMPILER_VERSION_MINOR`` +# and ``<PREFIX>_COMPILER_VERSION_PATCH`` containing decimal values +# for the corresponding compiler version components, if defined. +# +# A preprocessor test is generated based on the compiler version +# denoting whether each feature is enabled. A preprocessor macro +# matching ``<PREFIX>_COMPILER_<FEATURE>``, where ``<FEATURE>`` is the +# upper-case ``<feature>`` name, is generated to contain the value +# ``0`` or ``1`` depending on whether the compiler in use supports the +# feature: +# +# .. code-block:: cmake +# +# write_compiler_detection_header( +# FILE climbingstats_compiler_detection.h +# PREFIX ClimbingStats +# COMPILERS GNU Clang AppleClang MSVC +# FEATURES cxx_variadic_templates +# ) +# +# .. code-block:: c++ +# +# #if ClimbingStats_COMPILER_CXX_VARIADIC_TEMPLATES +# template<typename... T> +# void someInterface(T t...) { /* ... */ } +# #else +# // Compatibility versions +# template<typename T1> +# void someInterface(T1 t1) { /* ... */ } +# template<typename T1, typename T2> +# void someInterface(T1 t1, T2 t2) { /* ... */ } +# template<typename T1, typename T2, typename T3> +# void someInterface(T1 t1, T2 t2, T3 t3) { /* ... */ } +# #endif +# +# Symbol Macros +# ============= +# +# Some additional symbol-defines are created for particular features for +# use as symbols which may be conditionally defined empty: +# +# .. code-block:: c++ +# +# class MyClass ClimbingStats_FINAL +# { +# ClimbingStats_CONSTEXPR int someInterface() { return 42; } +# }; +# +# The ``ClimbingStats_FINAL`` macro will expand to ``final`` if the +# compiler (and its flags) support the ``cxx_final`` feature, and the +# ``ClimbingStats_CONSTEXPR`` macro will expand to ``constexpr`` +# if ``cxx_constexpr`` is supported. +# +# The following features generate corresponding symbol defines: +# +# ========================== =================================== ================= +# Feature Define Symbol +# ========================== =================================== ================= +# ``c_restrict`` ``<PREFIX>_RESTRICT`` ``restrict`` +# ``cxx_constexpr`` ``<PREFIX>_CONSTEXPR`` ``constexpr`` +# ``cxx_deleted_functions`` ``<PREFIX>_DELETED_FUNCTION`` ``= delete`` +# ``cxx_extern_templates`` ``<PREFIX>_EXTERN_TEMPLATE`` ``extern`` +# ``cxx_final`` ``<PREFIX>_FINAL`` ``final`` +# ``cxx_noexcept`` ``<PREFIX>_NOEXCEPT`` ``noexcept`` +# ``cxx_noexcept`` ``<PREFIX>_NOEXCEPT_EXPR(X)`` ``noexcept(X)`` +# ``cxx_override`` ``<PREFIX>_OVERRIDE`` ``override`` +# ========================== =================================== ================= +# +# Compatibility Implementation Macros +# =================================== +# +# Some features are suitable for wrapping in a macro with a backward +# compatibility implementation if the compiler does not support the feature. +# +# When the ``cxx_static_assert`` feature is not provided by the compiler, +# a compatibility implementation is available via the +# ``<PREFIX>_STATIC_ASSERT(COND)`` and +# ``<PREFIX>_STATIC_ASSERT_MSG(COND, MSG)`` function-like macros. The macros +# expand to ``static_assert`` where that compiler feature is available, and +# to a compatibility implementation otherwise. In the first form, the +# condition is stringified in the message field of ``static_assert``. In +# the second form, the message ``MSG`` is passed to the message field of +# ``static_assert``, or ignored if using the backward compatibility +# implementation. +# +# The ``cxx_attribute_deprecated`` feature provides a macro definition +# ``<PREFIX>_DEPRECATED``, which expands to either the standard +# ``[[deprecated]]`` attribute or a compiler-specific decorator such +# as ``__attribute__((__deprecated__))`` used by GNU compilers. +# +# The ``cxx_alignas`` feature provides a macro definition +# ``<PREFIX>_ALIGNAS`` which expands to either the standard ``alignas`` +# decorator or a compiler-specific decorator such as +# ``__attribute__ ((__aligned__))`` used by GNU compilers. +# +# The ``cxx_alignof`` feature provides a macro definition +# ``<PREFIX>_ALIGNOF`` which expands to either the standard ``alignof`` +# decorator or a compiler-specific decorator such as ``__alignof__`` +# used by GNU compilers. +# +# ============================= ================================ ===================== +# Feature Define Symbol +# ============================= ================================ ===================== +# ``cxx_alignas`` ``<PREFIX>_ALIGNAS`` ``alignas`` +# ``cxx_alignof`` ``<PREFIX>_ALIGNOF`` ``alignof`` +# ``cxx_nullptr`` ``<PREFIX>_NULLPTR`` ``nullptr`` +# ``cxx_static_assert`` ``<PREFIX>_STATIC_ASSERT`` ``static_assert`` +# ``cxx_static_assert`` ``<PREFIX>_STATIC_ASSERT_MSG`` ``static_assert`` +# ``cxx_attribute_deprecated`` ``<PREFIX>_DEPRECATED`` ``[[deprecated]]`` +# ``cxx_attribute_deprecated`` ``<PREFIX>_DEPRECATED_MSG`` ``[[deprecated]]`` +# ``cxx_thread_local`` ``<PREFIX>_THREAD_LOCAL`` ``thread_local`` +# ============================= ================================ ===================== +# +# A use-case which arises with such deprecation macros is the deprecation +# of an entire library. In that case, all public API in the library may +# be decorated with the ``<PREFIX>_DEPRECATED`` macro. This results in +# very noisy build output when building the library itself, so the macro +# may be may be defined to empty in that case when building the deprecated +# library: +# +# .. code-block:: cmake +# +# add_library(compat_support ${srcs}) +# target_compile_definitions(compat_support +# PRIVATE +# CompatSupport_DEPRECATED= +# ) + +#============================================================================= +# Copyright 2014 Stephen Kelly <steveire@gmail.com> +# +# Distributed under the OSI-approved BSD License (the "License"); +# see accompanying file Copyright.txt for details. +# +# This software is distributed WITHOUT ANY WARRANTY; without even the +# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the License for more information. +#============================================================================= +# +# 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(${CMAKE_CURRENT_LIST_DIR}/CMakeParseArguments.cmake) +include(${CMAKE_CURRENT_LIST_DIR}/CMakeCompilerIdDetection.cmake) + +function(_load_compiler_variables CompilerId lang) + include("${CMAKE_ROOT}/Modules/Compiler/${CompilerId}-${lang}-FeatureTests.cmake" OPTIONAL) + set(_cmake_oldestSupported_${CompilerId} ${_cmake_oldestSupported} PARENT_SCOPE) + foreach(feature ${ARGN}) + set(_cmake_feature_test_${CompilerId}_${feature} ${_cmake_feature_test_${feature}} PARENT_SCOPE) + endforeach() + include("${CMAKE_ROOT}/Modules/Compiler/${CompilerId}-${lang}-DetermineCompiler.cmake" OPTIONAL + RESULT_VARIABLE determinedCompiler) + if (NOT determinedCompiler) + include("${CMAKE_ROOT}/Modules/Compiler/${CompilerId}-DetermineCompiler.cmake" OPTIONAL) + endif() + set(_compiler_id_version_compute_${CompilerId} ${_compiler_id_version_compute} PARENT_SCOPE) +endfunction() + +function(write_compiler_detection_header + file_keyword file_arg + prefix_keyword prefix_arg + ) + if (NOT "x${file_keyword}" STREQUAL "xFILE") + message(FATAL_ERROR "write_compiler_detection_header: FILE parameter missing.") + endif() + if (NOT "x${prefix_keyword}" STREQUAL "xPREFIX") + message(FATAL_ERROR "write_compiler_detection_header: PREFIX parameter missing.") + endif() + set(options) + set(oneValueArgs VERSION EPILOG PROLOG OUTPUT_FILES_VAR OUTPUT_DIR) + set(multiValueArgs COMPILERS FEATURES) + cmake_parse_arguments(_WCD "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN}) + + if (NOT _WCD_COMPILERS) + message(FATAL_ERROR "Invalid arguments. write_compiler_detection_header requires at least one compiler.") + endif() + if (NOT _WCD_FEATURES) + message(FATAL_ERROR "Invalid arguments. write_compiler_detection_header requires at least one feature.") + endif() + + if(_WCD_UNPARSED_ARGUMENTS) + message(FATAL_ERROR "Unparsed arguments: ${_WCD_UNPARSED_ARGUMENTS}") + endif() + + if (prefix_arg STREQUAL "") + message(FATAL_ERROR "A prefix must be specified") + endif() + string(MAKE_C_IDENTIFIER ${prefix_arg} cleaned_prefix) + if (NOT prefix_arg STREQUAL cleaned_prefix) + message(FATAL_ERROR "The prefix must be a valid C identifier.") + endif() + + if(NOT _WCD_VERSION) + set(_WCD_VERSION ${CMAKE_MINIMUM_REQUIRED_VERSION}) + endif() + set(_min_version 3.1.0) # Version which introduced this function + if (_WCD_VERSION VERSION_LESS _min_version) + set(err "VERSION compatibility for write_compiler_detection_header is set to ${_WCD_VERSION}, which is too low.") + set(err "${err} It must be set to at least ${_min_version}. ") + set(err "${err} Either set the VERSION parameter to the write_compiler_detection_header function, or update") + set(err "${err} your minimum required CMake version with the cmake_minimum_required command.") + message(FATAL_ERROR "${err}") + endif() + + if(_WCD_OUTPUT_FILES_VAR) + if(NOT _WCD_OUTPUT_DIR) + message(FATAL_ERROR "If OUTPUT_FILES_VAR is specified, then OUTPUT_DIR must also be specified.") + endif() + endif() + if(_WCD_OUTPUT_DIR) + if(NOT _WCD_OUTPUT_FILES_VAR) + message(FATAL_ERROR "If OUTPUT_DIR is specified, then OUTPUT_FILES_VAR must also be specified.") + endif() + get_filename_component(main_file_dir ${file_arg} DIRECTORY) + if (NOT IS_ABSOLUTE ${main_file_dir}) + set(main_file_dir "${CMAKE_CURRENT_BINARY_DIR}/${main_file_dir}") + endif() + if (NOT IS_ABSOLUTE ${_WCD_OUTPUT_DIR}) + set(_WCD_OUTPUT_DIR "${CMAKE_CURRENT_BINARY_DIR}/${_WCD_OUTPUT_DIR}") + endif() + get_filename_component(out_file_dir ${_WCD_OUTPUT_DIR} ABSOLUTE) + string(FIND ${out_file_dir} ${main_file_dir} idx) + if (NOT idx EQUAL 0) + message(FATAL_ERROR "The compiler-specific output directory must be within the same directory as the main file.") + endif() + + if (main_file_dir STREQUAL out_file_dir) + unset(_WCD_OUTPUT_DIR) + else() + string(REPLACE "${main_file_dir}/" "" _WCD_OUTPUT_DIR "${out_file_dir}/") + endif() + endif() + + set(compilers + GNU + Clang + AppleClang + MSVC + SunPro + ) + + set(_hex_compilers ADSP Borland Embarcadero SunPro) + + foreach(_comp ${_WCD_COMPILERS}) + list(FIND compilers ${_comp} idx) + if (idx EQUAL -1) + message(FATAL_ERROR "Unsupported compiler ${_comp}.") + endif() + if (NOT _need_hex_conversion) + list(FIND _hex_compilers ${_comp} idx) + if (NOT idx EQUAL -1) + set(_need_hex_conversion TRUE) + endif() + endif() + endforeach() + + set(file_content " +// This is a generated file. Do not edit! + +#ifndef ${prefix_arg}_COMPILER_DETECTION_H +#define ${prefix_arg}_COMPILER_DETECTION_H +") + + if (_WCD_PROLOG) + set(file_content "${file_content}\n${_WCD_PROLOG}\n") + endif() + + if (_need_hex_conversion) + set(file_content "${file_content} +#define ${prefix_arg}_DEC(X) (X) +#define ${prefix_arg}_HEX(X) ( \\ + ((X)>>28 & 0xF) * 10000000 + \\ + ((X)>>24 & 0xF) * 1000000 + \\ + ((X)>>20 & 0xF) * 100000 + \\ + ((X)>>16 & 0xF) * 10000 + \\ + ((X)>>12 & 0xF) * 1000 + \\ + ((X)>>8 & 0xF) * 100 + \\ + ((X)>>4 & 0xF) * 10 + \\ + ((X) & 0xF) \\ + )\n") + endif() + + foreach(feature ${_WCD_FEATURES}) + if (feature MATCHES "^cxx_") + list(APPEND _langs CXX) + list(APPEND CXX_features ${feature}) + elseif (feature MATCHES "^c_") + list(APPEND _langs C) + list(APPEND C_features ${feature}) + else() + message(FATAL_ERROR "Unsupported feature ${feature}.") + endif() + endforeach() + list(REMOVE_DUPLICATES _langs) + + if(_WCD_OUTPUT_FILES_VAR) + get_filename_component(main_file_name ${file_arg} NAME) + set(compiler_file_content_ +"#ifndef ${prefix_arg}_COMPILER_DETECTION_H +# error This file may only be included from ${main_file_name} +#endif\n") + endif() + + foreach(_lang ${_langs}) + set(target_compilers) + foreach(compiler ${_WCD_COMPILERS}) + _load_compiler_variables(${compiler} ${_lang} ${${_lang}_features}) + if(_cmake_oldestSupported_${compiler}) + list(APPEND target_compilers ${compiler}) + endif() + endforeach() + + get_property(known_features GLOBAL PROPERTY CMAKE_${_lang}_KNOWN_FEATURES) + foreach(feature ${${_lang}_features}) + list(FIND known_features ${feature} idx) + if (idx EQUAL -1) + message(FATAL_ERROR "Unsupported feature ${feature}.") + endif() + endforeach() + + if(_lang STREQUAL CXX) + set(file_content "${file_content}\n#ifdef __cplusplus\n") + else() + set(file_content "${file_content}\n#ifndef __cplusplus\n") + endif() + + compiler_id_detection(ID_CONTENT ${_lang} PREFIX ${prefix_arg}_ + ID_DEFINE + ) + + set(file_content "${file_content}${ID_CONTENT}\n") + + set(pp_if "if") + foreach(compiler ${target_compilers}) + set(file_content "${file_content}\n# ${pp_if} ${prefix_arg}_COMPILER_IS_${compiler}\n") + + if(_WCD_OUTPUT_FILES_VAR) + set(compile_file_name "${_WCD_OUTPUT_DIR}${prefix_arg}_COMPILER_INFO_${compiler}_${_lang}.h") + set(file_content "${file_content}\n# include \"${compile_file_name}\"\n") + endif() + + if(_WCD_OUTPUT_FILES_VAR) + set(compiler_file_content compiler_file_content_${compiler}_${_lang}) + else() + set(compiler_file_content file_content) + endif() + + set(${compiler_file_content} "${${compiler_file_content}} +# if !(${_cmake_oldestSupported_${compiler}}) +# error Unsupported compiler version +# endif\n") + + set(PREFIX ${prefix_arg}_) + if (_need_hex_conversion) + set(MACRO_DEC ${prefix_arg}_DEC) + set(MACRO_HEX ${prefix_arg}_HEX) + else() + set(MACRO_DEC) + set(MACRO_HEX) + endif() + string(CONFIGURE "${_compiler_id_version_compute_${compiler}}" VERSION_BLOCK @ONLY) + set(${compiler_file_content} "${${compiler_file_content}}${VERSION_BLOCK}\n") + set(PREFIX) + set(MACRO_DEC) + set(MACRO_HEX) + + set(pp_if "elif") + foreach(feature ${${_lang}_features}) + string(TOUPPER ${feature} feature_upper) + set(feature_PP "COMPILER_${feature_upper}") + set(_define_item "\n# define ${prefix_arg}_${feature_PP} 0\n") + if (_cmake_feature_test_${compiler}_${feature} STREQUAL "1") + set(_define_item "\n# define ${prefix_arg}_${feature_PP} 1\n") + elseif (_cmake_feature_test_${compiler}_${feature}) + set(_define_item "\n# define ${prefix_arg}_${feature_PP} 0\n") + set(_define_item "\n# if ${_cmake_feature_test_${compiler}_${feature}}\n# define ${prefix_arg}_${feature_PP} 1\n# else${_define_item}# endif\n") + endif() + set(${compiler_file_content} "${${compiler_file_content}}${_define_item}") + endforeach() + endforeach() + if(pp_if STREQUAL "elif") + set(file_content "${file_content} +# else +# error Unsupported compiler +# endif\n") + endif() + foreach(feature ${${_lang}_features}) + string(TOUPPER ${feature} feature_upper) + set(feature_PP "COMPILER_${feature_upper}") + set(def_name ${prefix_arg}_${feature_PP}) + if (feature STREQUAL c_restrict) + set(def_value "${prefix_arg}_RESTRICT") + set(file_content "${file_content} +# if ${def_name} +# define ${def_value} restrict +# else +# define ${def_value} +# endif +\n") + endif() + if (feature STREQUAL cxx_constexpr) + set(def_value "${prefix_arg}_CONSTEXPR") + set(file_content "${file_content} +# if ${def_name} +# define ${def_value} constexpr +# else +# define ${def_value} +# endif +\n") + endif() + if (feature STREQUAL cxx_final) + set(def_value "${prefix_arg}_FINAL") + set(file_content "${file_content} +# if ${def_name} +# define ${def_value} final +# else +# define ${def_value} +# endif +\n") + endif() + if (feature STREQUAL cxx_override) + set(def_value "${prefix_arg}_OVERRIDE") + set(file_content "${file_content} +# if ${def_name} +# define ${def_value} override +# else +# define ${def_value} +# endif +\n") + endif() + if (feature STREQUAL cxx_static_assert) + set(def_value "${prefix_arg}_STATIC_ASSERT(X)") + set(def_value_msg "${prefix_arg}_STATIC_ASSERT_MSG(X, MSG)") + set(static_assert_struct "template<bool> struct ${prefix_arg}StaticAssert;\ntemplate<> struct ${prefix_arg}StaticAssert<true>{};\n") + set(def_standard "# define ${def_value} static_assert(X, #X)\n# define ${def_value_msg} static_assert(X, MSG)") + set(def_alternative "${static_assert_struct}# define ${def_value} sizeof(${prefix_arg}StaticAssert<X>)\n# define ${def_value_msg} sizeof(${prefix_arg}StaticAssert<X>)") + set(file_content "${file_content}# if ${def_name}\n${def_standard}\n# else\n${def_alternative}\n# endif\n\n") + endif() + if (feature STREQUAL cxx_alignas) + set(def_value "${prefix_arg}_ALIGNAS(X)") + set(file_content "${file_content} +# if ${def_name} +# define ${def_value} alignas(X) +# elif ${prefix_arg}_COMPILER_IS_GNU || ${prefix_arg}_COMPILER_IS_Clang || ${prefix_arg}_COMPILER_IS_AppleClang +# define ${def_value} __attribute__ ((__aligned__(X))) +# elif ${prefix_arg}_COMPILER_IS_MSVC +# define ${def_value} __declspec(align(X)) +# else +# define ${def_value} +# endif +\n") + endif() + if (feature STREQUAL cxx_alignof) + set(def_value "${prefix_arg}_ALIGNOF(X)") + set(file_content "${file_content} +# if ${def_name} +# define ${def_value} alignof(X) +# elif ${prefix_arg}_COMPILER_IS_GNU || ${prefix_arg}_COMPILER_IS_Clang || ${prefix_arg}_COMPILER_IS_AppleClang +# define ${def_value} __alignof__(X) +# elif ${prefix_arg}_COMPILER_IS_MSVC +# define ${def_value} __alignof(X) +# endif +\n") + endif() + if (feature STREQUAL cxx_deleted_functions) + set(def_value "${prefix_arg}_DELETED_FUNCTION") + set(file_content "${file_content} +# if ${def_name} +# define ${def_value} = delete +# else +# define ${def_value} +# endif +\n") + endif() + if (feature STREQUAL cxx_extern_templates) + set(def_value "${prefix_arg}_EXTERN_TEMPLATE") + set(file_content "${file_content} +# if ${def_name} +# define ${def_value} extern +# else +# define ${def_value} +# endif +\n") + endif() + if (feature STREQUAL cxx_noexcept) + set(def_value "${prefix_arg}_NOEXCEPT") + set(file_content "${file_content} +# if ${def_name} +# define ${def_value} noexcept +# define ${def_value}_EXPR(X) noexcept(X) +# else +# define ${def_value} +# define ${def_value}_EXPR(X) +# endif +\n") + endif() + if (feature STREQUAL cxx_nullptr) + set(def_value "${prefix_arg}_NULLPTR") + set(file_content "${file_content} +# if ${def_name} +# define ${def_value} nullptr +# else +# define ${def_value} 0 +# endif +\n") + endif() + if (feature STREQUAL cxx_thread_local) + set(def_value "${prefix_arg}_THREAD_LOCAL") + set(file_content "${file_content} +# if ${def_name} +# define ${def_value} thread_local +# elif ${prefix_arg}_COMPILER_IS_GNU || ${prefix_arg}_COMPILER_IS_Clang || ${prefix_arg}_COMPILER_IS_AppleClang +# define ${def_value} __thread +# elif ${prefix_arg}_COMPILER_IS_MSVC +# define ${def_value} __declspec(thread) +# else +// ${def_value} not defined for this configuration. +# endif +\n") + endif() + if (feature STREQUAL cxx_attribute_deprecated) + set(def_name ${prefix_arg}_${feature_PP}) + set(def_value "${prefix_arg}_DEPRECATED") + set(file_content "${file_content} +# ifndef ${def_value} +# if ${def_name} +# define ${def_value} [[deprecated]] +# define ${def_value}_MSG(MSG) [[deprecated(MSG)]] +# elif ${prefix_arg}_COMPILER_IS_GNU || ${prefix_arg}_COMPILER_IS_Clang +# define ${def_value} __attribute__((__deprecated__)) +# define ${def_value}_MSG(MSG) __attribute__((__deprecated__(MSG))) +# elif ${prefix_arg}_COMPILER_IS_MSVC +# define ${def_value} __declspec(deprecated) +# define ${def_value}_MSG(MSG) __declspec(deprecated(MSG)) +# else +# define ${def_value} +# define ${def_value}_MSG(MSG) +# endif +# endif +\n") + endif() + endforeach() + + set(file_content "${file_content}#endif\n") + + endforeach() + + if(_WCD_OUTPUT_FILES_VAR) + foreach(compiler ${_WCD_COMPILERS}) + foreach(_lang ${_langs}) + if(compiler_file_content_${compiler}_${_lang}) + set(CMAKE_CONFIGURABLE_FILE_CONTENT "${compiler_file_content_}") + set(CMAKE_CONFIGURABLE_FILE_CONTENT "${CMAKE_CONFIGURABLE_FILE_CONTENT}${compiler_file_content_${compiler}_${_lang}}") + + set(compile_file_name "${_WCD_OUTPUT_DIR}${prefix_arg}_COMPILER_INFO_${compiler}_${_lang}.h") + set(full_path "${main_file_dir}/${compile_file_name}") + list(APPEND ${_WCD_OUTPUT_FILES_VAR} ${full_path}) + configure_file("${CMAKE_ROOT}/Modules/CMakeConfigurableFile.in" + "${full_path}" + @ONLY + ) + endif() + endforeach() + endforeach() + set(${_WCD_OUTPUT_FILES_VAR} ${${_WCD_OUTPUT_FILES_VAR}} PARENT_SCOPE) + endif() + + if (_WCD_EPILOG) + set(file_content "${file_content}\n${_WCD_EPILOG}\n") + endif() + set(file_content "${file_content}\n#endif") + + set(CMAKE_CONFIGURABLE_FILE_CONTENT ${file_content}) + configure_file("${CMAKE_ROOT}/Modules/CMakeConfigurableFile.in" + "${file_arg}" + @ONLY + ) +endfunction() diff --git a/cmake/cmake-modules/cmake-4.0.0-modules/RequireOutOfSourceBuild.cmake b/cmake/cmake-modules/cmake-4.0.0-modules/RequireOutOfSourceBuild.cmake new file mode 100644 index 000000000..9b27970b5 --- /dev/null +++ b/cmake/cmake-modules/cmake-4.0.0-modules/RequireOutOfSourceBuild.cmake @@ -0,0 +1,44 @@ +# - Issue an error if the source tree is in or equal to the build tree +# +# include(RequireOutOfSourceBuild) +# +# +# Original Author: +# 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> +# http://academic.cleardefinition.com +# Iowa State University HCI Graduate Program/VRAC +# +# Copyright Iowa State University 2009-2010. +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file ../LICENSE_1_0.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) + +get_filename_component(_src "${CMAKE_SOURCE_DIR}" ABSOLUTE) +get_filename_component(_cur_src "${CMAKE_CURRENT_SOURCE_DIR}" ABSOLUTE) +get_filename_component(_bin "${CMAKE_BINARY_DIR}" ABSOLUTE) + +string(LENGTH "${_src}" _src_len) +string(LENGTH "${_cur_src}" _cur_src_len) +string(LENGTH "${_bin}" _bin_len) + +set(_test) + +if(NOT "${_bin_len}" GREATER "${_src_len}") + list(APPEND _test _src) + #message(STATUS "Checking ${_src}") +endif() + +if(NOT "${_bin_len}" GREATER "${_cur_src_len}") + list(APPEND _test _cur_src) + #message(STATUS "Checking ${_cur_src}") +endif() + +foreach(_var ${_test}) + string(SUBSTRING "${${_var}}" 0 ${_bin_len} _chopped) + #message(STATUS "comparing ${_bin} and ${_chopped}") + if("${_bin}" STREQUAL "${_chopped}") + get_filename_component(_parent "${CMAKE_SOURCE_DIR}/.." ABSOLUTE) + message(FATAL_ERROR + "You must set a binary directory that is different from your source directory. You might consider ${CMAKE_SOURCE_DIR}/build or ${_parent}/build-${CMAKE_PROJECT_NAME}") + endif() +endforeach() diff --git a/cmake/cmake-modules/cmake-4.0.0-modules/autoinclude.cmake b/cmake/cmake-modules/cmake-4.0.0-modules/autoinclude.cmake new file mode 100644 index 000000000..e9206ee08 --- /dev/null +++ b/cmake/cmake-modules/cmake-4.0.0-modules/autoinclude.cmake @@ -0,0 +1,13 @@ +# - Autoinclude these policies automatically +# +# Original Author: +# 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> +# http://academic.cleardefinition.com +# Iowa State University HCI Graduate Program/VRAC +# +# Copyright Iowa State University 2009-2010. +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file ../LICENSE_1_0.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) + +include(RequireOutOfSourceBuild) diff --git a/cmake/cmake-modules/cmake-4.0.0-modules/from-ITK-3.18.0/FindFFTW.cmake b/cmake/cmake-modules/cmake-4.0.0-modules/from-ITK-3.18.0/FindFFTW.cmake new file mode 100644 index 000000000..906906ec8 --- /dev/null +++ b/cmake/cmake-modules/cmake-4.0.0-modules/from-ITK-3.18.0/FindFFTW.cmake @@ -0,0 +1,68 @@ +## FFTW can be compiled and subsequently linked against +## various data types. +## There is a single set of include files, and then muttiple libraries, +## One for each type. I.e. libfftw.a-->double, libfftwf.a-->float + +## The following logic belongs in the individual package +## MARK_AS_ADVANCED(USE_FFTWD) +## OPTION(USE_FFTWD "Use double precision FFTW if found" ON) +## MARK_AS_ADVANCED(USE_FFTWF) +## OPTION(USE_FFTWF "Use single precision FFTW if found" ON) + +IF(USE_FFTWD OR USE_FFTWF) + + SET(FFTW_INC_SEARCHPATH + /sw/include + /usr/include + /usr/local/include + /usr/include/fftw + /usr/local/include/fftw + ) + + FIND_PATH(FFTW_INCLUDE_PATH fftw3.h ${FFTW_INC_SEARCHPATH}) + + IF(FFTW_INCLUDE_PATH) + SET(FFTW_INCLUDE ${FFTW_INCLUDE_PATH}) + ENDIF (FFTW_INCLUDE_PATH) + + IF(FFTW_INCLUDE) + INCLUDE_DIRECTORIES( ${FFTW_INCLUDE}) + ENDIF(FFTW_INCLUDE) + + GET_FILENAME_COMPONENT(FFTW_INSTALL_BASE_PATH ${FFTW_INCLUDE_PATH} PATH) + + SET(FFTW_LIB_SEARCHPATH + ${FFTW_INSTALL_BASE_PATH}/lib + /usr/lib/fftw + /usr/local/lib/fftw + ) + + IF(USE_FFTWD) + MARK_AS_ADVANCED(FFTWD_LIB) +# OPTION(FFTWD_LIB "The full path to the fftw3 library (including the library)" ) + FIND_LIBRARY(FFTWD_LIB fftw3 ${FFTW_LIB_SEARCHPATH}) #Double Precision Lib + FIND_LIBRARY(FFTWD_THREADS_LIB fftw3_threads ${FFTW_LIB_SEARCHPATH}) #Double Precision Lib only if compiled with threads support + + IF(FFTWD_LIB) + SET(FFTWD_FOUND 1) + IF(FFTWD_THREADS_LIB) + SET(FFTWD_LIB ${FFTWD_LIB} ${FFTWD_THREADS_LIB} ) + ENDIF(FFTWD_THREADS_LIB) + ENDIF(FFTWD_LIB) + ENDIF(USE_FFTWD) + + IF(USE_FFTWF) + MARK_AS_ADVANCED(FFTWF_LIB) +# OPTION(FFTWF_LIB "The full path to the fftw3f library (including the library)" ) + FIND_LIBRARY(FFTWF_LIB fftw3f ${FFTW_LIB_SEARCHPATH}) #Single Precision Lib + FIND_LIBRARY(FFTWF_THREADS_LIB fftw3f_threads ${FFTW_LIB_SEARCHPATH}) #Single Precision Lib only if compiled with threads support + + IF(FFTWF_LIB) + SET(FFTWF_FOUND 1) + IF(FFTWF_THREADS_LIB) + SET(FFTWF_LIB ${FFTWF_LIB} ${FFTWF_THREADS_LIB} ) + ENDIF(FFTWF_THREADS_LIB) + ENDIF(FFTWF_LIB) + ENDIF(USE_FFTWF) + +ENDIF(USE_FFTWD OR USE_FFTWF) diff --git a/cmake/cmake-modules/export-to-directory.sh b/cmake/cmake-modules/export-to-directory.sh new file mode 100755 index 000000000..1736e5c02 --- /dev/null +++ b/cmake/cmake-modules/export-to-directory.sh @@ -0,0 +1,22 @@ +#!/bin/sh + +src="$(dirname $(readlink -f $0))" + +if [ "x$1" = "x-f" ]; then + dst="$(readlink -mn $2)/" + args="-f" +else + dst="$(readlink -mn $1)/" + args="$2" +fi + +echo "Exporting the modules from '$src' to '$dst'" + +mkdir -p $dst +( + cd "$src" + git checkout-index -a $args "--prefix=$dst" +) + +echo "Done!" + diff --git a/cmake/cmake-modules/ghost-fake-stl/alloc.h b/cmake/cmake-modules/ghost-fake-stl/alloc.h new file mode 100644 index 000000000..cc8883f51 --- /dev/null +++ b/cmake/cmake-modules/ghost-fake-stl/alloc.h @@ -0,0 +1,14 @@ +/** @file + @brief Fake header to allow GHOST 4.09 use with MSVC 2005 + + @date 2012 + + @author + Ryan Pavlik + <rpavlik@iastate.edu> and <abiryan@ryand.net> + http://academic.cleardefinition.com/ + Iowa State University Virtual Reality Applications Center + Human-Computer Interaction Graduate Program +*/ + +#pragma once diff --git a/cmake/cmake-modules/ghost-fake-stl/hash_map.h b/cmake/cmake-modules/ghost-fake-stl/hash_map.h new file mode 100644 index 000000000..fcf3f0d0b --- /dev/null +++ b/cmake/cmake-modules/ghost-fake-stl/hash_map.h @@ -0,0 +1,28 @@ +/** @file + @brief Fake header to allow GHOST 4.09 use with MSVC 2005 + + @date 2012 + + @author + Ryan Pavlik + <rpavlik@iastate.edu> and <abiryan@ryand.net> + http://academic.cleardefinition.com/ + Iowa State University Virtual Reality Applications Center + Human-Computer Interaction Graduate Program +*/ + +#pragma once + +#include <hash_map> +//using stdext::hash_map; + +template<typename Key> +class hash; +template<typename Key> +class equal_to; + +template<typename Key, typename Val, typename HashFcn, typename EqualKey, typename Alloc> +class hash_map; + +template<typename Key, typename Val> +class hash_map<Key, Val, hash<Key>, equal_to<Val> > : public stdext::hash_map<Key, Val> {}; diff --git a/cmake/cmake-modules/ghost-fake-stl/iostream.h b/cmake/cmake-modules/ghost-fake-stl/iostream.h new file mode 100644 index 000000000..7d7195fd2 --- /dev/null +++ b/cmake/cmake-modules/ghost-fake-stl/iostream.h @@ -0,0 +1,20 @@ +/** @file + @brief Fake header to allow GHOST 4.09 use with MSVC 2005 + + @date 2010 + + @author + Ryan Pavlik + <rpavlik@iastate.edu> and <abiryan@ryand.net> + http://academic.cleardefinition.com/ + Iowa State University Virtual Reality Applications Center + Human-Computer Interaction Graduate Program +*/ + +#pragma once + +#include <iostream> +using std::istream; +using std::ostream; +using std::cerr; +using std::endl; \ No newline at end of file diff --git a/cmake/cmake-modules/ghost-fake-stl/list.h b/cmake/cmake-modules/ghost-fake-stl/list.h new file mode 100644 index 000000000..a8b3fc24d --- /dev/null +++ b/cmake/cmake-modules/ghost-fake-stl/list.h @@ -0,0 +1,20 @@ +/** @file + @brief Fake header to allow GHOST 4.09 use with MSVC 2005 + + @date 2010 + + @author + Ryan Pavlik + <rpavlik@iastate.edu> and <abiryan@ryand.net> + http://academic.cleardefinition.com/ + Iowa State University Virtual Reality Applications Center + Human-Computer Interaction Graduate Program +*/ + +#pragma once + +#include <list> +using std::list; + +// Disable dll export that depends on the SGI STL implementation +#undef GHOST_EXTRA_TEMPLATE_DECLARATIONS \ No newline at end of file diff --git a/cmake/cmake-modules/ghost-fake-stl/pair.h b/cmake/cmake-modules/ghost-fake-stl/pair.h new file mode 100644 index 000000000..af793b553 --- /dev/null +++ b/cmake/cmake-modules/ghost-fake-stl/pair.h @@ -0,0 +1,17 @@ +/** @file + @brief Fake header to allow GHOST 4.09 use with MSVC 2005 + + @date 2012 + + @author + Ryan Pavlik + <rpavlik@iastate.edu> and <abiryan@ryand.net> + http://academic.cleardefinition.com/ + Iowa State University Virtual Reality Applications Center + Human-Computer Interaction Graduate Program +*/ + +#pragma once + +#include <utility> +using std::pair; diff --git a/cmake/cmake-modules/ghost-fake-stl/set.h b/cmake/cmake-modules/ghost-fake-stl/set.h new file mode 100644 index 000000000..880696135 --- /dev/null +++ b/cmake/cmake-modules/ghost-fake-stl/set.h @@ -0,0 +1,19 @@ +/** @file + @brief Fake header to allow GHOST 4.09 use with MSVC 2005 + + @date 2010 + + @author + Ryan Pavlik + <rpavlik@iastate.edu> and <abiryan@ryand.net> + http://academic.cleardefinition.com/ + Iowa State University Virtual Reality Applications Center + Human-Computer Interaction Graduate Program +*/ + +#pragma once + +#include <set> +#include <functional> +using std::set; +using std::less; \ No newline at end of file diff --git a/cmake/cmake-modules/ghost-fake-stl/vector.h b/cmake/cmake-modules/ghost-fake-stl/vector.h new file mode 100644 index 000000000..659db2d68 --- /dev/null +++ b/cmake/cmake-modules/ghost-fake-stl/vector.h @@ -0,0 +1,20 @@ +/** @file + @brief Fake header to allow GHOST 4.09 use with MSVC 2005 + + @date 2010 + + @author + Ryan Pavlik + <rpavlik@iastate.edu> and <abiryan@ryand.net> + http://academic.cleardefinition.com/ + Iowa State University Virtual Reality Applications Center + Human-Computer Interaction Graduate Program +*/ + +#pragma once + +#include <vector> +using std::vector; + +// Disable dll export that depends on the SGI STL implementation +#undef GHOST_EXTRA_TEMPLATE_DECLARATIONS \ No newline at end of file diff --git a/cmake/cmake-modules/launcher-templates/genericlauncher.cmd.in b/cmake/cmake-modules/launcher-templates/genericlauncher.cmd.in new file mode 100644 index 000000000..9a19bbc7a --- /dev/null +++ b/cmake/cmake-modules/launcher-templates/genericlauncher.cmd.in @@ -0,0 +1,14 @@ +cd @USERFILE_WORKING_DIRECTORY@ +@USERFILE_ENV_COMMANDS@ + +IF NOT [x%1]==[x--debugger] GOTO SkipDebuggingMess + +ECHO Need to ditch the debugger! +SHIFT /1 +%1 %2 %3 %4 %5 %6 %7 %8 %9 +GOTO EOF + +:SkipDebuggingMess +%* + +:EOF \ No newline at end of file diff --git a/cmake/cmake-modules/launcher-templates/genericlauncher.sh.in b/cmake/cmake-modules/launcher-templates/genericlauncher.sh.in new file mode 100644 index 000000000..18720517a --- /dev/null +++ b/cmake/cmake-modules/launcher-templates/genericlauncher.sh.in @@ -0,0 +1,18 @@ +#!/bin/sh +bindir=$(pwd) +cd @USERFILE_WORKING_DIRECTORY@ +@USERFILE_ENV_COMMANDS@ +if test "x$1" = "x--debugger"; then + shift + cmd="$1" + shift + if test "x@LAUNCHERS_GOT_GDB@" = "xYES"; then + echo "r $@" > $bindir/gdbscript + echo "bt" >> $bindir/gdbscript + @GDB_COMMAND@ -batch -command=$bindir/gdbscript @LAUNCHERS_GDB_ARG@ $cmd + else + $cmd $@ + fi +else + $@ +fi diff --git a/cmake/cmake-modules/launcher-templates/launcher.env.cmd.in b/cmake/cmake-modules/launcher-templates/launcher.env.cmd.in new file mode 100644 index 000000000..72a24e67e --- /dev/null +++ b/cmake/cmake-modules/launcher-templates/launcher.env.cmd.in @@ -0,0 +1 @@ +set @_arg@ diff --git a/cmake/cmake-modules/launcher-templates/launcher.env.sh.in b/cmake/cmake-modules/launcher-templates/launcher.env.sh.in new file mode 100644 index 000000000..428cffffb --- /dev/null +++ b/cmake/cmake-modules/launcher-templates/launcher.env.sh.in @@ -0,0 +1 @@ +export @_arg@ diff --git a/cmake/cmake-modules/launcher-templates/perconfig.vcproj.user.in b/cmake/cmake-modules/launcher-templates/perconfig.vcproj.user.in new file mode 100644 index 000000000..95cacecff --- /dev/null +++ b/cmake/cmake-modules/launcher-templates/perconfig.vcproj.user.in @@ -0,0 +1,28 @@ + <Configuration + Name="@USERFILE_CONFIGNAME@|@USERFILE_PLATFORM@" + > + <DebugSettings + Command="${USERFILE_@USERFILE_CONFIGNAME@_COMMAND}" + WorkingDirectory="@USERFILE_WORKING_DIRECTORY@" + CommandArguments="@USERFILE_COMMAND_ARGUMENTS@" + Attach="false" + DebuggerType="3" + Remote="1" + RemoteMachine="@USERFILE_REMOTE_MACHINE@" + RemoteCommand="" + HttpUrl="" + PDBPath="" + SQLDebugging="" + Environment="@USERFILE_ENVIRONMENT@" + EnvironmentMerge="true" + DebuggerFlavor="" + MPIRunCommand="" + MPIRunArguments="" + MPIRunWorkingDirectory="" + ApplicationCommand="" + ApplicationArguments="" + ShimCommand="" + MPIAcceptMode="" + MPIAcceptFilter="" + /> + </Configuration> diff --git a/cmake/cmake-modules/launcher-templates/perconfig.vcxproj.user.in b/cmake/cmake-modules/launcher-templates/perconfig.vcxproj.user.in new file mode 100644 index 000000000..ef0237999 --- /dev/null +++ b/cmake/cmake-modules/launcher-templates/perconfig.vcxproj.user.in @@ -0,0 +1,7 @@ + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='@USERFILE_CONFIGNAME@|@USERFILE_PLATFORM@'"> + <LocalDebuggerEnvironment>@USERFILE_ENVIRONMENT@</LocalDebuggerEnvironment> + <DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor> + <LocalDebuggerCommand>${USERFILE_@USERFILE_CONFIGNAME@_COMMAND}</LocalDebuggerCommand> + <LocalDebuggerCommandArguments>@USERFILE_COMMAND_ARGUMENTS@</LocalDebuggerCommandArguments> + <LocalDebuggerWorkingDirectory>@USERFILE_WORKING_DIRECTORY@</LocalDebuggerWorkingDirectory> + </PropertyGroup> diff --git a/cmake/cmake-modules/launcher-templates/targetlauncher.cmd.in b/cmake/cmake-modules/launcher-templates/targetlauncher.cmd.in new file mode 100644 index 000000000..c5715d679 --- /dev/null +++ b/cmake/cmake-modules/launcher-templates/targetlauncher.cmd.in @@ -0,0 +1,8 @@ +cd @USERFILE_WORKING_DIRECTORY@ +@USERFILE_ENV_COMMANDS@ +if [%1]==[--debugger] ( + SHIFT +) + +"@USERFILE_COMMAND@" @LAUNCHERSCRIPT_COMMAND_ARGUMENTS@ +pause diff --git a/cmake/cmake-modules/launcher-templates/targetlauncher.sh.in b/cmake/cmake-modules/launcher-templates/targetlauncher.sh.in new file mode 100644 index 000000000..b4b6d7309 --- /dev/null +++ b/cmake/cmake-modules/launcher-templates/targetlauncher.sh.in @@ -0,0 +1,16 @@ +#!/bin/sh +bindir=$(pwd) +cd @USERFILE_WORKING_DIRECTORY@ +@USERFILE_ENV_COMMANDS@ +if test "x$1" = "x--debugger"; then + shift + if test "x@LAUNCHERS_GOT_GDB@" = "xYES"; then + echo "r @LAUNCHERSCRIPT_COMMAND_ARGUMENTS@" > $bindir/gdbscript + echo "bt" >> $bindir/gdbscript + @GDB_COMMAND@ -batch -command=$bindir/gdbscript @LAUNCHERS_GDB_ARG@ @USERFILE_COMMAND@ + else + "@USERFILE_COMMAND@" @LAUNCHERSCRIPT_COMMAND_ARGUMENTS@ + fi +else + "@USERFILE_COMMAND@" @LAUNCHERSCRIPT_COMMAND_ARGUMENTS@ +fi diff --git a/cmake/cmake-modules/launcher-templates/vcproj.user.in b/cmake/cmake-modules/launcher-templates/vcproj.user.in new file mode 100644 index 000000000..117473d70 --- /dev/null +++ b/cmake/cmake-modules/launcher-templates/vcproj.user.in @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="Windows-1252"?> +<VisualStudioUserFile + ProjectType="Visual C++" + Version="@USERFILE_VC_VERSION@" + ShowAllFiles="false" + > + <Configurations> +@USERFILE_CONFIGSECTIONS@ + </Configurations> +</VisualStudioUserFile> diff --git a/cmake/cmake-modules/launcher-templates/vcxproj.user.in b/cmake/cmake-modules/launcher-templates/vcxproj.user.in new file mode 100644 index 000000000..f3e423835 --- /dev/null +++ b/cmake/cmake-modules/launcher-templates/vcxproj.user.in @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> +@USERFILE_CONFIGSECTIONS@ +</Project> diff --git a/cmake/cmake-modules/module-docs/AllModuleDependencies.dot b/cmake/cmake-modules/module-docs/AllModuleDependencies.dot new file mode 100644 index 000000000..9110002e6 --- /dev/null +++ b/cmake/cmake-modules/module-docs/AllModuleDependencies.dot @@ -0,0 +1,72 @@ +digraph { + size="7.5,10" + nodesep = .25 + ranksep = 1.0 + label = "Dependencies of CMake Modules - All require CMake 2.6 or newer"; + + subgraph cluster_upstream { + label = "Included with upstream 2.8.0 or cmake-2.8.0-modules"; + SelectLibraryConfigurations; + FindBoost; + FindOpenSceneGraph -> { FindOpenThreads; FindosgALL [label = "Findosg*"]; } + } + + // Directories + PackageMacosxDirectory [label = "cmake/package/macosx/"]; + workaroundsTcharDirectory [label = "cmake/workarounds/tchar/"]; + cmakeUpstreamModulesDirectories [label = "cmake/cmake-*-modules/"]; + + // other Modules + BundleOSGRuntime; + BundleVRJ22Runtime; + CheckMacHIDAPI; + CheckVersion; + CleanDirectoryList; + CleanLibraryList; + CreateMSVCUserFiles -> { ListFilter; ProgramFilesGlob; CleanDirectoryList; } + FixWinInstallPrefix; + GetCompilerInfoString; + GetForceIncludeDefinitions; + ListCombinations; + ListFilter; + MakeVRJugglerAppBundle -> PackageMacosxDirectory; + PrefixListGlob; + ProgramFilesGlob -> { PrefixListGlob; CleanDirectoryList;} + SearchProgramFilesForOpenSceneGraph -> { ProgramFilesGlob; ListFilter; PrefixListGlob; CleanDirectoryList; } + + + subgraph cluster_findmodules { + label = "find_package Find Modules"; + + subgraph cluster_vrjuggler22 { + label = "VR Juggler 2.2 suite: All require CleanLibraryList and CleanDirectoryList, and recommend FindFlagpoll"; + FindTweek12 -> FindVPR20; + FindJCCL12 -> FindVPR20; + FindGadgeteer12 -> { FindJCCL12; FindVPR20; } + FindSonix12 -> FindVPR20; + FindVRJ22 -> { FindJCCL12; FindGadgeteer12; FindSonix12; FindVPR20; } + FindVRJOGL22 -> FindVRJ22; + FindVRJuggler22 -> FindVRJOGL22; + } -> {FindFlagpoll; CleanLibraryList; CleanDirectoryList;} + FindVPR20 -> { FindBoost; FindCPPDOM; } + FindGadgeteer12 -> FindGMTL; + FindSonix12 -> FindGMTL; + //cluster_vrjuggler22 -> {FindFlagpoll; CleanLibraryList;} + BundleVRJ22Runtime -> FindVRJuggler22; + + FindGLUI; + FindGPM; + FindJtTk -> { ListCombinations; CheckVersion; PrefixListGlob; ProgramFilesGlob; } + FindMacHID -> CheckMacHIDAPI; + FindOpenHaptics -> { SelectLibraryConfigurations; CleanDirectoryList; CleanLibraryList; ListCombinations; ProgramFilesGlob; } + FindParasolid -> { ListCombinations; CheckVersion; ProgramFilesGlob; } + Findquatlib; + FindVPS -> { SelectLibraryConfigurations; ListCombinations; CheckVersion; ListFilter; } + FindWiiUse; + } + + + + TCHARWorkaround -> workaroundsTcharDirectory; + UseBackportedModules -> cmakeUpstreamModulesDirectories; +} diff --git a/cmake/cmake-modules/module-docs/AllModuleDependencies.jpg b/cmake/cmake-modules/module-docs/AllModuleDependencies.jpg new file mode 100644 index 0000000000000000000000000000000000000000..16de0c1752b52e0e24b21da852bbebd071c5e5fb GIT binary patch literal 15485 zcmex=<NpH&0WUXCHwH#V1_nk3Mh1re{}}9?gIpa${DZ6%(o=M^3R2S*$_(`k6f{bU zGxO3FJiXi%yaHU^70S$vG<6hGQqvMkb4nBnOA~W4ODehk-)3-T;9z58XJh4HXJ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nn;b(YBfEh$RO%t<W*ADA1QS(OS3KTzoql%HRsU<ir_NDc>;C<@?I0ZwPdC5c5P T;1D-5GB7gZQdM>JcjE#8Ef)AW literal 0 HcmV?d00001 diff --git a/cmake/cmake-modules/module-docs/AllModuleDependencies.png b/cmake/cmake-modules/module-docs/AllModuleDependencies.png new file mode 100644 index 0000000000000000000000000000000000000000..23deadbc1396d3f915f117cac706873d4e9c492f GIT binary patch literal 34317 zcmeAS@N?(olHy`uVBq!ia0y~yV7kD-z_6Tyje&u|;(hiR1_lPUByV>YhW{YAVDIwD z3=9eko-U3d6?5Lqjm$~88T)_#_iOuhuZp>MO7Hg5yKl?Bm-wIe5pwlfCdtT|D9oay zs<5zSy23$aA)5*24uTvX8zNd9K2K2R;GE^6!P2-$WpZKp?zctN<x@{TT^h4G`~JJV z&;LL8ZyUVbEPUtPw{L5fgzbL!%ldiV{?FF?Ta{Y`3?z8inhz!zNc3zAh~LK06Yg#_ zb5D+-1kW+uV+jTh>#xUe1F0x{Xu$f5?epaMe^`u-ji>9fH6Prubj`YTkAmm_x{}%r zGC-U!ctO5_Tt9o<`tO^LCd3#qGc#LQSurWH$Q)ld^Lp6s*A{(;FI^IPQ)d09%-Tmy zxME)T8ugY1AzF^hFYle@X1I=ZXUw}zt{}IBGu7W@GLYyAKYj6{U_<cHvcyD2nd6KM z^K2@cj`zzmGstF~+|SR?FW7(lW!=^P`Z_uZb#-!b{p@L*XUc7_nq6VT*M6AMb5fkU zuq4QT6>AH0IzBvm^!aDO_jh+si!~SeM#RJ%k<Q;!cr(c$PvDL0kpzQ0tust#6ATy{ zG|z+dBy8dQ+?b{y!>26N+3?t6MTpj`{j09OcI04GWLcz<l#sxnH~saU=bp<ibFeT4 ztiF21e_Mpkp#%emNh%(bSo$6(Y>hIsv8j3YS!J^4o40Qr7hhyxa0zVD=z8$;^2bG9 zOPP)r3a~K7trt(*yz_DKk|0f%X2%sFS_};e9AEMo0#;w0F=Ix6jy1QVz=qA6o4uAU zidYsl-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HNX1$wRA;@77sta{L8&_{nRVw9Y1p9h_n~`S(6K}5bbXh{P^O9#^37nbauXWW}EYu zbM(%Co^Ued#PiP=GE6{&hCwS?ju#5BFdEI|xtSvtwN~tAj#$x78JXjutecEx^3>MW z2CNL>WnU4t8no;abnmK;*asW`&9_r@p4hTFE;!m5v{Gd8;>8m@RMf4VK-rva`KE?B zpiI=hW#eV=wL?2@C*Ks`8nt)5-fWO~dAok?OYe$zJD<OU6d#R_DjZD#T2nzMhR*aU z+kgD91*?mapkDmGn*Hqu6Aa?mpM0)d5u){^$nx37^9cqL_U>G7yfp89S!RCs{YFsg zear}&Vq-|y7*X)_)YRWLQf$o!D-0~YhTQ|XsA}=Vf79>8zl<t*c!(9WHm9-@R4mW* zS+*)}@xA0~+3s)qo+lpL^nK&sV+A5&Vq&ZQrGrf623_{bd|(}Gx{VzBhV0Xx|JH3e ztztIU+1WXC{n{;0V&dYC{rvpA@ZX=xFJHepuD%Lhj98nuGGtZNnooZ{3#9vxzpU<Z zQL6c}SbnXf{zkUBbLXzjmRxoH^~ZJPdsn}c(E7eMM(;Yy)u~|%-&dZm{_y3p|KsiT zzqhaM0}cJ`nJCD4MrG!~1cP^++}zwdN?u-KHg9|RGV|3_P$={?BNAnEA<IAeJ7E)! VpFJM(l!1YP!PC{xWt~$(6986*(#!w= literal 0 HcmV?d00001 diff --git a/cmake/cmake-modules/module-docs/Example-FindMyPackage-UsingImportedTargets.cmake b/cmake/cmake-modules/module-docs/Example-FindMyPackage-UsingImportedTargets.cmake new file mode 100644 index 000000000..23ac10b2b --- /dev/null +++ b/cmake/cmake-modules/module-docs/Example-FindMyPackage-UsingImportedTargets.cmake @@ -0,0 +1,193 @@ +# - try to find MyPackage library +# +# Example-FindMyPackage-UsingImportedTargets.cmake +# +# This module does the same thing as Example-FindMyPackage.cmake +# except that rather than passing along full path names for libraries, +# it creates imported targets. The end result is roughly the same to +# the end-user. Please see that other file for the full documentation +# of the example. +# +# Note that if you're going to be installing target export files, this +# is probably what you should prefer. See cmake mailing list archives. +# +# Start of what would be a minimal module documentation block: +# +# Cache Variables: (not for direct use in CMakeLists.txt) +# MYPACKAGE_ROOT +# MYPACKAGE_LIBRARY +# MYPACKAGE_INCLUDE_DIR +# MYPACKAGE_a_LIBRARY +# MYPACKAGE_a_INCLUDE_DIR +# MYPACKAGE_b_LIBRARY +# MYPACKAGE_b_INCLUDE_DIR +# MYPACKAGE_c_LIBRARY +# MYPACKAGE_c_INCLUDE_DIR +# +# Non-cache variables you might use in your CMakeLists.txt: +# MYPACKAGE_FOUND +# +# MYPACKAGE_LIBRARIES +# MYPACKAGE_INCLUDE_DIRS +# MYPACKAGE_LINKER_FLAGS +# +# MYPACKAGE_a_LIBRARIES +# MYPACKAGE_a_INCLUDE_DIRS +# MYPACKAGE_a_LINKER_FLAGS +# +# MYPACKAGE_b_LIBRARIES +# MYPACKAGE_b_INCLUDE_DIRS +# MYPACKAGE_b_LINKER_FLAGS +# +# MYPACKAGE_c_LIBRARIES +# MYPACKAGE_c_INCLUDE_DIRS +# MYPACKAGE_c_LINKER_FLAGS +# +# Use this module this way: +# find_package(MyPackage) +# include_directories(${MYPACKAGE_INCLUDE_DIRS}) +# add_executable(myapp ${SOURCES}) +# target_link_libraries(myapp ${MYPACKAGE_LIBRARIES}) +# set_property(TARGET myapp PROPERTY LINK_FLAGS ${MYPACKAGE_LINKER_FLAGS}) +# +# Requires these CMake modules: +# FindPackageHandleStandardArgs (CMake standard module) +# +# Original Author: +# 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> +# http://academic.cleardefinition.com +# Iowa State University HCI Graduate Program/VRAC + +set(MYPACKAGE_ROOT + "${MYPACKAGE_ROOT}" + CACHE + PATH + "Root directory to look in") + +find_library(MYPACKAGE_LIBRARY + NAMES + mypackagecore + PATHS + "${MYPACKAGE_ROOT}" + PATH_SUFFIXES + lib) + +find_path(MYPACKAGE_INCLUDE_DIR + NAMES + mypackage/mypackage.h + PATHS + "${MYPACKAGE_ROOT}" + PATH_SUFFIXES + include) + +# Assuming that the components are named libmypackagea, libmypackageb, etc +foreach(lib a b c) + find_library(MYPACKAGE_${lib}_LIBRARY + NAMES + mypackage${lib} + PATHS + "${MYPACKAGE_ROOT}" + PATH_SUFFIXES + lib) + + find_path(MYPACKAGE_${lib}_INCLUDE_DIR + NAMES + mypackage/${lib}/${lib}.h + PATHS + "${MYPACKAGE_ROOT}" + PATH_SUFFIXES + include) + +endforeach() + +# see /usr/share/cmake-2.x/Modules/FindBLAS.cmake for the variables this will define +if(NOT BLAS_FOUND) + find_package(BLAS QUIETLY) +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(MyPackage + DEFAULT_MSG + MYPACKAGE_LIBRARY + MYPACKAGE_INCLUDE_DIR + MYPACKAGE_a_LIBRARY + MYPACKAGE_a_INCLUDE_DIR + MYPACKAGE_b_LIBRARY + MYPACKAGE_b_INCLUDE_DIR + MYPACKAGE_c_LIBRARY + MYPACKAGE_c_INCLUDE_DIR + BLAS_FOUND) + +if(MYPACKAGE_FOUND) + # Set variables containing libraries and their dependencies + # Always use the plural form for the variables defined by other find modules: + # they might have dependencies too! + + add_library(mypackage_c IMPORTED) + set_target_properties(mypackage_c + PROPERTIES + IMPORTED_LOCATION + ${MYPACKAGE_c_LIBRARY} + IMPORTED_LINK_INTERFACE_LIBRARIES + ${BLAS_LIBRARIES}) + set(MYPACKAGE_c_LIBRARIES mypackage_c) + set(MYPACKAGE_c_INCLUDE_DIRS ${MYPACKAGE_c_INCLUDE_DIR}) # No include dir for BLAS? + set(MYPACKAGE_c_LINKER_FLAGS ${BLAS_LINKER_FLAGS}) + + add_library(mypackage_b IMPORTED) + set_target_properties(mypackage_b + PROPERTIES + IMPORTED_LOCATION + ${MYPACKAGE_b_LIBRARY} + IMPORTED_LINK_INTERFACE_LIBRARIES + ${MYPACKAGE_c_LIBRARIES}) + set(MYPACKAGE_b_LIBRARIES mypackage_b) + set(MYPACKAGE_b_INCLUDE_DIRS + ${MYPACKAGE_b_INCLUDE_DIR} + ${MYPACKAGE_c_INCLUDE_DIRS}) + set(MYPACKAGE_b_LINKER_FLAGS ${MYPACKAGE_c_LINKER_FLAGS}) + + add_library(mypackage_a IMPORTED) + set_target_properties(mypackage_a + PROPERTIES + IMPORTED_LOCATION + ${MYPACKAGE_a_LIBRARY} + IMPORTED_LINK_INTERFACE_LIBRARIES + ${MYPACKAGE_b_LIBRARIES}) + set(MYPACKAGE_a_LIBRARIES mypackage_a) + set(MYPACKAGE_a_INCLUDE_DIRS + ${MYPACKAGE_a_INCLUDE_DIR} + ${MYPACKAGE_b_INCLUDE_DIRS}) + set(MYPACKAGE_a_LINKER_FLAGS ${MYPACKAGE_b_LINKER_FLAGS}) + + add_library(mypackage_core IMPORTED) + set_target_properties(mypackage_core + PROPERTIES + IMPORTED_LOCATION + ${MYPACKAGE_LIBRARY} + IMPORTED_LINK_INTERFACE_LIBRARIES + ${MYPACKAGE_a_LIBRARIES}) + set(MYPACKAGE_LIBRARIES mypackage_core) + set(MYPACKAGE_INCLUDE_DIRS + ${MYPACKAGE_INCLUDE_DIR} + ${MYPACKAGE_a_INCLUDE_DIRS}) + set(MYPACKAGE_LINKER_FLAGS ${MYPACKAGE_a_LINKER_FLAGS}) + +endif() + +mark_as_advanced(MYPACKAGE_LIBRARY + MYPACKAGE_INCLUDE_DIR + MYPACKAGE_a_LIBRARY + MYPACKAGE_a_INCLUDE_DIR + MYPACKAGE_b_LIBRARY + MYPACKAGE_b_INCLUDE_DIR + MYPACKAGE_c_LIBRARY + MYPACKAGE_c_INCLUDE_DIR) + +if(MYPACKAGE_FOUND) + mark_as_advanced(MYPACKAGE_ROOT) +endif() + +# End of Example-FindMyPackage-UsingImportedTargets.cmake diff --git a/cmake/cmake-modules/module-docs/Example-FindMyPackage.cmake b/cmake/cmake-modules/module-docs/Example-FindMyPackage.cmake new file mode 100644 index 000000000..cdf3bfcad --- /dev/null +++ b/cmake/cmake-modules/module-docs/Example-FindMyPackage.cmake @@ -0,0 +1,189 @@ +# - try to find MyPackage library +# +# Example-FindMyPackage.cmake +# +# This example is for a fairly in-depth library that has four +# internal dependencies as well as an external dependency. +# The dependency tree is described below, in graphviz/dot format, and you +# can remove the #'s from the following lines and run it through graphviz, +# with this command: dot dependencies.dot -O -Tpdf +# +# --- start of dependencies.dot --- +# digraph { +# BLAS; +# subgraph cluster_mypackage { +# label = "Components that are part of MyPackage"; +# libmypackagecore -> libmypackagea; +# libmypackagea -> libmypackageb; +# libmypackageb -> libmypackagec; +# libmypackagec -> BLAS; +# } +# } +# --- end of dependencies.dot --- +# +# Because our imaginary component "c" requires BLAS and BLAS needs some +# linker flags, MYPACKAGE_..._LINKER_FLAGS joins the usual group of +# _LIBRARY/_LIBRARIES and _INCLUDE_DIR/_INCLUDE_DIRS variables. If +# you don't use a library like that, you don't need to include the +# lines dealing with that group of variables. +# +# Most library aren't nearly this complex - but some are, and many +# have some parts of the complexity handled here. +# +# Start of what would be a minimal module documentation block: +# +# Cache Variables: (not for direct use in CMakeLists.txt) +# MYPACKAGE_ROOT +# MYPACKAGE_LIBRARY +# MYPACKAGE_INCLUDE_DIR +# MYPACKAGE_a_LIBRARY +# MYPACKAGE_a_INCLUDE_DIR +# MYPACKAGE_b_LIBRARY +# MYPACKAGE_b_INCLUDE_DIR +# MYPACKAGE_c_LIBRARY +# MYPACKAGE_c_INCLUDE_DIR +# +# Non-cache variables you might use in your CMakeLists.txt: +# MYPACKAGE_FOUND +# +# MYPACKAGE_LIBRARIES +# MYPACKAGE_INCLUDE_DIRS +# MYPACKAGE_LINKER_FLAGS +# +# MYPACKAGE_a_LIBRARIES +# MYPACKAGE_a_INCLUDE_DIRS +# MYPACKAGE_a_LINKER_FLAGS +# +# MYPACKAGE_b_LIBRARIES +# MYPACKAGE_b_INCLUDE_DIRS +# MYPACKAGE_b_LINKER_FLAGS +# +# MYPACKAGE_c_LIBRARIES +# MYPACKAGE_c_INCLUDE_DIRS +# MYPACKAGE_c_LINKER_FLAGS +# +# Use this module this way: +# find_package(MyPackage) +# include_directories(${MYPACKAGE_INCLUDE_DIRS}) +# add_executable(myapp ${SOURCES}) +# target_link_libraries(myapp ${MYPACKAGE_LIBRARIES}) +# set_property(TARGET myapp PROPERTY LINK_FLAGS ${MYPACKAGE_LINKER_FLAGS}) +# +# Requires these CMake modules: +# FindPackageHandleStandardArgs (CMake standard module) +# +# Original Author: +# 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> +# http://academic.cleardefinition.com +# Iowa State University HCI Graduate Program/VRAC + +set(MYPACKAGE_ROOT + "${MYPACKAGE_ROOT}" + CACHE + PATH + "Root directory to look in") + +find_library(MYPACKAGE_LIBRARY + NAMES + mypackagecore + PATHS + "${MYPACKAGE_ROOT}" + PATH_SUFFIXES + lib) + +find_path(MYPACKAGE_INCLUDE_DIR + NAMES + mypackage/mypackage.h + PATHS + "${MYPACKAGE_ROOT}" + PATH_SUFFIXES + include) + +# Assuming that the components are named libmypackagea, libmypackageb, etc +foreach(lib a b c) + find_library(MYPACKAGE_${lib}_LIBRARY + NAMES + mypackage${lib} + PATHS + "${MYPACKAGE_ROOT}" + PATH_SUFFIXES + lib) + + find_path(MYPACKAGE_${lib}_INCLUDE_DIR + NAMES + mypackage/${lib}/${lib}.h + PATHS + "${MYPACKAGE_ROOT}" + PATH_SUFFIXES + include) + +endforeach() + +# Searching for dependencies here - always quiet. +# see /usr/share/cmake-2.x/Modules/FindBLAS.cmake for the variables this will define +if(NOT BLAS_FOUND) + find_package(BLAS QUIETLY) +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(MyPackage + DEFAULT_MSG + MYPACKAGE_LIBRARY + MYPACKAGE_INCLUDE_DIR + MYPACKAGE_a_LIBRARY + MYPACKAGE_a_INCLUDE_DIR + MYPACKAGE_b_LIBRARY + MYPACKAGE_b_INCLUDE_DIR + MYPACKAGE_c_LIBRARY + MYPACKAGE_c_INCLUDE_DIR + BLAS_FOUND) + +if(MYPACKAGE_FOUND) + # Set variables containing libraries and their dependencies + # Always use the plural form for the variables defined by other find modules: + # they might have dependencies too! + + set(MYPACKAGE_c_LIBRARIES ${MYPACKAGE_c_LIBRARY} ${BLAS_LIBRARIES}) + set(MYPACKAGE_c_INCLUDE_DIRS ${MYPACKAGE_c_INCLUDE_DIR}) # No include dir for BLAS? + set(MYPACKAGE_c_LINKER_FLAGS ${BLAS_LINKER_FLAGS}) + + set(MYPACKAGE_b_LIBRARIES + ${MYPACKAGE_b_LIBRARY} + ${MYPACKAGE_c_LIBRARIES}) + set(MYPACKAGE_b_INCLUDE_DIRS + ${MYPACKAGE_b_INCLUDE_DIR} + ${MYPACKAGE_c_INCLUDE_DIRS}) + set(MYPACKAGE_b_LINKER_FLAGS ${MYPACKAGE_c_LINKER_FLAGS}) + + set(MYPACKAGE_a_LIBRARIES + ${MYPACKAGE_a_LIBRARY} + ${MYPACKAGE_b_LIBRARIES}) + set(MYPACKAGE_a_INCLUDE_DIRS + ${MYPACKAGE_a_INCLUDE_DIR} + ${MYPACKAGE_b_INCLUDE_DIRS}) + set(MYPACKAGE_a_LINKER_FLAGS ${MYPACKAGE_b_LINKER_FLAGS}) + + set(MYPACKAGE_LIBRARIES ${MYPACKAGE_LIBRARY} ${MYPACKAGE_a_LIBRARIES}) + set(MYPACKAGE_INCLUDE_DIRS + ${MYPACKAGE_INCLUDE_DIR} + ${MYPACKAGE_a_INCLUDE_DIRS}) + set(MYPACKAGE_LINKER_FLAGS ${MYPACKAGE_a_LINKER_FLAGS}) + +endif() + +mark_as_advanced(MYPACKAGE_LIBRARY + MYPACKAGE_INCLUDE_DIR + MYPACKAGE_a_LIBRARY + MYPACKAGE_a_INCLUDE_DIR + MYPACKAGE_b_LIBRARY + MYPACKAGE_b_INCLUDE_DIR + MYPACKAGE_c_LIBRARY + MYPACKAGE_c_INCLUDE_DIR) + +if(MYPACKAGE_FOUND) + mark_as_advanced(MYPACKAGE_ROOT) +endif() + +# End of Example-FindMyPackage.cmake diff --git a/cmake/cmake-modules/module-docs/Example-FindMySimplePackage.cmake b/cmake/cmake-modules/module-docs/Example-FindMySimplePackage.cmake new file mode 100644 index 000000000..678b8684e --- /dev/null +++ b/cmake/cmake-modules/module-docs/Example-FindMySimplePackage.cmake @@ -0,0 +1,101 @@ +# - try to find MySimplePackage library +# +# Example-MySimplePackage.cmake +# +# This example is for a pretty simple library but that is still fairly +# common in its complexity. +# +# Cache Variables: (probably not for direct use in your scripts) +# MYSIMPLEPACKAGE_INCLUDE_DIR +# MYSIMPLEPACKAGE_LIBRARY +# +# Non-cache variables you might use in your CMakeLists.txt: +# MYSIMPLEPACKAGE_FOUND +# MYSIMPLEPACKAGE_INCLUDE_DIRS +# MYSIMPLEPACKAGE_LIBRARIES +# MYSIMPLEPACKAGE_RUNTIME_LIBRARIES - aka the dll for installing +# MYSIMPLEPACKAGE_RUNTIME_LIBRARY_DIRS +# +# Requires these CMake modules: +# FindPackageHandleStandardArgs (known included with CMake >=2.6.2) +# +# Original Author: +# 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> +# http://academic.cleardefinition.com +# Iowa State University HCI Graduate Program/VRAC +# +# Copyright Iowa State University 2009-2010. +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE_1_0.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) + +set(MYSIMPLEPACKAGE_ROOT_DIR + "${MYSIMPLEPACKAGE_ROOT_DIR}" + CACHE + PATH + "Directory to search") + +if(CMAKE_SIZEOF_VOID_P MATCHES "8") + set(_LIBSUFFIXES /lib64 /lib) +else() + set(_LIBSUFFIXES /lib) +endif() + +find_library(MYSIMPLEPACKAGE_LIBRARY + NAMES + mysimplepackage + PATHS + "${MYSIMPLEPACKAGE_ROOT_DIR}" + PATH_SUFFIXES + "${_LIBSUFFIXES}") + +# Might want to look close to the library first for the includes. +get_filename_component(_libdir "${MYSIMPLEPACKAGE_LIBRARY}" PATH) + +find_path(MYSIMPLEPACKAGE_INCLUDE_DIR + NAMES + mysimplepackage.h + HINTS + "${_libdir}" # the library I based this on was sometimes bundled right next to its include + "${_libdir}/.." + PATHS + "${MYSIMPLEPACKAGE_ROOT_DIR}" + PATH_SUFFIXES + include/) + +# There's a DLL to distribute on Windows - find where it is. +set(_deps_check) +if(WIN32) + find_file(MYSIMPLEPACKAGE_RUNTIME_LIBRARY + NAMES + mysimplepackage.dll + HINTS + "${_libdir}") + set(MYSIMPLEPACKAGE_RUNTIME_LIBRARIES + "${MYSIMPLEPACKAGE_RUNTIME_LIBRARY}") + get_filename_component(MYSIMPLEPACKAGE_RUNTIME_LIBRARY_DIRS + "${MYSIMPLEPACKAGE_RUNTIME_LIBRARY}" + PATH) + list(APPEND _deps_check MYSIMPLEPACKAGE_RUNTIME_LIBRARY) +else() + get_filename_component(MYSIMPLEPACKAGE_RUNTIME_LIBRARY_DIRS + "${MYSIMPLEPACKAGE_LIBRARY}" + PATH) +endif() + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(MySimplePackage + DEFAULT_MSG + MYSIMPLEPACKAGE_LIBRARY + MYSIMPLEPACKAGE_INCLUDE_DIR + ${_deps_check}) + +if(MYSIMPLEPACKAGE_FOUND) + set(MYSIMPLEPACKAGE_LIBRARIES "${MYSIMPLEPACKAGE_LIBRARY}") + set(MYSIMPLEPACKAGE_INCLUDE_DIRS "${MYSIMPLEPACKAGE_INCLUDE_DIR}") + mark_as_advanced(MYSIMPLEPACKAGE_ROOT_DIR) +endif() + +mark_as_advanced(MYSIMPLEPACKAGE_INCLUDE_DIR + MYSIMPLEPACKAGE_LIBRARY + MYSIMPLEPACKAGE_RUNTIME_LIBRARY) diff --git a/cmake/cmake-modules/module-help.html b/cmake/cmake-modules/module-help.html new file mode 100644 index 000000000..e051192bd --- /dev/null +++ b/cmake/cmake-modules/module-help.html @@ -0,0 +1,1818 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> +<head><meta http-equiv="Content-Type" content="text/html;charset=utf-8" /><title>module-help - cmake</title></head><body> +<h2><a name="section_Index"></a>Master Index CMake 2.8.11.1</h2> +<ul> + <li><a href="#section_Introduction"><b>Introduction</b></a></li> + <li><a href="#section_Description"><b>Description</b></a></li> + <li><a href="#section_CustomCMakeModules"><b>Custom CMake Modules</b></a></li> + <li><a href="#section_SeeAlso"><b>See Also</b></a></li> +</ul> +<h2><a name="section_Introduction"></a>Introduction</h2> +<p>module-help - Reference of available CMake custom modules.</p> + +<h2><a name="section_Description"></a>Description</h2> +<p>The "cmake" executable is the CMake command-line interface. It may be used to configure projects in scripts. Project configuration settings may be specified on the command line with the -D option. The -i option will cause cmake to interactively prompt for such settings.</p> + +<p>CMake is a cross-platform build system generator. Projects specify their build process with platform-independent CMake listfiles included in each directory of a source tree with the name CMakeLists.txt. Users build a project by using CMake to generate a build system for a native tool on their platform.</p> + +<h2><a name="section_CustomCMakeModules"></a>Custom CMake Modules</h2> +<ul> + <li><a href="#module:AboutTheseModules"><b><code>AboutTheseModules</code></b></a></li> + <li><a href="#module:BoostTestTargets"><b><code>BoostTestTargets</code></b></a></li> + <li><a href="#module:BundleOSGPlugins"><b><code>BundleOSGPlugins</code></b></a></li> + <li><a href="#module:BundleOSGRuntime"><b><code>BundleOSGRuntime</code></b></a></li> + <li><a href="#module:BundleVRJ22Runtime"><b><code>BundleVRJ22Runtime</code></b></a></li> + <li><a href="#module:BundleVRJ30Runtime"><b><code>BundleVRJ30Runtime</code></b></a></li> + <li><a href="#module:CheckMacHIDAPI"><b><code>CheckMacHIDAPI</code></b></a></li> + <li><a href="#module:CheckVersion"><b><code>CheckVersion</code></b></a></li> + <li><a href="#module:CleanDirectoryList"><b><code>CleanDirectoryList</code></b></a></li> + <li><a href="#module:CleanLibraryList"><b><code>CleanLibraryList</code></b></a></li> + <li><a href="#module:CopyResourcesToBuildTree"><b><code>CopyResourcesToBuildTree</code></b></a></li> + <li><a href="#module:CppcheckTargets"><b><code>CppcheckTargets</code></b></a></li> + <li><a href="#module:CreateDashboardScripts"><b><code>CreateDashboardScripts</code></b></a></li> + <li><a href="#module:CreateImportedTarget"><b><code>CreateImportedTarget</code></b></a></li> + <li><a href="#module:CreateLaunchers"><b><code>CreateLaunchers</code></b></a></li> + <li><a href="#module:DoxygenTargets"><b><code>DoxygenTargets</code></b></a></li> + <li><a href="#module:EnableExtraCompilerWarnings"><b><code>EnableExtraCompilerWarnings</code></b></a></li> + <li><a href="#module:EnableProfiling"><b><code>EnableProfiling</code></b></a></li> + <li><a href="#module:FileCopyTargets"><b><code>FileCopyTargets</code></b></a></li> + <li><a href="#module:FindALUT"><b><code>FindALUT</code></b></a></li> + <li><a href="#module:FindAdrienne"><b><code>FindAdrienne</code></b></a></li> + <li><a href="#module:FindBluez"><b><code>FindBluez</code></b></a></li> + <li><a href="#module:FindCPPDOM"><b><code>FindCPPDOM</code></b></a></li> + <li><a href="#module:FindDCubed"><b><code>FindDCubed</code></b></a></li> + <li><a href="#module:FindDirectInput"><b><code>FindDirectInput</code></b></a></li> + <li><a href="#module:FindDirectShow"><b><code>FindDirectShow</code></b></a></li> + <li><a href="#module:FindDirectX"><b><code>FindDirectX</code></b></a></li> + <li><a href="#module:FindFlagpoll"><b><code>FindFlagpoll</code></b></a></li> + <li><a href="#module:FindGDB"><b><code>FindGDB</code></b></a></li> + <li><a href="#module:FindGHOST"><b><code>FindGHOST</code></b></a></li> + <li><a href="#module:FindGLUI"><b><code>FindGLUI</code></b></a></li> + <li><a href="#module:FindGLUT"><b><code>FindGLUT</code></b></a></li> + <li><a href="#module:FindGMTL"><b><code>FindGMTL</code></b></a></li> + <li><a href="#module:FindGPM"><b><code>FindGPM</code></b></a></li> + <li><a href="#module:FindGadgeteer12"><b><code>FindGadgeteer12</code></b></a></li> + <li><a href="#module:FindGadgeteer20"><b><code>FindGadgeteer20</code></b></a></li> + <li><a href="#module:FindGlove5DT"><b><code>FindGlove5DT</code></b></a></li> + <li><a href="#module:FindHIDAPI"><b><code>FindHIDAPI</code></b></a></li> + <li><a href="#module:FindIDLJ"><b><code>FindIDLJ</code></b></a></li> + <li><a href="#module:FindInterSense"><b><code>FindInterSense</code></b></a></li> + <li><a href="#module:FindJCCL12"><b><code>FindJCCL12</code></b></a></li> + <li><a href="#module:FindJCCL14"><b><code>FindJCCL14</code></b></a></li> + <li><a href="#module:FindJtTk"><b><code>FindJtTk</code></b></a></li> + <li><a href="#module:FindLAPACKLibs"><b><code>FindLAPACKLibs</code></b></a></li> + <li><a href="#module:FindLibusb1"><b><code>FindLibusb1</code></b></a></li> + <li><a href="#module:FindLuabind"><b><code>FindLuabind</code></b></a></li> + <li><a href="#module:FindLyX"><b><code>FindLyX</code></b></a></li> + <li><a href="#module:FindMacHID"><b><code>FindMacHID</code></b></a></li> + <li><a href="#module:FindMarkdown"><b><code>FindMarkdown</code></b></a></li> + <li><a href="#module:FindOpenCV"><b><code>FindOpenCV</code></b></a></li> + <li><a href="#module:FindOpenHaptics"><b><code>FindOpenHaptics</code></b></a></li> + <li><a href="#module:FindParasolid"><b><code>FindParasolid</code></b></a></li> + <li><a href="#module:FindPerformer"><b><code>FindPerformer</code></b></a></li> + <li><a href="#module:FindPerlModules"><b><code>FindPerlModules</code></b></a></li> + <li><a href="#module:FindQVRPN"><b><code>FindQVRPN</code></b></a></li> + <li><a href="#module:FindSonix12"><b><code>FindSonix12</code></b></a></li> + <li><a href="#module:FindSonix14"><b><code>FindSonix14</code></b></a></li> + <li><a href="#module:FindTR1"><b><code>FindTR1</code></b></a></li> + <li><a href="#module:FindTooN"><b><code>FindTooN</code></b></a></li> + <li><a href="#module:FindTooNtag"><b><code>FindTooNtag</code></b></a></li> + <li><a href="#module:FindTweek12"><b><code>FindTweek12</code></b></a></li> + <li><a href="#module:FindTweek14"><b><code>FindTweek14</code></b></a></li> + <li><a href="#module:FindVPR20"><b><code>FindVPR20</code></b></a></li> + <li><a href="#module:FindVPR22"><b><code>FindVPR22</code></b></a></li> + <li><a href="#module:FindVPS"><b><code>FindVPS</code></b></a></li> + <li><a href="#module:FindVRJ22"><b><code>FindVRJ22</code></b></a></li> + <li><a href="#module:FindVRJ30"><b><code>FindVRJ30</code></b></a></li> + <li><a href="#module:FindVRJOGL22"><b><code>FindVRJOGL22</code></b></a></li> + <li><a href="#module:FindVRJOGL30"><b><code>FindVRJOGL30</code></b></a></li> + <li><a href="#module:FindVRJuggler"><b><code>FindVRJuggler</code></b></a></li> + <li><a href="#module:FindVRJuggler22"><b><code>FindVRJuggler22</code></b></a></li> + <li><a href="#module:FindVRJuggler30"><b><code>FindVRJuggler30</code></b></a></li> + <li><a href="#module:FindVRPN"><b><code>FindVRPN</code></b></a></li> + <li><a href="#module:FindViewPoint"><b><code>FindViewPoint</code></b></a></li> + <li><a href="#module:FindVirtuoseAPI"><b><code>FindVirtuoseAPI</code></b></a></li> + <li><a href="#module:FindVirtuoseVPP"><b><code>FindVirtuoseVPP</code></b></a></li> + <li><a href="#module:FindWiiSCAAT"><b><code>FindWiiSCAAT</code></b></a></li> + <li><a href="#module:FindWiiUse"><b><code>FindWiiUse</code></b></a></li> + <li><a href="#module:FindWinHID"><b><code>FindWinHID</code></b></a></li> + <li><a href="#module:FindWindowsSDK"><b><code>FindWindowsSDK</code></b></a></li> + <li><a href="#module:Findargp"><b><code>Findargp</code></b></a></li> + <li><a href="#module:Findcppcheck"><b><code>Findcppcheck</code></b></a></li> + <li><a href="#module:Findcppunit"><b><code>Findcppunit</code></b></a></li> + <li><a href="#module:Findcutil"><b><code>Findcutil</code></b></a></li> + <li><a href="#module:Finddb2pdf"><b><code>Finddb2pdf</code></b></a></li> + <li><a href="#module:FindosgLua"><b><code>FindosgLua</code></b></a></li> + <li><a href="#module:Findquatlib"><b><code>Findquatlib</code></b></a></li> + <li><a href="#module:GetCPUDetails"><b><code>GetCPUDetails</code></b></a></li> + <li><a href="#module:GetCompilerInfoString"><b><code>GetCompilerInfoString</code></b></a></li> + <li><a href="#module:GetDirectoryList"><b><code>GetDirectoryList</code></b></a></li> + <li><a href="#module:GetFileList"><b><code>GetFileList</code></b></a></li> + <li><a href="#module:GetForceIncludeDefinitions"><b><code>GetForceIncludeDefinitions</code></b></a></li> + <li><a href="#module:GetGitRevisionDescription"><b><code>GetGitRevisionDescription</code></b></a></li> + <li><a href="#module:GetSubprojectStatus"><b><code>GetSubprojectStatus</code></b></a></li> + <li><a href="#module:Licensing"><b><code>Licensing</code></b></a></li> + <li><a href="#module:ListCombinations"><b><code>ListCombinations</code></b></a></li> + <li><a href="#module:ListFilter"><b><code>ListFilter</code></b></a></li> + <li><a href="#module:LuaTargets"><b><code>LuaTargets</code></b></a></li> + <li><a href="#module:MSVCMultipleProcessCompile"><b><code>MSVCMultipleProcessCompile</code></b></a></li> + <li><a href="#module:MSVCStaticRuntime"><b><code>MSVCStaticRuntime</code></b></a></li> + <li><a href="#module:MSVCVerboseLinking"><b><code>MSVCVerboseLinking</code></b></a></li> + <li><a href="#module:OptionRequires"><b><code>OptionRequires</code></b></a></li> + <li><a href="#module:PrefixListGlob"><b><code>PrefixListGlob</code></b></a></li> + <li><a href="#module:ProgramFilesGlob"><b><code>ProgramFilesGlob</code></b></a></li> + <li><a href="#module:ResetConfigurations"><b><code>ResetConfigurations</code></b></a></li> + <li><a href="#module:SearchProgramFilesForOpenSceneGraph"><b><code>SearchProgramFilesForOpenSceneGraph</code></b></a></li> + <li><a href="#module:SetDefaultBuildType"><b><code>SetDefaultBuildType</code></b></a></li> + <li><a href="#module:SplitLibraryList"><b><code>SplitLibraryList</code></b></a></li> + <li><a href="#module:StampSourcesWithVersion"><b><code>StampSourcesWithVersion</code></b></a></li> + <li><a href="#module:TCHARWorkaround"><b><code>TCHARWorkaround</code></b></a></li> + <li><a href="#module:UseBackportedModules"><b><code>UseBackportedModules</code></b></a></li> + <li><a href="#module:UseMarkdown"><b><code>UseMarkdown</code></b></a></li> + <li><a href="#module:UseTR1"><b><code>UseTR1</code></b></a></li> + <li><a href="#module:WarningDev"><b><code>WarningDev</code></b></a></li> +</ul> +<p>The following modules are also available for CMake. They can be used with INCLUDE(ModuleName).</p> + +<pre> Custom CMake Modules - Additional Modules for CMake.</pre> + +<p>This is the documentation for additional modules and scripts for CMake. Using these modules you can check the computer system for installed software packages, features of the compiler and the existance of headers to name just a few.</p> + +<ul> + <li> + <a name="module:AboutTheseModules"></a><b><code>AboutTheseModules</code></b>: Dummy module containing information about these modules for the HELP file<br /> + <p>This file documents a snapshot of the cmake-modules available from <a href="http://github.com/rpavlik/cmake-modules/">http://github.com/rpavlik/cmake-modules/</a> The latest version of these modules can always be found there. Additionally, you can find instructions on how to integrate these modules into your own project either in the README.markdown file in this directory, or on the GitHub page listed above (scroll to the bottom to see the README rendered attractively).<br /></p> +<p>In short: Modules of the form "FindSomeName.cmake" are considered to be "find modules", and are intended to be used indirectly by calling find_package, not by calling include. Thus, you'll want to do something like:<br /></p> +<pre> find_package(SomeName)<br /></pre> + <p>They define a number of variables allowing you to use whatever software they search for, such as include directories and libraries. A few also define some functions for your use.<br /></p> +<p>All other modules provide functionality, either immediately upon including them, or by defining functions that perform some task of varying utility that you can use any time after including them. Note that if a module has the filename, for example, cmake/BoostTestTargets.cmake, you only need to call:<br /></p> +<pre> include(BoostTestTargets)<br /></pre> + <p><br /></p> +<p>For more information, see the documentation for individual modules, the cmake-modules github page, and/or the upstream CMake documentation at <a href="http://www.cmake.org/cmake/help/cmake-2-8-docs.html">http://www.cmake.org/cmake/help/cmake-2-8-docs.html</a><br /></p> +<p><br /></p> +<p>Copyright Iowa State University 2009-2010. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt">http://www.boost.org/LICENSE_1_0.txt</a>)</p> + + </li> + <li> + <a name="module:BoostTestTargets"></a><b><code>BoostTestTargets</code></b>: Add tests using boost::test<br /> + <p><br /></p> +<p>Add this line to your test files in place of including a basic boost test header:<br /></p> +<pre> #include <BoostTestTargetConfig.h><br /></pre> + <p><br /></p> +<p>If you cannot do that and must use the included form for a given test, include the line<br /></p> +<pre> // OVERRIDE_BOOST_TEST_INCLUDED_WARNING<br /></pre> + <p>in the same file with the boost test include.<br /></p> +<pre> include(BoostTestTargets)<br /> add_boost_test(<testdriver_name> SOURCES <source1> [<more sources...>]<br /> [FAIL_REGULAR_EXPRESSION <additional fail regex>]<br /> [LAUNCHER <generic launcher script>]<br /> [LIBRARIES <library> [<library>...]]<br /> [RESOURCES <resource> [<resource>...]]<br /> [TESTS <testcasename> [<testcasename>...]])<br /></pre> + <p><br /></p> +<pre> If for some reason you need access to the executable target created,<br /> it can be found in ${${testdriver_name}_TARGET_NAME} as specified when<br /> you called add_boost_test<br /></pre> + <p><br /></p> +<p>Requires CMake 2.6 or newer (uses the 'function' command)<br /></p> +<p>Requires: GetForceIncludeDefinitions CopyResourcesToBuildTree<br /></p> +<p>Original Author: 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> <a href="http://academic.cleardefinition.com">http://academic.cleardefinition.com</a> Iowa State University HCI Graduate Program/VRAC<br /></p> +<p>Copyright Iowa State University 2009-2010. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt">http://www.boost.org/LICENSE_1_0.txt</a>)</p> + + </li> + <li> + <a name="module:BundleOSGPlugins"></a><b><code>BundleOSGPlugins</code></b>: Provide access to the OpenSceneGraph runtime files for bundling in<br /> + <p>an installation or package.<br /></p> +<p>Sets these variables:<br /></p> +<pre> - OSGDB_PLUGINS_RELEASE<br /> - OSGDB_PLUGINS_DEBUG<br /> - OSGWRAPPER_PLUGINS_RELEASE<br /> - OSGWRAPPER_PLUGINS_DEBUG<br /> - OSG_RUNTIME_LIBRARY_DIR<br /> - OSG_PATH_TO_PLUGINS<br /></pre> + <p><br /></p> +<p>Creates this function:<br /></p> +<pre> - install_osg_plugins( {varNameForOutputFilenames} )<br /></pre> + <p><br /></p> +<p>Requires these CMake modules:<br /></p> +<pre> no additional modules required<br /></pre> + <p><br /></p> +<p>Original Author: 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> <a href="http://academic.cleardefinition.com">http://academic.cleardefinition.com</a> Iowa State University HCI Graduate Program/VRAC<br /></p> +<p>Copyright Iowa State University 2009-2010. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt">http://www.boost.org/LICENSE_1_0.txt</a>)</p> + + </li> + <li> + <a name="module:BundleOSGRuntime"></a><b><code>BundleOSGRuntime</code></b>: Include the OpenSceneGraph runtime files in an installation or built package.<br /> + <p><br /></p> +<pre> OSGRUNTIME_BUNDLE - Set to "yes" to enable this behavior<br /> OSGRUNTIME_zlib1dll - Must be set to the location of zlib1.dll on Windows<br /> OSGRUNTIME_zlib1ddll - Can be set to the location of zlib1d.dll (debug) on Windows.<br /> If set, will be installed.<br /></pre> + <p><br /></p> +<p>Requires these CMake modules:<br /></p> +<pre> no additional modules required<br /></pre> + <p><br /></p> +<p>Original Author: 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> <a href="http://academic.cleardefinition.com">http://academic.cleardefinition.com</a> Iowa State University HCI Graduate Program/VRAC<br /></p> +<p>Copyright Iowa State University 2009-2010. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt">http://www.boost.org/LICENSE_1_0.txt</a>)</p> + + </li> + <li> + <a name="module:BundleVRJ22Runtime"></a><b><code>BundleVRJ22Runtime</code></b>: Include the VR Juggler runtime files in an installation or built package.<br /> + <p><br /></p> +<pre> VRJUGGLERRUNTIME_BUNDLE<br /> VRJUGGLERRUNTIME_BUNDLE_DEBUG - set to yes to include debug dll's as well<br /></pre> + <p><br /></p> +<p>Requires these CMake modules:<br /></p> +<pre> FindVRJuggler22 and its dependencies<br /></pre> + <p><br /></p> +<p>Original Author: 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> <a href="http://academic.cleardefinition.com">http://academic.cleardefinition.com</a> Iowa State University HCI Graduate Program/VRAC<br /></p> +<p>Copyright Iowa State University 2009-2010. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt">http://www.boost.org/LICENSE_1_0.txt</a>)</p> + + </li> + <li> + <a name="module:BundleVRJ30Runtime"></a><b><code>BundleVRJ30Runtime</code></b>: Include the VR Juggler runtime files in an installation or built package.<br /> + <p><br /></p> +<pre> VRJUGGLERRUNTIME_BUNDLE<br /> VRJUGGLERRUNTIME_BUNDLE_DEBUG - set to yes to include debug dll's as well<br /></pre> + <p><br /></p> +<p>Requires these CMake modules:<br /></p> +<pre> FindVRJuggler22 and its dependencies<br /></pre> + <p><br /></p> +<p>Original Author: 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> <a href="http://academic.cleardefinition.com">http://academic.cleardefinition.com</a> Iowa State University HCI Graduate Program/VRAC Updated for VR Juggler 3.0 by: Brandon Newendorp <brandon@newendorp.com></p> + + </li> + <li> + <a name="module:CheckMacHIDAPI"></a><b><code>CheckMacHIDAPI</code></b>: Script to check if the signature for a mac HID callback uses UInt32 or uint32_t<br /> + <p>Requires that the associated CPP file be present: CheckMacHIDAPI.cpp.<br /></p> +<p> MACOSX_HID_UINT32T, set according to the results of our test.<br /></p> +<p>Use add_definitions(-DMACOSX_HID_UINT32T=${MACOSX_HID_UINT32T}) in your listfile and the following prototype for the function you'd like to register using setInterruptReportHandlerCallback:<br /></p> +<pre> void ReaderReportCallback(<br /> void *target,<br /> IOReturn result,<br /> void *refcon,<br /> void *sender,<br /> MACOSX_HID_UINT32T size<br /> )<br /></pre> + <p><br /></p> +<p>Original Author: 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> <a href="http://academic.cleardefinition.com">http://academic.cleardefinition.com</a> Iowa State University HCI Graduate Program/VRAC<br /></p> +<p>Copyright Iowa State University 2009-2010. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt">http://www.boost.org/LICENSE_1_0.txt</a>)</p> + + </li> + <li> + <a name="module:CheckVersion"></a><b><code>CheckVersion</code></b>: Utility function for Find modules considering multiple possible versions<br /> + <p><br /></p> +<p>Requires these CMake modules:<br /></p> +<pre> no additional modules required<br /></pre> + <p><br /></p> +<p>Original Author: 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> <a href="http://academic.cleardefinition.com">http://academic.cleardefinition.com</a> Iowa State University HCI Graduate Program/VRAC<br /></p> +<p>Copyright Iowa State University 2009-2010. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt">http://www.boost.org/LICENSE_1_0.txt</a>)</p> + + </li> + <li> + <a name="module:CleanDirectoryList"></a><b><code>CleanDirectoryList</code></b>: Removes duplicate entries and non-directories from a provided list<br /> + <p><br /></p> +<pre> clean_directory_list(<listvar> [<additional list items>...])<br /></pre> + <p><br /></p> +<p>Requires CMake 2.6 or newer (uses the 'function' command)<br /></p> +<p>Original Author: 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> <a href="http://academic.cleardefinition.com">http://academic.cleardefinition.com</a> Iowa State University HCI Graduate Program/VRAC<br /></p> +<p>Copyright Iowa State University 2009-2010. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt">http://www.boost.org/LICENSE_1_0.txt</a>)</p> + + </li> + <li> + <a name="module:CleanLibraryList"></a><b><code>CleanLibraryList</code></b>: A smarter replacement for list(REMOVE_DUPLICATES) for library lists<br /> + <p><br /></p> +<p>Note that, in the case of cyclic link dependencies, you _do_ actually need a library in a list multiple times. So, only use this function when you know that the dependency graph is acyclic.<br /></p> +<pre> clean_library_list(<listvar> [<additional list items>...]) - where<br /> listvar is the name of a destination variable, and also possibly a source, and<br /> it is followed by any number (including 0) of additional libraries to append<br /> to the list before processing.<br /></pre> + <p><br /></p> +<p>Removes duplicates from the list, leaving only the last instance, while preserving the meaning of the "optimized", "debug", and "general" labeling. (Libraries listed as general are listed in the result instead as optimized and debug)<br /></p> +<p>Requires CMake 2.6 or newer (uses the 'function' command)<br /></p> +<p>Original Author: 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> <a href="http://academic.cleardefinition.com">http://academic.cleardefinition.com</a> Iowa State University HCI Graduate Program/VRAC<br /></p> +<p>Copyright Iowa State University 2009-2010. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt">http://www.boost.org/LICENSE_1_0.txt</a>)</p> + + </li> + <li> + <a name="module:CopyResourcesToBuildTree"></a><b><code>CopyResourcesToBuildTree</code></b>: Copy the resources your app needs to the build tree.<br /> + <p><br /></p> +<pre> copy_resources_to_build_tree(<target_name>)<br /></pre> + <p><br /></p> +<p>Requires CMake 2.6 or newer (uses the 'function' command)<br /></p> +<p>Original Author: 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> <a href="http://academic.cleardefinition.com">http://academic.cleardefinition.com</a> Iowa State University HCI Graduate Program/VRAC<br /></p> +<p>Copyright Iowa State University 2009-2010. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt">http://www.boost.org/LICENSE_1_0.txt</a>)</p> + + </li> + <li> + <a name="module:CppcheckTargets"></a><b><code>CppcheckTargets</code></b>: Run cppcheck on c++ source files as a custom target and a test<br /> + <p><br /></p> +<pre> include(CppcheckTargets)<br /> add_cppcheck(<target-name> [UNUSED_FUNCTIONS] [STYLE] [POSSIBLE_ERROR] [FAIL_ON_WARNINGS]) -<br /> Create a target to check a target's sources with cppcheck and the indicated options<br /> add_cppcheck_sources(<target-name> [UNUSED_FUNCTIONS] [STYLE] [POSSIBLE_ERROR] [FAIL_ON_WARNINGS]) -<br /> Create a target to check standalone sources with cppcheck and the indicated options<br /></pre> + <p><br /></p> +<p>Requires these CMake modules:<br /></p> +<pre> Findcppcheck<br /></pre> + <p><br /></p> +<p>Requires CMake 2.6 or newer (uses the 'function' command)<br /></p> +<p>Original Author: 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> <a href="http://academic.cleardefinition.com">http://academic.cleardefinition.com</a> Iowa State University HCI Graduate Program/VRAC<br /></p> +<p>Copyright Iowa State University 2009-2010. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt">http://www.boost.org/LICENSE_1_0.txt</a>)</p> + + </li> + <li> + <a name="module:CreateDashboardScripts"></a><b><code>CreateDashboardScripts</code></b>: Create ctest -S scripts to use to run dashboard builds<br /> + <p><br /></p> +<pre> include(CreateDashboardScripts)<br /> create_dashboard_scripts([<initialcachetemplatefilename>])<br /></pre> + <p><br /></p> +<p>If you need additional settings to persist from the "parent" CMake instance to the initial cache created by the dashboard script, you may pass a filename which will be configured into the initial cache.<br /></p> +<p>In the resulting DASHBOARDSCRIPT_BASE_DIRECTORY, an end-user may optionally create a file named<br /></p> +<pre> CustomInitialCache.${DASHBOARDSCRIPT_SCRIPT_NAME}<br /></pre> + <p>(by default, CustomInitialCache.go.cmake) containing set commands that use the CACHE option, to set up additional site-local cache variable values.<br /></p> +<p>Requires these CMake modules:<br /></p> +<pre> GetCompilerInfoString<br /></pre> + <p><br /></p> +<p>Requires CMake 2.6 or newer (uses the 'function' command)<br /></p> +<p>Original Author: 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> <a href="http://academic.cleardefinition.com">http://academic.cleardefinition.com</a> Iowa State University HCI Graduate Program/VRAC<br /></p> +<p>Copyright Iowa State University 2009-2010. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt">http://www.boost.org/LICENSE_1_0.txt</a>)</p> + + </li> + <li> + <a name="module:CreateImportedTarget"></a><b><code>CreateImportedTarget</code></b>: A smarter replacement for list(REMOVE_DUPLICATES) for library lists<br /> + <p><br /></p> +<pre> create_imported_target(<libname> [SHARED|STATIC|MODULE] [<library dependency>...]) - where<br /> ${libname}_LIBRARIES is set to this library's paths.<br /></pre> + <p><br /></p> +<p>Removes duplicates from the list then sorts while preserving "optimized", "debug", and "general" labeling<br /></p> +<p>Requires CMake 2.6 or newer (uses the 'function' command)<br /></p> +<p>Original Author: 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> <a href="http://academic.cleardefinition.com">http://academic.cleardefinition.com</a> Iowa State University HCI Graduate Program/VRAC<br /></p> +<p>Copyright Iowa State University 2009-2010. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt">http://www.boost.org/LICENSE_1_0.txt</a>)</p> + + </li> + <li> + <a name="module:CreateLaunchers"></a><b><code>CreateLaunchers</code></b>: Create launchers to set working directory, env. vars, etc.<br /> + <p><br /></p> +<pre> include(CreateLaunchers) - to make these available<br /> guess_runtime_library_dirs(<outputvarname> [<extralibrary> ...])<br /> create_default_target_launcher(<targetname><br /> [ARGS <args...>]<br /> [FORWARD_ARGS]<br /> [RUNTIME_LIBRARY_DIRS <dir...>]<br /> [WORKING_DIRECTORY <dir>]<br /> [ENVIRONMENT <VAR=value> [<VAR=value>...]])<br /></pre> + <p><br /></p> +<pre> create_target_launcher(<targetname><br /> [ARGS <args...>]<br /> [FORWARD_ARGS]<br /> [RUNTIME_LIBRARY_DIRS <dir...>]<br /> [WORKING_DIRECTORY <dir>]<br /> [ENVIRONMENT <VAR=value> [<VAR=value>...]])<br /></pre> + <p><br /></p> +<pre> create_generic_launcher(<launchername><br /> [RUNTIME_LIBRARY_DIRS <dir...>]<br /> [WORKING_DIRECTORY <dir>]<br /> [ENVIRONMENT <VAR=value> [<VAR=value>...]])<br /> - sets GENERIC_LAUNCHER_COMMAND and GENERIC_LAUNCHER_FAIL_REGULAR_EXPRESSION<br /></pre> + <p><br /></p> +<p>Requires these CMake modules:<br /></p> +<pre> ListFilter<br /> ProgramFilesGlob<br /> CleanDirectoryList<br /></pre> + <p><br /></p> +<p>Requires CMake 2.6 or newer (uses the 'function' command)<br /></p> +<p>Original Author: 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> <a href="http://academic.cleardefinition.com">http://academic.cleardefinition.com</a> Iowa State University HCI Graduate Program/VRAC<br /></p> +<p>Copyright Iowa State University 2009-2010. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt">http://www.boost.org/LICENSE_1_0.txt</a>)</p> + + </li> + <li> + <a name="module:DoxygenTargets"></a><b><code>DoxygenTargets</code></b>: Run doxygen on source files as a custom target<br /> + <p><br /></p> +<pre> include(DoxygenTargets)<br /> add_doxygen(<doxyfile> [OUTPUT_DIRECTORY <outputdir>]<br /> [INSTALL_DESTINATION <installdir><br /> [INSTALL_COMPONENT <installcomponent>]<br /> [INSTALL_PDF_NAME <installpdfname>] ]<br /> [DOC_TARGET <targetname>]<br /> [PROJECT_NUMBER <versionnumber>]<br /> [NO_WARNINGS]<br /> [NO_PDF])<br /></pre> + <p><br /></p> +<p>Requires these CMake modules:<br /></p> +<pre> FindDoxygen<br /></pre> + <p><br /></p> +<p>Requires CMake 2.6 or newer (uses the 'function' command)<br /></p> +<p>Original Author: 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> <a href="http://academic.cleardefinition.com">http://academic.cleardefinition.com</a> Iowa State University HCI Graduate Program/VRAC<br /></p> +<p>Copyright Iowa State University 2009-2010. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt">http://www.boost.org/LICENSE_1_0.txt</a>)</p> + + </li> + <li> + <a name="module:EnableExtraCompilerWarnings"></a><b><code>EnableExtraCompilerWarnings</code></b>: Add flags to compile with extra warnings<br /> + <p><br /></p> +<pre> enable_extra_compiler_warnings(<targetname>)<br /> globally_enable_extra_compiler_warnings() - to modify CMAKE_CXX_FLAGS, etc<br /> to change for all targets declared after the command, instead of per-command<br /></pre> + <p><br /></p> +<p><br /></p> +<p>Original Author: 2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> <a href="http://academic.cleardefinition.com">http://academic.cleardefinition.com</a> Iowa State University HCI Graduate Program/VRAC<br /></p> +<p>Copyright Iowa State University 2009-2010. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt">http://www.boost.org/LICENSE_1_0.txt</a>)</p> + + </li> + <li> + <a name="module:EnableProfiling"></a><b><code>EnableProfiling</code></b>: Add flags to compile with profiling support - currently only for GCC<br /> + <p><br /></p> +<pre> enable_profiling(<targetname>)<br /> globally_enable_profiling() - to modify CMAKE_CXX_FLAGS, etc<br /> to change for all targets declared after the command, instead of per-command<br /></pre> + <p><br /></p> +<p><br /></p> +<p>Original Author: 2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> <a href="http://academic.cleardefinition.com">http://academic.cleardefinition.com</a> Iowa State University HCI Graduate Program/VRAC<br /></p> +<p>Copyright Iowa State University 2009-2010. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt">http://www.boost.org/LICENSE_1_0.txt</a>)</p> + + </li> + <li> + <a name="module:FileCopyTargets"></a><b><code>FileCopyTargets</code></b>: Add a target for files that just need to be copied<br /> + <p><br /></p> +<pre> include(FileCopyTargets)<br /> add_file_copy_target(<target_name> <directory to copy to> <filename> [<filename>...])<br /> Creates a custom target that copies the files to a directory, if needed.<br /> Relative paths for the destination directory are considered with<br /> with respect to CMAKE_CURRENT_BINARY_DIR<br /> You can use this target in all the usual ways, including<br /> add_dependencies(some_other_target this_target) to specify that another<br /> target depends on this.<br /></pre> + <p><br /></p> +<pre> install_file_copy_target(<target_name> [arguments to INSTALL(PROGRAMS ...) ])<br /> Works just the same as INSTALL(PROGRAMS ...) because it wraps it to install<br /> the files you specified in add_file_copy_target<br /></pre> + <p><br /></p> +<p><br /></p> +<p>Requires CMake 2.6 or newer (uses the 'function' command)<br /></p> +<p>Original Author: 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> <a href="http://academic.cleardefinition.com">http://academic.cleardefinition.com</a> Iowa State University HCI Graduate Program/VRAC<br /></p> +<p>Copyright Iowa State University 2009-2010. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt">http://www.boost.org/LICENSE_1_0.txt</a>)</p> + + </li> + <li> + <a name="module:FindALUT"></a><b><code>FindALUT</code></b>: try to find the OpenAL ALUT library<br /> + <p><br /></p> +<p>Users may optionally supply:<br /></p> +<pre> ALUT_ROOT_DIR - a prefix to start searching.<br /></pre> + <p><br /></p> +<p>Cache Variables: (probably not for direct use in your scripts)<br /></p> +<pre> ALUT_INCLUDE_DIR<br /> ALUT_LIBRARY<br /></pre> + <p><br /></p> +<p>Non-cache variables you might use in your CMakeLists.txt:<br /></p> +<pre> ALUT_FOUND<br /> ALUT_INCLUDE_DIRS<br /> ALUT_LIBRARIES<br /> ALUT_WORKAROUND_INCLUDE_DIRS - add these to your include path with<br /> include_directories(${ALUT_WORKAROUND_INCLUDE_DIRS} ${ALUT_INCLUDE_DIRS})<br /> so you can always #include <AL/al.h> and #include <AL/alut.h> even on<br /> Mac where the paths might differ.<br /></pre> + <p><br /></p> +<p>Requires these CMake modules:<br /></p> +<pre> FindPackageHandleStandardArgs (known included with CMake >=2.6.2)<br /></pre> + <p><br /></p> +<p>Original Author: 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> <a href="http://academic.cleardefinition.com">http://academic.cleardefinition.com</a> Iowa State University HCI Graduate Program/VRAC<br /></p> +<p>Copyright Iowa State University 2009-2010. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt">http://www.boost.org/LICENSE_1_0.txt</a>)</p> + + </li> + <li> + <a name="module:FindAdrienne"></a><b><code>FindAdrienne</code></b>: try to find Adrienne Electronics Corporation timecode card library<br /> + <p><br /></p> +<p>SDK available from the manufacturer: <a href="http://www.adrielec.com/">http://www.adrielec.com/</a><br /></p> +<p>Cache Variables: (probably not for direct use in your scripts)<br /></p> +<pre> ADRIENNE_INCLUDE_DIR<br /> ADRIENNE_LIBRARY<br /> ADRIENNE_RUNTIME_LIBRARY<br /> ADRIENNE_INCLUDE_FILE<br /></pre> + <p><br /></p> +<p>Variables you might use in your CMakeLists.txt:<br /></p> +<pre> ADRIENNE_FOUND<br /> ADRIENNE_INCLUDE_DIRS<br /> ADRIENNE_LIBRARIES<br /> ADRIENNE_RUNTIME_LIBRARIES - the AEC_NTTC.dll file<br /> ADRIENNE_RUNTIME_LIBRARY_DIRS<br /></pre> + <p><br /></p> +<pre> ADRIENNE_INCLUDE_FILENAME - this is probably AEC_NTTC.h, but it might also<br /> be AECINTTC.H.<br /></pre> + <p><br /></p> +<pre> ADRIENNE_INCLUDE_HAS_EXTERN_C - Some (most) versions of the header already<br /> wrap their definitions in extern "C" { }, but some do not.<br /></pre> + <p><br /></p> +<pre> ADRIENNE_DEFINITIONS - defines a quoted ADRIENNE_INCLUDE_FILENAME as above,<br /> so you can write a line like #include ADRIENNE_INCLUDE_FILENAME<br /> Also defines ADRIENNE_BEFORE_INCLUDE and ADRIENNE_AFTER_INCLUDE to handle<br /> adding extern "C" { and } if the header file doesn't do so itself.<br /></pre> + <p><br /></p> +<p>Variables that might be set by the user in the gui/command line to help find the library:<br /></p> +<pre> ADRIENNE_ROOT_DIR - root of an Adrienne CD, disk, or extracted/copied contents<br /> thereof.<br /></pre> + <p><br /></p> +<p>Requires these CMake modules:<br /></p> +<pre> FindPackageHandleStandardArgs (known included with CMake >=2.6.2)<br /></pre> + <p><br /></p> +<p>Original Author: 2012 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> <a href="http://academic.cleardefinition.com">http://academic.cleardefinition.com</a> Iowa State University HCI Graduate Program/VRAC<br /></p> +<p>Copyright Iowa State University 2012. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt">http://www.boost.org/LICENSE_1_0.txt</a>)</p> + + </li> + <li> + <a name="module:FindBluez"></a><b><code>FindBluez</code></b>: try to find Bluez<br /> + <p><br /></p> +<p>Cache Variables: (probably not for direct use in your scripts)<br /></p> +<pre> BLUEZ_INCLUDE_DIR<br /> BLUEZ_LIBRARY<br /></pre> + <p><br /></p> +<p>Non-cache variables you might use in your CMakeLists.txt:<br /></p> +<pre> BLUEZ_FOUND<br /> BLUEZ_INCLUDE_DIRS<br /> BLUEZ_LIBRARIES<br /></pre> + <p><br /></p> +<p>Requires these CMake modules:<br /></p> +<pre> FindPackageHandleStandardArgs (known included with CMake >=2.6.2)<br /></pre> + <p><br /></p> +<p>Original Author: 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> <a href="http://academic.cleardefinition.com">http://academic.cleardefinition.com</a> Iowa State University HCI Graduate Program/VRAC<br /></p> +<p>Copyright Iowa State University 2009-2010. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt">http://www.boost.org/LICENSE_1_0.txt</a>)</p> + + </li> + <li> + <a name="module:FindCPPDOM"></a><b><code>FindCPPDOM</code></b>: try to find CPPDOM library<br /> + <p>Optionally uses Flagpoll and FindFlagpoll.cmake<br /></p> +<pre> CPPDOM_LIBRARY_DIR, library search path<br /> CPPDOM_INCLUDE_DIR, include search path<br /> CPPDOM_LIBRARY, the library to link against<br /> CPPDOM_CXX_FLAGS<br /> CPPDOM_FOUND, If false, do not try to use this library.<br /></pre> + <p><br /></p> +<p>Useful configuration variables you might want to add to your cache:<br /></p> +<pre> CPPDOM_ROOT_DIR - A directory prefix to search<br /> (a path that contains include/ as a subdirectory)<br /> CPPDOM_ADDITIONAL_VERSIONS - Additional versions (outside of 0.7.8 to 1.2.0)<br /> to use when constructing search names and paths<br /></pre> + <p><br /></p> +<p>This script will use Flagpoll, if found, to provide hints to the location of this library, but does not use the compiler flags returned by Flagpoll directly.<br /></p> +<p>VR Juggler requires this package, so this Find script takes that into account when determining where to search for the desired files. The VJ_BASE_DIR environment variable is searched (preferentially) when searching for this package, so most sane VR Juggler build environments should "just work." Note that you need to manually re-run CMake if you change this environment variable, because it cannot auto-detect this change and trigger an automatic re-run.<br /></p> +<p>Original Author: 2009-2012 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> <a href="http://academic.cleardefinition.com">http://academic.cleardefinition.com</a> Iowa State University HCI Graduate Program/VRAC<br /></p> +<p>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 <a href="http://www.boost.org/LICENSE_1_0.txt">http://www.boost.org/LICENSE_1_0.txt</a>)</p> + + </li> + <li> + <a name="module:FindDCubed"></a><b><code>FindDCubed</code></b>: try to find DCUBED library<br /> + <p><br /></p> +<pre> DCUBED_LIBRARY_DIR, library search path<br /> DCUBED_INCLUDE_DIR, include search path<br /> DCUBED_{component}_LIBRARY, the library to link against<br /> DCUBED_ENVIRONMENT<br /> DCUBED_FOUND, If false, do not try to use this library.<br /></pre> + <p><br /></p> +<p>Plural versions refer to this library and its dependencies, and are recommended to be used instead, unless you have a good reason.<br /></p> +<p>Useful configuration variables you might want to add to your cache:<br /></p> +<pre> DCUBED_ROOT_DIR - A directory prefix to search<br /> (a path that contains include/ as a subdirectory)<br /></pre> + <p><br /></p> +<p>2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <a href="http://academic.cleardefinition.com">http://academic.cleardefinition.com</a> Iowa State University HCI Graduate Program/VRAC<br /></p> +<p>Copyright Iowa State University 2009-2010. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt">http://www.boost.org/LICENSE_1_0.txt</a>)</p> + + </li> + <li> + <a name="module:FindDirectInput"></a><b><code>FindDirectInput</code></b>: try to find DirectInput library (part of DirectX SDK)<br /> + <p><br /></p> +<p>Cache Variables: (probably not for direct use in your scripts)<br /></p> +<pre> DIRECTINPUT_DXGUID_LIBRARY<br /> DIRECTINPUT_DXERR_LIBRARY<br /> DIRECTINPUT_DINPUT_LIBRARY<br /> DIRECTINPUT_INCLUDE_DIR<br /></pre> + <p><br /></p> +<p>Non-cache variables you should use in your CMakeLists.txt:<br /></p> +<pre> DIRECTINPUT_LIBRARIES<br /> DIRECTINPUT_INCLUDE_DIRS<br /> DIRECTINPUT_FOUND - if this is not true, do not attempt to use this library<br /></pre> + <p><br /></p> +<p>Requires these CMake modules:<br /></p> +<pre> FindPackageHandleStandardArgs (known included with CMake >=2.6.2)<br /></pre> + <p><br /></p> +<p>Original Author: 2011 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> <a href="http://academic.cleardefinition.com">http://academic.cleardefinition.com</a> Iowa State University HCI Graduate Program/VRAC<br /></p> +<p>Copyright Iowa State University 2011. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt">http://www.boost.org/LICENSE_1_0.txt</a>)</p> + + </li> + <li> + <a name="module:FindDirectShow"></a><b><code>FindDirectShow</code></b>: Find Microsoft DirectShow sample files, library, and headers.<br /> + <p><br /></p> +<pre> DIRECTSHOW_INCLUDE_DIRS - where to find needed include file<br /> DIRECTSHOW_BASECLASS_DIR- Directory containing the DirectShow baseclass sample code.<br /> DIRECTSHOW_FOUND - True if DirectShow found.<br /></pre> + <p><br /></p> +<p>Requires these CMake modules:<br /></p> +<pre> FindPackageHandleStandardArgs (known included with CMake >=2.6.2)<br /></pre> + <p><br /></p> +<p>Initially in VRPN - Distributed under the Boost Software License, Version 1.0.<br /></p> +<p>Almost entirely re-written by: 2012 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> <a href="http://academic.cleardefinition.com">http://academic.cleardefinition.com</a> Iowa State University HCI Graduate Program/VRAC<br /></p> +<p>Copyright Iowa State University 2012. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt">http://www.boost.org/LICENSE_1_0.txt</a>)</p> + + </li> + <li> + <a name="module:FindDirectX"></a><b><code>FindDirectX</code></b>: try to find part of DirectX SDK<br /> + <p><br /></p> +<p>Cache Variables: (probably not for direct use in your scripts)<br /></p> +<pre> DIRECTX_INCLUDE_DIR<br /></pre> + <p><br /></p> +<p>Variables you should use in your CMakeLists.txt:<br /></p> +<pre> DIRECTX_DXGUID_LIBRARY<br /> DIRECTX_DXERR_LIBRARY<br /> DIRECTX_DINPUT_LIBRARY<br /> DIRECTX_DINPUT_INCLUDE_DIR<br /> DIRECTX_D3D9_LIBRARY<br /> DIRECTX_D3DXOF_LIBRARY<br /> DIRECTX_D3DX9_LIBRARIES<br /> DIRECTX_INCLUDE_DIRS<br /> DIRECTX_FOUND - if this is not true, do not attempt to use this library<br /></pre> + <p><br /></p> +<p>Requires these CMake modules:<br /></p> +<pre> FindPackageHandleStandardArgs (known included with CMake >=2.6.2)<br /> SelectLibraryConfigurations<br /></pre> + <p><br /></p> +<p>Original Author: 2012 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> <a href="http://academic.cleardefinition.com">http://academic.cleardefinition.com</a> Iowa State University HCI Graduate Program/VRAC<br /></p> +<p>Copyright Iowa State University 2012. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt">http://www.boost.org/LICENSE_1_0.txt</a>)</p> + + </li> + <li> + <a name="module:FindFlagpoll"></a><b><code>FindFlagpoll</code></b>: try to find Flagpoll application, and offer package-finding services<br /> + <pre> FLAGPOLL, the executable: if not defined, do not try to use Flagpoll.<br /></pre> + <p><br /></p> +<p>Useful configuration variables you might want to add to your cache:<br /></p> +<pre> FLAGPOLL_ROOT_DIR - A directory prefix to search for the app<br /> (a path that contains bin/ as a subdirectory)<br /></pre> + <p><br /></p> +<p>VR Juggler requires this package, so this Find script takes that into account when determining where to search for the desired files. The VJ_BASE_DIR environment variable is searched (preferentially) when searching for this package, so most sane VR Juggler build environments should "just work." Note that you need to manually re-run CMake if you change this environment variable, because it cannot auto-detect this change and trigger an automatic re-run.<br /></p> +<p>You can use Flagpoll to provide directories to use as HINTS for find_* These are the provided macros:<br /></p> +<pre> flagpoll_get_include_dirs<br /> flagpoll_get_library_dirs<br /> flagpoll_get_library_names<br /> flagpoll_get_extra_libs<br /></pre> + <p>All take the name of the desired package, optionally NO_DEPS to pass --no-deps to Flagpoll, and return yourpkgname_FLAGPOLL_INCLUDE_DIRS(etc. for the other macros).<br /></p> +<p>Example usage: flagpoll_get_include_dirs(vpr NO_DEPS) find_path(VPR20_INCLUDE_DIRS vpr/vpr.h<br /></p> +<pre> HINTS ${vpr_FLAGPOLL_INCLUDE_DIRS})<br /></pre> + <p><br /></p> +<p>Original Author: 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> <a href="http://academic.cleardefinition.com">http://academic.cleardefinition.com</a> Iowa State University HCI Graduate Program/VRAC<br /></p> +<p>Copyright Iowa State University 2009-2010. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt">http://www.boost.org/LICENSE_1_0.txt</a>)</p> + + </li> + <li> + <a name="module:FindGDB"></a><b><code>FindGDB</code></b>: Try to find GDB<br /> + <p><br /></p> +<p>Once done, this will define:<br /></p> +<pre> GDB_FOUND - system has GDB<br /> GDB_COMMAND - the command to run<br /> GDB_VERSION - version<br /> GDB_HAS_RETURN_CHILD_RESULT - if the --return-child-result flag is supported<br /></pre> + <p><br /></p> +<p>Useful configuration variables you might want to add to your cache:<br /></p> +<pre> GDB_ROOT_DIR - A directory prefix to search<br /></pre> + <p><br /></p> +<p>Original Author: 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> <a href="http://academic.cleardefinition.com">http://academic.cleardefinition.com</a> Iowa State University HCI Graduate Program/VRAC<br /></p> +<p>Copyright Iowa State University 2009-2010. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt">http://www.boost.org/LICENSE_1_0.txt</a>)</p> + + </li> + <li> + <a name="module:FindGHOST"></a><b><code>FindGHOST</code></b>: try to find Sensable GHOST library and include files<br /> + <pre> GHOST_INCLUDE_DIRS, where to find GL/glut.h, etc.<br /> GHOST_LIBRARIES, the libraries to link against<br /> GHOST_FOUND, If false, do not try to use GLUT.<br /> GHOST_RUNTIME_LIBRARY_DIRS, path to DLL on Windows for runtime use.<br /></pre> + <p><br /></p> +<p>Requires these CMake modules:<br /></p> +<pre> no additional modules required<br /></pre> + <p><br /></p> +<p>Original Author: 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> <a href="http://academic.cleardefinition.com">http://academic.cleardefinition.com</a> Iowa State University HCI Graduate Program/VRAC<br /></p> +<p>Copyright Iowa State University 2009-2010. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt">http://www.boost.org/LICENSE_1_0.txt</a>)</p> + + </li> + <li> + <a name="module:FindGLUI"></a><b><code>FindGLUI</code></b>: Try to find GLUI (GL User Interface)<br /> + <p>Requires OpenGL and GLUT - searches for them using find_package Once done, this will define<br /></p> +<p> GLUI_INCLUDE_DIR, where to find GL/glui.h (or GLUI/glui.h on mac) GLUI_LIBRARY, the libraries to link against GLUI_FOUND, If false, do not try to use GLUI.<br /></p> +<p>Plural versions refer to this library and its dependencies, and are recommended to be used instead, unless you have a good reason.<br /></p> +<p>Useful configuration variables you might want to add to your cache:<br /></p> +<pre> GLUI_ROOT_DIR - A directory prefix to search<br /> (usually a path that contains include/ as a subdirectory)<br /></pre> + <p><br /></p> +<p>Original Author: 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> <a href="http://academic.cleardefinition.com">http://academic.cleardefinition.com</a> Iowa State University HCI Graduate Program/VRAC<br /></p> +<p>Copyright Iowa State University 2009-2010. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt">http://www.boost.org/LICENSE_1_0.txt</a>)</p> + + </li> + <li> + <a name="module:FindGLUT"></a><b><code>FindGLUT</code></b>: try to find glut library and include files<br /> + <pre> GLUT_INCLUDE_DIRS, where to find GL/glut.h, etc.<br /> GLUT_LIBRARIES, the libraries to link against<br /> GLUT_FOUND, If false, do not try to use GLUT.<br /> GLUT_RUNTIME_LIBRARY_DIRS, path to DLL on Windows for runtime use.<br /> GLUT_RUNTIME_LIBRARY, dll on Windows, for installation purposes<br /></pre> + <p><br /></p> +<p>Also defined, but not for general use are:<br /></p> +<pre> GLUT_INCLUDE_DIR, where to find GL/glut.h, etc.<br /> GLUT_glut_LIBRARY = the full path to the glut library.<br /></pre> + + </li> + <li> + <a name="module:FindGMTL"></a><b><code>FindGMTL</code></b>: Try to find GMTL<br /> + <p>Optionally uses Flagpoll and FindFlagpoll.cmake Once done, this will define<br /></p> +<pre> GMTL_FOUND - system has GMTL<br /> GMTL_INCLUDE_DIR - the GMTL include directory<br /></pre> + <p><br /></p> +<p>Useful configuration variables you might want to add to your cache:<br /></p> +<pre> GMTL_ROOT_DIR - A directory prefix to search<br /> (a path that contains include/ as a subdirectory)<br /> GMTL_ADDITIONAL_VERSIONS - Additional versions (outside of 0.5.1 to 0.7.0)<br /> to use when constructing search names and paths<br /></pre> + <p><br /></p> +<p>This script will use Flagpoll, if found, to provide hints to the location of this library, but does not use the compiler flags returned by Flagpoll directly.<br /></p> +<p>VR Juggler requires this package, so this Find script takes that into account when determining where to search for the desired files. The VJ_BASE_DIR environment variable is searched (preferentially) when searching for this package, so most sane VR Juggler build environments should "just work." Note that you need to manually re-run CMake if you change this environment variable, because it cannot auto-detect this change and trigger an automatic re-run.<br /></p> +<p>Original Author: 2009-2012 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> <a href="http://academic.cleardefinition.com">http://academic.cleardefinition.com</a> Iowa State University HCI Graduate Program/VRAC<br /></p> +<p>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 <a href="http://www.boost.org/LICENSE_1_0.txt">http://www.boost.org/LICENSE_1_0.txt</a>)</p> + + </li> + <li> + <a name="module:FindGPM"></a><b><code>FindGPM</code></b>: try to find GPM library<br /> + <p><br /></p> +<p>Cache Variables: (probably not for direct use in your scripts)<br /></p> +<pre> GPM_INCLUDE_DIR<br /> GPM_LIBRARY<br /></pre> + <p><br /></p> +<p>Non-cache variables you might use in your CMakeLists.txt:<br /></p> +<pre> GPM_FOUND<br /> GPM_INCLUDE_DIRS<br /> GPM_LIBRARIES<br /></pre> + <p><br /></p> +<p>Requires these CMake modules:<br /></p> +<pre> FindPackageHandleStandardArgs (known included with CMake >=2.6.2)<br /></pre> + <p><br /></p> +<p>Original Author: 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> <a href="http://academic.cleardefinition.com">http://academic.cleardefinition.com</a> Iowa State University HCI Graduate Program/VRAC<br /></p> +<p>Copyright Iowa State University 2009-2010. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt">http://www.boost.org/LICENSE_1_0.txt</a>)</p> + + </li> + <li> + <a name="module:FindGadgeteer12"></a><b><code>FindGadgeteer12</code></b>: try to find Gadgeteer 1.2 library<br /> + <p>Requires JCCL 1.2 and VPR 2.0 (thus FindJCCL12.cmake and FindVPR20.cmake) Requires X11 if not on Mac or Windows. Optionally uses Flagpoll and FindFlagpoll.cmake<br /></p> +<p>This library is a part of VR Juggler 2.2 - you probably want to use find_package(VRJuggler22) instead, for an easy interface to this and related scripts. See FindVRJuggler22.cmake for more information.<br /></p> +<pre> GADGETEER12_LIBRARY_DIR, library search path<br /> GADGETEER12_INCLUDE_DIR, include search path<br /> GADGETEER12_LIBRARY, the library to link against<br /> GADGETEER12_FOUND, If false, do not try to use this library.<br /></pre> + <p><br /></p> +<p>Plural versions refer to this library and its dependencies, and are recommended to be used instead, unless you have a good reason.<br /></p> +<p>Useful configuration variables you might want to add to your cache:<br /></p> +<pre> GADGETEER12_ROOT_DIR - A directory prefix to search<br /> (a path that contains include/ as a subdirectory)<br /></pre> + <p><br /></p> +<p>This script will use Flagpoll, if found, to provide hints to the location of this library, but does not use the compiler flags returned by Flagpoll directly.<br /></p> +<p>The VJ_BASE_DIR environment variable is also searched (preferentially) when searching for this component, so most sane build environments should "just work." Note that you need to manually re-run CMake if you change this environment variable, because it cannot auto-detect this change and trigger an automatic re-run.<br /></p> +<p>Original Author: 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> <a href="http://academic.cleardefinition.com">http://academic.cleardefinition.com</a> Iowa State University HCI Graduate Program/VRAC<br /></p> +<p>Copyright Iowa State University 2009-2010. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt">http://www.boost.org/LICENSE_1_0.txt</a>)</p> + + </li> + <li> + <a name="module:FindGadgeteer20"></a><b><code>FindGadgeteer20</code></b>: try to find Gadgeteer 2.0 library<br /> + <p>Requires JCCL 1.4 and VPR 2.2 (thus FindJCCL14.cmake and FindVPR22.cmake) Requires X11 if not on Mac or Windows. Optionally uses Flagpoll and FindFlagpoll.cmake<br /></p> +<p>This library is a part of VR Juggler 3.0 - you probably want to use find_package(VRJuggler30) instead, for an easy interface to this and related scripts. See FindVRJuggler30.cmake for more information.<br /></p> +<pre> GADGETEER20_LIBRARY_DIR, library search path<br /> GADGETEER20_INCLUDE_DIR, include search path<br /> GADGETEER20_LIBRARY, the library to link against<br /> GADGETEER20_FOUND, If false, do not try to use this library.<br /></pre> + <p><br /></p> +<p>Plural versions refer to this library and its dependencies, and are recommended to be used instead, unless you have a good reason.<br /></p> +<p>Useful configuration variables you might want to add to your cache:<br /></p> +<pre> GADGETEER20_ROOT_DIR - A directory prefix to search<br /> (a path that contains include/ as a subdirectory)<br /></pre> + <p><br /></p> +<p>This script will use Flagpoll, if found, to provide hints to the location of this library, but does not use the compiler flags returned by Flagpoll directly.<br /></p> +<p>The VJ_BASE_DIR environment variable is also searched (preferentially) when searching for this component, so most sane build environments should "just work." Note that you need to manually re-run CMake if you change this environment variable, because it cannot auto-detect this change and trigger an automatic re-run.<br /></p> +<p>Original Author: 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> <a href="http://academic.cleardefinition.com">http://academic.cleardefinition.com</a> Iowa State University HCI Graduate Program/VRAC Updated for VR Juggler 3.0 by: Brandon Newendorp <brandon@newendorp.com></p> + + </li> + <li> + <a name="module:FindGlove5DT"></a><b><code>FindGlove5DT</code></b>: try to find Glove5DT libraries<br /> + <p><br /></p> +<p>Cache Variables: (probably not for direct use in your scripts)<br /></p> +<pre> GLOVE5DT_INCLUDE_DIR<br /> GLOVE5DT_LIBRARY<br /> GLOVE5DT_LIBRARY_RELEASE<br /> GLOVE5DT_LIBRARY_DEBUG<br /> GLOVE5DT_RUNTIME_LIBRARY_RELEASE<br /> GLOVE5DT_RUNTIME_LIBRARY_DEBUG<br /></pre> + <p><br /></p> +<p>Non-cache variables you might use in your CMakeLists.txt:<br /></p> +<pre> GLOVE5DT_FOUND<br /> GLOVE5DT_INCLUDE_DIRS<br /> GLOVE5DT_LIBRARIES<br /> GLOVE5DT_RUNTIME_LIBRARY_DIRS<br /></pre> + <p><br /></p> +<p>Requires these CMake modules:<br /></p> +<pre> CleanDirectoryList<br /> CleanLibraryList<br /> ListCombinations<br /> ProgramFilesGlob<br /> SelectLibraryConfigurations (included with CMake >=2.8.0)<br /> FindPackageHandleStandardArgs (known included with CMake >=2.6.2)<br /></pre> + <p><br /></p> +<p>Original Author: 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> <a href="http://academic.cleardefinition.com">http://academic.cleardefinition.com</a> Iowa State University HCI Graduate Program/VRAC<br /></p> +<p>Copyright Iowa State University 2009-2010. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt">http://www.boost.org/LICENSE_1_0.txt</a>)</p> + + </li> + <li> + <a name="module:FindHIDAPI"></a><b><code>FindHIDAPI</code></b>: try to find HIDAPI library<br /> + <p>from <a href="http://www.signal11.us/oss/hidapi/">http://www.signal11.us/oss/hidapi/</a><br /></p> +<p>Cache Variables: (probably not for direct use in your scripts)<br /></p> +<pre> HIDAPI_INCLUDE_DIR<br /> HIDAPI_LIBRARY<br /></pre> + <p><br /></p> +<p>Non-cache variables you might use in your CMakeLists.txt:<br /></p> +<pre> HIDAPI_FOUND<br /> HIDAPI_INCLUDE_DIRS<br /> HIDAPI_LIBRARIES<br /></pre> + <p><br /></p> +<p>Requires these CMake modules:<br /></p> +<pre> FindPackageHandleStandardArgs (known included with CMake >=2.6.2)<br /></pre> + <p><br /></p> +<p>Original Author: 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> <a href="http://academic.cleardefinition.com">http://academic.cleardefinition.com</a> Iowa State University HCI Graduate Program/VRAC<br /></p> +<p>Copyright Iowa State University 2009-2010. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt">http://www.boost.org/LICENSE_1_0.txt</a>)</p> + + </li> + <li> + <a name="module:FindIDLJ"></a><b><code>FindIDLJ</code></b>: try to find Java's IDLJ Interface Definition Language compiler.<br /> + <p><br /></p> +<p>Ideally used with CMake 2.8.5 or newer for Java support using FindJava.cmake and UseJava.cmake<br /></p> +<p>Variables:<br /></p> +<pre> Java_IDLJ_COMMAND, executable for idlj<br /> IDLJ_FOUND, If false, do not try to use this<br /></pre> + <p><br /></p> +<p>Function:<br /></p> +<pre> java_idlj(varname idlfile [extra idlj args]) - Generates<br /> the Java source files from the IDL file you indicate, and<br /> appends filenames suitable to add to a add_jar() call to the<br /> variable you specified.<br /></pre> + <p><br /></p> +<p>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.<br /></p> +<p>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.<br /></p> +<p>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.<br /></p> +<p>Original Author: 2012 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> <a href="http://academic.cleardefinition.com">http://academic.cleardefinition.com</a> Iowa State University HCI Graduate Program/VRAC<br /></p> +<p>Copyright Iowa State University 2012. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt">http://www.boost.org/LICENSE_1_0.txt</a>)</p> + + </li> + <li> + <a name="module:FindInterSense"></a><b><code>FindInterSense</code></b>: try to find InterSense library<br /> + <p><br /></p> +<p>Cache Variables: (probably not for direct use in your scripts)<br /></p> +<pre> INTERSENSE_INCLUDE_DIR<br /> INTERSENSE_ISENSEC_DIR - location of the isense.c "import library" substitute.<br /> INTERSENSE_LIBRARY<br /></pre> + <p><br /></p> +<p>Non-cache variables you might use in your CMakeLists.txt:<br /></p> +<pre> INTERSENSE_FOUND<br /> INTERSENSE_INCLUDE_DIRS<br /> INTERSENSE_LIBRARIES<br /></pre> + <p><br /></p> +<p>Requires these CMake modules:<br /></p> +<pre> FindPackageHandleStandardArgs (known included with CMake >=2.6.2)<br /></pre> + <p><br /></p> +<p>Author: 2013 Eric Marsh <bits@wemarsh.com> <a href="http://wemarsh.com/">http://wemarsh.com/</a> Kognitiv Neuroinformatik, Universität Bremen<br /></p> +<p>(building on Ryan Pavlik's templates)<br /></p> +<p>2013 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> <a href="http://academic.cleardefinition.com">http://academic.cleardefinition.com</a> Iowa State University HCI Graduate Program/VRAC<br /></p> +<p>Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt">http://www.boost.org/LICENSE_1_0.txt</a>)</p> + + </li> + <li> + <a name="module:FindJCCL12"></a><b><code>FindJCCL12</code></b>: try to find JCCL 1.2 library<br /> + <p>Requires VPR 2.0 (thus FindVPR20.cmake) Optionally uses Flagpoll and FindFlagpoll.cmake<br /></p> +<p>This library is a part of VR Juggler 2.2 - you probably want to use find_package(VRJuggler22) instead, for an easy interface to this and related scripts. See FindVRJuggler22.cmake for more information.<br /></p> +<pre> JCCL12_LIBRARY_DIR, library search path<br /> JCCL12_INCLUDE_DIR, include search path<br /> JCCL12_LIBRARY, the library to link against<br /> JCCL12_FOUND, If false, do not try to use this library.<br /></pre> + <p><br /></p> +<p>Plural versions refer to this library and its dependencies, and are recommended to be used instead, unless you have a good reason.<br /></p> +<p>Useful configuration variables you might want to add to your cache:<br /></p> +<pre> JCCL12_ROOT_DIR - A directory prefix to search<br /> (a path that contains include/ as a subdirectory)<br /></pre> + <p><br /></p> +<p>This script will use Flagpoll, if found, to provide hints to the location of this library, but does not use the compiler flags returned by Flagpoll directly.<br /></p> +<p>The VJ_BASE_DIR environment variable is also searched (preferentially) when searching for this component, so most sane build environments should "just work." Note that you need to manually re-run CMake if you change this environment variable, because it cannot auto-detect this change and trigger an automatic re-run.<br /></p> +<p>Original Author: 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> <a href="http://academic.cleardefinition.com">http://academic.cleardefinition.com</a> Iowa State University HCI Graduate Program/VRAC<br /></p> +<p>Copyright Iowa State University 2009-2010. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt">http://www.boost.org/LICENSE_1_0.txt</a>)</p> + + </li> + <li> + <a name="module:FindJCCL14"></a><b><code>FindJCCL14</code></b>: try to find JCCL 1.4 library<br /> + <p>Requires VPR 2.2 (thus FindVPR22.cmake) Optionally uses Flagpoll and FindFlagpoll.cmake<br /></p> +<p>This library is a part of VR Juggler 3.0 - you probably want to use find_package(VRJuggler30) instead, for an easy interface to this and related scripts. See FindVRJuggler30.cmake for more information.<br /></p> +<pre> JCCL14_LIBRARY_DIR, library search path<br /> JCCL14_INCLUDE_DIR, include search path<br /> JCCL14_LIBRARY, the library to link against<br /> JCCL14_FOUND, If false, do not try to use this library.<br /></pre> + <p><br /></p> +<p>Plural versions refer to this library and its dependencies, and are recommended to be used instead, unless you have a good reason.<br /></p> +<p>Useful configuration variables you might want to add to your cache:<br /></p> +<pre> JCCL14_ROOT_DIR - A directory prefix to search<br /> (a path that contains include/ as a subdirectory)<br /></pre> + <p><br /></p> +<p>This script will use Flagpoll, if found, to provide hints to the location of this library, but does not use the compiler flags returned by Flagpoll directly.<br /></p> +<p>The VJ_BASE_DIR environment variable is also searched (preferentially) when searching for this component, so most sane build environments should "just work." Note that you need to manually re-run CMake if you change this environment variable, because it cannot auto-detect this change and trigger an automatic re-run.<br /></p> +<p>Original Author: 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> <a href="http://academic.cleardefinition.com">http://academic.cleardefinition.com</a> Iowa State University HCI Graduate Program/VRAC Updated for VR Juggler 3.0 by: Brandon Newendorp <brandon@newendorp.com></p> + + </li> + <li> + <a name="module:FindJtTk"></a><b><code>FindJtTk</code></b>: try to find JTTK library<br /> + <p><br /></p> +<pre> JTTK_LIBRARY_DIRS, library search path<br /> JTTK_INCLUDE_DIRS, include search path<br /> JTTK_{component}_LIBRARY, the library to link against<br /> JTTK_ENVIRONMENT, environment variables to set<br /> JTTK_RUNTIME_LIBRARY_DIRS<br /> JTTK_FOUND, If false, do not try to use this library.<br /></pre> + <p><br /></p> +<p>If you have license issues, you might run this command on each JtTk-using target:<br /></p> +<pre> jttk_stamp_binary(<targetname>)<br /></pre> + <p><br /></p> +<p>Plural versions refer to this library and its dependencies, and are recommended to be used instead, unless you have a good reason.<br /></p> +<p>Useful configuration variables you might want to add to your cache:<br /></p> +<pre> JTTK_ROOT_DIR - A directory prefix to search<br /> (a path that contains include/ as a subdirectory)<br /></pre> + <p><br /></p> +<p>Original Author: 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> <a href="http://academic.cleardefinition.com">http://academic.cleardefinition.com</a> Iowa State University HCI Graduate Program/VRAC<br /></p> +<p>Copyright Iowa State University 2009-2010. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt">http://www.boost.org/LICENSE_1_0.txt</a>)</p> + + </li> + <li> + <a name="module:FindLAPACKLibs"></a><b><code>FindLAPACKLibs</code></b>: Try to find LAPACK and BLAS libraries<br /> + <p>Once done, this will define<br /></p> +<pre> LAPACKLIBS_LIBRARIES, all libraries to link against<br /> LAPACKLIBS_FOUND, If false, do not try to use LAPACK library features.<br /></pre> + <p><br /></p> +<p>Users may wish to set:<br /></p> +<pre> LAPACKLIBS_ROOT_DIR, location to start searching for LAPACK libraries<br /></pre> + <p><br /></p> +<p>Original Author: 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> <a href="http://academic.cleardefinition.com">http://academic.cleardefinition.com</a> Iowa State University HCI Graduate Program/VRAC<br /></p> +<p>Copyright Iowa State University 2009-2010. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt">http://www.boost.org/LICENSE_1_0.txt</a>)</p> + + </li> + <li> + <a name="module:FindLibusb1"></a><b><code>FindLibusb1</code></b>: try to find libusb-1 library<br /> + <p><br /></p> +<p>Cache Variables: (probably not for direct use in your scripts)<br /></p> +<pre> LIBUSB1_LIBRARY<br /> LIBUSB1_INCLUDE_DIR<br /></pre> + <p><br /></p> +<p>Non-cache variables you should use in your CMakeLists.txt:<br /></p> +<pre> LIBUSB1_LIBRARIES<br /> LIBUSB1_INCLUDE_DIRS<br /> LIBUSB1_FOUND - if this is not true, do not attempt to use this library<br /></pre> + <p><br /></p> +<p>Requires these CMake modules:<br /></p> +<pre> ProgramFilesGlob<br /> FindPackageHandleStandardArgs (known included with CMake >=2.6.2)<br /></pre> + <p><br /></p> +<p>Original Author: 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> <a href="http://academic.cleardefinition.com">http://academic.cleardefinition.com</a> Iowa State University HCI Graduate Program/VRAC<br /></p> +<p>Copyright Iowa State University 2009-2010. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt">http://www.boost.org/LICENSE_1_0.txt</a>)</p> + + </li> + <li> + <a name="module:FindLuabind"></a><b><code>FindLuabind</code></b>: try to find Luabind<br /> + <p><br /></p> +<p>Users may optionally supply:<br /></p> +<pre> LUABIND_ROOT_DIR - a prefix to start searching<br /></pre> + <p><br /></p> +<p>Non-cache variables you might use in your CMakeLists.txt:<br /></p> +<pre> LUABIND_FOUND<br /> LUABIND_DEFINITIONS<br /> LUABIND_INCLUDE_DIRS<br /> LUABIND_LIBRARIES<br /></pre> + <p><br /></p> +<p>Requires these CMake modules:<br /></p> +<pre> FindPackageHandleStandardArgs (known included with CMake >=2.6.2)<br /></pre> + <p><br /></p> +<p>Original Author: 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> <a href="http://academic.cleardefinition.com">http://academic.cleardefinition.com</a> Iowa State University HCI Graduate Program/VRAC<br /></p> +<p>Copyright Iowa State University 2009-2010. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt">http://www.boost.org/LICENSE_1_0.txt</a>)</p> + + </li> + <li> + <a name="module:FindLyX"></a><b><code>FindLyX</code></b>: Try to find LyX, and define some custom commands to export from LyX<br /> + <p><br /></p> +<p>Once done, this will define:<br /></p> +<pre> LYX_FOUND - system has LyX<br /> LYX_COMMAND - the command to run<br /></pre> + <p><br /></p> +<p>and the following new functions:<br /></p> +<pre> lyx_export(<format> <extension-without-leading-dot> <output-variable><br /> INPUT <lyx-file> [...]<br /> [OUTPUT_TO_SOURCE_DIR]<br /> [ EXTRA_DEPS <bibtex-or-other-file> [...] ]) - the base function<br /></pre> + <p><br /></p> +<p>These shortcut functions all have the same syntax:<br /></p> +<pre> lyx_export_to_XXX(<output-variable><br /> INPUT <lyx-file> [...]<br /> [OUTPUT_TO_SOURCE_DIR]<br /> [ EXTRA_DEPS <bibtex-or-other-file> [...] ])<br /></pre> + <p><br /></p> +<p>Available shortcuts:<br /></p> +<pre> lyx_export_to_docbook_xml<br /> lyx_export_to_docbook<br /> lyx_export_to_pdf<br /> lyx_export_to_pdf_via_pdflatex<br /> lyx_export_to_pdf_via_dvi<br /></pre> + <p><br /></p> +<p>Useful configuration variables you might want to add to your cache:<br /></p> +<pre> LYX_ROOT_DIR - A directory prefix to search<br /></pre> + <p><br /></p> +<p>Original Author: 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> <a href="http://academic.cleardefinition.com">http://academic.cleardefinition.com</a> Iowa State University HCI Graduate Program/VRAC<br /></p> +<p>Copyright Iowa State University 2009-2010. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt">http://www.boost.org/LICENSE_1_0.txt</a>)</p> + + </li> + <li> + <a name="module:FindMacHID"></a><b><code>FindMacHID</code></b>: try to find Mac HID frameworks<br /> + <p><br /></p> +<p>Cache Variables: (probably not for direct use in your scripts)<br /></p> +<pre> MACHID_CoreFoundation_LIBRARY<br /> MACHID_CoreFoundation_INCLUDE_DIR<br /> MACHID_IOKit_LIBRARY<br /> MACHID_IOKit_INCLUDE_DIR<br /> MACOSX_HID_UINT32T (from CheckMacHIDAPI)<br /></pre> + <p><br /></p> +<p>Non-cache variables you should use in your CMakeLists.txt:<br /></p> +<pre> MACHID_DEFINITIONS<br /> MACHID_LIBRARIES<br /> MACHID_INCLUDE_DIRS<br /> MACHID_FOUND - if this is not true, do not attempt to use this library<br /></pre> + <p><br /></p> +<p>Requires these CMake modules:<br /></p> +<pre> CheckMacHIDAPI<br /> FindPackageHandleStandardArgs (known included with CMake >=2.6.2)<br /></pre> + <p><br /></p> +<p>Original Author: 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> <a href="http://academic.cleardefinition.com">http://academic.cleardefinition.com</a> Iowa State University HCI Graduate Program/VRAC<br /></p> +<p>Copyright Iowa State University 2009-2010. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt">http://www.boost.org/LICENSE_1_0.txt</a>)</p> + + </li> + <li> + <a name="module:FindMarkdown"></a><b><code>FindMarkdown</code></b>: try to find Markdown tool<br /> + <p><br /></p> +<p>Cache Variables:<br /></p> +<pre> MARKDOWN_EXECUTABLE<br /></pre> + <p><br /></p> +<p>Non-cache variables you might use in your CMakeLists.txt:<br /></p> +<pre> MARKDOWN_FOUND<br /></pre> + <p><br /></p> +<p>Requires these CMake modules:<br /></p> +<pre> FindPackageHandleStandardArgs (known included with CMake >=2.6.2)<br /></pre> + <p><br /></p> +<p>Original Author: 2011 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> <a href="http://academic.cleardefinition.com">http://academic.cleardefinition.com</a> Iowa State University HCI Graduate Program/VRAC<br /></p> +<p>Copyright Iowa State University 2011. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt">http://www.boost.org/LICENSE_1_0.txt</a>)</p> + + </li> + <li> + <a name="module:FindOpenCV"></a><b><code>FindOpenCV</code></b>: ------------------------------<br /> + <p>See <a href="http://sourceforge.net/projects/opencvlibrary/">http://sourceforge.net/projects/opencvlibrary/</a><br /></p> +<p>The following variable is optionally searched for defaults<br /></p> +<pre> OPENCV_ROOT_DIR: Base directory of OpenCv tree to use.<br /></pre> + <p><br /></p> +<pre> OPENCV_NEW_LIBRARY_NAMES Set to YES before searching if you want to<br /></pre> + <p>The following are set after configuration is done:<br /></p> +<pre> OPENCV_FOUND<br /> OPENCV_INCLUDE_DIRS<br /> OPENCV_LIBRARIES<br /></pre> + <p><br /></p> +<p>2004/05 Jan Woetzel, Friso, Daniel Grest 2006/01 complete rewrite by Jan Woetzel 2006/09 2nd rewrite introducing ROOT_DIR and PATH_SUFFIXES<br /></p> +<pre> to handle multiple installed versions gracefully by Jan Woetzel<br /></pre> + <p>2010/02 Ryan Pavlik (Iowa State University) - partial rewrite to standardize<br /></p> +<p>tested with:<br /></p> +<p>www.mip.informatik.uni-kiel.de/~jw academic.cleardefinition.com</p> + + </li> + <li> + <a name="module:FindOpenHaptics"></a><b><code>FindOpenHaptics</code></b>: try to find OpenHaptics libraries<br /> + <p><br /></p> +<p>Cache Variables: (probably not for direct use in your scripts)<br /></p> +<pre> HDAPI_INCLUDE_DIR<br /> HDAPI_LIBRARY<br /> HDAPI_LIBRARY_RELEASE<br /> HDAPI_LIBRARY_DEBUG<br /> HDAPI_HDU_INCLUDE_DIR<br /> HDAPI_HDU_LIBRARY<br /> HDAPI_HDU_LIBRARY_RELEASE<br /> HDAPI_HDU_LIBRARY_DEBUG<br /> HLAPI_INCLUDE_DIR<br /> HLAPI_LIBRARY<br /> HLAPI_LIBRARY_RELEASE<br /> HLAPI_LIBRARY_DEBUG<br /> HLAPI_HLU_INCLUDE_DIR<br /> HLAPI_HLU_LIBRARY<br /> HLAPI_HLU_LIBRARY_RELEASE<br /> HLAPI_HLU_LIBRARY_DEBUG<br /></pre> + <p><br /></p> +<p>Non-cache variables you might use in your CMakeLists.txt:<br /></p> +<pre> OPENHAPTICS_FOUND<br /> HDAPI_INCLUDE_DIRS<br /> HDAPI_LIBRARIES<br /> HDAPI_HDU_INCLUDE_DIRS<br /> HDAPI_HDU_LIBRARIES<br /> HLAPI_INCLUDE_DIRS<br /> HLAPI_LIBRARIES<br /> HLAPI_HLU_INCLUDE_DIRS<br /> HLAPI_HLU_LIBRARIES<br /> OPENHAPTICS_LIBRARIES - includes HD, HDU, HL, HLU<br /> OPENHAPTICS_RUNTIME_LIBRARY_DIRS<br /> OPENHAPTICS_ENVIRONMENT<br /> OPENHAPTICS_LIBRARY_DIRS<br /> OPENHAPTICS_INCLUDE_DIRS<br /></pre> + <p><br /></p> +<p>Requires these CMake modules:<br /></p> +<pre> CleanDirectoryList<br /> CleanLibraryList<br /> ListCombinations<br /> ProgramFilesGlob<br /> SelectLibraryConfigurations (included with CMake >=2.8.0)<br /> FindPackageHandleStandardArgs (known included with CMake >=2.6.2)<br /> CMake 2.6.3 (uses "unset")<br /></pre> + <p><br /></p> +<p>Original Author: 2009-2012 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> <a href="http://academic.cleardefinition.com">http://academic.cleardefinition.com</a> Iowa State University HCI Graduate Program/VRAC<br /></p> +<p>Copyright Iowa State University 2009-2010. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt">http://www.boost.org/LICENSE_1_0.txt</a>)</p> + + </li> + <li> + <a name="module:FindParasolid"></a><b><code>FindParasolid</code></b>: try to find PARASOLID library<br /> + <p>Important note: If you are also using JtTk, do your<br /></p> +<pre> find_package(JtTk)<br /></pre> + <p>first, to avoid runtime PK_* errors!<br /></p> +<pre> PARASOLID_LIBRARY_DIR, library search path<br /> PARASOLID_INCLUDE_DIR, include search path<br /> PARASOLID_{component}_LIBRARY, the library to link against<br /> PARASOLID_FOUND, If false, do not try to use this library.<br /></pre> + <p><br /></p> +<p>Plural versions refer to this library and its dependencies, and are recommended to be used instead, unless you have a good reason.<br /></p> +<p>Requires these CMake modules:<br /></p> +<pre> CheckVersion<br /> ListCombinations<br /> ProgramFilesGlob<br /> FindPackageHandleStandardArgs (known included with CMake >=2.6.2)<br /></pre> + <p><br /></p> +<p>Original Author: 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> <a href="http://academic.cleardefinition.com">http://academic.cleardefinition.com</a> Iowa State University HCI Graduate Program/VRAC<br /></p> +<p>Copyright Iowa State University 2009-2010. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt">http://www.boost.org/LICENSE_1_0.txt</a>)</p> + + </li> + <li> + <a name="module:FindPerformer"></a><b><code>FindPerformer</code></b>: try to find the OpenGL Performer library<br /> + <p><br /></p> +<p>Users may optionally supply:<br /></p> +<pre> PERFORMER_ROOT_DIR - a prefix to start searching.<br /></pre> + <p><br /></p> +<p>Cache Variables: (probably not for direct use in your scripts)<br /></p> +<pre> PERFORMER_INCLUDE_DIR<br /> PERFORMER_LIBRARY<br /> PERFORMER_PFUI_LIBRARY - doesn't get included in PERFORMER_LIBRARIES<br /> PERFORMER_PFDU_UTIL_LIBRARY - doesn't get included in PERFORMER_LIBRARIES<br /> PERFORMER_PFV_LIBRARY - doesn't get included in PERFORMER_LIBRARIES<br /></pre> + <p><br /></p> +<p>Non-cache variables you might use in your CMakeLists.txt:<br /></p> +<pre> PERFORMER_FOUND<br /> PERFORMER_INCLUDE_DIRS<br /> PERFORMER_LIBRARIES<br /> PERFORMER_RUNTIME_LIBRARY_DIRS<br /></pre> + <p><br /></p> +<p>Requires these CMake modules:<br /></p> +<pre> FindPackageHandleStandardArgs (known included with CMake >=2.6.2)<br /></pre> + <p><br /></p> +<p>Original Author: 2012 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> <a href="http://academic.cleardefinition.com">http://academic.cleardefinition.com</a> Iowa State University HCI Graduate Program/VRAC<br /></p> +<p>Copyright Iowa State University 2012. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt">http://www.boost.org/LICENSE_1_0.txt</a>)</p> + + </li> + <li> + <a name="module:FindPerlModules"></a><b><code>FindPerlModules</code></b>: try to find perl modules, passed as COMPONENTS<br /> + <p><br /></p> +<p>Non-cache variable you might use in your CMakeLists.txt:<br /></p> +<pre> PERLMODULES_FOUND<br /></pre> + <p><br /></p> +<p>Requires these CMake modules:<br /></p> +<pre> FindPackageHandleStandardArgs (known included with CMake >=2.6.2)<br /></pre> + <p><br /></p> +<p>Original Author: 2012 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> <a href="http://academic.cleardefinition.com">http://academic.cleardefinition.com</a> Iowa State University HCI Graduate Program/VRAC<br /></p> +<p>Copyright Iowa State University 2012. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt">http://www.boost.org/LICENSE_1_0.txt</a>)</p> + + </li> + <li> + <a name="module:FindQVRPN"></a><b><code>FindQVRPN</code></b>: try to find QVRPN library<br /> + <p><br /></p> +<p>Of course, you may also just choose to make QVRPN a submodule of your project itself.<br /></p> +<p>Cache Variables:<br /></p> +<pre> QVRPN_LIBRARY<br /> QVRPN_INCLUDE_DIR<br /></pre> + <p><br /></p> +<p>Non-cache variables you might use in your CMakeLists.txt:<br /></p> +<pre> QVRPN_FOUND<br /> QVRPN_LIBRARIES<br /> QVRPN_INCLUDE_DIRS<br /></pre> + <p><br /></p> +<p>QVRPN_ROOT_DIR is searched preferentially for these files<br /></p> +<p>Requires these CMake modules:<br /></p> +<pre> FindPackageHandleStandardArgs (known included with CMake >=2.6.2)<br /></pre> + <p><br /></p> +<p>Refactored from FindVRPN.cmake by: Juan Sebastian Casallas <casallas@iastate.edu><br /></p> +<p>FindVRPN.cmake Original Author: 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> <a href="http://academic.cleardefinition.com">http://academic.cleardefinition.com</a> Iowa State University HCI Graduate Program/VRAC<br /></p> +<p>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 <a href="http://www.boost.org/LICENSE_1_0.txt">http://www.boost.org/LICENSE_1_0.txt</a>)</p> + + </li> + <li> + <a name="module:FindSonix12"></a><b><code>FindSonix12</code></b>: try to find Sonix 1.2 library<br /> + <p>Requires VPR 2.0 and GMTL (thus FindVPR20.cmake and FindGMTL.cmake) Optionally uses Flagpoll and FindFlagpoll.cmake<br /></p> +<p>This library is a part of VR Juggler 2.2 - you probably want to use find_package(VRJuggler22) instead, for an easy interface to this and related scripts. See FindVRJuggler22.cmake for more information.<br /></p> +<pre> SONIX12_LIBRARY_DIR, library search path<br /> SONIX12_INCLUDE_DIR, include search path<br /> SONIX12_LIBRARY, the library to link against<br /> SONIX12_FOUND, If false, do not try to use this library.<br /></pre> + <p><br /></p> +<p>Plural versions refer to this library and its dependencies, and are recommended to be used instead, unless you have a good reason.<br /></p> +<p>Useful configuration variables you might want to add to your cache:<br /></p> +<pre> SONIX12_ROOT_DIR - A directory prefix to search<br /> (a path that contains include/ as a subdirectory)<br /></pre> + <p><br /></p> +<p>This script will use Flagpoll, if found, to provide hints to the location of this library, but does not use the compiler flags returned by Flagpoll directly.<br /></p> +<p>The VJ_BASE_DIR environment variable is also searched (preferentially) when searching for this component, so most sane build environments should "just work." Note that you need to manually re-run CMake if you change this environment variable, because it cannot auto-detect this change and trigger an automatic re-run.<br /></p> +<p>Original Author: 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> <a href="http://academic.cleardefinition.com">http://academic.cleardefinition.com</a> Iowa State University HCI Graduate Program/VRAC<br /></p> +<p>Copyright Iowa State University 2009-2010. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt">http://www.boost.org/LICENSE_1_0.txt</a>)</p> + + </li> + <li> + <a name="module:FindSonix14"></a><b><code>FindSonix14</code></b>: try to find Sonix 1.4 library<br /> + <p>Requires VPR 2.2 and GMTL (thus FindVPR22.cmake and FindGMTL.cmake) Optionally uses Flagpoll and FindFlagpoll.cmake<br /></p> +<p>This library is a part of VR Juggler 3.0 - you probably want to use find_package(VRJuggler30) instead, for an easy interface to this and related scripts. See FindVRJuggler30.cmake for more information.<br /></p> +<pre> SONIX14_LIBRARY_DIR, library search path<br /> SONIX14_INCLUDE_DIR, include search path<br /> SONIX14_LIBRARY, the library to link against<br /> SONIX14_FOUND, If false, do not try to use this library.<br /></pre> + <p><br /></p> +<p>Plural versions refer to this library and its dependencies, and are recommended to be used instead, unless you have a good reason.<br /></p> +<p>Useful configuration variables you might want to add to your cache:<br /></p> +<pre> SONIX14_ROOT_DIR - A directory prefix to search<br /> (a path that contains include/ as a subdirectory)<br /></pre> + <p><br /></p> +<p>This script will use Flagpoll, if found, to provide hints to the location of this library, but does not use the compiler flags returned by Flagpoll directly.<br /></p> +<p>The VJ_BASE_DIR environment variable is also searched (preferentially) when searching for this component, so most sane build environments should "just work." Note that you need to manually re-run CMake if you change this environment variable, because it cannot auto-detect this change and trigger an automatic re-run.<br /></p> +<p>Original Author: 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> <a href="http://academic.cleardefinition.com">http://academic.cleardefinition.com</a> Iowa State University HCI Graduate Program/VRAC Updated for VR Juggler 3.0 by: Brandon Newendorp <brandon@newendorp.com></p> + + </li> + <li> + <a name="module:FindTR1"></a><b><code>FindTR1</code></b>: Try to find C++ TR1 headers and libraries<br /> + <p>Once done, this will define<br /></p> +<pre> TR1_USE_FILE, which you may "include" in your CMake file to be able<br /> to use TR1 features transparently<br /> TR1_INCLUDE_DIRS, any directories needed to access TR1 headers<br /> TR1_LIBRARY_DIRS, any directories needed to access (auto-link) TR1 libraries<br /> TR1_FOUND, If false, do not try to use TR1 features.<br /></pre> + <p><br /></p> +<p>If TR1 features are not built-in, we will try to use Boost to substitute for them.<br /></p> +<p>Original Author: 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> <a href="http://academic.cleardefinition.com">http://academic.cleardefinition.com</a> Iowa State University HCI Graduate Program/VRAC<br /></p> +<p>Copyright Iowa State University 2009-2010. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt">http://www.boost.org/LICENSE_1_0.txt</a>)</p> + + </li> + <li> + <a name="module:FindTooN"></a><b><code>FindTooN</code></b>: try to find TooN headers<br /> + <p><br /></p> +<p>Users may optionally supply:<br /></p> +<pre> TOON_ROOT_DIR - a prefix to start searching for the toon headers.<br /></pre> + <p><br /></p> +<p>Cache Variables: (probably not for direct use in your scripts)<br /></p> +<pre> TOON_INCLUDE_DIR<br /></pre> + <p><br /></p> +<p>Non-cache variables you might use in your CMakeLists.txt:<br /></p> +<pre> TOON_FOUND<br /> TOON_INCLUDE_DIRS<br /> TOON_LIBRARIES<br /></pre> + <p><br /></p> +<p>Requires these CMake modules:<br /></p> +<pre> FindPackageHandleStandardArgs (known included with CMake >=2.6.2)<br /></pre> + <p><br /></p> +<p>Original Author: 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> <a href="http://academic.cleardefinition.com">http://academic.cleardefinition.com</a> Iowa State University HCI Graduate Program/VRAC<br /></p> +<p>Copyright Iowa State University 2009-2010. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt">http://www.boost.org/LICENSE_1_0.txt</a>)</p> + + </li> + <li> + <a name="module:FindTooNtag"></a><b><code>FindTooNtag</code></b>: try to find tag algorithm library (built on TooN)<br /> + <p><br /></p> +<p>Users may optionally supply:<br /></p> +<pre> TAG_ROOT_DIR - a prefix to start searching for the toon headers.<br /></pre> + <p><br /></p> +<p>Cache Variables: (probably not for direct use in your scripts)<br /></p> +<pre> TAG_INCLUDE_DIR<br /> TAG_LIBRARY<br /></pre> + <p><br /></p> +<p>Non-cache variables you might use in your CMakeLists.txt:<br /></p> +<pre> TOONTAG_FOUND<br /> TOONTAG_INCLUDE_DIRS<br /> TOONTAG_LIBRARIES<br /></pre> + <p><br /></p> +<p>Requires these CMake modules:<br /></p> +<pre> FindPackageHandleStandardArgs (known included with CMake >=2.6.2)<br /></pre> + <p><br /></p> +<p>Original Author: 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> <a href="http://academic.cleardefinition.com">http://academic.cleardefinition.com</a> Iowa State University HCI Graduate Program/VRAC<br /></p> +<p>Copyright Iowa State University 2009-2010. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt">http://www.boost.org/LICENSE_1_0.txt</a>)</p> + + </li> + <li> + <a name="module:FindTweek12"></a><b><code>FindTweek12</code></b>: try to find Tweek 1.2 library<br /> + <p>Requires VPR 2.0 (thus FindVPR20.cmake) Optionally uses Flagpoll and FindFlagpoll.cmake<br /></p> +<p>This library is a part of VR Juggler 2.2 - you probably want to use find_package(VRJuggler22) instead, for an easy interface to this and related scripts. See FindVRJuggler22.cmake for more information.<br /></p> +<pre> TWEEK12_LIBRARY_DIR, library search path<br /> TWEEK12_INCLUDE_DIR, include search path<br /> TWEEK12_LIBRARY, the library to link against<br /> TWEEK12_FOUND, If false, do not try to use this library.<br /></pre> + <p><br /></p> +<p>Plural versions refer to this library and its dependencies, and are recommended to be used instead, unless you have a good reason.<br /></p> +<p>Useful configuration variables you might want to add to your cache:<br /></p> +<pre> TWEEK12_ROOT_DIR - A directory prefix to search<br /> (a path that contains include/ as a subdirectory)<br /></pre> + <p><br /></p> +<p>This script will use Flagpoll, if found, to provide hints to the location of this library, but does not use the compiler flags returned by Flagpoll directly.<br /></p> +<p>The VJ_BASE_DIR environment variable is also searched (preferentially) when searching for this component, so most sane build environments should "just work." Note that you need to manually re-run CMake if you change this environment variable, because it cannot auto-detect this change and trigger an automatic re-run.<br /></p> +<p>Original Author: 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> <a href="http://academic.cleardefinition.com">http://academic.cleardefinition.com</a> Iowa State University HCI Graduate Program/VRAC<br /></p> +<p>Copyright Iowa State University 2009-2010. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt">http://www.boost.org/LICENSE_1_0.txt</a>)</p> + + </li> + <li> + <a name="module:FindTweek14"></a><b><code>FindTweek14</code></b>: try to find Tweek 1.4 library<br /> + <p>Requires VPR 2.2 (thus FindVPR22.cmake) Optionally uses Flagpoll and FindFlagpoll.cmake<br /></p> +<p>This library is a part of VR Juggler 3.0 - you probably want to use find_package(VRJuggler30) instead, for an easy interface to this and related scripts. See FindVRJuggler30.cmake for more information.<br /></p> +<pre> TWEEK14_LIBRARY_DIR, library search path<br /> TWEEK14_INCLUDE_DIR, include search path<br /> TWEEK14_LIBRARY, the library to link against<br /> TWEEK14_FOUND, If false, do not try to use this library.<br /></pre> + <p><br /></p> +<p>Plural versions refer to this library and its dependencies, and are recommended to be used instead, unless you have a good reason.<br /></p> +<p>Useful configuration variables you might want to add to your cache:<br /></p> +<pre> TWEEK14_ROOT_DIR - A directory prefix to search<br /> (a path that contains include/ as a subdirectory)<br /></pre> + <p><br /></p> +<p>This script will use Flagpoll, if found, to provide hints to the location of this library, but does not use the compiler flags returned by Flagpoll directly.<br /></p> +<p>The VJ_BASE_DIR environment variable is also searched (preferentially) when searching for this component, so most sane build environments should "just work." Note that you need to manually re-run CMake if you change this environment variable, because it cannot auto-detect this change and trigger an automatic re-run.<br /></p> +<p>Original Author: 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> <a href="http://academic.cleardefinition.com">http://academic.cleardefinition.com</a> Iowa State University HCI Graduate Program/VRAC Updated for VR Juggler 3.0 by: Brandon Newendorp <brandon@newendorp.com></p> + + </li> + <li> + <a name="module:FindVPR20"></a><b><code>FindVPR20</code></b>: try to find VPR 2.0 library<br /> + <p>Requires Boost 1.33.1 or greater (including filesystem and signals libraries) (and thus FindBoost.cmake from 2.8rc3 or newer, preferably) Requires NSPR4 (and PLC4) on Windows Requires pthreads on Unix (Mac or Linux) Requires libuuid on Linux Optionally uses Flagpoll and FindFlagpoll.cmake<br /></p> +<p>This library is a part of VR Juggler 2.2 - you probably want to use find_package(VRJuggler22) instead, for an easy interface to this and related scripts. See FindVRJuggler22.cmake for more information.<br /></p> +<pre> VPR20_LIBRARY_DIR, library search path<br /> VPR20_INCLUDE_DIR, include search path<br /> VPR20_LIBRARY, the library to link against<br /> VPR20_FOUND, If false, do not try to use this library.<br /></pre> + <p><br /></p> +<p>Plural versions refer to this library and its dependencies, and are recommended to be used instead, unless you have a good reason.<br /></p> +<p>Useful configuration variables you might want to add to your cache:<br /></p> +<pre> VPR20_ROOT_DIR - A directory prefix to search<br /> (a path that contains include/ as a subdirectory)<br /></pre> + <p><br /></p> +<p>This script will use Flagpoll, if found, to provide hints to the location of this library, but does not use the compiler flags returned by Flagpoll directly.<br /></p> +<p>The VJ_BASE_DIR environment variable is also searched (preferentially) when searching for this component, so most sane build environments should "just work." Note that you need to manually re-run CMake if you change this environment variable, because it cannot auto-detect this change and trigger an automatic re-run.<br /></p> +<p>Original Author: 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> <a href="http://academic.cleardefinition.com">http://academic.cleardefinition.com</a> Iowa State University HCI Graduate Program/VRAC<br /></p> +<p>Copyright Iowa State University 2009-2010. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt">http://www.boost.org/LICENSE_1_0.txt</a>)</p> + + </li> + <li> + <a name="module:FindVPR22"></a><b><code>FindVPR22</code></b>: try to find VPR 2.2 library<br /> + <p>Requires Boost 1.33.1 or greater (including filesystem and signals libraries) (and thus FindBoost.cmake from 2.8rc3 or newer, preferably) Requires NSPR4 (and PLC4) on Windows Requires pthreads on Unix (Mac or Linux) Requires libuuid on Linux Optionally uses Flagpoll and FindFlagpoll.cmake<br /></p> +<p>This library is a part of VR Juggler 3.0 - you probably want to use find_package(VRJuggler30) instead, for an easy interface to this and related scripts. See FindVRJuggler30.cmake for more information.<br /></p> +<pre> VPR22_LIBRARY_DIR, library search path<br /> VPR22_INCLUDE_DIR, include search path<br /> VPR22_LIBRARY, the library to link against<br /> VPR22_FOUND, If false, do not try to use this library.<br /></pre> + <p><br /></p> +<p>Plural versions refer to this library and its dependencies, and are recommended to be used instead, unless you have a good reason.<br /></p> +<p>Useful configuration variables you might want to add to your cache:<br /></p> +<pre> VPR22_ROOT_DIR - A directory prefix to search<br /> (a path that contains include/ as a subdirectory)<br /></pre> + <p><br /></p> +<p>This script will use Flagpoll, if found, to provide hints to the location of this library, but does not use the compiler flags returned by Flagpoll directly.<br /></p> +<p>The VJ_BASE_DIR environment variable is also searched (preferentially) when searching for this component, so most sane build environments should "just work." Note that you need to manually re-run CMake if you change this environment variable, because it cannot auto-detect this change and trigger an automatic re-run.<br /></p> +<p>Original Author: 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> <a href="http://academic.cleardefinition.com">http://academic.cleardefinition.com</a> Iowa State University HCI Graduate Program/VRAC Updated for VR Juggler 3.0 by: Brandon Newendorp <brandon@newendorp.com></p> + + </li> + <li> + <a name="module:FindVPS"></a><b><code>FindVPS</code></b>: try to find VPS library<br /> + <p><br /></p> +<pre> VPS_LIBRARY_DIR, library search path<br /> VPS_INCLUDE_DIR, include search path<br /> VPS_{component}_LIBRARY, the library to link against<br /> VPS_FOUND, If false, do not try to use this library.<br /></pre> + <p><br /></p> +<p>Plural versions refer to this library and its dependencies, and are recommended to be used instead, unless you have a good reason.<br /></p> +<p>Useful configuration variables you might want to add to your cache:<br /></p> +<pre> VPS_ROOT_DIR - A directory prefix to search<br /> (a path that contains include/ as a subdirectory)<br /></pre> + <p><br /></p> +<p>Original Author: 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> <a href="http://academic.cleardefinition.com">http://academic.cleardefinition.com</a> Iowa State University HCI Graduate Program/VRAC<br /></p> +<p>Copyright Iowa State University 2009-2010. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt">http://www.boost.org/LICENSE_1_0.txt</a>)</p> + + </li> + <li> + <a name="module:FindVRJ22"></a><b><code>FindVRJ22</code></b>: try to find VR Juggler 2.2 core library<br /> + <p>Requires JCCL 1.2, Gadgeteer 1.2, VPR 2.0, and Sonix 1.2 (thus FindJCCL12.cmake, FindGadgeteer12.cmake, FindVPR20.cmake, and FindSonix12.cmake) Requires X11 if not on Mac or Windows. Optionally uses Flagpoll and FindFlagpoll.cmake<br /></p> +<p>This library is a part of VR Juggler 2.2 - you probably want to use find_package(VRJuggler22) instead, for an easy interface to this and related scripts. See FindVRJuggler22.cmake for more information.<br /></p> +<pre> VRJ22_LIBRARY_DIR, library search path<br /> VRJ22_INCLUDE_DIR, include search path<br /> VRJ22_LIBRARY, the library to link against<br /> VRJ22_FOUND, If false, do not try to use this library.<br /></pre> + <p><br /></p> +<p>Plural versions refer to this library and its dependencies, and are recommended to be used instead, unless you have a good reason.<br /></p> +<p>Useful configuration variables you might want to add to your cache:<br /></p> +<pre> VRJ22_ROOT_DIR - A directory prefix to search<br /> (a path that contains include/ as a subdirectory)<br /></pre> + <p><br /></p> +<p>This script will use Flagpoll, if found, to provide hints to the location of this library, but does not use the compiler flags returned by Flagpoll directly.<br /></p> +<p>The VJ_BASE_DIR environment variable is also searched (preferentially) when searching for this component, so most sane build environments should "just work." Note that you need to manually re-run CMake if you change this environment variable, because it cannot auto-detect this change and trigger an automatic re-run.<br /></p> +<p>Original Author: 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> <a href="http://academic.cleardefinition.com">http://academic.cleardefinition.com</a> Iowa State University HCI Graduate Program/VRAC<br /></p> +<p>Copyright Iowa State University 2009-2010. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt">http://www.boost.org/LICENSE_1_0.txt</a>)</p> + + </li> + <li> + <a name="module:FindVRJ30"></a><b><code>FindVRJ30</code></b>: try to find VR Juggler 3.0 core library<br /> + <p>Requires JCCL 1.4, Gadgeteer 1.4, VPR 2.2, and Sonix 1.4 (thus FindJCCL14.cmake, FindGadgeteer20.cmake, FindVPR22.cmake, and FindSonix14.cmake) Requires X11 if not on Mac or Windows. Optionally uses Flagpoll and FindFlagpoll.cmake<br /></p> +<p>This library is a part of VR Juggler 3.0 - you probably want to use find_package(VRJuggler30) instead, for an easy interface to this and related scripts. See FindVRJuggler30.cmake for more information.<br /></p> +<pre> VRJ30_LIBRARY_DIR, library search path<br /> VRJ30_INCLUDE_DIR, include search path<br /> VRJ30_LIBRARY, the library to link against<br /> VRJ30_FOUND, If false, do not try to use this library.<br /></pre> + <p><br /></p> +<p>Plural versions refer to this library and its dependencies, and are recommended to be used instead, unless you have a good reason.<br /></p> +<p>Useful configuration variables you might want to add to your cache:<br /></p> +<pre> VRJ30_ROOT_DIR - A directory prefix to search<br /> (a path that contains include/ as a subdirectory)<br /></pre> + <p><br /></p> +<p>This script will use Flagpoll, if found, to provide hints to the location of this library, but does not use the compiler flags returned by Flagpoll directly.<br /></p> +<p>The VJ_BASE_DIR environment variable is also searched (preferentially) when searching for this component, so most sane build environments should "just work." Note that you need to manually re-run CMake if you change this environment variable, because it cannot auto-detect this change and trigger an automatic re-run.<br /></p> +<p>Original Author: 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> <a href="http://academic.cleardefinition.com">http://academic.cleardefinition.com</a> Iowa State University HCI Graduate Program/VRAC Updated for VR Juggler 3.0 by: Brandon Newendorp <brandon@newendorp.com><br /></p> +<p>Copyright Iowa State University 2009-2010. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt">http://www.boost.org/LICENSE_1_0.txt</a>)</p> + + </li> + <li> + <a name="module:FindVRJOGL22"></a><b><code>FindVRJOGL22</code></b>: try to find VRJuggler 2.2 OpenGL library<br /> + <p>Requires VRJ core 2.2 (thus FindVRJ22.cmake) Requires OpenGL. Optionally uses Flagpoll and FindFlagpoll.cmake<br /></p> +<p>This library is a part of VR Juggler 2.2 - you probably want to use find_package(VRJuggler22) instead, for an easy interface to this and related scripts. See FindVRJuggler22.cmake for more information.<br /></p> +<pre> VRJOGL22_LIBRARY_DIR, library search path<br /> VRJOGL22_INCLUDE_DIRS, include search path for dependencies<br /> VRJOGL22_LIBRARY, the library to link against<br /> VRJOGL22_FOUND, If false, do not try to use this library.<br /></pre> + <p><br /></p> +<p>Plural versions refer to this library and its dependencies, and are recommended to be used instead, unless you have a good reason.<br /></p> +<p>Useful configuration variables you might want to add to your cache:<br /></p> +<pre> VRJOGL22_ROOT_DIR - A directory prefix to search<br /> (a path that contains include/ as a subdirectory)<br /></pre> + <p><br /></p> +<p>This script will use Flagpoll, if found, to provide hints to the location of this library, but does not use the compiler flags returned by Flagpoll directly.<br /></p> +<p>The VJ_BASE_DIR environment variable is also searched (preferentially) when searching for this component, so most sane build environments should "just work." Note that you need to manually re-run CMake if you change this environment variable, because it cannot auto-detect this change and trigger an automatic re-run.<br /></p> +<p>Original Author: 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> <a href="http://academic.cleardefinition.com">http://academic.cleardefinition.com</a> Iowa State University HCI Graduate Program/VRAC<br /></p> +<p>Copyright Iowa State University 2009-2010. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt">http://www.boost.org/LICENSE_1_0.txt</a>)</p> + + </li> + <li> + <a name="module:FindVRJOGL30"></a><b><code>FindVRJOGL30</code></b>: try to find VRJuggler 3.0 OpenGL library<br /> + <p>Requires VRJ core 3.0 (thus FindVRJ30.cmake) Requires OpenGL. Optionally uses Flagpoll and FindFlagpoll.cmake<br /></p> +<p>This library is a part of VR Juggler 3.0 - you probably want to use find_package(VRJuggler30) instead, for an easy interface to this and related scripts. See FindVRJuggler30.cmake for more information.<br /></p> +<pre> VRJOGL30_LIBRARY_DIR, library search path<br /> VRJOGL30_INCLUDE_DIRS, include search path for dependencies<br /> VRJOGL30_LIBRARY, the library to link against<br /> VRJOGL30_FOUND, If false, do not try to use this library.<br /></pre> + <p><br /></p> +<p>Plural versions refer to this library and its dependencies, and are recommended to be used instead, unless you have a good reason.<br /></p> +<p>Useful configuration variables you might want to add to your cache:<br /></p> +<pre> VRJOGL30_ROOT_DIR - A directory prefix to search<br /> (a path that contains include/ as a subdirectory)<br /></pre> + <p><br /></p> +<p>This script will use Flagpoll, if found, to provide hints to the location of this library, but does not use the compiler flags returned by Flagpoll directly.<br /></p> +<p>The VJ_BASE_DIR environment variable is also searched (preferentially) when searching for this component, so most sane build environments should "just work." Note that you need to manually re-run CMake if you change this environment variable, because it cannot auto-detect this change and trigger an automatic re-run.<br /></p> +<p>Original Author: 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> <a href="http://academic.cleardefinition.com">http://academic.cleardefinition.com</a> Iowa State University HCI Graduate Program/VRAC Updated for VR Juggler 3.0 by: Brandon Newendorp <brandon@newendorp.com></p> + + </li> + <li> + <a name="module:FindVRJuggler"></a><b><code>FindVRJuggler</code></b>: try to find VR Juggler-related packages (combined finder)<br /> + <pre> VRJUGGLER_INCLUDE_DIRS, include search paths<br /> VRJUGGLER_LIBRARIES, the libraries to link against<br /> VRJUGGLER_ENVIRONMENT<br /> VRJUGGLER_RUNTIME_LIBRARY_DIRS<br /> VRJUGGLER_CXX_FLAGS<br /> VRJUGGLER_DEFINITIONS<br /> VRJUGGLER_FOUND, If false, do not try to use VR Juggler.<br /></pre> + <p><br /></p> +<p>Components available to search for (uses "VRJOGL" by default):<br /></p> +<pre> VRJOGL<br /> VRJ<br /> Gadgeteer<br /> JCCL<br /> VPR<br /> Sonix<br /> Tweek<br /></pre> + <p><br /></p> +<p>Additionally, a full setup requires these packages and their Find_.cmake scripts<br /></p> +<pre> CPPDOM<br /> GMTL<br /></pre> + <p><br /></p> +<p>Optionally uses Flagpoll (and FindFlagpoll.cmake)<br /></p> +<p>Notes on components:<br /></p> +<pre> - All components automatically include their dependencies.<br /> - If you do not specify a component, VRJOGL (the OpenGL view manager)<br /> will be used by default.<br /> - Capitalization of component names does not matter, but it's best to<br /> pretend it does and use the above capitalization.<br /> - Since this script calls find_package for your requested components and<br /> their dependencies, you can use any of the variables specified in those<br /> files in addition to the "summary" ones listed here, for more finely<br /> controlled building and linking.<br /></pre> + <p><br /></p> +<p>This CMake script requires all of the Find*.cmake scripts for the components listed above, as it is only a "meta-script" designed to make using those scripts more developer-friendly.<br /></p> +<p>Useful configuration variables you might want to add to your cache:<br /></p> +<pre> (CAPS COMPONENT NAME)_ROOT_DIR - A directory prefix to search<br /> (a path that contains include/ as a subdirectory)<br /></pre> + <p><br /></p> +<p>The VJ_BASE_DIR environment variable is also searched (preferentially) when seeking any of the above components, as well as Flagpoll, CPPDOM, and Boost (from within VPR), so most sane build environments should "just work."<br /></p> +<p>IMPORTANT: Note that you need to manually re-run CMake if you change this environment variable, because it cannot auto-detect this change and trigger an automatic re-run.<br /></p> +<p>Original Author: 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> <a href="http://academic.cleardefinition.com">http://academic.cleardefinition.com</a> Iowa State University HCI Graduate Program/VRAC Updated for VR Juggler 3.0 by: Brandon Newendorp <brandon@newendorp.com><br /></p> +<p>Copyright Iowa State University 2009-2010. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt">http://www.boost.org/LICENSE_1_0.txt</a>)</p> + + </li> + <li> + <a name="module:FindVRJuggler22"></a><b><code>FindVRJuggler22</code></b>: try to find VRJuggler 2.2-related packages (main finder)<br /> + <pre> VRJUGGLER22_LIBRARY_DIRS, library search paths<br /> VRJUGGLER22_INCLUDE_DIRS, include search paths<br /> VRJUGGLER22_LIBRARIES, the libraries to link against<br /> VRJUGGLER22_ENVIRONMENT<br /> VRJUGGLER22_RUNTIME_LIBRARY_DIRS<br /> VRJUGGLER22_CXX_FLAGS<br /> VRJUGGLER22_DEFINITIONS<br /> VRJUGGLER22_FOUND, If false, do not try to use VR Juggler 2.2.<br /></pre> + <p><br /></p> +<p>Components available to search for (uses "VRJOGL22" by default):<br /></p> +<pre> VRJOGL22<br /> VRJ22<br /> Gadgeteer12<br /> JCCL12<br /> VPR20<br /> Sonix12<br /> Tweek12<br /></pre> + <p><br /></p> +<p>Additionally, a full setup requires these packages and their Find_.cmake scripts<br /></p> +<pre> CPPDOM<br /> GMTL<br /></pre> + <p><br /></p> +<p>Optionally uses Flagpoll (and FindFlagpoll.cmake)<br /></p> +<p>Notes on components:<br /></p> +<pre> - All components automatically include their dependencies.<br /> - You can search for the name above with or without the version suffix.<br /> - If you do not specify a component, VRJOGL22(the OpenGL view manager)<br /> will be used by default.<br /> - Capitalization of component names does not matter, but it's best to<br /> pretend it does and use the above capitalization.<br /> - Since this script calls find_package for your requested components and<br /> their dependencies, you can use any of the variables specified in those<br /> files in addition to the "summary" ones listed here, for more finely<br /> controlled building and linking.<br /></pre> + <p><br /></p> +<p>This CMake script requires all of the Find*.cmake scripts for the components listed above, as it is only a "meta-script" designed to make using those scripts more developer-friendly.<br /></p> +<p>Useful configuration variables you might want to add to your cache:<br /></p> +<pre> (CAPS COMPONENT NAME)_ROOT_DIR - A directory prefix to search<br /> (a path that contains include/ as a subdirectory)<br /></pre> + <p><br /></p> +<p>The VJ_BASE_DIR environment variable is also searched (preferentially) when seeking any of the above components, as well as Flagpoll, CPPDOM, and Boost (from within VPR20), so most sane build environments should "just work."<br /></p> +<p>IMPORTANT: Note that you need to manually re-run CMake if you change this environment variable, because it cannot auto-detect this change and trigger an automatic re-run.<br /></p> +<p>Original Author: 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> <a href="http://academic.cleardefinition.com">http://academic.cleardefinition.com</a> Iowa State University HCI Graduate Program/VRAC<br /></p> +<p>Copyright Iowa State University 2009-2010. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt">http://www.boost.org/LICENSE_1_0.txt</a>)</p> + + </li> + <li> + <a name="module:FindVRJuggler30"></a><b><code>FindVRJuggler30</code></b>: try to find VRJuggler 3.0-related packages (main finder)<br /> + <pre> VRJUGGLER30_LIBRARY_DIRS, library search paths<br /> VRJUGGLER30_INCLUDE_DIRS, include search paths<br /> VRJUGGLER30_LIBRARIES, the libraries to link against<br /> VRJUGGLER30_ENVIRONMENT<br /> VRJUGGLER30_RUNTIME_LIBRARY_DIRS<br /> VRJUGGLER30_CXX_FLAGS<br /> VRJUGGLER30_DEFINITIONS<br /> VRJUGGLER30_FOUND, If false, do not try to use VR Juggler 3.0.<br /></pre> + <p><br /></p> +<p>Components available to search for (uses "VRJOGL30" by default):<br /></p> +<pre> VRJOGL30<br /> VRJ30<br /> Gadgeteer20<br /> JCCL14<br /> VPR22<br /> Sonix14<br /> Tweek14<br /></pre> + <p><br /></p> +<p>Additionally, a full setup requires these packages and their Find_.cmake scripts<br /></p> +<pre> CPPDOM<br /> GMTL<br /></pre> + <p><br /></p> +<p>Optionally uses Flagpoll (and FindFlagpoll.cmake)<br /></p> +<p>Notes on components:<br /></p> +<pre> - All components automatically include their dependencies.<br /> - You can search for the name above with or without the version suffix.<br /> - If you do not specify a component, VRJOGL30(the OpenGL view manager)<br /> will be used by default.<br /> - Capitalization of component names does not matter, but it's best to<br /> pretend it does and use the above capitalization.<br /> - Since this script calls find_package for your requested components and<br /> their dependencies, you can use any of the variables specified in those<br /> files in addition to the "summary" ones listed here, for more finely<br /> controlled building and linking.<br /></pre> + <p><br /></p> +<p>This CMake script requires all of the Find*.cmake scripts for the components listed above, as it is only a "meta-script" designed to make using those scripts more developer-friendly.<br /></p> +<p>Useful configuration variables you might want to add to your cache:<br /></p> +<pre> (CAPS COMPONENT NAME)_ROOT_DIR - A directory prefix to search<br /> (a path that contains include/ as a subdirectory)<br /></pre> + <p><br /></p> +<p>The VJ_BASE_DIR environment variable is also searched (preferentially) when seeking any of the above components, as well as Flagpoll, CPPDOM, and Boost (from within VPR22), so most sane build environments should "just work."<br /></p> +<p>IMPORTANT: Note that you need to manually re-run CMake if you change this environment variable, because it cannot auto-detect this change and trigger an automatic re-run.<br /></p> +<p>Original Author: 2009-2011 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> <a href="http://academic.cleardefinition.com">http://academic.cleardefinition.com</a> Iowa State University HCI Graduate Program/VRAC Updated for VR Juggler 3.0 by: Brandon Newendorp <brandon@newendorp.com> and Ryan Pavlik<br /></p> +<p>Copyright Iowa State University 2009-2011. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt">http://www.boost.org/LICENSE_1_0.txt</a>)</p> + + </li> + <li> + <a name="module:FindVRPN"></a><b><code>FindVRPN</code></b>: try to find VRPN library<br /> + <p><br /></p> +<p>Cache Variables:<br /></p> +<pre> VRPN_LIBRARY<br /> VRPN_SERVER_LIBRARY<br /> VRPN_INCLUDE_DIR<br /></pre> + <p><br /></p> +<p>Non-cache variables you might use in your CMakeLists.txt:<br /></p> +<pre> VRPN_FOUND<br /> VRPN_SERVER_LIBRARIES - server libraries<br /> VRPN_LIBRARIES - client libraries<br /> VRPN_CLIENT_DEFINITIONS - definitions if you only use the client library<br /> VRPN_DEFINITIONS - Client-only definition if all we found was the client library.<br /> VRPN_INCLUDE_DIRS<br /></pre> + <p><br /></p> +<p>VRPN_ROOT_DIR is searched preferentially for these files<br /></p> +<p>Requires these CMake modules:<br /></p> +<pre> FindPackageHandleStandardArgs (known included with CMake >=2.6.2)<br /></pre> + <p><br /></p> +<p>Original Author: 2009-2012 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> <a href="http://academic.cleardefinition.com">http://academic.cleardefinition.com</a> Iowa State University HCI Graduate Program/VRAC<br /></p> +<p>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 <a href="http://www.boost.org/LICENSE_1_0.txt">http://www.boost.org/LICENSE_1_0.txt</a>)</p> + + </li> + <li> + <a name="module:FindViewPoint"></a><b><code>FindViewPoint</code></b>: try to find Arrington Research ViewPoint EyeTracker SDK<br /> + <p><br /></p> +<p>Cache Variables: (probably not for direct use in your scripts)<br /></p> +<pre> VIEWPOINT_INCLUDE_DIR<br /> VIEWPOINT_LIBRARY<br /> VIEWPOINT_RUNTIME_LIBRARY<br /></pre> + <p><br /></p> +<p>Non-cache variables you might use in your CMakeLists.txt:<br /></p> +<pre> VIEWPOINT_FOUND<br /> VIEWPOINT_INCLUDE_DIRS<br /> VIEWPOINT_LIBRARIES<br /> VIEWPOINT_RUNTIME_LIBRARIES - aka the dll for installing<br /> VIEWPOINT_RUNTIME_LIBRARY_DIRS<br /></pre> + <p><br /></p> +<p>Requires these CMake modules:<br /></p> +<pre> FindPackageHandleStandardArgs (known included with CMake >=2.6.2)<br /></pre> + <p><br /></p> +<p>Original Author: 2012 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> <a href="http://academic.cleardefinition.com">http://academic.cleardefinition.com</a> Iowa State University HCI Graduate Program/VRAC<br /></p> +<p>Copyright Iowa State University 2012. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt">http://www.boost.org/LICENSE_1_0.txt</a>)</p> + + </li> + <li> + <a name="module:FindVirtuoseAPI"></a><b><code>FindVirtuoseAPI</code></b>: try to find Haption VirtuoseAPI library and include files<br /> + <p><br /></p> +<pre> VIRTUOSEAPI_INCLUDE_DIRS, where to find headers<br /> VIRTUOSEAPI_LIBRARIES, the libraries to link against<br /> VIRTUOSEAPI_FOUND, If false, do not try to use this library<br /> VIRTUOSEAPI_RUNTIME_LIBRARY_DIRS, path to DLL/SO for runtime use.<br /> VIRTUOSEAPI_RUNTIME_LIBRARIES, runtime libraries you might want to install<br /></pre> + + </li> + <li> + <a name="module:FindVirtuoseVPP"></a><b><code>FindVirtuoseVPP</code></b>: try to find Haption VirtuoseAPI C++ wrapper include files<br /> + <p><br /></p> +<p>Use of this header depends on the VirtuoseAPI, so we search for that too.<br /></p> +<pre> VIRTUOSEVPP_INCLUDE_DIRS, where to find headers<br /> VIRTUOSEVPP_LIBRARIES, the libraries to link against<br /> VIRTUOSEVPP_FOUND, If false, do not try to use this library<br /> VIRTUOSEVPP_RUNTIME_LIBRARY_DIRS, path to DLL/SO for runtime use.<br /> VIRTUOSEAPI_RUNTIME_LIBRARIES, runtime libraries you might want to install<br /></pre> + + </li> + <li> + <a name="module:FindWiiSCAAT"></a><b><code>FindWiiSCAAT</code></b>: try to find the Wii SCAAT library<br /> + <p><br /></p> +<p>Users may optionally supply:<br /></p> +<pre> WIISCAAT_ROOT_DIR - a prefix to start searching for the headers.<br /></pre> + <p><br /></p> +<p>Cache Variables: (probably not for direct use in your scripts)<br /></p> +<pre> WIISCAAT_INCLUDE_DIR<br /> WIISCAAT_LIBRARY<br /></pre> + <p><br /></p> +<p>Non-cache variables you might use in your CMakeLists.txt:<br /></p> +<pre> WIISCAAT_FOUND<br /> WIISCAAT_INCLUDE_DIRS<br /> WIISCAAT_LIBRARIES<br /></pre> + <p><br /></p> +<p>Requires these CMake modules:<br /></p> +<pre> FindPackageHandleStandardArgs (known included with CMake >=2.6.2)<br /></pre> + <p><br /></p> +<p>Original Author: 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> <a href="http://academic.cleardefinition.com">http://academic.cleardefinition.com</a> Iowa State University HCI Graduate Program/VRAC<br /></p> +<p>Copyright Iowa State University 2009-2010. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt">http://www.boost.org/LICENSE_1_0.txt</a>)</p> + + </li> + <li> + <a name="module:FindWiiUse"></a><b><code>FindWiiUse</code></b>: try to find WiiUse library<br /> + <p><br /></p> +<p>Cache Variables: (probably not for direct use in your scripts)<br /></p> +<pre> WIIUSE_INCLUDE_DIR<br /> WIIUSE_LIBRARY<br /></pre> + <p><br /></p> +<p>Non-cache variables you might use in your CMakeLists.txt:<br /></p> +<pre> WIIUSE_FOUND<br /> WIIUSE_INCLUDE_DIRS<br /> WIIUSE_LIBRARIES<br /> WIIUSE_RUNTIME_LIBRARIES - aka the dll for installing<br /> WIIUSE_RUNTIME_LIBRARY_DIRS<br /></pre> + <p><br /></p> +<p>Requires these CMake modules:<br /></p> +<pre> FindPackageHandleStandardArgs (known included with CMake >=2.6.2)<br /></pre> + <p><br /></p> +<p>Original Author: 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> <a href="http://academic.cleardefinition.com">http://academic.cleardefinition.com</a> Iowa State University HCI Graduate Program/VRAC<br /></p> +<p>Copyright Iowa State University 2009-2010. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt">http://www.boost.org/LICENSE_1_0.txt</a>)</p> + + </li> + <li> + <a name="module:FindWinHID"></a><b><code>FindWinHID</code></b>: try to find Windows HID support, part of the WDK/DDK<br /> + <p><br /></p> +<p>Cache Variables: (probably not for direct use in your scripts)<br /></p> +<pre> WINHID_INCLUDE_DIR<br /> WINHID_CRT_INCLUDE_DIR<br /> WINHID_LIBRARY<br /></pre> + <p><br /></p> +<p>Non-cache variables you might use in your CMakeLists.txt:<br /></p> +<pre> WINHID_FOUND<br /> WINHID_INCLUDE_DIRS<br /> WINHID_LIBRARIES<br /></pre> + <p><br /></p> +<p>Requires these CMake modules:<br /></p> +<pre> FindPackageHandleStandardArgs (known included with CMake >=2.6.2)<br /> PrefixListGlob<br /> CleanDirectoryList<br /></pre> + <p><br /></p> +<p>Original Author: 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> <a href="http://academic.cleardefinition.com">http://academic.cleardefinition.com</a> Iowa State University HCI Graduate Program/VRAC<br /></p> +<p>Copyright Iowa State University 2009-2010. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt">http://www.boost.org/LICENSE_1_0.txt</a>)</p> + + </li> + <li> + <a name="module:FindWindowsSDK"></a><b><code>FindWindowsSDK</code></b>: Find the Windows SDK aka Platform SDK<br /> + <p><br /></p> +<p>Variables:<br /></p> +<pre> WINDOWSSDK_FOUND - if any version of the windows or platform SDK was found that is usable with the current version of visual studio<br /> WINDOWSSDK_LATEST_DIR<br /> WINDOWSSDK_LATEST_NAME<br /> WINDOWSSDK_FOUND_PREFERENCE - if we found an entry indicating a "preferred" SDK listed for this visual studio version<br /> WINDOWSSDK_PREFERRED_DIR<br /> WINDOWSSDK_PREFERRED_NAME<br /></pre> + <p><br /></p> +<pre> WINDOWSSDK_DIRS - contains no duplicates, ordered most recent first.<br /> WINDOWSSDK_PREFERRED_FIRST_DIRS - contains no duplicates, ordered with preferred first, followed by the rest in descending recency<br /></pre> + <p><br /></p> +<p>Functions:<br /></p> +<pre> windowssdk_name_lookup(<directory> <output variable>) - Find the name corresponding with the SDK directory you pass in, or<br /> NOTFOUND if not recognized. Your directory must be one of WINDOWSSDK_DIRS for this to work.<br /></pre> + <p><br /></p> +<p>Requires these CMake modules:<br /></p> +<pre> FindPackageHandleStandardArgs (known included with CMake >=2.6.2)<br /></pre> + <p><br /></p> +<p>Original Author: 2012 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> <a href="http://academic.cleardefinition.com">http://academic.cleardefinition.com</a> Iowa State University HCI Graduate Program/VRAC<br /></p> +<p>Copyright Iowa State University 2012. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt">http://www.boost.org/LICENSE_1_0.txt</a>)</p> + + </li> + <li> + <a name="module:Findargp"></a><b><code>Findargp</code></b>: try to find the argp library/component of glibc<br /> + <p><br /></p> +<p>Users may optionally supply:<br /></p> +<pre> ARGP_ROOT_DIR - a prefix to start searching.<br /></pre> + <p><br /></p> +<p>Cache Variables: (probably not for direct use in your scripts)<br /></p> +<pre> ARGP_INCLUDE_DIR<br /> ARGP_LIBRARY, only defined if linking to an extra library is required<br /></pre> + <p><br /></p> +<p>Non-cache variables you might use in your CMakeLists.txt:<br /></p> +<pre> ARGP_FOUND<br /> ARGP_INCLUDE_DIRS<br /> ARGP_LIBRARIES<br /></pre> + <p><br /></p> +<p>Requires these CMake modules:<br /></p> +<pre> FindPackageHandleStandardArgs (known included with CMake >=2.6.2)<br /></pre> + <p><br /></p> +<p>Original Author: 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> <a href="http://academic.cleardefinition.com">http://academic.cleardefinition.com</a> Iowa State University HCI Graduate Program/VRAC<br /></p> +<p>Copyright Iowa State University 2009-2010. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt">http://www.boost.org/LICENSE_1_0.txt</a>)</p> + + </li> + <li> + <a name="module:Findcppcheck"></a><b><code>Findcppcheck</code></b>: try to find cppcheck tool<br /> + <p><br /></p> +<p>Cache Variables:<br /></p> +<pre> CPPCHECK_EXECUTABLE<br /></pre> + <p><br /></p> +<p>Non-cache variables you might use in your CMakeLists.txt:<br /></p> +<pre> CPPCHECK_FOUND<br /> CPPCHECK_POSSIBLEERROR_ARG<br /> CPPCHECK_UNUSEDFUNC_ARG<br /> CPPCHECK_STYLE_ARG<br /> CPPCHECK_QUIET_ARG<br /> CPPCHECK_INCLUDEPATH_ARG<br /> CPPCHECK_FAIL_REGULAR_EXPRESSION<br /> CPPCHECK_WARN_REGULAR_EXPRESSION<br /> CPPCHECK_MARK_AS_ADVANCED - whether to mark our vars as advanced even<br /> if we don't find this program.<br /></pre> + <p><br /></p> +<p>Requires these CMake modules:<br /></p> +<pre> FindPackageHandleStandardArgs (known included with CMake >=2.6.2)<br /></pre> + <p><br /></p> +<p>Original Author: 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> <a href="http://academic.cleardefinition.com">http://academic.cleardefinition.com</a> Iowa State University HCI Graduate Program/VRAC<br /></p> +<p>Copyright Iowa State University 2009-2010. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt">http://www.boost.org/LICENSE_1_0.txt</a>)</p> + + </li> + <li> + <a name="module:Findcppunit"></a><b><code>Findcppunit</code></b>: try to find cppunit library<br /> + <p><br /></p> +<p>Cache Variables: (probably not for direct use in your scripts)<br /></p> +<pre> CPPUNIT_INCLUDE_DIR<br /> CPPUNIT_LIBRARY<br /></pre> + <p><br /></p> +<p>Non-cache variables you might use in your CMakeLists.txt:<br /></p> +<pre> CPPUNIT_FOUND<br /> CPPUNIT_INCLUDE_DIRS<br /> CPPUNIT_LIBRARIES<br /></pre> + <p><br /></p> +<p>Requires these CMake modules:<br /></p> +<pre> SelectLibraryConfigurations (included with CMake >= 2.8.0)<br /> FindPackageHandleStandardArgs (known included with CMake >=2.6.2)<br /></pre> + <p><br /></p> +<p>Original Author: 2009-2011 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> <a href="http://academic.cleardefinition.com">http://academic.cleardefinition.com</a> Iowa State University HCI Graduate Program/VRAC<br /></p> +<p>Copyright Iowa State University 2009-2011. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt">http://www.boost.org/LICENSE_1_0.txt</a>)</p> + + </li> + <li> + <a name="module:Findcutil"></a><b><code>Findcutil</code></b>: find NVIDIA CUDA and source for the cutil library, building cutil if needed.<br /> + <p><br /></p> +<pre> CUTIL_LIBRARIES - Libraries to link against to use CUTIL<br /> CUTIL_INCLUDE_DIRS - Include directories to add before building a CUTIL app.<br /></pre> + <p><br /></p> +<p>Functions:<br /></p> +<pre> install_cutil({RUNTIME_LIBRARY_DESTINATION}) - Install the CUTIL shared lib if created.<br /></pre> + <p><br /></p> +<p>Original Author: 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> <a href="http://academic.cleardefinition.com">http://academic.cleardefinition.com</a> Iowa State University HCI Graduate Program/VRAC<br /></p> +<p>Copyright Iowa State University 2009-2010. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt">http://www.boost.org/LICENSE_1_0.txt</a>)</p> + + </li> + <li> + <a name="module:Finddb2pdf"></a><b><code>Finddb2pdf</code></b>: Try to find db2pdf, and define a custom command to turn docbook into pdf<br /> + <p><br /></p> +<p>Once done, this will define:<br /></p> +<pre> DB2PDF_FOUND - system has LyX<br /> DB2PDF_COMMAND - the command to run<br /></pre> + <p><br /></p> +<p>and the following function:<br /></p> +<pre> docbook_to_pdf(<output-variable> <docbook files>)<br /></pre> + <p><br /></p> +<p>Useful configuration variables you might want to add to your cache:<br /></p> +<pre> DB2PDF_ROOT_DIR - A directory prefix to search<br /></pre> + <p><br /></p> +<p>Original Author: 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> <a href="http://academic.cleardefinition.com">http://academic.cleardefinition.com</a> Iowa State University HCI Graduate Program/VRAC<br /></p> +<p>Copyright Iowa State University 2009-2010. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt">http://www.boost.org/LICENSE_1_0.txt</a>)</p> + + </li> + <li> + <a name="module:FindosgLua"></a><b><code>FindosgLua</code></b>: try to find osgLua<br /> + <p><br /></p> +<p>Users may optionally supply:<br /></p> +<pre> OSGLUA_ROOT_DIR - a prefix to start searching<br /></pre> + <p><br /></p> +<p>Non-cache variables you might use in your CMakeLists.txt:<br /></p> +<pre> OSGLUA_FOUND<br /> OSGLUA_INCLUDE_DIRS<br /> OSGLUA_LIBRARIES<br /></pre> + <p><br /></p> +<p>Requires these CMake modules:<br /></p> +<pre> FindPackageHandleStandardArgs (known included with CMake >=2.6.2)<br /></pre> + <p><br /></p> +<p>Original Author: 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> <a href="http://academic.cleardefinition.com">http://academic.cleardefinition.com</a> Iowa State University HCI Graduate Program/VRAC<br /></p> +<p>Copyright Iowa State University 2009-2010. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt">http://www.boost.org/LICENSE_1_0.txt</a>)</p> + + </li> + <li> + <a name="module:Findquatlib"></a><b><code>Findquatlib</code></b>: Find quatlib<br /> + <p>Find the quatlib headers and libraries.<br /></p> +<pre> QUATLIB_INCLUDE_DIRS - where to find quat.h<br /> QUATLIB_LIBRARIES - List of libraries when using quatlib.<br /> QUATLIB_FOUND - True if quatlib found.<br /></pre> + <p><br /></p> +<p>Original Author: 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> <a href="http://academic.cleardefinition.com">http://academic.cleardefinition.com</a> Iowa State University HCI Graduate Program/VRAC<br /></p> +<p>Copyright Iowa State University 2009-2010. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt">http://www.boost.org/LICENSE_1_0.txt</a>)</p> + + </li> + <li> + <a name="module:GetCPUDetails"></a><b><code>GetCPUDetails</code></b>: Set a number of variables to indicate things about the current CPU and OS<br /> + <p><br /></p> +<pre> CPU_COUNT<br /> CPU_INTEL<br /> CPU_EXE_64BIT<br /> CPU_EXE_32BIT<br /> CPU_HAS_SSE<br /> CPU_HAS_SSE2<br /> CPU_HAS_SSE3<br /> CPU_HAS_SSSE3<br /> CPU_HAS_SSE4_1<br /> CPU_HAS_SSE4_2<br /></pre> + <p><br /></p> +<p>Requires these CMake modules:<br /></p> +<pre> no additional modules required<br /></pre> + <p><br /></p> +<p>Original Author: 2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> <a href="http://academic.cleardefinition.com">http://academic.cleardefinition.com</a> Iowa State University HCI Graduate Program/VRAC<br /></p> +<p>Copyright Iowa State University 2009-2010. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt">http://www.boost.org/LICENSE_1_0.txt</a>)<br /></p> + + </li> + <li> + <a name="module:GetCompilerInfoString"></a><b><code>GetCompilerInfoString</code></b>: Utility function to return a human-useful-only string ID'ing the compiler<br /> + <p><br /></p> +<pre> get_compiler_info_string(<resultvar>)<br /></pre> + <p><br /></p> +<p>and some helper functions:<br /></p> +<pre> get_gcc_version(<resultvar>)<br /> get_vs_short_version_string(<generator> <resultvar>)<br /></pre> + <p><br /></p> +<p>You might consider using it when setting up CTest options, for example:<br /></p> +<pre> include(GetCompilerInfoString)<br /> get_compiler_info_string(COMPILERID)<br /> set(CTEST_BUILD_NAME "${CMAKE_SYSTEM}-${CMAKE_SYSTEM_PROCESSOR}-${COMPILERID}")<br /></pre> + <p><br /></p> +<p>Requires these CMake modules:<br /></p> +<pre> no additional modules required<br /></pre> + <p><br /></p> +<p>Original Author: 2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> <a href="http://academic.cleardefinition.com">http://academic.cleardefinition.com</a> Iowa State University HCI Graduate Program/VRAC<br /></p> +<p>Copyright Iowa State University 2009-2010. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt">http://www.boost.org/LICENSE_1_0.txt</a>)<br /></p> +<p>Some functions based on cmake-2.8.0 modules FindBoost.cmake and CTest.cmake ============================================================================= Copyright 2006-2009 Kitware, Inc. Copyright 2006-2008 Andreas Schneider <mail@cynapses.org> Copyright 2007 Wengo Copyright 2007 Mike Jackson Copyright 2008 Andreas Pakulat <apaku@gmx.de> Copyright 2008-2009 Philip Lowman <philip@yhbt.com> Copyright 2010 Iowa State University (Ryan Pavlik <abiryan@ryand.net>)<br /></p> +<p>Distributed under the OSI-approved BSD License (the "License"); see accompanying file Copyright.txt for details.<br /></p> +<p>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. ============================================================================= CMake - Cross Platform Makefile Generator Copyright 2000-2009 Kitware, Inc., Insight Software Consortium All rights reserved.<br /></p> +<p>Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:<br /></p> +<p>* Redistributions of source code must retain the above copyright<br /></p> +<pre> notice, this list of conditions and the following disclaimer.<br /></pre> + <p><br /></p> +<p>* Redistributions in binary form must reproduce the above copyright<br /></p> +<pre> notice, this list of conditions and the following disclaimer in the<br /> documentation and/or other materials provided with the distribution.<br /></pre> + <p><br /></p> +<p>* Neither the names of Kitware, Inc., the Insight Software Consortium,<br /></p> +<pre> nor the names of their contributors may be used to endorse or promote<br /> products derived from this software without specific prior written<br /> permission.<br /></pre> + <p><br /></p> +<p>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. =============================================================================</p> + + </li> + <li> + <a name="module:GetDirectoryList"></a><b><code>GetDirectoryList</code></b>: Returns a list of the parent directories of all files passed<br /> + <p><br /></p> +<pre> get_directory_list(<listvar> <file path> [<additional file paths>...])<br /></pre> + <p><br /></p> +<p>Requires CMake 2.6 or newer (uses the 'function' command)<br /></p> +<p>Original Author: 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> <a href="http://academic.cleardefinition.com">http://academic.cleardefinition.com</a> Iowa State University HCI Graduate Program/VRAC<br /></p> +<p>Copyright Iowa State University 2009-2010. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt">http://www.boost.org/LICENSE_1_0.txt</a>)</p> + + </li> + <li> + <a name="module:GetFileList"></a><b><code>GetFileList</code></b>: Returns a list of the file names of all files passed<br /> + <p><br /></p> +<pre> get_file_list(<listvar> <file path> [<additional file paths>...])<br /></pre> + <p><br /></p> +<p>Requires CMake 2.6 or newer (uses the 'function' command)<br /></p> +<p>Original Author: 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> <a href="http://academic.cleardefinition.com">http://academic.cleardefinition.com</a> Iowa State University HCI Graduate Program/VRAC<br /></p> +<p>Copyright Iowa State University 2009-2010. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt">http://www.boost.org/LICENSE_1_0.txt</a>)</p> + + </li> + <li> + <a name="module:GetForceIncludeDefinitions"></a><b><code>GetForceIncludeDefinitions</code></b>: Get the platform-appropriate flags to add to force inclusion of a file<br /> + <p><br /></p> +<p>The most common use of this is to use a generated config.h-type file placed out of the source tree in all files.<br /></p> +<pre> get_force_include_definitions(var forcedincludefiles...) -<br /> where var is the name of your desired output variable, and everything<br /> else is a source file to forcibly include.<br /> a list item to be filtered.<br /></pre> + <p><br /></p> +<p>Original Author: 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> <a href="http://academic.cleardefinition.com">http://academic.cleardefinition.com</a> Iowa State University HCI Graduate Program/VRAC<br /></p> +<p>Copyright Iowa State University 2009-2010. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt">http://www.boost.org/LICENSE_1_0.txt</a>)</p> + + </li> + <li> + <a name="module:GetGitRevisionDescription"></a><b><code>GetGitRevisionDescription</code></b>: Returns a version string from Git<br /> + <p><br /></p> +<p>These functions force a re-configure on each git commit so that you can trust the values of the variables in your build system.<br /></p> +<pre> get_git_head_revision(<refspecvar> <hashvar> [<additional arguments to git describe> ...])<br /></pre> + <p><br /></p> +<p>Returns the refspec and sha hash of the current head revision<br /></p> +<pre> git_describe(<var> [<additional arguments to git describe> ...])<br /></pre> + <p><br /></p> +<p>Returns the results of git describe on the source tree, and adjusting the output so that it tests false if an error occurs.<br /></p> +<pre> git_get_exact_tag(<var> [<additional arguments to git describe> ...])<br /></pre> + <p><br /></p> +<p>Returns the results of git describe --exact-match on the source tree, and adjusting the output so that it tests false if there was no exact matching tag.<br /></p> +<p>Requires CMake 2.6 or newer (uses the 'function' command)<br /></p> +<p>Original Author: 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> <a href="http://academic.cleardefinition.com">http://academic.cleardefinition.com</a> Iowa State University HCI Graduate Program/VRAC<br /></p> +<p>Copyright Iowa State University 2009-2010. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt">http://www.boost.org/LICENSE_1_0.txt</a>)</p> + + </li> + <li> + <a name="module:GetSubprojectStatus"></a><b><code>GetSubprojectStatus</code></b>: Returns whether the current project is on its own or within another project's build<br /> + <p><br /></p> +<pre> get_subproject_status(<resultvar>) - resultvar will be YES if we are<br /> included in another project, or NO if we are being built separately<br /></pre> + <p><br /></p> +<p>Requires CMake 2.6 or newer (uses the 'function' command)<br /></p> +<p>Original Author: 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> <a href="http://academic.cleardefinition.com">http://academic.cleardefinition.com</a> Iowa State University HCI Graduate Program/VRAC<br /></p> +<p>Copyright Iowa State University 2009-2010. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt">http://www.boost.org/LICENSE_1_0.txt</a>)</p> + + </li> + <li> + <a name="module:Licensing"></a><b><code>Licensing</code></b>: Building a licensing description file<br /> + <p><br /></p> +<p>Original Author: 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> <a href="http://academic.cleardefinition.com">http://academic.cleardefinition.com</a> Iowa State University HCI Graduate Program/VRAC<br /></p> +<p>Copyright Iowa State University 2009-2010. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt">http://www.boost.org/LICENSE_1_0.txt</a>)</p> + + </li> + <li> + <a name="module:ListCombinations"></a><b><code>ListCombinations</code></b>: Combine lists of prefixes and suffixes in all combinations<br /> + <p><br /></p> +<pre> list_combinations(var PREFIXES listitems... SUFFIXES listitems...) -<br /> where var is the name of your desired output variable and PREFIXES<br /> and SUFFIXES are special arguments that indicate the start of your<br /> list of prefixes or suffixes respectively.<br /></pre> + <p><br /></p> +<p>Original Author: 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> <a href="http://academic.cleardefinition.com">http://academic.cleardefinition.com</a> Iowa State University HCI Graduate Program/VRAC<br /></p> +<p>Copyright Iowa State University 2009-2010. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt">http://www.boost.org/LICENSE_1_0.txt</a>)</p> + + </li> + <li> + <a name="module:ListFilter"></a><b><code>ListFilter</code></b>: List filtering functions<br /> + <p><br /></p> +<pre> list_filter(var regex listitems...) - where var is the name of<br /> your desired output variable, regex is the regex whose matching items<br /> WILL be put in the output variable, and everything else is considered<br /> a list item to be filtered.<br /></pre> + <p><br /></p> +<pre> list_filter_out(var regex listitems...) - where var is the name of<br /> your desired output variable, regex is the regex whose matching items<br /> will NOT be put in the output variable, and everything else is considered<br /> a list item to be filtered.<br /></pre> + <p><br /></p> +<p>Original Author: 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> <a href="http://academic.cleardefinition.com">http://academic.cleardefinition.com</a> Iowa State University HCI Graduate Program/VRAC<br /></p> +<p>Copyright Iowa State University 2009-2010. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt">http://www.boost.org/LICENSE_1_0.txt</a>)</p> + + </li> + <li> + <a name="module:LuaTargets"></a><b><code>LuaTargets</code></b>: Copy/parse lua source files as a custom target<br /> + <p><br /></p> +<pre> include(LuaTargets)<br /> add_lua_target(<target_name> <directory to copy to> [<luafile> <luafile>])<br /> Relative paths for the destination directory are considered with<br /> with respect to CMAKE_CURRENT_BINARY_DIR<br /></pre> + <p><br /></p> +<pre> install_lua_target(<target_name> [arguments to INSTALL(PROGRAMS ...) ])<br /></pre> + <p><br /></p> +<p>Set this variable to specify location of luac, if it is not a target:<br /></p> +<pre> LUA_TARGET_LUAC_EXECUTABLE<br /></pre> + <p><br /></p> +<p>Requires CMake 2.6 or newer (uses the 'function' command)<br /></p> +<p>Original Author: 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> <a href="http://academic.cleardefinition.com">http://academic.cleardefinition.com</a> Iowa State University HCI Graduate Program/VRAC<br /></p> +<p>Copyright Iowa State University 2009-2010. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt">http://www.boost.org/LICENSE_1_0.txt</a>)</p> + + </li> + <li> + <a name="module:MSVCMultipleProcessCompile"></a><b><code>MSVCMultipleProcessCompile</code></b>: Compile with multiple processes on MSVC<br /> + <p><br /></p> +<pre> include(MSVCMultipleProcessCompile)<br /></pre> + <p><br /></p> +<p>Requires these CMake modules:<br /></p> +<pre> ListCombinations.cmake<br /></pre> + <p><br /></p> +<p>Original Author: 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> <a href="http://academic.cleardefinition.com">http://academic.cleardefinition.com</a> Iowa State University HCI Graduate Program/VRAC<br /></p> +<p>Copyright Iowa State University 2009-2010. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt">http://www.boost.org/LICENSE_1_0.txt</a>)</p> + + </li> + <li> + <a name="module:MSVCStaticRuntime"></a><b><code>MSVCStaticRuntime</code></b>: Modify compile flags to use the static runtimes of MSVC<br /> + <p><br /></p> +<pre> include(MSVCStaticRuntime)<br /></pre> + <p><br /></p> +<p>Requires these CMake modules:<br /></p> +<pre> ListCombinations.cmake<br /></pre> + <p><br /></p> +<p>Original Author: 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> <a href="http://academic.cleardefinition.com">http://academic.cleardefinition.com</a> Iowa State University HCI Graduate Program/VRAC<br /></p> +<p>Copyright Iowa State University 2009-2010. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt">http://www.boost.org/LICENSE_1_0.txt</a>)</p> + + </li> + <li> + <a name="module:MSVCVerboseLinking"></a><b><code>MSVCVerboseLinking</code></b>: Add appropriate linker flags to show link details on Visual Studio<br /> + <p><br /></p> +<pre> include(MSVCVerboseLinking) - to add the flags automaticlly if applicable<br /></pre> + <p><br /></p> +<p>Be sure to include this module _BEFORE_ adding your targets, or the targets won't pick up the updated flags.<br /></p> +<p>Requires these CMake modules:<br /></p> +<pre> - none<br /></pre> + <p><br /></p> +<p>Original Author: 2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> <a href="http://academic.cleardefinition.com">http://academic.cleardefinition.com</a> Iowa State University HCI Graduate Program/VRAC<br /></p> +<p>Copyright Iowa State University 2009-2010. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt">http://www.boost.org/LICENSE_1_0.txt</a>)</p> + + </li> + <li> + <a name="module:OptionRequires"></a><b><code>OptionRequires</code></b>: Add an option that depends on one or more variables being true.<br /> + <p><br /></p> +<pre> option_requires(<option_name> <description> <variable_name> [<variable_name>...])<br /></pre> + <p><br /></p> +<p>Original Author: 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> <a href="http://academic.cleardefinition.com">http://academic.cleardefinition.com</a> Iowa State University HCI Graduate Program/VRAC<br /></p> +<p>Copyright Iowa State University 2009-2010. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt">http://www.boost.org/LICENSE_1_0.txt</a>)</p> + + </li> + <li> + <a name="module:PrefixListGlob"></a><b><code>PrefixListGlob</code></b>: For each given prefix in a list, glob using the prefix+pattern<br /> + <p><br /></p> +<p><br /></p> +<p>Original Author: 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> <a href="http://academic.cleardefinition.com">http://academic.cleardefinition.com</a> Iowa State University HCI Graduate Program/VRAC<br /></p> +<p>Copyright Iowa State University 2009-2010. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt">http://www.boost.org/LICENSE_1_0.txt</a>)</p> + + </li> + <li> + <a name="module:ProgramFilesGlob"></a><b><code>ProgramFilesGlob</code></b>: Find bit-appropriate program files directories matching a given pattern<br /> + <p><br /></p> +<p>Requires these CMake modules:<br /></p> +<pre> CleanDirectoryList<br /> PrefixListGlob<br /></pre> + <p><br /></p> +<p>Original Author: 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> <a href="http://academic.cleardefinition.com">http://academic.cleardefinition.com</a> Iowa State University HCI Graduate Program/VRAC<br /></p> +<p>Copyright Iowa State University 2009-2010. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt">http://www.boost.org/LICENSE_1_0.txt</a>)</p> + + </li> + <li> + <a name="module:ResetConfigurations"></a><b><code>ResetConfigurations</code></b>: Re-set the available configurations to just RelWithDebInfo, Release, and Debug<br /> + <p><br /></p> +<p>Requires these CMake modules:<br /></p> +<pre> no additional modules required<br /></pre> + <p><br /></p> +<p>Original Author: 2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> <a href="http://academic.cleardefinition.com">http://academic.cleardefinition.com</a> Iowa State University HCI Graduate Program/VRAC<br /></p> +<p>Copyright Iowa State University 2009-2010. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt">http://www.boost.org/LICENSE_1_0.txt</a>)<br /></p> + + </li> + <li> + <a name="module:SearchProgramFilesForOpenSceneGraph"></a><b><code>SearchProgramFilesForOpenSceneGraph</code></b>: Use some smarts to try to find OpenSceneGraph in the Program Files dirs<br /> + <p><br /></p> +<p>Also uses the OSGHOME environment variable as OSG_DIR, if it's found.<br /></p> +<p>Usage:<br /></p> +<pre> include(SearchProgramFilesForOpenSceneGraph OPTIONAL)<br /></pre> + <p><br /></p> +<p>Requires these CMake modules:<br /></p> +<pre> ListFilter<br /> ProgramFilesGlob<br /></pre> + <p><br /></p> +<p>Original Author: 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> <a href="http://academic.cleardefinition.com">http://academic.cleardefinition.com</a> Iowa State University HCI Graduate Program/VRAC<br /></p> +<p>Copyright Iowa State University 2009-2010. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt">http://www.boost.org/LICENSE_1_0.txt</a>)</p> + + </li> + <li> + <a name="module:SetDefaultBuildType"></a><b><code>SetDefaultBuildType</code></b>: Set a developer-chosen default build type<br /> + <p><br /></p> +<p>Requires these CMake modules:<br /></p> +<pre> no additional modules required<br /></pre> + <p><br /></p> +<p>Original Author: 2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> <a href="http://academic.cleardefinition.com">http://academic.cleardefinition.com</a> Iowa State University HCI Graduate Program/VRAC<br /></p> +<p>Copyright Iowa State University 2009-2010. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt">http://www.boost.org/LICENSE_1_0.txt</a>)<br /></p> + + </li> + <li> + <a name="module:SplitLibraryList"></a><b><code>SplitLibraryList</code></b>: Given a list of libraries with OPTIMIZED, DEBUG, etc.<br /> + <p><br /></p> +<pre> split_library_list(_generalvar _releasevar _debugvar)<br /></pre> + <p><br /></p> +<p>Requires CMake 2.6 or newer (uses the 'function' command)<br /></p> +<p>Original Author: 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> <a href="http://academic.cleardefinition.com">http://academic.cleardefinition.com</a> Iowa State University HCI Graduate Program/VRAC<br /></p> +<p>Copyright Iowa State University 2009-2010. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt">http://www.boost.org/LICENSE_1_0.txt</a>)</p> + + </li> + <li> + <a name="module:StampSourcesWithVersion"></a><b><code>StampSourcesWithVersion</code></b>: It will only attempt a substitution within the first C-style comment block<br /> + <p><br /></p> +<p>To set up your source code for proper stamping, start your file with a Doxygen-style comment block, starting with /* and ending with */ On a line by itself, with unimportant whitespace, add the standard Doxygen "version" command:<br /></p> +<pre> @version xxx<br /></pre> + <p>or<br /></p> +<pre> \version xxx<br /></pre> + <p><br /></p> +<p>To make sure it works, please do actually put xxx as the current version: when you save, add one of the command below to your cmake build, and run cmake, it should replace xxx with the current version. (It replaces anything between the end of the whitespace after \version and the end of the line with the version that you pass in your build script, so put nothing else on that line!)<br /></p> +<p>For <version>, I recommend passing the value of a CMake variable like<br /></p> +<pre> ${CPACK_PACKAGE_VERSION}<br /></pre> + <p>Remember, reduced duplication of information means reduced errors!<br /></p> +<p>WARNING! This does edit your source directory, but will only execute if the (hidden/advanced, default OFF) variable ENABLE_VERSION_STAMPING is on.<br /></p> +<p>Additionally, it tries to be very careful: of your code (that is, the first /* */), but only if // is not found first<br /></p> +<pre> stamp_target_with_version(<version> <target_name> [HEADERS_ONLY | <source>...]) -<br /> If no source file is specified, all will be processed.<br /></pre> + <p><br /></p> +<pre> stamp_sources_with_version(<version> <source> [<source> ...]) -<br /> Use for files not directly associated with a target.<br /></pre> + <p><br /></p> +<p>Original Author: 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> <a href="http://academic.cleardefinition.com">http://academic.cleardefinition.com</a> Iowa State University HCI Graduate Program/VRAC<br /></p> +<p>Copyright Iowa State University 2009-2010. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt">http://www.boost.org/LICENSE_1_0.txt</a>)</p> + + </li> + <li> + <a name="module:TCHARWorkaround"></a><b><code>TCHARWorkaround</code></b>: Script to compile Win32-developed sources using tchar without modifying the code<br /> + <p>Requires that ${CMAKE_SOURCE_DIR}/cmake/workarounds/tchar/ be present.<br /></p> +<p> TCHAR_WORKAROUND, automatically set to on when not on win32 TCHAR_INCLUDE_DIR, location of our fake tchar.h file<br /></p> +<p>Original Author: 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> <a href="http://academic.cleardefinition.com">http://academic.cleardefinition.com</a> Iowa State University HCI Graduate Program/VRAC<br /></p> +<p>Copyright Iowa State University 2009-2010. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt">http://www.boost.org/LICENSE_1_0.txt</a>)</p> + + </li> + <li> + <a name="module:UseBackportedModules"></a><b><code>UseBackportedModules</code></b>: Do a version-dependent check and auto-include backported modules dirs<br /> + <p><br /></p> +<p>Name your module directories cmake-*-modules where * is the full (maj.min.patch) version number that they came from. You can use subdirectories within those directories, if you like - all directories inside of a cmake-*-modules dir for a newer version of CMake that what we're running, that contain one or more .cmake files, will be appended to the CMAKE_MODULE_PATH.<br /></p> +<p>When backporting modules, be sure to test them and follow copyright instructions (usually updating copyright notices)<br /></p> +<p>Requires these CMake modules:<br /></p> +<pre> CleanDirectoryList<br /></pre> + <p><br /></p> +<p>Original Author: 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> <a href="http://academic.cleardefinition.com">http://academic.cleardefinition.com</a> Iowa State University HCI Graduate Program/VRAC<br /></p> +<p>Copyright Iowa State University 2009-2010. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt">http://www.boost.org/LICENSE_1_0.txt</a>)</p> + + </li> + <li> + <a name="module:UseMarkdown"></a><b><code>UseMarkdown</code></b>: Convert markdown source files to HTML as a custom target<br /> + <p><br /></p> +<pre> include(UseMarkdown)<br /> add_markdown_target(<target_name> <directory to copy to> <markdownfile> [<markdownfile>...] [RENAME <newname>])<br /> Relative paths for the destination directory are considered with<br /> with respect to CMAKE_CURRENT_BINARY_DIR. The RENAME argument is only<br /> valid with a single markdown file as input.<br /></pre> + <p><br /></p> +<p><br /></p> +<pre> install_markdown_target(<target_name> [extra arguments to INSTALL(FILES ...) ])<br /></pre> + <p><br /></p> +<p><br /></p> +<p>Requires CMake 2.6 or newer (uses the 'function' command)<br /></p> +<p>Original Author: 2011 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> <a href="http://academic.cleardefinition.com">http://academic.cleardefinition.com</a> Iowa State University HCI Graduate Program/VRAC<br /></p> +<p>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 <a href="http://www.boost.org/LICENSE_1_0.txt">http://www.boost.org/LICENSE_1_0.txt</a>)</p> + + </li> + <li> + <a name="module:UseTR1"></a><b><code>UseTR1</code></b>: Use settings to enable access to C++ TR1<br /> + <p><br /></p> +<p>This calls include_directories and link_directories as needed to permit TR1 support.<br /></p> +<p>Original Author: 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> <a href="http://academic.cleardefinition.com">http://academic.cleardefinition.com</a> Iowa State University HCI Graduate Program/VRAC<br /></p> +<p>Copyright Iowa State University 2009-2010. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt">http://www.boost.org/LICENSE_1_0.txt</a>)</p> + + </li> + <li> + <a name="module:WarningDev"></a><b><code>WarningDev</code></b>: Print a developer warning, using author_warning if we have cmake 2.8<br /> + <p><br /></p> +<pre> warning_dev("your desired message")<br /></pre> + <p><br /></p> +<p>Original Author: 2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> <a href="http://academic.cleardefinition.com">http://academic.cleardefinition.com</a> Iowa State University HCI Graduate Program/VRAC<br /></p> +<p>Copyright Iowa State University 2009-2010. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt">http://www.boost.org/LICENSE_1_0.txt</a>)</p> + + </li> +</ul> +<h2><a name="section_SeeAlso"></a>See Also</h2> +<ul> + <li><a href="#see:HomePage"><b><code>Home Page</code></b></a></li> + <li><a href="#see:FrequentlyAskedQuestions"><b><code>Frequently Asked Questions</code></b></a></li> + <li><a href="#see:OnlineDocumentation"><b><code>Online Documentation</code></b></a></li> + <li><a href="#see:MailingList"><b><code>Mailing List</code></b></a></li> +</ul> +<p>.B ccmake(1), cpack(1), ctest(1), cmakecommands(1), cmakecompat(1), cmakemodules(1), cmakeprops(1), cmakevars(1)</p> + +<p>The following resources are available to get help using CMake:</p> + +<ul> + <li> + <a name="see:HomePage"></a><b><code>Home Page</code></b>: <a href="http://www.cmake.org">http://www.cmake.org</a><br /> + <p>The primary starting point for learning about CMake.</p> + + </li> + <li> + <a name="see:FrequentlyAskedQuestions"></a><b><code>Frequently Asked Questions</code></b>: <a href="http://www.cmake.org/Wiki/CMake_FAQ">http://www.cmake.org/Wiki/CMake_FAQ</a><br /> + <p>A Wiki is provided containing answers to frequently asked questions. </p> + + </li> + <li> + <a name="see:OnlineDocumentation"></a><b><code>Online Documentation</code></b>: <a href="http://www.cmake.org/HTML/Documentation.html">http://www.cmake.org/HTML/Documentation.html</a><br /> + <p>Links to available documentation may be found on this web page.</p> + + </li> + <li> + <a name="see:MailingList"></a><b><code>Mailing List</code></b>: <a href="http://www.cmake.org/HTML/MailingLists.html">http://www.cmake.org/HTML/MailingLists.html</a><br /> + <p>For help and discussion about using cmake, a mailing list is provided at cmake@cmake.org. The list is member-post-only but one may sign up on the CMake web page. Please first read the full documentation at <a href="http://www.cmake.org">http://www.cmake.org</a> before posting questions to the list.</p> + + </li> +</ul> +</body></html> diff --git a/cmake/cmake-modules/module-help.txt b/cmake/cmake-modules/module-help.txt new file mode 100644 index 000000000..0a219f088 --- /dev/null +++ b/cmake/cmake-modules/module-help.txt @@ -0,0 +1,4042 @@ +cmake version 2.8.11.1 +------------------------------------------------------------------------------ +Introduction + +module-help - Reference of available CMake custom modules. + +------------------------------------------------------------------------------ +Description + +The "cmake" executable is the CMake command-line interface. It may be used +to configure projects in scripts. Project configuration settings may be +specified on the command line with the -D option. The -i option will cause +cmake to interactively prompt for such settings. + +CMake is a cross-platform build system generator. Projects specify their +build process with platform-independent CMake listfiles included in each +directory of a source tree with the name CMakeLists.txt. Users build a +project by using CMake to generate a build system for a native tool on their +platform. + +------------------------------------------------------------------------------ +Custom CMake Modules + +The following modules are also available for CMake. They can be used with +INCLUDE(ModuleName). + + Custom CMake Modules - Additional Modules for CMake. + +This is the documentation for additional modules and scripts for CMake. +Using these modules you can check the computer system for installed software +packages, features of the compiler and the existance of headers to name just +a few. + + AboutTheseModules + Dummy module containing information about these modules for the HELP + file + + This file documents a snapshot of the cmake-modules available from + http://github.com/rpavlik/cmake-modules/ The latest version of these + modules can always be found there. Additionally, you can find + instructions on how to integrate these modules into your own project + either in the README.markdown file in this directory, or on the GitHub + page listed above (scroll to the bottom to see the README rendered + attractively). + + In short: Modules of the form "FindSomeName.cmake" are considered to + be "find modules", and are intended to be used indirectly by calling + find_package, not by calling include. Thus, you'll want to do + something like: + + find_package(SomeName) + + They define a number of variables allowing you to use whatever + software they search for, such as include directories and libraries. + A few also define some functions for your use. + + All other modules provide functionality, either immediately upon + including them, or by defining functions that perform some task of + varying utility that you can use any time after including them. Note + that if a module has the filename, for example, + cmake/BoostTestTargets.cmake, you only need to call: + + include(BoostTestTargets) + + + + 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 + + + + Copyright Iowa State University 2009-2010. Distributed under the + Boost Software License, Version 1.0. (See accompanying file + LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + + BoostTestTargets + Add tests using boost::test + + + + Add this line to your test files in place of including a basic boost + test header: + + #include <BoostTestTargetConfig.h> + + + + If you cannot do that and must use the included form for a given test, + include the line + + // OVERRIDE_BOOST_TEST_INCLUDED_WARNING + + in the same file with the boost test include. + + include(BoostTestTargets) + add_boost_test(<testdriver_name> SOURCES <source1> [<more sources...>] + [FAIL_REGULAR_EXPRESSION <additional fail regex>] + [LAUNCHER <generic launcher script>] + [LIBRARIES <library> [<library>...]] + [RESOURCES <resource> [<resource>...]] + [TESTS <testcasename> [<testcasename>...]]) + + + + If for some reason you need access to the executable target created, + it can be found in ${${testdriver_name}_TARGET_NAME} as specified when + you called add_boost_test + + + + Requires CMake 2.6 or newer (uses the 'function' command) + + Requires: GetForceIncludeDefinitions CopyResourcesToBuildTree + + Original Author: 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> + <abiryan@ryand.net> http://academic.cleardefinition.com Iowa State + University HCI Graduate Program/VRAC + + Copyright Iowa State University 2009-2010. Distributed under the + Boost Software License, Version 1.0. (See accompanying file + LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + + BundleOSGPlugins + Provide access to the OpenSceneGraph runtime files for bundling in + + an installation or package. + + Sets these variables: + + - OSGDB_PLUGINS_RELEASE + - OSGDB_PLUGINS_DEBUG + - OSGWRAPPER_PLUGINS_RELEASE + - OSGWRAPPER_PLUGINS_DEBUG + - OSG_RUNTIME_LIBRARY_DIR + - OSG_PATH_TO_PLUGINS + + + + Creates this function: + + - install_osg_plugins( {varNameForOutputFilenames} ) + + + + Requires these CMake modules: + + no additional modules required + + + + Original Author: 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> + <abiryan@ryand.net> http://academic.cleardefinition.com Iowa State + University HCI Graduate Program/VRAC + + Copyright Iowa State University 2009-2010. Distributed under the + Boost Software License, Version 1.0. (See accompanying file + LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + + BundleOSGRuntime + Include the OpenSceneGraph runtime files in an installation or built + package. + + + + OSGRUNTIME_BUNDLE - Set to "yes" to enable this behavior + OSGRUNTIME_zlib1dll - Must be set to the location of zlib1.dll on Windows + OSGRUNTIME_zlib1ddll - Can be set to the location of zlib1d.dll (debug) on Windows. + If set, will be installed. + + + + Requires these CMake modules: + + no additional modules required + + + + Original Author: 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> + <abiryan@ryand.net> http://academic.cleardefinition.com Iowa State + University HCI Graduate Program/VRAC + + Copyright Iowa State University 2009-2010. Distributed under the + Boost Software License, Version 1.0. (See accompanying file + LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + + BundleVRJ22Runtime + Include the VR Juggler runtime files in an installation or built + package. + + + + VRJUGGLERRUNTIME_BUNDLE + VRJUGGLERRUNTIME_BUNDLE_DEBUG - set to yes to include debug dll's as well + + + + Requires these CMake modules: + + FindVRJuggler22 and its dependencies + + + + Original Author: 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> + <abiryan@ryand.net> http://academic.cleardefinition.com Iowa State + University HCI Graduate Program/VRAC + + Copyright Iowa State University 2009-2010. Distributed under the + Boost Software License, Version 1.0. (See accompanying file + LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + + BundleVRJ30Runtime + Include the VR Juggler runtime files in an installation or built + package. + + + + VRJUGGLERRUNTIME_BUNDLE + VRJUGGLERRUNTIME_BUNDLE_DEBUG - set to yes to include debug dll's as well + + + + Requires these CMake modules: + + FindVRJuggler22 and its dependencies + + + + Original Author: 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> + <abiryan@ryand.net> http://academic.cleardefinition.com Iowa State + University HCI Graduate Program/VRAC Updated for VR Juggler 3.0 by: + Brandon Newendorp <brandon@newendorp.com> + + CheckMacHIDAPI + Script to check if the signature for a mac HID callback uses UInt32 or + uint32_t + + Requires that the associated CPP file be present: CheckMacHIDAPI.cpp. + + MACOSX_HID_UINT32T, set according to the results of our test. + + Use add_definitions(-DMACOSX_HID_UINT32T=${MACOSX_HID_UINT32T}) in + your listfile and the following prototype for the function you'd like + to register using setInterruptReportHandlerCallback: + + void ReaderReportCallback( + void *target, + IOReturn result, + void *refcon, + void *sender, + MACOSX_HID_UINT32T size + ) + + + + Original Author: 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> + <abiryan@ryand.net> http://academic.cleardefinition.com Iowa State + University HCI Graduate Program/VRAC + + Copyright Iowa State University 2009-2010. Distributed under the + Boost Software License, Version 1.0. (See accompanying file + LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + + CheckVersion + Utility function for Find modules considering multiple possible + versions + + + + Requires these CMake modules: + + no additional modules required + + + + Original Author: 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> + <abiryan@ryand.net> http://academic.cleardefinition.com Iowa State + University HCI Graduate Program/VRAC + + Copyright Iowa State University 2009-2010. Distributed under the + Boost Software License, Version 1.0. (See accompanying file + LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + + CleanDirectoryList + Removes duplicate entries and non-directories from a provided list + + + + clean_directory_list(<listvar> [<additional list items>...]) + + + + Requires CMake 2.6 or newer (uses the 'function' command) + + Original Author: 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> + <abiryan@ryand.net> http://academic.cleardefinition.com Iowa State + University HCI Graduate Program/VRAC + + Copyright Iowa State University 2009-2010. Distributed under the + Boost Software License, Version 1.0. (See accompanying file + LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + + CleanLibraryList + A smarter replacement for list(REMOVE_DUPLICATES) for library lists + + + + Note that, in the case of cyclic link dependencies, you _do_ actually + need a library in a list multiple times. So, only use this function + when you know that the dependency graph is acyclic. + + clean_library_list(<listvar> [<additional list items>...]) - where + listvar is the name of a destination variable, and also possibly a source, and + it is followed by any number (including 0) of additional libraries to append + to the list before processing. + + + + Removes duplicates from the list, leaving only the last instance, + while preserving the meaning of the "optimized", "debug", and + "general" labeling. (Libraries listed as general are listed in the + result instead as optimized and debug) + + Requires CMake 2.6 or newer (uses the 'function' command) + + Original Author: 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> + <abiryan@ryand.net> http://academic.cleardefinition.com Iowa State + University HCI Graduate Program/VRAC + + Copyright Iowa State University 2009-2010. Distributed under the + Boost Software License, Version 1.0. (See accompanying file + LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + + CopyResourcesToBuildTree + Copy the resources your app needs to the build tree. + + + + copy_resources_to_build_tree(<target_name>) + + + + Requires CMake 2.6 or newer (uses the 'function' command) + + Original Author: 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> + <abiryan@ryand.net> http://academic.cleardefinition.com Iowa State + University HCI Graduate Program/VRAC + + Copyright Iowa State University 2009-2010. Distributed under the + Boost Software License, Version 1.0. (See accompanying file + LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + + CppcheckTargets + Run cppcheck on c++ source files as a custom target and a test + + + + include(CppcheckTargets) + add_cppcheck(<target-name> [UNUSED_FUNCTIONS] [STYLE] [POSSIBLE_ERROR] [FAIL_ON_WARNINGS]) - + Create a target to check a target's sources with cppcheck and the indicated options + add_cppcheck_sources(<target-name> [UNUSED_FUNCTIONS] [STYLE] [POSSIBLE_ERROR] [FAIL_ON_WARNINGS]) - + Create a target to check standalone sources with cppcheck and the indicated options + + + + Requires these CMake modules: + + Findcppcheck + + + + Requires CMake 2.6 or newer (uses the 'function' command) + + Original Author: 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> + <abiryan@ryand.net> http://academic.cleardefinition.com Iowa State + University HCI Graduate Program/VRAC + + Copyright Iowa State University 2009-2010. Distributed under the + Boost Software License, Version 1.0. (See accompanying file + LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + + CreateDashboardScripts + Create ctest -S scripts to use to run dashboard builds + + + + include(CreateDashboardScripts) + create_dashboard_scripts([<initialcachetemplatefilename>]) + + + + If you need additional settings to persist from the "parent" CMake + instance to the initial cache created by the dashboard script, you may + pass a filename which will be configured into the initial cache. + + In the resulting DASHBOARDSCRIPT_BASE_DIRECTORY, an end-user may + optionally create a file named + + CustomInitialCache.${DASHBOARDSCRIPT_SCRIPT_NAME} + + (by default, CustomInitialCache.go.cmake) containing set commands that + use the CACHE option, to set up additional site-local cache variable + values. + + Requires these CMake modules: + + GetCompilerInfoString + + + + Requires CMake 2.6 or newer (uses the 'function' command) + + Original Author: 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> + <abiryan@ryand.net> http://academic.cleardefinition.com Iowa State + University HCI Graduate Program/VRAC + + Copyright Iowa State University 2009-2010. Distributed under the + Boost Software License, Version 1.0. (See accompanying file + LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + + CreateImportedTarget + A smarter replacement for list(REMOVE_DUPLICATES) for library lists + + + + create_imported_target(<libname> [SHARED|STATIC|MODULE] [<library dependency>...]) - where + ${libname}_LIBRARIES is set to this library's paths. + + + + Removes duplicates from the list then sorts while preserving + "optimized", "debug", and "general" labeling + + Requires CMake 2.6 or newer (uses the 'function' command) + + Original Author: 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> + <abiryan@ryand.net> http://academic.cleardefinition.com Iowa State + University HCI Graduate Program/VRAC + + Copyright Iowa State University 2009-2010. Distributed under the + Boost Software License, Version 1.0. (See accompanying file + LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + + CreateLaunchers + Create launchers to set working directory, env. vars, etc. + + + + include(CreateLaunchers) - to make these available + guess_runtime_library_dirs(<outputvarname> [<extralibrary> ...]) + create_default_target_launcher(<targetname> + [ARGS <args...>] + [FORWARD_ARGS] + [RUNTIME_LIBRARY_DIRS <dir...>] + [WORKING_DIRECTORY <dir>] + [ENVIRONMENT <VAR=value> [<VAR=value>...]]) + + + + create_target_launcher(<targetname> + [ARGS <args...>] + [FORWARD_ARGS] + [RUNTIME_LIBRARY_DIRS <dir...>] + [WORKING_DIRECTORY <dir>] + [ENVIRONMENT <VAR=value> [<VAR=value>...]]) + + + + create_generic_launcher(<launchername> + [RUNTIME_LIBRARY_DIRS <dir...>] + [WORKING_DIRECTORY <dir>] + [ENVIRONMENT <VAR=value> [<VAR=value>...]]) + - sets GENERIC_LAUNCHER_COMMAND and GENERIC_LAUNCHER_FAIL_REGULAR_EXPRESSION + + + + Requires these CMake modules: + + ListFilter + ProgramFilesGlob + CleanDirectoryList + + + + Requires CMake 2.6 or newer (uses the 'function' command) + + Original Author: 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> + <abiryan@ryand.net> http://academic.cleardefinition.com Iowa State + University HCI Graduate Program/VRAC + + Copyright Iowa State University 2009-2010. Distributed under the + Boost Software License, Version 1.0. (See accompanying file + LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + + DoxygenTargets + Run doxygen on source files as a custom target + + + + include(DoxygenTargets) + add_doxygen(<doxyfile> [OUTPUT_DIRECTORY <outputdir>] + [INSTALL_DESTINATION <installdir> + [INSTALL_COMPONENT <installcomponent>] + [INSTALL_PDF_NAME <installpdfname>] ] + [DOC_TARGET <targetname>] + [PROJECT_NUMBER <versionnumber>] + [NO_WARNINGS] + [NO_PDF]) + + + + Requires these CMake modules: + + FindDoxygen + + + + Requires CMake 2.6 or newer (uses the 'function' command) + + Original Author: 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> + <abiryan@ryand.net> http://academic.cleardefinition.com Iowa State + University HCI Graduate Program/VRAC + + Copyright Iowa State University 2009-2010. Distributed under the + Boost Software License, Version 1.0. (See accompanying file + LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + + EnableExtraCompilerWarnings + Add flags to compile with extra warnings + + + + enable_extra_compiler_warnings(<targetname>) + globally_enable_extra_compiler_warnings() - to modify CMAKE_CXX_FLAGS, etc + to change for all targets declared after the command, instead of per-command + + + + + + Original Author: 2010 Ryan Pavlik <rpavlik@iastate.edu> + <abiryan@ryand.net> http://academic.cleardefinition.com Iowa State + University HCI Graduate Program/VRAC + + Copyright Iowa State University 2009-2010. Distributed under the + Boost Software License, Version 1.0. (See accompanying file + LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + + EnableProfiling + Add flags to compile with profiling support - currently only for GCC + + + + enable_profiling(<targetname>) + globally_enable_profiling() - to modify CMAKE_CXX_FLAGS, etc + to change for all targets declared after the command, instead of per-command + + + + + + Original Author: 2010 Ryan Pavlik <rpavlik@iastate.edu> + <abiryan@ryand.net> http://academic.cleardefinition.com Iowa State + University HCI Graduate Program/VRAC + + Copyright Iowa State University 2009-2010. Distributed under the + Boost Software License, Version 1.0. (See accompanying file + LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + + FileCopyTargets + Add a target for files that just need to be copied + + + + include(FileCopyTargets) + add_file_copy_target(<target_name> <directory to copy to> <filename> [<filename>...]) + Creates a custom target that copies the files to a directory, if needed. + Relative paths for the destination directory are considered with + with respect to CMAKE_CURRENT_BINARY_DIR + You can use this target in all the usual ways, including + add_dependencies(some_other_target this_target) to specify that another + target depends on this. + + + + install_file_copy_target(<target_name> [arguments to INSTALL(PROGRAMS ...) ]) + Works just the same as INSTALL(PROGRAMS ...) because it wraps it to install + the files you specified in add_file_copy_target + + + + + + Requires CMake 2.6 or newer (uses the 'function' command) + + Original Author: 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> + <abiryan@ryand.net> http://academic.cleardefinition.com Iowa State + University HCI Graduate Program/VRAC + + Copyright Iowa State University 2009-2010. Distributed under the + Boost Software License, Version 1.0. (See accompanying file + LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + + FindALUT + try to find the OpenAL ALUT library + + + + Users may optionally supply: + + ALUT_ROOT_DIR - a prefix to start searching. + + + + Cache Variables: (probably not for direct use in your scripts) + + ALUT_INCLUDE_DIR + ALUT_LIBRARY + + + + Non-cache variables you might use in your CMakeLists.txt: + + ALUT_FOUND + ALUT_INCLUDE_DIRS + ALUT_LIBRARIES + ALUT_WORKAROUND_INCLUDE_DIRS - add these to your include path with + include_directories(${ALUT_WORKAROUND_INCLUDE_DIRS} ${ALUT_INCLUDE_DIRS}) + so you can always #include <AL/al.h> and #include <AL/alut.h> even on + Mac where the paths might differ. + + + + Requires these CMake modules: + + FindPackageHandleStandardArgs (known included with CMake >=2.6.2) + + + + Original Author: 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> + <abiryan@ryand.net> http://academic.cleardefinition.com Iowa State + University HCI Graduate Program/VRAC + + Copyright Iowa State University 2009-2010. Distributed under the + Boost Software License, Version 1.0. (See accompanying file + LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + + 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 + + + + Cache Variables: (probably not for direct use in your scripts) + + BLUEZ_INCLUDE_DIR + BLUEZ_LIBRARY + + + + Non-cache variables you might use in your CMakeLists.txt: + + BLUEZ_FOUND + BLUEZ_INCLUDE_DIRS + BLUEZ_LIBRARIES + + + + Requires these CMake modules: + + FindPackageHandleStandardArgs (known included with CMake >=2.6.2) + + + + Original Author: 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> + <abiryan@ryand.net> http://academic.cleardefinition.com Iowa State + University HCI Graduate Program/VRAC + + Copyright Iowa State University 2009-2010. Distributed under the + Boost Software License, Version 1.0. (See accompanying file + LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + + FindCPPDOM + try to find CPPDOM library + + Optionally uses Flagpoll and FindFlagpoll.cmake + + CPPDOM_LIBRARY_DIR, library search path + CPPDOM_INCLUDE_DIR, include search path + CPPDOM_LIBRARY, the library to link against + CPPDOM_CXX_FLAGS + CPPDOM_FOUND, If false, do not try to use this library. + + + + 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.2.0) + to use when constructing search names and paths + + + + This script will use Flagpoll, if found, to provide hints to the + location of this library, but does not use the compiler flags returned + by Flagpoll directly. + + VR Juggler requires this package, so this Find script takes that into + account when determining where to search for the desired files. The + VJ_BASE_DIR environment variable is searched (preferentially) when + searching for this package, so most sane VR Juggler build environments + should "just work." Note that you need to manually re-run CMake if you + change this environment variable, because it cannot auto-detect this + change and trigger an automatic re-run. + + 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-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) + + FindDCubed + try to find DCUBED library + + + + DCUBED_LIBRARY_DIR, library search path + DCUBED_INCLUDE_DIR, include search path + DCUBED_{component}_LIBRARY, the library to link against + DCUBED_ENVIRONMENT + DCUBED_FOUND, If false, do not try to use this library. + + + + Plural versions refer to this library and its dependencies, and are + recommended to be used instead, unless you have a good reason. + + Useful configuration variables you might want to add to your cache: + + DCUBED_ROOT_DIR - A directory prefix to search + (a path that contains include/ as a subdirectory) + + + + 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> + http://academic.cleardefinition.com Iowa State University HCI Graduate + Program/VRAC + + Copyright Iowa State University 2009-2010. Distributed under the + Boost Software License, Version 1.0. (See accompanying file + LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + + 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 + + FLAGPOLL, the executable: if not defined, do not try to use Flagpoll. + + + + Useful configuration variables you might want to add to your cache: + + FLAGPOLL_ROOT_DIR - A directory prefix to search for the app + (a path that contains bin/ as a subdirectory) + + + + VR Juggler requires this package, so this Find script takes that into + account when determining where to search for the desired files. The + VJ_BASE_DIR environment variable is searched (preferentially) when + searching for this package, so most sane VR Juggler build environments + should "just work." Note that you need to manually re-run CMake if you + change this environment variable, because it cannot auto-detect this + change and trigger an automatic re-run. + + You can use Flagpoll to provide directories to use as HINTS for find_* + These are the provided macros: + + flagpoll_get_include_dirs + flagpoll_get_library_dirs + flagpoll_get_library_names + flagpoll_get_extra_libs + + All take the name of the desired package, optionally NO_DEPS to pass + --no-deps to Flagpoll, and return + yourpkgname_FLAGPOLL_INCLUDE_DIRS(etc. for the other macros). + + Example usage: flagpoll_get_include_dirs(vpr NO_DEPS) + find_path(VPR20_INCLUDE_DIRS vpr/vpr.h + + HINTS ${vpr_FLAGPOLL_INCLUDE_DIRS}) + + + + Original Author: 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> + <abiryan@ryand.net> http://academic.cleardefinition.com Iowa State + University HCI Graduate Program/VRAC + + Copyright Iowa State University 2009-2010. Distributed under the + Boost Software License, Version 1.0. (See accompanying file + LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + + FindGDB + Try to find GDB + + + + Once done, this will define: + + GDB_FOUND - system has GDB + GDB_COMMAND - the command to run + GDB_VERSION - version + GDB_HAS_RETURN_CHILD_RESULT - if the --return-child-result flag is supported + + + + Useful configuration variables you might want to add to your cache: + + GDB_ROOT_DIR - A directory prefix to search + + + + Original Author: 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> + <abiryan@ryand.net> http://academic.cleardefinition.com Iowa State + University HCI Graduate Program/VRAC + + Copyright Iowa State University 2009-2010. Distributed under the + Boost Software License, Version 1.0. (See accompanying file + LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + + FindGHOST + try to find Sensable GHOST library and include files + + GHOST_INCLUDE_DIRS, where to find GL/glut.h, etc. + GHOST_LIBRARIES, the libraries to link against + GHOST_FOUND, If false, do not try to use GLUT. + GHOST_RUNTIME_LIBRARY_DIRS, path to DLL on Windows for runtime use. + + + + Requires these CMake modules: + + no additional modules required + + + + Original Author: 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> + <abiryan@ryand.net> http://academic.cleardefinition.com Iowa State + University HCI Graduate Program/VRAC + + Copyright Iowa State University 2009-2010. Distributed under the + Boost Software License, Version 1.0. (See accompanying file + LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + + FindGLUI + Try to find GLUI (GL User Interface) + + Requires OpenGL and GLUT - searches for them using find_package Once + done, this will define + + GLUI_INCLUDE_DIR, where to find GL/glui.h (or GLUI/glui.h on mac) + GLUI_LIBRARY, the libraries to link against GLUI_FOUND, If false, do + not try to use GLUI. + + Plural versions refer to this library and its dependencies, and are + recommended to be used instead, unless you have a good reason. + + Useful configuration variables you might want to add to your cache: + + GLUI_ROOT_DIR - A directory prefix to search + (usually a path that contains include/ as a subdirectory) + + + + Original Author: 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> + <abiryan@ryand.net> http://academic.cleardefinition.com Iowa State + University HCI Graduate Program/VRAC + + Copyright Iowa State University 2009-2010. Distributed under the + Boost Software License, Version 1.0. (See accompanying file + LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + + FindGLUT + try to find glut library and include files + + GLUT_INCLUDE_DIRS, where to find GL/glut.h, etc. + GLUT_LIBRARIES, the libraries to link against + GLUT_FOUND, If false, do not try to use GLUT. + GLUT_RUNTIME_LIBRARY_DIRS, path to DLL on Windows for runtime use. + GLUT_RUNTIME_LIBRARY, dll on Windows, for installation purposes + + + + Also defined, but not for general use are: + + GLUT_INCLUDE_DIR, where to find GL/glut.h, etc. + GLUT_glut_LIBRARY = the full path to the glut library. + + + FindGMTL + Try to find GMTL + + Optionally uses Flagpoll and FindFlagpoll.cmake Once done, this will + define + + GMTL_FOUND - system has GMTL + GMTL_INCLUDE_DIR - the GMTL include directory + + + + 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.7.0) + to use when constructing search names and paths + + + + This script will use Flagpoll, if found, to provide hints to the + location of this library, but does not use the compiler flags returned + by Flagpoll directly. + + VR Juggler requires this package, so this Find script takes that into + account when determining where to search for the desired files. The + VJ_BASE_DIR environment variable is searched (preferentially) when + searching for this package, so most sane VR Juggler build environments + should "just work." Note that you need to manually re-run CMake if you + change this environment variable, because it cannot auto-detect this + change and trigger an automatic re-run. + + 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-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) + + FindGPM + try to find GPM library + + + + Cache Variables: (probably not for direct use in your scripts) + + GPM_INCLUDE_DIR + GPM_LIBRARY + + + + Non-cache variables you might use in your CMakeLists.txt: + + GPM_FOUND + GPM_INCLUDE_DIRS + GPM_LIBRARIES + + + + Requires these CMake modules: + + FindPackageHandleStandardArgs (known included with CMake >=2.6.2) + + + + Original Author: 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> + <abiryan@ryand.net> http://academic.cleardefinition.com Iowa State + University HCI Graduate Program/VRAC + + Copyright Iowa State University 2009-2010. Distributed under the + Boost Software License, Version 1.0. (See accompanying file + LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + + FindGadgeteer12 + try to find Gadgeteer 1.2 library + + Requires JCCL 1.2 and VPR 2.0 (thus FindJCCL12.cmake and + FindVPR20.cmake) Requires X11 if not on Mac or Windows. Optionally + uses Flagpoll and FindFlagpoll.cmake + + This library is a part of VR Juggler 2.2 - you probably want to use + find_package(VRJuggler22) instead, for an easy interface to this and + related scripts. See FindVRJuggler22.cmake for more information. + + GADGETEER12_LIBRARY_DIR, library search path + GADGETEER12_INCLUDE_DIR, include search path + GADGETEER12_LIBRARY, the library to link against + GADGETEER12_FOUND, If false, do not try to use this library. + + + + Plural versions refer to this library and its dependencies, and are + recommended to be used instead, unless you have a good reason. + + Useful configuration variables you might want to add to your cache: + + GADGETEER12_ROOT_DIR - A directory prefix to search + (a path that contains include/ as a subdirectory) + + + + This script will use Flagpoll, if found, to provide hints to the + location of this library, but does not use the compiler flags returned + by Flagpoll directly. + + The VJ_BASE_DIR environment variable is also searched (preferentially) + when searching for this component, so most sane build environments + should "just work." Note that you need to manually re-run CMake if you + 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> + <abiryan@ryand.net> http://academic.cleardefinition.com Iowa State + University HCI Graduate Program/VRAC + + Copyright Iowa State University 2009-2010. Distributed under the + Boost Software License, Version 1.0. (See accompanying file + LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + + FindGadgeteer20 + try to find Gadgeteer 2.0 library + + Requires JCCL 1.4 and VPR 2.2 (thus FindJCCL14.cmake and + FindVPR22.cmake) Requires X11 if not on Mac or Windows. Optionally + uses Flagpoll and FindFlagpoll.cmake + + This library is a part of VR Juggler 3.0 - you probably want to use + find_package(VRJuggler30) instead, for an easy interface to this and + related scripts. See FindVRJuggler30.cmake for more information. + + GADGETEER20_LIBRARY_DIR, library search path + GADGETEER20_INCLUDE_DIR, include search path + GADGETEER20_LIBRARY, the library to link against + GADGETEER20_FOUND, If false, do not try to use this library. + + + + Plural versions refer to this library and its dependencies, and are + recommended to be used instead, unless you have a good reason. + + Useful configuration variables you might want to add to your cache: + + GADGETEER20_ROOT_DIR - A directory prefix to search + (a path that contains include/ as a subdirectory) + + + + This script will use Flagpoll, if found, to provide hints to the + location of this library, but does not use the compiler flags returned + by Flagpoll directly. + + The VJ_BASE_DIR environment variable is also searched (preferentially) + when searching for this component, so most sane build environments + should "just work." Note that you need to manually re-run CMake if you + 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> + <abiryan@ryand.net> http://academic.cleardefinition.com Iowa State + University HCI Graduate Program/VRAC Updated for VR Juggler 3.0 by: + Brandon Newendorp <brandon@newendorp.com> + + FindGlove5DT + try to find Glove5DT libraries + + + + Cache Variables: (probably not for direct use in your scripts) + + GLOVE5DT_INCLUDE_DIR + GLOVE5DT_LIBRARY + GLOVE5DT_LIBRARY_RELEASE + GLOVE5DT_LIBRARY_DEBUG + GLOVE5DT_RUNTIME_LIBRARY_RELEASE + GLOVE5DT_RUNTIME_LIBRARY_DEBUG + + + + Non-cache variables you might use in your CMakeLists.txt: + + GLOVE5DT_FOUND + GLOVE5DT_INCLUDE_DIRS + GLOVE5DT_LIBRARIES + GLOVE5DT_RUNTIME_LIBRARY_DIRS + + + + Requires these CMake modules: + + CleanDirectoryList + CleanLibraryList + ListCombinations + ProgramFilesGlob + SelectLibraryConfigurations (included with CMake >=2.8.0) + FindPackageHandleStandardArgs (known included with CMake >=2.6.2) + + + + Original Author: 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> + <abiryan@ryand.net> http://academic.cleardefinition.com Iowa State + University HCI Graduate Program/VRAC + + Copyright Iowa State University 2009-2010. Distributed under the + Boost Software License, Version 1.0. (See accompanying file + LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + + FindHIDAPI + try to find HIDAPI library + + from http://www.signal11.us/oss/hidapi/ + + Cache Variables: (probably not for direct use in your scripts) + + HIDAPI_INCLUDE_DIR + HIDAPI_LIBRARY + + + + Non-cache variables you might use in your CMakeLists.txt: + + HIDAPI_FOUND + HIDAPI_INCLUDE_DIRS + HIDAPI_LIBRARIES + + + + Requires these CMake modules: + + FindPackageHandleStandardArgs (known included with CMake >=2.6.2) + + + + Original Author: 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> + <abiryan@ryand.net> http://academic.cleardefinition.com Iowa State + University HCI Graduate Program/VRAC + + Copyright Iowa State University 2009-2010. Distributed under the + Boost Software License, Version 1.0. (See accompanying file + LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + + 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) + + FindInterSense + try to find InterSense library + + + + Cache Variables: (probably not for direct use in your scripts) + + INTERSENSE_INCLUDE_DIR + INTERSENSE_ISENSEC_DIR - location of the isense.c "import library" substitute. + INTERSENSE_LIBRARY + + + + Non-cache variables you might use in your CMakeLists.txt: + + INTERSENSE_FOUND + INTERSENSE_INCLUDE_DIRS + INTERSENSE_LIBRARIES + + + + Requires these CMake modules: + + FindPackageHandleStandardArgs (known included with CMake >=2.6.2) + + + + Author: 2013 Eric Marsh <bits@wemarsh.com> http://wemarsh.com/ + Kognitiv Neuroinformatik, Universität Bremen + + (building on Ryan Pavlik's templates) + + 2013 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> + http://academic.cleardefinition.com Iowa State University HCI Graduate + Program/VRAC + + 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 + + Requires VPR 2.0 (thus FindVPR20.cmake) Optionally uses Flagpoll and + FindFlagpoll.cmake + + This library is a part of VR Juggler 2.2 - you probably want to use + find_package(VRJuggler22) instead, for an easy interface to this and + related scripts. See FindVRJuggler22.cmake for more information. + + JCCL12_LIBRARY_DIR, library search path + JCCL12_INCLUDE_DIR, include search path + JCCL12_LIBRARY, the library to link against + JCCL12_FOUND, If false, do not try to use this library. + + + + Plural versions refer to this library and its dependencies, and are + recommended to be used instead, unless you have a good reason. + + Useful configuration variables you might want to add to your cache: + + JCCL12_ROOT_DIR - A directory prefix to search + (a path that contains include/ as a subdirectory) + + + + This script will use Flagpoll, if found, to provide hints to the + location of this library, but does not use the compiler flags returned + by Flagpoll directly. + + The VJ_BASE_DIR environment variable is also searched (preferentially) + when searching for this component, so most sane build environments + should "just work." Note that you need to manually re-run CMake if you + 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> + <abiryan@ryand.net> http://academic.cleardefinition.com Iowa State + University HCI Graduate Program/VRAC + + Copyright Iowa State University 2009-2010. Distributed under the + Boost Software License, Version 1.0. (See accompanying file + LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + + FindJCCL14 + try to find JCCL 1.4 library + + Requires VPR 2.2 (thus FindVPR22.cmake) Optionally uses Flagpoll and + FindFlagpoll.cmake + + This library is a part of VR Juggler 3.0 - you probably want to use + find_package(VRJuggler30) instead, for an easy interface to this and + related scripts. See FindVRJuggler30.cmake for more information. + + JCCL14_LIBRARY_DIR, library search path + JCCL14_INCLUDE_DIR, include search path + JCCL14_LIBRARY, the library to link against + JCCL14_FOUND, If false, do not try to use this library. + + + + Plural versions refer to this library and its dependencies, and are + recommended to be used instead, unless you have a good reason. + + Useful configuration variables you might want to add to your cache: + + JCCL14_ROOT_DIR - A directory prefix to search + (a path that contains include/ as a subdirectory) + + + + This script will use Flagpoll, if found, to provide hints to the + location of this library, but does not use the compiler flags returned + by Flagpoll directly. + + The VJ_BASE_DIR environment variable is also searched (preferentially) + when searching for this component, so most sane build environments + should "just work." Note that you need to manually re-run CMake if you + 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> + <abiryan@ryand.net> http://academic.cleardefinition.com Iowa State + University HCI Graduate Program/VRAC Updated for VR Juggler 3.0 by: + Brandon Newendorp <brandon@newendorp.com> + + FindJtTk + try to find JTTK library + + + + JTTK_LIBRARY_DIRS, library search path + JTTK_INCLUDE_DIRS, include search path + JTTK_{component}_LIBRARY, the library to link against + JTTK_ENVIRONMENT, environment variables to set + JTTK_RUNTIME_LIBRARY_DIRS + JTTK_FOUND, If false, do not try to use this library. + + + + If you have license issues, you might run this command on each + JtTk-using target: + + jttk_stamp_binary(<targetname>) + + + + Plural versions refer to this library and its dependencies, and are + recommended to be used instead, unless you have a good reason. + + Useful configuration variables you might want to add to your cache: + + JTTK_ROOT_DIR - A directory prefix to search + (a path that contains include/ as a subdirectory) + + + + Original Author: 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> + <abiryan@ryand.net> http://academic.cleardefinition.com Iowa State + University HCI Graduate Program/VRAC + + Copyright Iowa State University 2009-2010. Distributed under the + Boost Software License, Version 1.0. (See accompanying file + LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + + FindLAPACKLibs + Try to find LAPACK and BLAS libraries + + Once done, this will define + + LAPACKLIBS_LIBRARIES, all libraries to link against + LAPACKLIBS_FOUND, If false, do not try to use LAPACK library features. + + + + Users may wish to set: + + LAPACKLIBS_ROOT_DIR, location to start searching for LAPACK libraries + + + + Original Author: 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> + <abiryan@ryand.net> http://academic.cleardefinition.com Iowa State + University HCI Graduate Program/VRAC + + Copyright Iowa State University 2009-2010. Distributed under the + Boost Software License, Version 1.0. (See accompanying file + LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + + FindLibusb1 + try to find libusb-1 library + + + + Cache Variables: (probably not for direct use in your scripts) + + LIBUSB1_LIBRARY + LIBUSB1_INCLUDE_DIR + + + + Non-cache variables you should use in your CMakeLists.txt: + + LIBUSB1_LIBRARIES + LIBUSB1_INCLUDE_DIRS + LIBUSB1_FOUND - if this is not true, do not attempt to use this library + + + + Requires these CMake modules: + + ProgramFilesGlob + FindPackageHandleStandardArgs (known included with CMake >=2.6.2) + + + + Original Author: 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> + <abiryan@ryand.net> http://academic.cleardefinition.com Iowa State + University HCI Graduate Program/VRAC + + Copyright Iowa State University 2009-2010. Distributed under the + Boost Software License, Version 1.0. (See accompanying file + LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + + FindLuabind + try to find Luabind + + + + Users may optionally supply: + + LUABIND_ROOT_DIR - a prefix to start searching + + + + Non-cache variables you might use in your CMakeLists.txt: + + LUABIND_FOUND + LUABIND_DEFINITIONS + LUABIND_INCLUDE_DIRS + LUABIND_LIBRARIES + + + + Requires these CMake modules: + + FindPackageHandleStandardArgs (known included with CMake >=2.6.2) + + + + Original Author: 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> + <abiryan@ryand.net> http://academic.cleardefinition.com Iowa State + University HCI Graduate Program/VRAC + + Copyright Iowa State University 2009-2010. Distributed under the + Boost Software License, Version 1.0. (See accompanying file + LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + + FindLyX + Try to find LyX, and define some custom commands to export from LyX + + + + Once done, this will define: + + LYX_FOUND - system has LyX + LYX_COMMAND - the command to run + + + + and the following new functions: + + lyx_export(<format> <extension-without-leading-dot> <output-variable> + INPUT <lyx-file> [...] + [OUTPUT_TO_SOURCE_DIR] + [ EXTRA_DEPS <bibtex-or-other-file> [...] ]) - the base function + + + + These shortcut functions all have the same syntax: + + lyx_export_to_XXX(<output-variable> + INPUT <lyx-file> [...] + [OUTPUT_TO_SOURCE_DIR] + [ EXTRA_DEPS <bibtex-or-other-file> [...] ]) + + + + Available shortcuts: + + lyx_export_to_docbook_xml + lyx_export_to_docbook + lyx_export_to_pdf + lyx_export_to_pdf_via_pdflatex + lyx_export_to_pdf_via_dvi + + + + Useful configuration variables you might want to add to your cache: + + LYX_ROOT_DIR - A directory prefix to search + + + + Original Author: 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> + <abiryan@ryand.net> http://academic.cleardefinition.com Iowa State + University HCI Graduate Program/VRAC + + Copyright Iowa State University 2009-2010. Distributed under the + Boost Software License, Version 1.0. (See accompanying file + LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + + FindMacHID + try to find Mac HID frameworks + + + + Cache Variables: (probably not for direct use in your scripts) + + MACHID_CoreFoundation_LIBRARY + MACHID_CoreFoundation_INCLUDE_DIR + MACHID_IOKit_LIBRARY + MACHID_IOKit_INCLUDE_DIR + MACOSX_HID_UINT32T (from CheckMacHIDAPI) + + + + Non-cache variables you should use in your CMakeLists.txt: + + MACHID_DEFINITIONS + MACHID_LIBRARIES + MACHID_INCLUDE_DIRS + MACHID_FOUND - if this is not true, do not attempt to use this library + + + + Requires these CMake modules: + + CheckMacHIDAPI + FindPackageHandleStandardArgs (known included with CMake >=2.6.2) + + + + Original Author: 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> + <abiryan@ryand.net> http://academic.cleardefinition.com Iowa State + University HCI Graduate Program/VRAC + + Copyright Iowa State University 2009-2010. Distributed under the + Boost Software License, Version 1.0. (See accompanying file + LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + + 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 + ------------------------------ + + See http://sourceforge.net/projects/opencvlibrary/ + + The following variable is optionally searched for defaults + + OPENCV_ROOT_DIR: Base directory of OpenCv tree to use. + + + + OPENCV_NEW_LIBRARY_NAMES Set to YES before searching if you want to + + The following are set after configuration is done: + + OPENCV_FOUND + OPENCV_INCLUDE_DIRS + OPENCV_LIBRARIES + + + + 2004/05 Jan Woetzel, Friso, Daniel Grest 2006/01 complete rewrite by + Jan Woetzel 2006/09 2nd rewrite introducing ROOT_DIR and PATH_SUFFIXES + + to handle multiple installed versions gracefully by Jan Woetzel + + 2010/02 Ryan Pavlik (Iowa State University) - partial rewrite to + standardize + + tested with: + + www.mip.informatik.uni-kiel.de/~jw academic.cleardefinition.com + + FindOpenHaptics + try to find OpenHaptics libraries + + + + 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 + HLAPI_HLU_LIBRARY_DEBUG + + + + Non-cache variables you might use in your CMakeLists.txt: + + OPENHAPTICS_FOUND + HDAPI_INCLUDE_DIRS + HDAPI_LIBRARIES + HDAPI_HDU_INCLUDE_DIRS + HDAPI_HDU_LIBRARIES + HLAPI_INCLUDE_DIRS + HLAPI_LIBRARIES + HLAPI_HLU_INCLUDE_DIRS + HLAPI_HLU_LIBRARIES + OPENHAPTICS_LIBRARIES - includes HD, HDU, HL, HLU + OPENHAPTICS_RUNTIME_LIBRARY_DIRS + OPENHAPTICS_ENVIRONMENT + OPENHAPTICS_LIBRARY_DIRS + OPENHAPTICS_INCLUDE_DIRS + + + + Requires these CMake modules: + + CleanDirectoryList + CleanLibraryList + ListCombinations + ProgramFilesGlob + SelectLibraryConfigurations (included with CMake >=2.8.0) + FindPackageHandleStandardArgs (known included with CMake >=2.6.2) + CMake 2.6.3 (uses "unset") + + + + 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 + Boost Software License, Version 1.0. (See accompanying file + LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + + FindParasolid + try to find PARASOLID library + + Important note: If you are also using JtTk, do your + + find_package(JtTk) + + first, to avoid runtime PK_* errors! + + PARASOLID_LIBRARY_DIR, library search path + PARASOLID_INCLUDE_DIR, include search path + PARASOLID_{component}_LIBRARY, the library to link against + PARASOLID_FOUND, If false, do not try to use this library. + + + + Plural versions refer to this library and its dependencies, and are + recommended to be used instead, unless you have a good reason. + + Requires these CMake modules: + + CheckVersion + ListCombinations + ProgramFilesGlob + FindPackageHandleStandardArgs (known included with CMake >=2.6.2) + + + + Original Author: 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> + <abiryan@ryand.net> http://academic.cleardefinition.com Iowa State + University HCI Graduate Program/VRAC + + Copyright Iowa State University 2009-2010. Distributed under the + Boost Software License, Version 1.0. (See accompanying file + LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + + 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 + + Requires VPR 2.0 and GMTL (thus FindVPR20.cmake and FindGMTL.cmake) + Optionally uses Flagpoll and FindFlagpoll.cmake + + This library is a part of VR Juggler 2.2 - you probably want to use + find_package(VRJuggler22) instead, for an easy interface to this and + related scripts. See FindVRJuggler22.cmake for more information. + + SONIX12_LIBRARY_DIR, library search path + SONIX12_INCLUDE_DIR, include search path + SONIX12_LIBRARY, the library to link against + SONIX12_FOUND, If false, do not try to use this library. + + + + Plural versions refer to this library and its dependencies, and are + recommended to be used instead, unless you have a good reason. + + Useful configuration variables you might want to add to your cache: + + SONIX12_ROOT_DIR - A directory prefix to search + (a path that contains include/ as a subdirectory) + + + + This script will use Flagpoll, if found, to provide hints to the + location of this library, but does not use the compiler flags returned + by Flagpoll directly. + + The VJ_BASE_DIR environment variable is also searched (preferentially) + when searching for this component, so most sane build environments + should "just work." Note that you need to manually re-run CMake if you + 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> + <abiryan@ryand.net> http://academic.cleardefinition.com Iowa State + University HCI Graduate Program/VRAC + + Copyright Iowa State University 2009-2010. Distributed under the + Boost Software License, Version 1.0. (See accompanying file + LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + + FindSonix14 + try to find Sonix 1.4 library + + Requires VPR 2.2 and GMTL (thus FindVPR22.cmake and FindGMTL.cmake) + Optionally uses Flagpoll and FindFlagpoll.cmake + + This library is a part of VR Juggler 3.0 - you probably want to use + find_package(VRJuggler30) instead, for an easy interface to this and + related scripts. See FindVRJuggler30.cmake for more information. + + SONIX14_LIBRARY_DIR, library search path + SONIX14_INCLUDE_DIR, include search path + SONIX14_LIBRARY, the library to link against + SONIX14_FOUND, If false, do not try to use this library. + + + + Plural versions refer to this library and its dependencies, and are + recommended to be used instead, unless you have a good reason. + + Useful configuration variables you might want to add to your cache: + + SONIX14_ROOT_DIR - A directory prefix to search + (a path that contains include/ as a subdirectory) + + + + This script will use Flagpoll, if found, to provide hints to the + location of this library, but does not use the compiler flags returned + by Flagpoll directly. + + The VJ_BASE_DIR environment variable is also searched (preferentially) + when searching for this component, so most sane build environments + should "just work." Note that you need to manually re-run CMake if you + 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> + <abiryan@ryand.net> http://academic.cleardefinition.com Iowa State + University HCI Graduate Program/VRAC Updated for VR Juggler 3.0 by: + Brandon Newendorp <brandon@newendorp.com> + + FindTR1 + Try to find C++ TR1 headers and libraries + + Once done, this will define + + TR1_USE_FILE, which you may "include" in your CMake file to be able + to use TR1 features transparently + TR1_INCLUDE_DIRS, any directories needed to access TR1 headers + TR1_LIBRARY_DIRS, any directories needed to access (auto-link) TR1 libraries + TR1_FOUND, If false, do not try to use TR1 features. + + + + If TR1 features are not built-in, we will try to use Boost to + substitute for them. + + Original Author: 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> + <abiryan@ryand.net> http://academic.cleardefinition.com Iowa State + University HCI Graduate Program/VRAC + + Copyright Iowa State University 2009-2010. Distributed under the + Boost Software License, Version 1.0. (See accompanying file + LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + + FindTooN + try to find TooN headers + + + + Users may optionally supply: + + TOON_ROOT_DIR - a prefix to start searching for the toon headers. + + + + Cache Variables: (probably not for direct use in your scripts) + + TOON_INCLUDE_DIR + + + + Non-cache variables you might use in your CMakeLists.txt: + + TOON_FOUND + TOON_INCLUDE_DIRS + TOON_LIBRARIES + + + + Requires these CMake modules: + + FindPackageHandleStandardArgs (known included with CMake >=2.6.2) + + + + Original Author: 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> + <abiryan@ryand.net> http://academic.cleardefinition.com Iowa State + University HCI Graduate Program/VRAC + + Copyright Iowa State University 2009-2010. Distributed under the + Boost Software License, Version 1.0. (See accompanying file + LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + + FindTooNtag + try to find tag algorithm library (built on TooN) + + + + Users may optionally supply: + + TAG_ROOT_DIR - a prefix to start searching for the toon headers. + + + + Cache Variables: (probably not for direct use in your scripts) + + TAG_INCLUDE_DIR + TAG_LIBRARY + + + + Non-cache variables you might use in your CMakeLists.txt: + + TOONTAG_FOUND + TOONTAG_INCLUDE_DIRS + TOONTAG_LIBRARIES + + + + Requires these CMake modules: + + FindPackageHandleStandardArgs (known included with CMake >=2.6.2) + + + + Original Author: 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> + <abiryan@ryand.net> http://academic.cleardefinition.com Iowa State + University HCI Graduate Program/VRAC + + Copyright Iowa State University 2009-2010. Distributed under the + Boost Software License, Version 1.0. (See accompanying file + LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + + FindTweek12 + try to find Tweek 1.2 library + + Requires VPR 2.0 (thus FindVPR20.cmake) Optionally uses Flagpoll and + FindFlagpoll.cmake + + This library is a part of VR Juggler 2.2 - you probably want to use + find_package(VRJuggler22) instead, for an easy interface to this and + related scripts. See FindVRJuggler22.cmake for more information. + + TWEEK12_LIBRARY_DIR, library search path + TWEEK12_INCLUDE_DIR, include search path + TWEEK12_LIBRARY, the library to link against + TWEEK12_FOUND, If false, do not try to use this library. + + + + Plural versions refer to this library and its dependencies, and are + recommended to be used instead, unless you have a good reason. + + Useful configuration variables you might want to add to your cache: + + TWEEK12_ROOT_DIR - A directory prefix to search + (a path that contains include/ as a subdirectory) + + + + This script will use Flagpoll, if found, to provide hints to the + location of this library, but does not use the compiler flags returned + by Flagpoll directly. + + The VJ_BASE_DIR environment variable is also searched (preferentially) + when searching for this component, so most sane build environments + should "just work." Note that you need to manually re-run CMake if you + 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> + <abiryan@ryand.net> http://academic.cleardefinition.com Iowa State + University HCI Graduate Program/VRAC + + Copyright Iowa State University 2009-2010. Distributed under the + Boost Software License, Version 1.0. (See accompanying file + LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + + FindTweek14 + try to find Tweek 1.4 library + + Requires VPR 2.2 (thus FindVPR22.cmake) Optionally uses Flagpoll and + FindFlagpoll.cmake + + This library is a part of VR Juggler 3.0 - you probably want to use + find_package(VRJuggler30) instead, for an easy interface to this and + related scripts. See FindVRJuggler30.cmake for more information. + + TWEEK14_LIBRARY_DIR, library search path + TWEEK14_INCLUDE_DIR, include search path + TWEEK14_LIBRARY, the library to link against + TWEEK14_FOUND, If false, do not try to use this library. + + + + Plural versions refer to this library and its dependencies, and are + recommended to be used instead, unless you have a good reason. + + Useful configuration variables you might want to add to your cache: + + TWEEK14_ROOT_DIR - A directory prefix to search + (a path that contains include/ as a subdirectory) + + + + This script will use Flagpoll, if found, to provide hints to the + location of this library, but does not use the compiler flags returned + by Flagpoll directly. + + The VJ_BASE_DIR environment variable is also searched (preferentially) + when searching for this component, so most sane build environments + should "just work." Note that you need to manually re-run CMake if you + 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> + <abiryan@ryand.net> http://academic.cleardefinition.com Iowa State + University HCI Graduate Program/VRAC Updated for VR Juggler 3.0 by: + Brandon Newendorp <brandon@newendorp.com> + + FindVPR20 + try to find VPR 2.0 library + + Requires Boost 1.33.1 or greater (including filesystem and signals + libraries) (and thus FindBoost.cmake from 2.8rc3 or newer, preferably) + Requires NSPR4 (and PLC4) on Windows Requires pthreads on Unix (Mac or + Linux) Requires libuuid on Linux Optionally uses Flagpoll and + FindFlagpoll.cmake + + This library is a part of VR Juggler 2.2 - you probably want to use + find_package(VRJuggler22) instead, for an easy interface to this and + related scripts. See FindVRJuggler22.cmake for more information. + + VPR20_LIBRARY_DIR, library search path + VPR20_INCLUDE_DIR, include search path + VPR20_LIBRARY, the library to link against + VPR20_FOUND, If false, do not try to use this library. + + + + Plural versions refer to this library and its dependencies, and are + recommended to be used instead, unless you have a good reason. + + Useful configuration variables you might want to add to your cache: + + VPR20_ROOT_DIR - A directory prefix to search + (a path that contains include/ as a subdirectory) + + + + This script will use Flagpoll, if found, to provide hints to the + location of this library, but does not use the compiler flags returned + by Flagpoll directly. + + The VJ_BASE_DIR environment variable is also searched (preferentially) + when searching for this component, so most sane build environments + should "just work." Note that you need to manually re-run CMake if you + 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> + <abiryan@ryand.net> http://academic.cleardefinition.com Iowa State + University HCI Graduate Program/VRAC + + Copyright Iowa State University 2009-2010. Distributed under the + Boost Software License, Version 1.0. (See accompanying file + LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + + FindVPR22 + try to find VPR 2.2 library + + Requires Boost 1.33.1 or greater (including filesystem and signals + libraries) (and thus FindBoost.cmake from 2.8rc3 or newer, preferably) + Requires NSPR4 (and PLC4) on Windows Requires pthreads on Unix (Mac or + Linux) Requires libuuid on Linux Optionally uses Flagpoll and + FindFlagpoll.cmake + + This library is a part of VR Juggler 3.0 - you probably want to use + find_package(VRJuggler30) instead, for an easy interface to this and + related scripts. See FindVRJuggler30.cmake for more information. + + VPR22_LIBRARY_DIR, library search path + VPR22_INCLUDE_DIR, include search path + VPR22_LIBRARY, the library to link against + VPR22_FOUND, If false, do not try to use this library. + + + + Plural versions refer to this library and its dependencies, and are + recommended to be used instead, unless you have a good reason. + + Useful configuration variables you might want to add to your cache: + + VPR22_ROOT_DIR - A directory prefix to search + (a path that contains include/ as a subdirectory) + + + + This script will use Flagpoll, if found, to provide hints to the + location of this library, but does not use the compiler flags returned + by Flagpoll directly. + + The VJ_BASE_DIR environment variable is also searched (preferentially) + when searching for this component, so most sane build environments + should "just work." Note that you need to manually re-run CMake if you + 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> + <abiryan@ryand.net> http://academic.cleardefinition.com Iowa State + University HCI Graduate Program/VRAC Updated for VR Juggler 3.0 by: + Brandon Newendorp <brandon@newendorp.com> + + FindVPS + try to find VPS library + + + + VPS_LIBRARY_DIR, library search path + VPS_INCLUDE_DIR, include search path + VPS_{component}_LIBRARY, the library to link against + VPS_FOUND, If false, do not try to use this library. + + + + Plural versions refer to this library and its dependencies, and are + recommended to be used instead, unless you have a good reason. + + Useful configuration variables you might want to add to your cache: + + VPS_ROOT_DIR - A directory prefix to search + (a path that contains include/ as a subdirectory) + + + + Original Author: 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> + <abiryan@ryand.net> http://academic.cleardefinition.com Iowa State + University HCI Graduate Program/VRAC + + Copyright Iowa State University 2009-2010. Distributed under the + Boost Software License, Version 1.0. (See accompanying file + LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + + FindVRJ22 + try to find VR Juggler 2.2 core library + + Requires JCCL 1.2, Gadgeteer 1.2, VPR 2.0, and Sonix 1.2 (thus + FindJCCL12.cmake, FindGadgeteer12.cmake, FindVPR20.cmake, and + FindSonix12.cmake) Requires X11 if not on Mac or Windows. Optionally + uses Flagpoll and FindFlagpoll.cmake + + This library is a part of VR Juggler 2.2 - you probably want to use + find_package(VRJuggler22) instead, for an easy interface to this and + related scripts. See FindVRJuggler22.cmake for more information. + + VRJ22_LIBRARY_DIR, library search path + VRJ22_INCLUDE_DIR, include search path + VRJ22_LIBRARY, the library to link against + VRJ22_FOUND, If false, do not try to use this library. + + + + Plural versions refer to this library and its dependencies, and are + recommended to be used instead, unless you have a good reason. + + Useful configuration variables you might want to add to your cache: + + VRJ22_ROOT_DIR - A directory prefix to search + (a path that contains include/ as a subdirectory) + + + + This script will use Flagpoll, if found, to provide hints to the + location of this library, but does not use the compiler flags returned + by Flagpoll directly. + + The VJ_BASE_DIR environment variable is also searched (preferentially) + when searching for this component, so most sane build environments + should "just work." Note that you need to manually re-run CMake if you + 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> + <abiryan@ryand.net> http://academic.cleardefinition.com Iowa State + University HCI Graduate Program/VRAC + + Copyright Iowa State University 2009-2010. Distributed under the + Boost Software License, Version 1.0. (See accompanying file + LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + + FindVRJ30 + try to find VR Juggler 3.0 core library + + Requires JCCL 1.4, Gadgeteer 1.4, VPR 2.2, and Sonix 1.4 (thus + FindJCCL14.cmake, FindGadgeteer20.cmake, FindVPR22.cmake, and + FindSonix14.cmake) Requires X11 if not on Mac or Windows. Optionally + uses Flagpoll and FindFlagpoll.cmake + + This library is a part of VR Juggler 3.0 - you probably want to use + find_package(VRJuggler30) instead, for an easy interface to this and + related scripts. See FindVRJuggler30.cmake for more information. + + VRJ30_LIBRARY_DIR, library search path + VRJ30_INCLUDE_DIR, include search path + VRJ30_LIBRARY, the library to link against + VRJ30_FOUND, If false, do not try to use this library. + + + + Plural versions refer to this library and its dependencies, and are + recommended to be used instead, unless you have a good reason. + + Useful configuration variables you might want to add to your cache: + + VRJ30_ROOT_DIR - A directory prefix to search + (a path that contains include/ as a subdirectory) + + + + This script will use Flagpoll, if found, to provide hints to the + location of this library, but does not use the compiler flags returned + by Flagpoll directly. + + The VJ_BASE_DIR environment variable is also searched (preferentially) + when searching for this component, so most sane build environments + should "just work." Note that you need to manually re-run CMake if you + 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> + <abiryan@ryand.net> http://academic.cleardefinition.com Iowa State + University HCI Graduate Program/VRAC Updated for VR Juggler 3.0 by: + Brandon Newendorp <brandon@newendorp.com> + + Copyright Iowa State University 2009-2010. Distributed under the + Boost Software License, Version 1.0. (See accompanying file + LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + + FindVRJOGL22 + try to find VRJuggler 2.2 OpenGL library + + Requires VRJ core 2.2 (thus FindVRJ22.cmake) Requires OpenGL. + Optionally uses Flagpoll and FindFlagpoll.cmake + + This library is a part of VR Juggler 2.2 - you probably want to use + find_package(VRJuggler22) instead, for an easy interface to this and + related scripts. See FindVRJuggler22.cmake for more information. + + VRJOGL22_LIBRARY_DIR, library search path + VRJOGL22_INCLUDE_DIRS, include search path for dependencies + VRJOGL22_LIBRARY, the library to link against + VRJOGL22_FOUND, If false, do not try to use this library. + + + + Plural versions refer to this library and its dependencies, and are + recommended to be used instead, unless you have a good reason. + + Useful configuration variables you might want to add to your cache: + + VRJOGL22_ROOT_DIR - A directory prefix to search + (a path that contains include/ as a subdirectory) + + + + This script will use Flagpoll, if found, to provide hints to the + location of this library, but does not use the compiler flags returned + by Flagpoll directly. + + The VJ_BASE_DIR environment variable is also searched (preferentially) + when searching for this component, so most sane build environments + should "just work." Note that you need to manually re-run CMake if you + 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> + <abiryan@ryand.net> http://academic.cleardefinition.com Iowa State + University HCI Graduate Program/VRAC + + Copyright Iowa State University 2009-2010. Distributed under the + Boost Software License, Version 1.0. (See accompanying file + LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + + FindVRJOGL30 + try to find VRJuggler 3.0 OpenGL library + + Requires VRJ core 3.0 (thus FindVRJ30.cmake) Requires OpenGL. + Optionally uses Flagpoll and FindFlagpoll.cmake + + This library is a part of VR Juggler 3.0 - you probably want to use + find_package(VRJuggler30) instead, for an easy interface to this and + related scripts. See FindVRJuggler30.cmake for more information. + + VRJOGL30_LIBRARY_DIR, library search path + VRJOGL30_INCLUDE_DIRS, include search path for dependencies + VRJOGL30_LIBRARY, the library to link against + VRJOGL30_FOUND, If false, do not try to use this library. + + + + Plural versions refer to this library and its dependencies, and are + recommended to be used instead, unless you have a good reason. + + Useful configuration variables you might want to add to your cache: + + VRJOGL30_ROOT_DIR - A directory prefix to search + (a path that contains include/ as a subdirectory) + + + + This script will use Flagpoll, if found, to provide hints to the + location of this library, but does not use the compiler flags returned + by Flagpoll directly. + + The VJ_BASE_DIR environment variable is also searched (preferentially) + when searching for this component, so most sane build environments + should "just work." Note that you need to manually re-run CMake if you + 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> + <abiryan@ryand.net> http://academic.cleardefinition.com Iowa State + University HCI Graduate Program/VRAC Updated for VR Juggler 3.0 by: + Brandon Newendorp <brandon@newendorp.com> + + FindVRJuggler + try to find VR Juggler-related packages (combined finder) + + VRJUGGLER_INCLUDE_DIRS, include search paths + VRJUGGLER_LIBRARIES, the libraries to link against + VRJUGGLER_ENVIRONMENT + VRJUGGLER_RUNTIME_LIBRARY_DIRS + VRJUGGLER_CXX_FLAGS + VRJUGGLER_DEFINITIONS + VRJUGGLER_FOUND, If false, do not try to use VR Juggler. + + + + Components available to search for (uses "VRJOGL" by default): + + VRJOGL + VRJ + Gadgeteer + JCCL + VPR + Sonix + Tweek + + + + Additionally, a full setup requires these packages and their + Find_.cmake scripts + + CPPDOM + GMTL + + + + Optionally uses Flagpoll (and FindFlagpoll.cmake) + + Notes on components: + + - All components automatically include their dependencies. + - If you do not specify a component, VRJOGL (the OpenGL view manager) + will be used by default. + - Capitalization of component names does not matter, but it's best to + pretend it does and use the above capitalization. + - Since this script calls find_package for your requested components and + their dependencies, you can use any of the variables specified in those + files in addition to the "summary" ones listed here, for more finely + controlled building and linking. + + + + This CMake script requires all of the Find*.cmake scripts for the + components listed above, as it is only a "meta-script" designed to + make using those scripts more developer-friendly. + + Useful configuration variables you might want to add to your cache: + + (CAPS COMPONENT NAME)_ROOT_DIR - A directory prefix to search + (a path that contains include/ as a subdirectory) + + + + The VJ_BASE_DIR environment variable is also searched (preferentially) + when seeking any of the above components, as well as Flagpoll, CPPDOM, + and Boost (from within VPR), so most sane build environments should + "just work." + + IMPORTANT: Note that you need to manually re-run CMake if you 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> + <abiryan@ryand.net> http://academic.cleardefinition.com Iowa State + University HCI Graduate Program/VRAC Updated for VR Juggler 3.0 by: + Brandon Newendorp <brandon@newendorp.com> + + Copyright Iowa State University 2009-2010. Distributed under the + Boost Software License, Version 1.0. (See accompanying file + LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + + FindVRJuggler22 + try to find VRJuggler 2.2-related packages (main finder) + + VRJUGGLER22_LIBRARY_DIRS, library search paths + VRJUGGLER22_INCLUDE_DIRS, include search paths + VRJUGGLER22_LIBRARIES, the libraries to link against + VRJUGGLER22_ENVIRONMENT + VRJUGGLER22_RUNTIME_LIBRARY_DIRS + VRJUGGLER22_CXX_FLAGS + VRJUGGLER22_DEFINITIONS + VRJUGGLER22_FOUND, If false, do not try to use VR Juggler 2.2. + + + + Components available to search for (uses "VRJOGL22" by default): + + VRJOGL22 + VRJ22 + Gadgeteer12 + JCCL12 + VPR20 + Sonix12 + Tweek12 + + + + Additionally, a full setup requires these packages and their + Find_.cmake scripts + + CPPDOM + GMTL + + + + Optionally uses Flagpoll (and FindFlagpoll.cmake) + + Notes on components: + + - All components automatically include their dependencies. + - You can search for the name above with or without the version suffix. + - If you do not specify a component, VRJOGL22(the OpenGL view manager) + will be used by default. + - Capitalization of component names does not matter, but it's best to + pretend it does and use the above capitalization. + - Since this script calls find_package for your requested components and + their dependencies, you can use any of the variables specified in those + files in addition to the "summary" ones listed here, for more finely + controlled building and linking. + + + + This CMake script requires all of the Find*.cmake scripts for the + components listed above, as it is only a "meta-script" designed to + make using those scripts more developer-friendly. + + Useful configuration variables you might want to add to your cache: + + (CAPS COMPONENT NAME)_ROOT_DIR - A directory prefix to search + (a path that contains include/ as a subdirectory) + + + + The VJ_BASE_DIR environment variable is also searched (preferentially) + when seeking any of the above components, as well as Flagpoll, CPPDOM, + and Boost (from within VPR20), so most sane build environments should + "just work." + + IMPORTANT: Note that you need to manually re-run CMake if you 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> + <abiryan@ryand.net> http://academic.cleardefinition.com Iowa State + University HCI Graduate Program/VRAC + + Copyright Iowa State University 2009-2010. Distributed under the + Boost Software License, Version 1.0. (See accompanying file + LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + + FindVRJuggler30 + try to find VRJuggler 3.0-related packages (main finder) + + VRJUGGLER30_LIBRARY_DIRS, library search paths + VRJUGGLER30_INCLUDE_DIRS, include search paths + VRJUGGLER30_LIBRARIES, the libraries to link against + VRJUGGLER30_ENVIRONMENT + VRJUGGLER30_RUNTIME_LIBRARY_DIRS + VRJUGGLER30_CXX_FLAGS + VRJUGGLER30_DEFINITIONS + VRJUGGLER30_FOUND, If false, do not try to use VR Juggler 3.0. + + + + Components available to search for (uses "VRJOGL30" by default): + + VRJOGL30 + VRJ30 + Gadgeteer20 + JCCL14 + VPR22 + Sonix14 + Tweek14 + + + + Additionally, a full setup requires these packages and their + Find_.cmake scripts + + CPPDOM + GMTL + + + + Optionally uses Flagpoll (and FindFlagpoll.cmake) + + Notes on components: + + - All components automatically include their dependencies. + - You can search for the name above with or without the version suffix. + - If you do not specify a component, VRJOGL30(the OpenGL view manager) + will be used by default. + - Capitalization of component names does not matter, but it's best to + pretend it does and use the above capitalization. + - Since this script calls find_package for your requested components and + their dependencies, you can use any of the variables specified in those + files in addition to the "summary" ones listed here, for more finely + controlled building and linking. + + + + This CMake script requires all of the Find*.cmake scripts for the + components listed above, as it is only a "meta-script" designed to + make using those scripts more developer-friendly. + + Useful configuration variables you might want to add to your cache: + + (CAPS COMPONENT NAME)_ROOT_DIR - A directory prefix to search + (a path that contains include/ as a subdirectory) + + + + The VJ_BASE_DIR environment variable is also searched (preferentially) + when seeking any of the above components, as well as Flagpoll, CPPDOM, + and Boost (from within VPR22), so most sane build environments should + "just work." + + IMPORTANT: Note that you need to manually re-run CMake if you change + this environment variable, because it cannot auto-detect this change + and trigger an automatic re-run. + + Original Author: 2009-2011 Ryan Pavlik <rpavlik@iastate.edu> + <abiryan@ryand.net> http://academic.cleardefinition.com Iowa State + University HCI Graduate Program/VRAC Updated for VR Juggler 3.0 by: + Brandon Newendorp <brandon@newendorp.com> and Ryan Pavlik + + Copyright Iowa State University 2009-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) + + FindVRPN + try to find VRPN library + + + + Cache Variables: + + VRPN_LIBRARY + VRPN_SERVER_LIBRARY + VRPN_INCLUDE_DIR + + + + Non-cache variables you might use in your CMakeLists.txt: + + VRPN_FOUND + 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 + + Requires these CMake modules: + + FindPackageHandleStandardArgs (known included with CMake >=2.6.2) + + + + 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-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 + + + + VIRTUOSEAPI_INCLUDE_DIRS, where to find headers + VIRTUOSEAPI_LIBRARIES, the libraries to link against + VIRTUOSEAPI_FOUND, If false, do not try to use this library + VIRTUOSEAPI_RUNTIME_LIBRARY_DIRS, path to DLL/SO for runtime use. + VIRTUOSEAPI_RUNTIME_LIBRARIES, runtime libraries you might want to install + + + FindVirtuoseVPP + try to find Haption VirtuoseAPI C++ wrapper include files + + + + Use of this header depends on the VirtuoseAPI, so we search for that + too. + + VIRTUOSEVPP_INCLUDE_DIRS, where to find headers + VIRTUOSEVPP_LIBRARIES, the libraries to link against + VIRTUOSEVPP_FOUND, If false, do not try to use this library + VIRTUOSEVPP_RUNTIME_LIBRARY_DIRS, path to DLL/SO for runtime use. + VIRTUOSEAPI_RUNTIME_LIBRARIES, runtime libraries you might want to install + + + FindWiiSCAAT + try to find the Wii SCAAT library + + + + Users may optionally supply: + + WIISCAAT_ROOT_DIR - a prefix to start searching for the headers. + + + + Cache Variables: (probably not for direct use in your scripts) + + WIISCAAT_INCLUDE_DIR + WIISCAAT_LIBRARY + + + + Non-cache variables you might use in your CMakeLists.txt: + + WIISCAAT_FOUND + WIISCAAT_INCLUDE_DIRS + WIISCAAT_LIBRARIES + + + + Requires these CMake modules: + + FindPackageHandleStandardArgs (known included with CMake >=2.6.2) + + + + Original Author: 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> + <abiryan@ryand.net> http://academic.cleardefinition.com Iowa State + University HCI Graduate Program/VRAC + + Copyright Iowa State University 2009-2010. Distributed under the + Boost Software License, Version 1.0. (See accompanying file + LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + + FindWiiUse + try to find WiiUse library + + + + Cache Variables: (probably not for direct use in your scripts) + + WIIUSE_INCLUDE_DIR + WIIUSE_LIBRARY + + + + Non-cache variables you might use in your CMakeLists.txt: + + WIIUSE_FOUND + WIIUSE_INCLUDE_DIRS + WIIUSE_LIBRARIES + WIIUSE_RUNTIME_LIBRARIES - aka the dll for installing + WIIUSE_RUNTIME_LIBRARY_DIRS + + + + Requires these CMake modules: + + FindPackageHandleStandardArgs (known included with CMake >=2.6.2) + + + + Original Author: 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> + <abiryan@ryand.net> http://academic.cleardefinition.com Iowa State + University HCI Graduate Program/VRAC + + Copyright Iowa State University 2009-2010. Distributed under the + Boost Software License, Version 1.0. (See accompanying file + LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + + FindWinHID + try to find Windows HID support, part of the WDK/DDK + + + + Cache Variables: (probably not for direct use in your scripts) + + WINHID_INCLUDE_DIR + WINHID_CRT_INCLUDE_DIR + WINHID_LIBRARY + + + + Non-cache variables you might use in your CMakeLists.txt: + + WINHID_FOUND + WINHID_INCLUDE_DIRS + WINHID_LIBRARIES + + + + Requires these CMake modules: + + FindPackageHandleStandardArgs (known included with CMake >=2.6.2) + PrefixListGlob + CleanDirectoryList + + + + Original Author: 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> + <abiryan@ryand.net> http://academic.cleardefinition.com Iowa State + University HCI Graduate Program/VRAC + + Copyright Iowa State University 2009-2010. Distributed under the + Boost Software License, Version 1.0. (See accompanying file + LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + + 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 + + + + Users may optionally supply: + + ARGP_ROOT_DIR - a prefix to start searching. + + + + Cache Variables: (probably not for direct use in your scripts) + + ARGP_INCLUDE_DIR + ARGP_LIBRARY, only defined if linking to an extra library is required + + + + Non-cache variables you might use in your CMakeLists.txt: + + ARGP_FOUND + ARGP_INCLUDE_DIRS + ARGP_LIBRARIES + + + + Requires these CMake modules: + + FindPackageHandleStandardArgs (known included with CMake >=2.6.2) + + + + Original Author: 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> + <abiryan@ryand.net> http://academic.cleardefinition.com Iowa State + University HCI Graduate Program/VRAC + + Copyright Iowa State University 2009-2010. Distributed under the + Boost Software License, Version 1.0. (See accompanying file + LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + + Findcppcheck + try to find cppcheck tool + + + + Cache Variables: + + CPPCHECK_EXECUTABLE + + + + Non-cache variables you might use in your CMakeLists.txt: + + CPPCHECK_FOUND + CPPCHECK_POSSIBLEERROR_ARG + CPPCHECK_UNUSEDFUNC_ARG + CPPCHECK_STYLE_ARG + CPPCHECK_QUIET_ARG + CPPCHECK_INCLUDEPATH_ARG + CPPCHECK_FAIL_REGULAR_EXPRESSION + CPPCHECK_WARN_REGULAR_EXPRESSION + CPPCHECK_MARK_AS_ADVANCED - whether to mark our vars as advanced even + if we don't find this program. + + + + Requires these CMake modules: + + FindPackageHandleStandardArgs (known included with CMake >=2.6.2) + + + + Original Author: 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> + <abiryan@ryand.net> http://academic.cleardefinition.com Iowa State + University HCI Graduate Program/VRAC + + Copyright Iowa State University 2009-2010. Distributed under the + Boost Software License, Version 1.0. (See accompanying file + LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + + Findcppunit + try to find cppunit library + + + + Cache Variables: (probably not for direct use in your scripts) + + CPPUNIT_INCLUDE_DIR + CPPUNIT_LIBRARY + + + + Non-cache variables you might use in your CMakeLists.txt: + + CPPUNIT_FOUND + CPPUNIT_INCLUDE_DIRS + CPPUNIT_LIBRARIES + + + + Requires these CMake modules: + + SelectLibraryConfigurations (included with CMake >= 2.8.0) + FindPackageHandleStandardArgs (known included with CMake >=2.6.2) + + + + Original Author: 2009-2011 Ryan Pavlik <rpavlik@iastate.edu> + <abiryan@ryand.net> http://academic.cleardefinition.com Iowa State + University HCI Graduate Program/VRAC + + Copyright Iowa State University 2009-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) + + Findcutil + find NVIDIA CUDA and source for the cutil library, building cutil if + needed. + + + + CUTIL_LIBRARIES - Libraries to link against to use CUTIL + CUTIL_INCLUDE_DIRS - Include directories to add before building a CUTIL app. + + + + Functions: + + install_cutil({RUNTIME_LIBRARY_DESTINATION}) - Install the CUTIL shared lib if created. + + + + Original Author: 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> + <abiryan@ryand.net> http://academic.cleardefinition.com Iowa State + University HCI Graduate Program/VRAC + + Copyright Iowa State University 2009-2010. Distributed under the + Boost Software License, Version 1.0. (See accompanying file + LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + + Finddb2pdf + Try to find db2pdf, and define a custom command to turn docbook into + pdf + + + + Once done, this will define: + + DB2PDF_FOUND - system has LyX + DB2PDF_COMMAND - the command to run + + + + and the following function: + + docbook_to_pdf(<output-variable> <docbook files>) + + + + Useful configuration variables you might want to add to your cache: + + DB2PDF_ROOT_DIR - A directory prefix to search + + + + Original Author: 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> + <abiryan@ryand.net> http://academic.cleardefinition.com Iowa State + University HCI Graduate Program/VRAC + + Copyright Iowa State University 2009-2010. Distributed under the + Boost Software License, Version 1.0. (See accompanying file + LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + + FindosgLua + try to find osgLua + + + + Users may optionally supply: + + OSGLUA_ROOT_DIR - a prefix to start searching + + + + Non-cache variables you might use in your CMakeLists.txt: + + OSGLUA_FOUND + OSGLUA_INCLUDE_DIRS + OSGLUA_LIBRARIES + + + + Requires these CMake modules: + + FindPackageHandleStandardArgs (known included with CMake >=2.6.2) + + + + Original Author: 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> + <abiryan@ryand.net> http://academic.cleardefinition.com Iowa State + University HCI Graduate Program/VRAC + + Copyright Iowa State University 2009-2010. Distributed under the + Boost Software License, Version 1.0. (See accompanying file + LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + + Findquatlib + Find quatlib + + Find the quatlib headers and libraries. + + QUATLIB_INCLUDE_DIRS - where to find quat.h + QUATLIB_LIBRARIES - List of libraries when using quatlib. + QUATLIB_FOUND - True if quatlib found. + + + + Original Author: 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> + <abiryan@ryand.net> http://academic.cleardefinition.com Iowa State + University HCI Graduate Program/VRAC + + Copyright Iowa State University 2009-2010. Distributed under the + Boost Software License, Version 1.0. (See accompanying file + LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + + GetCPUDetails + Set a number of variables to indicate things about the current CPU and + OS + + + CPU_COUNT + CPU_INTEL + CPU_EXE_64BIT + CPU_EXE_32BIT + CPU_HAS_SSE + CPU_HAS_SSE2 + CPU_HAS_SSE3 + CPU_HAS_SSSE3 + CPU_HAS_SSE4_1 + CPU_HAS_SSE4_2 + + + + Requires these CMake modules: + + no additional modules required + + + + Original Author: 2010 Ryan Pavlik <rpavlik@iastate.edu> + <abiryan@ryand.net> http://academic.cleardefinition.com Iowa State + University HCI Graduate Program/VRAC + + Copyright Iowa State University 2009-2010. Distributed under the + Boost Software License, Version 1.0. (See accompanying file + LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + + + GetCompilerInfoString + Utility function to return a human-useful-only string ID'ing the + compiler + + + + get_compiler_info_string(<resultvar>) + + + + and some helper functions: + + get_gcc_version(<resultvar>) + get_vs_short_version_string(<generator> <resultvar>) + + + + You might consider using it when setting up CTest options, for + example: + + include(GetCompilerInfoString) + get_compiler_info_string(COMPILERID) + set(CTEST_BUILD_NAME "${CMAKE_SYSTEM}-${CMAKE_SYSTEM_PROCESSOR}-${COMPILERID}") + + + + Requires these CMake modules: + + no additional modules required + + + + Original Author: 2010 Ryan Pavlik <rpavlik@iastate.edu> + <abiryan@ryand.net> http://academic.cleardefinition.com Iowa State + University HCI Graduate Program/VRAC + + Copyright Iowa State University 2009-2010. Distributed under the + Boost Software License, Version 1.0. (See accompanying file + LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + + Some functions based on cmake-2.8.0 modules FindBoost.cmake and + CTest.cmake + ============================================================================= + Copyright 2006-2009 Kitware, Inc. Copyright 2006-2008 Andreas + Schneider <mail@cynapses.org> Copyright 2007 Wengo Copyright 2007 Mike + Jackson Copyright 2008 Andreas Pakulat <apaku@gmx.de> Copyright + 2008-2009 Philip Lowman <philip@yhbt.com> Copyright 2010 Iowa State + University (Ryan Pavlik <abiryan@ryand.net>) + + Distributed under the OSI-approved BSD License (the "License"); see + accompanying file Copyright.txt for details. + + This software is distributed WITHOUT ANY WARRANTY; without even the + implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the License for more information. + ============================================================================= + CMake - Cross Platform Makefile Generator Copyright 2000-2009 Kitware, + Inc., Insight Software Consortium All rights reserved. + + 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. + ============================================================================= + + GetDirectoryList + Returns a list of the parent directories of all files passed + + + + get_directory_list(<listvar> <file path> [<additional file paths>...]) + + + + Requires CMake 2.6 or newer (uses the 'function' command) + + Original Author: 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> + <abiryan@ryand.net> http://academic.cleardefinition.com Iowa State + University HCI Graduate Program/VRAC + + Copyright Iowa State University 2009-2010. Distributed under the + Boost Software License, Version 1.0. (See accompanying file + LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + + GetFileList + Returns a list of the file names of all files passed + + + + get_file_list(<listvar> <file path> [<additional file paths>...]) + + + + Requires CMake 2.6 or newer (uses the 'function' command) + + Original Author: 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> + <abiryan@ryand.net> http://academic.cleardefinition.com Iowa State + University HCI Graduate Program/VRAC + + Copyright Iowa State University 2009-2010. Distributed under the + Boost Software License, Version 1.0. (See accompanying file + LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + + GetForceIncludeDefinitions + Get the platform-appropriate flags to add to force inclusion of a file + + + + The most common use of this is to use a generated config.h-type file + placed out of the source tree in all files. + + get_force_include_definitions(var forcedincludefiles...) - + where var is the name of your desired output variable, and everything + else is a source file to forcibly include. + a list item to be filtered. + + + + Original Author: 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> + <abiryan@ryand.net> http://academic.cleardefinition.com Iowa State + University HCI Graduate Program/VRAC + + Copyright Iowa State University 2009-2010. Distributed under the + Boost Software License, Version 1.0. (See accompanying file + LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + + GetGitRevisionDescription + Returns a version string from Git + + + + These functions force a re-configure on each git commit so that you + can trust the values of the variables in your build system. + + get_git_head_revision(<refspecvar> <hashvar> [<additional arguments to git describe> ...]) + + + + Returns the refspec and sha hash of the current head revision + + git_describe(<var> [<additional arguments to git describe> ...]) + + + + Returns the results of git describe on the source tree, and adjusting + the output so that it tests false if an error occurs. + + git_get_exact_tag(<var> [<additional arguments to git describe> ...]) + + + + Returns the results of git describe --exact-match on the source tree, + and adjusting the output so that it tests false if there was no exact + matching tag. + + Requires CMake 2.6 or newer (uses the 'function' command) + + Original Author: 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> + <abiryan@ryand.net> http://academic.cleardefinition.com Iowa State + University HCI Graduate Program/VRAC + + Copyright Iowa State University 2009-2010. Distributed under the + Boost Software License, Version 1.0. (See accompanying file + LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + + GetSubprojectStatus + Returns whether the current project is on its own or within another + project's build + + + + get_subproject_status(<resultvar>) - resultvar will be YES if we are + included in another project, or NO if we are being built separately + + + + Requires CMake 2.6 or newer (uses the 'function' command) + + Original Author: 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> + <abiryan@ryand.net> http://academic.cleardefinition.com Iowa State + University HCI Graduate Program/VRAC + + Copyright Iowa State University 2009-2010. Distributed under the + Boost Software License, Version 1.0. (See accompanying file + LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + + Licensing + Building a licensing description file + + + + Original Author: 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> + <abiryan@ryand.net> http://academic.cleardefinition.com Iowa State + University HCI Graduate Program/VRAC + + Copyright Iowa State University 2009-2010. Distributed under the + Boost Software License, Version 1.0. (See accompanying file + LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + + ListCombinations + Combine lists of prefixes and suffixes in all combinations + + + + list_combinations(var PREFIXES listitems... SUFFIXES listitems...) - + where var is the name of your desired output variable and PREFIXES + and SUFFIXES are special arguments that indicate the start of your + list of prefixes or suffixes respectively. + + + + Original Author: 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> + <abiryan@ryand.net> http://academic.cleardefinition.com Iowa State + University HCI Graduate Program/VRAC + + Copyright Iowa State University 2009-2010. Distributed under the + Boost Software License, Version 1.0. (See accompanying file + LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + + ListFilter + List filtering functions + + + + list_filter(var regex listitems...) - where var is the name of + your desired output variable, regex is the regex whose matching items + WILL be put in the output variable, and everything else is considered + a list item to be filtered. + + + + list_filter_out(var regex listitems...) - where var is the name of + your desired output variable, regex is the regex whose matching items + will NOT be put in the output variable, and everything else is considered + a list item to be filtered. + + + + Original Author: 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> + <abiryan@ryand.net> http://academic.cleardefinition.com Iowa State + University HCI Graduate Program/VRAC + + Copyright Iowa State University 2009-2010. Distributed under the + Boost Software License, Version 1.0. (See accompanying file + LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + + LuaTargets + Copy/parse lua source files as a custom target + + + + include(LuaTargets) + add_lua_target(<target_name> <directory to copy to> [<luafile> <luafile>]) + Relative paths for the destination directory are considered with + with respect to CMAKE_CURRENT_BINARY_DIR + + + + install_lua_target(<target_name> [arguments to INSTALL(PROGRAMS ...) ]) + + + + Set this variable to specify location of luac, if it is not a target: + + LUA_TARGET_LUAC_EXECUTABLE + + + + Requires CMake 2.6 or newer (uses the 'function' command) + + Original Author: 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> + <abiryan@ryand.net> http://academic.cleardefinition.com Iowa State + University HCI Graduate Program/VRAC + + Copyright Iowa State University 2009-2010. Distributed under the + Boost Software License, Version 1.0. (See accompanying file + LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + + MSVCMultipleProcessCompile + Compile with multiple processes on MSVC + + + + include(MSVCMultipleProcessCompile) + + + + Requires these CMake modules: + + ListCombinations.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-2010. Distributed under the + Boost Software License, Version 1.0. (See accompanying file + LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + + MSVCStaticRuntime + Modify compile flags to use the static runtimes of MSVC + + + + include(MSVCStaticRuntime) + + + + Requires these CMake modules: + + ListCombinations.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-2010. Distributed under the + Boost Software License, Version 1.0. (See accompanying file + LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + + MSVCVerboseLinking + Add appropriate linker flags to show link details on Visual Studio + + + + include(MSVCVerboseLinking) - to add the flags automaticlly if applicable + + + + Be sure to include this module _BEFORE_ adding your targets, or the + targets won't pick up the updated flags. + + Requires these CMake modules: + + - none + + + + Original Author: 2010 Ryan Pavlik <rpavlik@iastate.edu> + <abiryan@ryand.net> http://academic.cleardefinition.com Iowa State + University HCI Graduate Program/VRAC + + Copyright Iowa State University 2009-2010. Distributed under the + Boost Software License, Version 1.0. (See accompanying file + LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + + OptionRequires + Add an option that depends on one or more variables being true. + + + + option_requires(<option_name> <description> <variable_name> [<variable_name>...]) + + + + Original Author: 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> + <abiryan@ryand.net> http://academic.cleardefinition.com Iowa State + University HCI Graduate Program/VRAC + + Copyright Iowa State University 2009-2010. Distributed under the + Boost Software License, Version 1.0. (See accompanying file + LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + + PrefixListGlob + For each given prefix in a list, glob using the prefix+pattern + + + + + + Original Author: 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> + <abiryan@ryand.net> http://academic.cleardefinition.com Iowa State + University HCI Graduate Program/VRAC + + Copyright Iowa State University 2009-2010. Distributed under the + Boost Software License, Version 1.0. (See accompanying file + LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + + ProgramFilesGlob + Find bit-appropriate program files directories matching a given + pattern + + + + Requires these CMake modules: + + CleanDirectoryList + PrefixListGlob + + + + Original Author: 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> + <abiryan@ryand.net> http://academic.cleardefinition.com Iowa State + University HCI Graduate Program/VRAC + + Copyright Iowa State University 2009-2010. Distributed under the + Boost Software License, Version 1.0. (See accompanying file + LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + + ResetConfigurations + Re-set the available configurations to just RelWithDebInfo, Release, + and Debug + + + + Requires these CMake modules: + + no additional modules required + + + + Original Author: 2010 Ryan Pavlik <rpavlik@iastate.edu> + <abiryan@ryand.net> http://academic.cleardefinition.com Iowa State + University HCI Graduate Program/VRAC + + Copyright Iowa State University 2009-2010. Distributed under the + Boost Software License, Version 1.0. (See accompanying file + LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + + + SearchProgramFilesForOpenSceneGraph + Use some smarts to try to find OpenSceneGraph in the Program Files + dirs + + + + Also uses the OSGHOME environment variable as OSG_DIR, if it's found. + + Usage: + + include(SearchProgramFilesForOpenSceneGraph OPTIONAL) + + + + Requires these CMake modules: + + ListFilter + ProgramFilesGlob + + + + Original Author: 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> + <abiryan@ryand.net> http://academic.cleardefinition.com Iowa State + University HCI Graduate Program/VRAC + + Copyright Iowa State University 2009-2010. Distributed under the + Boost Software License, Version 1.0. (See accompanying file + LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + + SetDefaultBuildType + Set a developer-chosen default build type + + + + Requires these CMake modules: + + no additional modules required + + + + Original Author: 2010 Ryan Pavlik <rpavlik@iastate.edu> + <abiryan@ryand.net> http://academic.cleardefinition.com Iowa State + University HCI Graduate Program/VRAC + + Copyright Iowa State University 2009-2010. Distributed under the + Boost Software License, Version 1.0. (See accompanying file + LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + + + SplitLibraryList + Given a list of libraries with OPTIMIZED, DEBUG, etc. + + + + split_library_list(_generalvar _releasevar _debugvar) + + + + Requires CMake 2.6 or newer (uses the 'function' command) + + Original Author: 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> + <abiryan@ryand.net> http://academic.cleardefinition.com Iowa State + University HCI Graduate Program/VRAC + + Copyright Iowa State University 2009-2010. Distributed under the + Boost Software License, Version 1.0. (See accompanying file + LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + + StampSourcesWithVersion + It will only attempt a substitution within the first C-style comment + block + + + + To set up your source code for proper stamping, start your file with a + Doxygen-style comment block, starting with /* and ending with */ On a + line by itself, with unimportant whitespace, add the standard Doxygen + "version" command: + + @version xxx + + or + + \version xxx + + + + To make sure it works, please do actually put xxx as the current + version: when you save, add one of the command below to your cmake + build, and run cmake, it should replace xxx with the current version. + (It replaces anything between the end of the whitespace after \version + and the end of the line with the version that you pass in your build + script, so put nothing else on that line!) + + For <version>, I recommend passing the value of a CMake variable like + + ${CPACK_PACKAGE_VERSION} + + Remember, reduced duplication of information means reduced errors! + + WARNING! This does edit your source directory, but will only execute + if the (hidden/advanced, default OFF) variable ENABLE_VERSION_STAMPING + is on. + + Additionally, it tries to be very careful: of your code (that is, the + first /* */), but only if // is not found first + + stamp_target_with_version(<version> <target_name> [HEADERS_ONLY | <source>...]) - + If no source file is specified, all will be processed. + + + + stamp_sources_with_version(<version> <source> [<source> ...]) - + Use for files not directly associated with a target. + + + + Original Author: 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> + <abiryan@ryand.net> http://academic.cleardefinition.com Iowa State + University HCI Graduate Program/VRAC + + Copyright Iowa State University 2009-2010. Distributed under the + Boost Software License, Version 1.0. (See accompanying file + LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + + TCHARWorkaround + Script to compile Win32-developed sources using tchar without + modifying the code + + Requires that ${CMAKE_SOURCE_DIR}/cmake/workarounds/tchar/ be present. + + TCHAR_WORKAROUND, automatically set to on when not on win32 + TCHAR_INCLUDE_DIR, location of our fake tchar.h file + + Original Author: 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> + <abiryan@ryand.net> http://academic.cleardefinition.com Iowa State + University HCI Graduate Program/VRAC + + Copyright Iowa State University 2009-2010. Distributed under the + Boost Software License, Version 1.0. (See accompanying file + LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + + UseBackportedModules + Do a version-dependent check and auto-include backported modules dirs + + + + Name your module directories cmake-*-modules where * is the full + (maj.min.patch) version number that they came from. You can use + subdirectories within those directories, if you like - all directories + inside of a cmake-*-modules dir for a newer version of CMake that what + we're running, that contain one or more .cmake files, will be appended + to the CMAKE_MODULE_PATH. + + When backporting modules, be sure to test them and follow copyright + instructions (usually updating copyright notices) + + Requires these CMake modules: + + CleanDirectoryList + + + + Original Author: 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> + <abiryan@ryand.net> http://academic.cleardefinition.com Iowa State + University HCI Graduate Program/VRAC + + Copyright Iowa State University 2009-2010. Distributed under the + Boost Software License, Version 1.0. (See accompanying file + LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + + 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 + + + + This calls include_directories and link_directories as needed to + permit TR1 support. + + Original Author: 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> + <abiryan@ryand.net> http://academic.cleardefinition.com Iowa State + University HCI Graduate Program/VRAC + + Copyright Iowa State University 2009-2010. Distributed under the + Boost Software License, Version 1.0. (See accompanying file + LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + + WarningDev + Print a developer warning, using author_warning if we have cmake 2.8 + + + + warning_dev("your desired message") + + + + Original Author: 2010 Ryan Pavlik <rpavlik@iastate.edu> + <abiryan@ryand.net> http://academic.cleardefinition.com Iowa State + University HCI Graduate Program/VRAC + + Copyright Iowa State University 2009-2010. Distributed under the + Boost Software License, Version 1.0. (See accompanying file + LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +------------------------------------------------------------------------------ +See Also + +.B ccmake(1), cpack(1), ctest(1), cmakecommands(1), cmakecompat(1), +cmakemodules(1), cmakeprops(1), cmakevars(1) + +The following resources are available to get help using CMake: + + Home Page + http://www.cmake.org + + The primary starting point for learning about CMake. + + Frequently Asked Questions + http://www.cmake.org/Wiki/CMake_FAQ + + A Wiki is provided containing answers to frequently asked questions. + + Online Documentation + http://www.cmake.org/HTML/Documentation.html + + Links to available documentation may be found on this web page. + + Mailing List + http://www.cmake.org/HTML/MailingLists.html + + For help and discussion about using cmake, a mailing list is provided + at cmake@cmake.org. The list is member-post-only but one may sign up + on the CMake web page. Please first read the full documentation at + http://www.cmake.org before posting questions to the list. + diff --git a/cmake/cmake-modules/nested_targets/DCubed/CMakeLists.txt b/cmake/cmake-modules/nested_targets/DCubed/CMakeLists.txt new file mode 100644 index 000000000..c25267e3c --- /dev/null +++ b/cmake/cmake-modules/nested_targets/DCubed/CMakeLists.txt @@ -0,0 +1,31 @@ +# - Build the DCubed wrapper libraries as a part of your solution. +# +# Original Author: +# 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> +# http://academic.cleardefinition.com +# Iowa State University HCI Graduate Program/VRAC +# +# Copyright Iowa State University 2009-2010. +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file ../../LICENSE_1_0.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) + + +include_directories("${DCUBED_CORE_INCLUDE_DIR}/d3e_inc" "${DCUBED_WRAPPER_INCLUDE_DIR}") + +include_directories(${PARASOLID_INCLUDE_DIRS}) +if(MSVC) + add_definitions(/D_CRT_SECURE_NO_DEPRECATE /arch:SSE2 /openmp /D_AFXDLL /DNDEBUG) +endif() +if(WIN32) + add_definitions(/DDCM_NT /DWIN32 /D_WINDOWS) +endif() +add_definitions(/DD3EW_DUMMY_HLM) + +if(DCUBED_WRAPPER_d3ew_scene_LIBRARY STREQUAL "dcubed_wrapper_d3ew_scene_nested_target") + add_subdirectory(d3ew_scene) +endif() + +if(DCUBED_WRAPPER_d3ew_p_LIBRARY STREQUAL "dcubed_wrapper_d3ew_p_nested_target") + add_subdirectory(d3ew_p) +endif() diff --git a/cmake/cmake-modules/nested_targets/DCubed/d3ew_p/CMakeLists.txt b/cmake/cmake-modules/nested_targets/DCubed/d3ew_p/CMakeLists.txt new file mode 100644 index 000000000..c86c52712 --- /dev/null +++ b/cmake/cmake-modules/nested_targets/DCubed/d3ew_p/CMakeLists.txt @@ -0,0 +1,41 @@ +# - Build the DCubed wrapper library d3ew_p as a part of your solution. +# +# Original Author: +# 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> +# http://academic.cleardefinition.com +# Iowa State University HCI Graduate Program/VRAC +# +# Copyright Iowa State University 2009-2010. +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file ../../LICENSE_1_0.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) + + +set(SOURCES) +foreach(filename d3ew_p.rc + p_dll.cpp + p_dll.hxx + p_dump.cpp + p_frustrum.cpp + p_gate.cpp + p_gate.hxx + p_lib.cpp + p_modeller.cpp + p_new.hxx + p_rollmark.cpp + p_utils.cpp + p_utils.hxx + res_defs.hxx) + list(APPEND SOURCES "${DCUBED_WRAPPER_INCLUDE_DIR}/d3ew_p/${filename}") +endforeach() +add_library(dcubed_wrapper_d3ew_p_nested_target + STATIC + EXCLUDE_FROM_ALL + ${SOURCES}) +target_link_libraries(dcubed_wrapper_d3ew_p_nested_target ${DCUBED_LIBRARIES} ${PARASOLID_LIBRARIES} "${DCUBED_WRAPPER_d3ew_scene_LIBRARY}") + +set_property(TARGET + dcubed_wrapper_d3ew_p_nested_target + PROPERTY + PROJECT_LABEL + "DCubed d3ew_p Wrapper Library") diff --git a/cmake/cmake-modules/nested_targets/DCubed/d3ew_scene/CMakeLists.txt b/cmake/cmake-modules/nested_targets/DCubed/d3ew_scene/CMakeLists.txt new file mode 100644 index 000000000..1f881b978 --- /dev/null +++ b/cmake/cmake-modules/nested_targets/DCubed/d3ew_scene/CMakeLists.txt @@ -0,0 +1,68 @@ +# - Build the DCubed wrapper library d3ew_scene as a part of your solution. +# +# Original Author: +# 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> +# http://academic.cleardefinition.com +# Iowa State University HCI Graduate Program/VRAC +# +# Copyright Iowa State University 2009-2010. +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file ../../LICENSE_1_0.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) + + +set(SOURCES) +foreach(filename ansi.hxx + body.hxx + d3ew_clap_data.cpp + d3ew_clap_data.hxx + d3ew_new.hxx + d3ew_stack.cpp + d3ew_stack.hxx + debload.hxx + edge.cpp + edge.hxx + ehlc_timer.cpp + ehlc_timer.hxx + face.cpp + face.hxx + frustum.cpp + frustum.hxx + hldeb.hxx + hljournal.hxx + hlm_cdm_dummies.cpp + hltable.hxx + hltabledef.hxx + journalw.cpp + journalw.hxx + modeller.cpp + modeller.hxx + nowarn.hxx + scene.cpp + scene.hxx + scene_build.cpp + scene_edge.cpp + scene_face.cpp + scene_misc.cpp + scene_node.cpp + scene_node.hxx + scene_table.cpp + scene_table.hxx + secure_c.hxx + segment.cpp + segment.hxx + table_dec.hxx + wrapper.cpp + wrapper_new.cpp) + list(APPEND SOURCES "${DCUBED_WRAPPER_INCLUDE_DIR}/d3ew_scene/${filename}") +endforeach() +add_library(dcubed_wrapper_d3ew_scene_nested_target + STATIC + EXCLUDE_FROM_ALL + ${SOURCES}) + +set_property(TARGET + dcubed_wrapper_d3ew_scene_nested_target + PROPERTY + PROJECT_LABEL + "DCubed d3ew_scene Wrapper Library") diff --git a/cmake/cmake-modules/nested_targets/OpenHaptics/CMakeLists.txt b/cmake/cmake-modules/nested_targets/OpenHaptics/CMakeLists.txt new file mode 100644 index 000000000..f46daa391 --- /dev/null +++ b/cmake/cmake-modules/nested_targets/OpenHaptics/CMakeLists.txt @@ -0,0 +1,95 @@ +# - Build the OpenHaptics utility libraries as a part of your solution. +# +# Original Author: +# 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> +# http://academic.cleardefinition.com +# Iowa State University HCI Graduate Program/VRAC +# +# Copyright Iowa State University 2009-2010. +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file ../../LICENSE_1_0.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) + +if(WIN32) + # Work around bug in library at least <= 3.10 + add_definitions(-DWIN32) +endif() +include_directories("${HDAPI_HDU_INCLUDE_DIR}" + "${HDAPI_INCLUDE_DIR}" + "${HLAPI_HLU_INCLUDE_DIR}" + "${HLAPI_INCLUDE_DIR}") + +if(HDAPI_HDU_LIBRARY STREQUAL "openhaptics_hdu_nested_target") + add_library(openhaptics_hdu_nested_target + STATIC + EXCLUDE_FROM_ALL + "${HDAPI_HDU_INCLUDE_DIR}/HDU/hduBoundBox.h" + "${HDAPI_HDU_INCLUDE_DIR}/HDU/hduError.h" + "${HDAPI_HDU_INCLUDE_DIR}/HDU/hduGenericMatrix.h" + "${HDAPI_HDU_INCLUDE_DIR}/HDU/hdu.h" + "${HDAPI_HDU_INCLUDE_DIR}/HDU/hduHapticDevice.h" + "${HDAPI_HDU_INCLUDE_DIR}/HDU/hduLine.h" + "${HDAPI_HDU_INCLUDE_DIR}/HDU/hduLineSegment.h" + "${HDAPI_HDU_INCLUDE_DIR}/HDU/hduMath.h" + "${HDAPI_HDU_INCLUDE_DIR}/HDU/hduMatrix.h" + "${HDAPI_HDU_INCLUDE_DIR}/HDU/hduPlane.h" + "${HDAPI_HDU_INCLUDE_DIR}/HDU/hduQuaternion.h" + "${HDAPI_HDU_INCLUDE_DIR}/HDU/hduRecord.h" + "${HDAPI_HDU_INCLUDE_DIR}/HDU/hduVector.h" + "${HDAPI_HDU_SOURCE_DIR}/hdu.cpp" + "${HDAPI_HDU_SOURCE_DIR}/hduAfx.cpp" + "${HDAPI_HDU_SOURCE_DIR}/hduAfx.h" + "${HDAPI_HDU_SOURCE_DIR}/hduDecompose.cpp" + "${HDAPI_HDU_SOURCE_DIR}/hduDecompose.h" + "${HDAPI_HDU_SOURCE_DIR}/hduError.cpp" + "${HDAPI_HDU_SOURCE_DIR}/hduHapticDevice.cpp" + "${HDAPI_HDU_SOURCE_DIR}/hduLine.cpp" + "${HDAPI_HDU_SOURCE_DIR}/hduLineSegment.cpp" + "${HDAPI_HDU_SOURCE_DIR}/hduMatrix.cpp" + "${HDAPI_HDU_SOURCE_DIR}/hduPlane.cpp" + "${HDAPI_HDU_SOURCE_DIR}/hduQuaternion.cpp" + "${HDAPI_HDU_SOURCE_DIR}/hduRecord.cpp") + target_link_libraries(openhaptics_hdu_nested_target ${HDAPI_LIBRARY}) + set_property(TARGET + openhaptics_hdu_nested_target + PROPERTY + PROJECT_LABEL + "OpenHaptics HDU Library") + + if(MSVC) + # Disable warnings - no sense in warning about Sensable's potential bugs. + set_property(TARGET + openhaptics_hdu_nested_target + PROPERTY + COMPILE_FLAGS + "/wd4189 /wd4701") + endif() +endif() + + +if(HLAPI_HLU_LIBRARY STREQUAL "openhaptics_hlu_nested_target") + add_library(openhaptics_hlu_nested_target + STATIC + EXCLUDE_FROM_ALL + "${HLAPI_HLU_INCLUDE_DIR}/HLU/hlu.h" + "${HLAPI_HLU_SOURCE_DIR}/hlu.cpp" + "${HLAPI_HLU_SOURCE_DIR}/hluAfx.cpp" + "${HLAPI_HLU_SOURCE_DIR}/hluAfx.h") + target_link_libraries(openhaptics_hlu_nested_target ${HLAPI_LIBRARY} ${HDAPI_LIBRARY}) + + set_property(TARGET + openhaptics_hlu_nested_target + PROPERTY + PROJECT_LABEL + "OpenHaptics HLU Library") + + if(MSVC) + # Disable warnings - no sense in warning about Sensable's potential bugs. + set_property(TARGET + openhaptics_hlu_nested_target + APPEND + PROPERTY + COMPILE_FLAGS + /wd4189) + endif() +endif() diff --git a/cmake/cmake-modules/nested_targets/Parasolid/CMakeLists.txt b/cmake/cmake-modules/nested_targets/Parasolid/CMakeLists.txt new file mode 100644 index 000000000..3dfc51e68 --- /dev/null +++ b/cmake/cmake-modules/nested_targets/Parasolid/CMakeLists.txt @@ -0,0 +1,73 @@ +# - Build the Parasolid utility libraries as a part of your solution. +# +# Original Author: +# 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> +# http://academic.cleardefinition.com +# Iowa State University HCI Graduate Program/VRAC +# +# Copyright Iowa State University 2009-2010. +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file ../../LICENSE_1_0.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) + + +if(PARASOLID_fg_LIBRARY STREQUAL "parasolid_fg_nested_target") + get_filename_component(_fgdir "${PARASOLID_FG_C}" PATH) + include_directories("${_fgdir}") + add_library(parasolid_fg_nested_target + STATIC + EXCLUDE_FROM_ALL + "${PARASOLID_FG_C}") + + set_property(TARGET + parasolid_fg_nested_target + PROPERTY + COMPILE_DEFINITIONS + _CRT_SECURE_NO_DEPRECATE) + if(MSVC) + set_property(TARGET + parasolid_fg_nested_target + PROPERTY + COMPILE_FLAGS + "/Gs /GF /GS- /fp:fast") + endif() + + set_property(TARGET + parasolid_fg_nested_target + PROPERTY + PROJECT_LABEL + "Parasolid Foreign Geometry Example Library") + +endif() + + +if(PARASOLID_frustrum_LIBRARY + STREQUAL + "parasolid_frustrum_nested_target") + get_filename_component(_frustrumdir "${PARASOLID_FRUSTRUM_C}" PATH) + include_directories("${_frustrumdir}") + add_library(parasolid_frustrum_nested_target + STATIC + EXCLUDE_FROM_ALL + "${PARASOLID_FRUSTRUM_C}") + + set_property(TARGET + parasolid_frustrum_nested_target + PROPERTY + COMPILE_DEFINITIONS + _CRT_SECURE_NO_DEPRECATE) + if(MSVC) + set_property(TARGET + parasolid_frustrum_nested_target + PROPERTY + COMPILE_FLAGS + "/Gs /GF /GS- /fp:fast") + endif() + + set_property(TARGET + parasolid_frustrum_nested_target + PROPERTY + PROJECT_LABEL + "Parasolid Frustrum Example Library") + +endif() diff --git a/cmake/cmake-modules/nested_targets/cutil/CMakeLists.txt b/cmake/cmake-modules/nested_targets/cutil/CMakeLists.txt new file mode 100644 index 000000000..2f2711492 --- /dev/null +++ b/cmake/cmake-modules/nested_targets/cutil/CMakeLists.txt @@ -0,0 +1,41 @@ +# CMake cross-platform build system +# 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> +# http://academic.cleardefinition.com/ +# Iowa State University HCI Graduate Program/VRAC +# +# Copyright Iowa State University 2009-2010. +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE_1_0.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) + + +### +# Build the project +### + +include_directories("${CUTIL_ROOT_DIR}/inc") +set(SOURCES + "${CUTIL_ROOT_DIR}/src/bank_checker.cpp" + "${CUTIL_ROOT_DIR}/src/cmd_arg_reader.cpp" + "${CUTIL_ROOT_DIR}/src/cutil.cpp" + "${CUTIL_ROOT_DIR}/src/stopwatch.cpp" + "${CUTIL_ROOT_DIR}/src/multithreading.cpp") + +if(WIN32) + list(APPEND SOURCES + "${CUDA_SDK_ROOT_DIR}/C/common/src/stopwatch_win.cpp") + add_definitions(-DWIN32 -D_WINDOWS -DBUILD_DLL) + set(TYPE SHARED) + +else() + list(APPEND SOURCES + "${CUTIL_ROOT_DIR}/src/stopwatch_linux.cpp") + set(TYPE STATIC) + +endif() + +cuda_add_library(cutil ${TYPE} EXCLUDE_FROM_ALL ${SOURCES}) + +set(CUTIL_INCLUDE_DIRS "${CUTIL_ROOT_DIR}/inc" "${CUDA_INCLUDE_DIRS}" PARENT_SCOPE) +set(CUTIL_LIBRARIES cutil PARENT_SCOPE) + diff --git a/cmake/cmake-modules/package-licensing/Boost.cmake b/cmake/cmake-modules/package-licensing/Boost.cmake new file mode 100644 index 000000000..22e7d86ee --- /dev/null +++ b/cmake/cmake-modules/package-licensing/Boost.cmake @@ -0,0 +1,13 @@ +# Original Author: +# 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> +# http://academic.cleardefinition.com +# Iowa State University HCI Graduate Program/VRAC +# +# Copyright Iowa State University 2009-2010. +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file ../LICENSE_1_0.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) + +add_permissive_license(Boost + "Based in part on the work of the Boost project. Boost is distributed under the Boost Software License, Version 1.0. See copy at http://www.boost.org/LICENSE_1_0.txt" + "<http://www.boost.org>") diff --git a/cmake/cmake-modules/package-licensing/Eigen.cmake b/cmake/cmake-modules/package-licensing/Eigen.cmake new file mode 100644 index 000000000..538d787ed --- /dev/null +++ b/cmake/cmake-modules/package-licensing/Eigen.cmake @@ -0,0 +1,13 @@ +# Original Author: +# 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> +# http://academic.cleardefinition.com +# Iowa State University HCI Graduate Program/VRAC +# +# Copyright Iowa State University 2009-2010. +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file ../LICENSE_1_0.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) + +add_permissive_license(Eigen + "Based in part on the work of the Eigen project. Eigen is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.\nEigen is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details." + "<http://eigen.tuxfamily.org>") diff --git a/cmake/cmake-modules/package-licensing/FLTK.cmake b/cmake/cmake-modules/package-licensing/FLTK.cmake new file mode 100644 index 000000000..21d71687c --- /dev/null +++ b/cmake/cmake-modules/package-licensing/FLTK.cmake @@ -0,0 +1,14 @@ +# Original Author: +# 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> +# http://academic.cleardefinition.com +# Iowa State University HCI Graduate Program/VRAC +# +# Copyright Iowa State University 2009-2010. +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file ../LICENSE_1_0.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) + +add_permissive_license(FLTK + "Based in part on the work of the FLTK project, available under the terms of the FLTK License (GNU Library General Public LIcense with exceptions). FLTK is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.\n\nFLTK is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details." + "<http://www.fltk.org/>") +add_permissive_license(FLTK "Based in part on the work of the FLTK project, available under the terms of the FLTK License (GNU Library General Public LIcense with exceptions). FLTK is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.\n\nFLTK is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details." "<http://www.fltk.org/>") \ No newline at end of file diff --git a/cmake/cmake-modules/package-licensing/Lua.cmake b/cmake/cmake-modules/package-licensing/Lua.cmake new file mode 100644 index 000000000..b15f51b3e --- /dev/null +++ b/cmake/cmake-modules/package-licensing/Lua.cmake @@ -0,0 +1,14 @@ +# Original Author: +# 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> +# http://academic.cleardefinition.com +# Iowa State University HCI Graduate Program/VRAC +# +# Copyright Iowa State University 2009-2010. +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file ../LICENSE_1_0.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) + +add_permissive_license(Lua + "Based in part on the work of the Lua project, Copyright 1994-2008 Lua.org, PUC-Rio. Lua is licensed under the terms of the MIT license, reproduced at http://www.lua.org/license.html#5" + "<http://www.lua.org/>") + diff --git a/cmake/cmake-modules/package-licensing/LuaBind.cmake b/cmake/cmake-modules/package-licensing/LuaBind.cmake new file mode 100644 index 000000000..342e7a419 --- /dev/null +++ b/cmake/cmake-modules/package-licensing/LuaBind.cmake @@ -0,0 +1,15 @@ +# Original Author: +# 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> +# http://academic.cleardefinition.com +# Iowa State University HCI Graduate Program/VRAC +# +# Copyright Iowa State University 2009-2010. +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file ../LICENSE_1_0.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) + +add_permissive_license(LuaBind + "Based in part on the work of the LuaBind project. LuaBind is licensed under the terms of the MIT license, reproduced at http://www.lua.org/license.html#5" + "<http://www.rasterbar.com/products/luabind.html>") + +include("package-licensing/Boost") diff --git a/cmake/cmake-modules/package-licensing/OpenHapticsAcademicEdition.cmake b/cmake/cmake-modules/package-licensing/OpenHapticsAcademicEdition.cmake new file mode 100644 index 000000000..5a06521d5 --- /dev/null +++ b/cmake/cmake-modules/package-licensing/OpenHapticsAcademicEdition.cmake @@ -0,0 +1,15 @@ +# Original Author: +# 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> +# http://academic.cleardefinition.com +# Iowa State University HCI Graduate Program/VRAC +# +# Copyright Iowa State University 2009-2010. +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file ../LICENSE_1_0.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) + +add_proprietary_license(OpenHapticsAE + "Based in part on the Sensable OpenHaptics Toolkit Academic Edition as licensed to Iowa State University. NOT FOR REDISTRIBUTION." + "<http://sensable.com/openhaptics-academic-edition-faqs.htm>") + +add_redistribution_warning("NOT FOR REDISTRIBUTION - OpenHaptics Toolkit Academic Edition licensed to Iowa State University.") diff --git a/cmake/cmake-modules/package-licensing/OpenSceneGraph.cmake b/cmake/cmake-modules/package-licensing/OpenSceneGraph.cmake new file mode 100644 index 000000000..c4fa29be1 --- /dev/null +++ b/cmake/cmake-modules/package-licensing/OpenSceneGraph.cmake @@ -0,0 +1,13 @@ +# Original Author: +# 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> +# http://academic.cleardefinition.com +# Iowa State University HCI Graduate Program/VRAC +# +# Copyright Iowa State University 2009-2010. +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file ../LICENSE_1_0.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) + +add_permissive_license(OpenSceneGraph + "Based in part on the work of the OpenSceneGraph project. OpenSceneGraph is open source and may be redistributed and/or modified under the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or (at your option) any later version. The full license is on the openscenegraph.org website.\n\nOpenSceneGraph is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the OpenSceneGraph Public License for more details." + "<http://www.openscenegraph.org>") diff --git a/cmake/cmake-modules/package-licensing/PhysicalModelingUtils.cmake b/cmake/cmake-modules/package-licensing/PhysicalModelingUtils.cmake new file mode 100644 index 000000000..edda38f0c --- /dev/null +++ b/cmake/cmake-modules/package-licensing/PhysicalModelingUtils.cmake @@ -0,0 +1,13 @@ +# Original Author: +# 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> +# http://academic.cleardefinition.com +# Iowa State University HCI Graduate Program/VRAC +# +# Copyright Iowa State University 2009-2010. +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file ../LICENSE_1_0.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) + +add_permissive_license(PhysicalModelingUtils + "Based in part on the work of the PhysicalModelingUtils project, Copyright 2009-2010 Iowa State University. PhysicalModelingUtils is distributed under the Boost Software License, Version 1.0. See copy at http://www.boost.org/LICENSE_1_0.txt" + "<http://github.com/rpavlik/physical-modeling-utilities>") diff --git a/cmake/cmake-modules/package-licensing/Qt-LGPL.cmake b/cmake/cmake-modules/package-licensing/Qt-LGPL.cmake new file mode 100644 index 000000000..db4d78d32 --- /dev/null +++ b/cmake/cmake-modules/package-licensing/Qt-LGPL.cmake @@ -0,0 +1,13 @@ +# Original Author: +# 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> +# http://academic.cleardefinition.com +# Iowa State University HCI Graduate Program/VRAC +# +# Copyright Iowa State University 2009-2010. +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file ../LICENSE_1_0.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) + +add_permissive_license(Qt + "Based in part on the work of the Qt GUI Toolkit project. The Qt GUI Toolkit is Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). You may use, distribute and copy the Qt GUI Toolkit under the terms of GNU Lesser General Public License version 2.1, as published by the Free Software Foundation." + "<http://qt.nokia.com/>") diff --git a/cmake/cmake-modules/package-licensing/VPS.cmake b/cmake/cmake-modules/package-licensing/VPS.cmake new file mode 100644 index 000000000..4a2b1ca85 --- /dev/null +++ b/cmake/cmake-modules/package-licensing/VPS.cmake @@ -0,0 +1,15 @@ +# Original Author: +# 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> +# http://academic.cleardefinition.com +# Iowa State University HCI Graduate Program/VRAC +# +# Copyright Iowa State University 2009-2010. +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file ../LICENSE_1_0.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) + +add_proprietary_license(VPS + "Based in part on Voxmap PointShell(TM) software from Boeing, licensed to Iowa State University. NOT FOR REDISTRIBUTION." + "<http://www.boeing.com/phantom/vps/>") + +add_redistribution_warning("NOT FOR REDISTRIBUTION - Voxmap PointShell(TM) software licensed only to Iowa State University.") diff --git a/cmake/cmake-modules/package-licensing/VRJuggLua.cmake b/cmake/cmake-modules/package-licensing/VRJuggLua.cmake new file mode 100644 index 000000000..d2da335cc --- /dev/null +++ b/cmake/cmake-modules/package-licensing/VRJuggLua.cmake @@ -0,0 +1,19 @@ +# 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-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_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") +include("package-licensing/LuaBind") +include("package-licensing/osgLua") +include("package-licensing/Boost") diff --git a/cmake/cmake-modules/package-licensing/VRJuggler.cmake b/cmake/cmake-modules/package-licensing/VRJuggler.cmake new file mode 100644 index 000000000..f015ef351 --- /dev/null +++ b/cmake/cmake-modules/package-licensing/VRJuggler.cmake @@ -0,0 +1,15 @@ +# Original Author: +# 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> +# http://academic.cleardefinition.com +# Iowa State University HCI Graduate Program/VRAC +# +# Copyright Iowa State University 2009-2010. +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file ../LICENSE_1_0.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) + +add_permissive_license("VR Juggler" + "Based in part on the work of the VR Juggler project. VR Juggler is Copyright 1998-2010 Iowa State University. VR Juggler is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.\n\nVR Juggler is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details." + "<http://code.google.com/p/vrjuggler/>") + +include("package-licensing/Boost") diff --git a/cmake/cmake-modules/package-licensing/VirtuoseAPI.cmake b/cmake/cmake-modules/package-licensing/VirtuoseAPI.cmake new file mode 100644 index 000000000..fe7d5c653 --- /dev/null +++ b/cmake/cmake-modules/package-licensing/VirtuoseAPI.cmake @@ -0,0 +1,14 @@ +# Original Author: +# 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> +# http://academic.cleardefinition.com +# Iowa State University HCI Graduate Program/VRAC +# +# Copyright Iowa State University 2009-2010. +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file ../LICENSE_1_0.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) + +add_proprietary_license(VirtuoseAPI + "Based in part on the Haption VirtuoseAPI." + "<http://www.haption.com/site/eng/html/logiciel.php?item=1>") +add_redistribution_warning("Redistribution of the VirtuoseAPI may be restricted.") diff --git a/cmake/cmake-modules/package-licensing/osgLua.cmake b/cmake/cmake-modules/package-licensing/osgLua.cmake new file mode 100644 index 000000000..04780e130 --- /dev/null +++ b/cmake/cmake-modules/package-licensing/osgLua.cmake @@ -0,0 +1,16 @@ +# Original Author: +# 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> +# http://academic.cleardefinition.com +# Iowa State University HCI Graduate Program/VRAC +# +# Copyright Iowa State University 2009-2010. +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file ../LICENSE_1_0.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) + +add_permissive_license(osgLua + "Based in part on the work of the osgLua project. osgLua is open source and may be redistributed and/or modified under the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or (at your option) any later version. The full license is on the openscenegraph.org website.\n\nosgLua is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the OpenSceneGraph Public License for more details." + "<http://svn.pplux.com/lab/osgLua/>") + +include("package-licensing/OpenSceneGraph") +include("package-licensing/Lua") diff --git a/cmake/cmake-modules/package/fixupbundle.cmake.in b/cmake/cmake-modules/package/fixupbundle.cmake.in new file mode 100644 index 000000000..1936f380b --- /dev/null +++ b/cmake/cmake-modules/package/fixupbundle.cmake.in @@ -0,0 +1,56 @@ +# - Configurable script to fix up a VR Juggler bundle +# +# Original Author: +# 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> +# http://academic.cleardefinition.com +# Iowa State University HCI Graduate Program/VRAC +# +# Copyright Iowa State University 2009-2010. +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file ../../LICENSE_1_0.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) + +function(gp_resolve_item_override _context _item _exepath _dirs _resolved_item _resolved) + if(NOT ${_resolved}) + set(ri "ri-NOTFOUND") + if("${_item}" MATCHES "@executable_path") + get_filename_component(itemname "${_item}" NAME) + message(STATUS "Was incompletely embedded, now looking for ${itemname}") + find_file(ri "${itemname}" ${_exepath} ${_dirs} NO_DEFAULT_PATH) + find_file(ri "${itemname}" ${_exepath} ${_dirs} /usr/lib) + if(ri) + get_filename_component(ri "${ri}" REALPATH) + message(STATUS "override info: 'find_file' on filename '${itemname} in exepath/dirs (${ri})") + set(${_resolved} 1 PARENT_SCOPE) + set(${_resolved_item} "${ri}" PARENT_SCOPE) + set(ri "ri-NOTFOUND") + endif() + endif() + endif() + +endfunction() + + +set(CMAKE_MODULE_PATH @CMAKE_MODULE_PATH@) + +include(BundleUtilities) +set(IS_XCODE @IS_XCODE@) +if(IS_XCODE) + set(APP "$ENV{TARGET_BUILD_DIR}/@_target@.app") +else() + set(APP "@TARGET_LOCATION@") +endif() +#set(APP "@_target@") + +set(BUNDLE_LIBS_INPUT "@BUNDLE_LIBS@") +foreach(lib ${BUNDLE_LIBS_INPUT}) + if(IS_ABSOLUTE "${lib}") + list(APPEND BUNDLE_LIBS "${lib}") + message(STATUS " ${lib}") + else() + message(STATUS "* ${CMAKE_INSTALL_PREFIX}/${lib}") + list(APPEND BUNDLE_LIBS "${CMAKE_INSTALL_PREFIX}/${lib}") + endif() +endforeach() + +fixup_bundle("${CMAKE_INSTALL_PREFIX}/${APP}" "${BUNDLE_LIBS}" "@BUNDLE_LIB_DIRS@") \ No newline at end of file diff --git a/cmake/cmake-modules/package/macosx/VRJuggler22BundleInfo.plist.in b/cmake/cmake-modules/package/macosx/VRJuggler22BundleInfo.plist.in new file mode 100644 index 000000000..161c82366 --- /dev/null +++ b/cmake/cmake-modules/package/macosx/VRJuggler22BundleInfo.plist.in @@ -0,0 +1,38 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> +<dict> + <key>CFBundleDevelopmentRegion</key> + <string>English</string> + <key>CFBundleExecutable</key> + <string>${MACOSX_BUNDLE_EXECUTABLE_NAME}</string> + <key>CFBundleGetInfoString</key> + <string>${MACOSX_BUNDLE_INFO_STRING}</string> + <key>CFBundleIconFile</key> + <string>${MACOSX_BUNDLE_ICON_FILE}</string> + <key>CFBundleIdentifier</key> + <string>${MACOSX_BUNDLE_GUI_IDENTIFIER}</string> + <key>CFBundleInfoDictionaryVersion</key> + <string>6.0</string> + <key>CFBundleLongVersionString</key> + <string>${MACOSX_BUNDLE_LONG_VERSION_STRING}</string> + <key>CFBundleName</key> + <string>${MACOSX_BUNDLE_BUNDLE_NAME}</string> + <key>CFBundlePackageType</key> + <string>APPL</string> + <key>CFBundleShortVersionString</key> + <string>${MACOSX_BUNDLE_SHORT_VERSION_STRING}</string> + <key>CFBundleSignature</key> + <string>????</string> + <key>CFBundleVersion</key> + <string>${MACOSX_BUNDLE_BUNDLE_VERSION}</string> + <key>CSResourcesFileMapped</key> + <true/> + <key>NSHumanReadableCopyright</key> + <string>${MACOSX_BUNDLE_COPYRIGHT}</string> + <key>NSMainNibFile</key> + <string>MainMenu</string> + <key>NSPrincipalClass</key> + <string>NSApplication</string> +</dict> +</plist> diff --git a/cmake/cmake-modules/package/macosx/VRJuggler30BundleInfo.plist.in b/cmake/cmake-modules/package/macosx/VRJuggler30BundleInfo.plist.in new file mode 100644 index 000000000..161c82366 --- /dev/null +++ b/cmake/cmake-modules/package/macosx/VRJuggler30BundleInfo.plist.in @@ -0,0 +1,38 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> +<dict> + <key>CFBundleDevelopmentRegion</key> + <string>English</string> + <key>CFBundleExecutable</key> + <string>${MACOSX_BUNDLE_EXECUTABLE_NAME}</string> + <key>CFBundleGetInfoString</key> + <string>${MACOSX_BUNDLE_INFO_STRING}</string> + <key>CFBundleIconFile</key> + <string>${MACOSX_BUNDLE_ICON_FILE}</string> + <key>CFBundleIdentifier</key> + <string>${MACOSX_BUNDLE_GUI_IDENTIFIER}</string> + <key>CFBundleInfoDictionaryVersion</key> + <string>6.0</string> + <key>CFBundleLongVersionString</key> + <string>${MACOSX_BUNDLE_LONG_VERSION_STRING}</string> + <key>CFBundleName</key> + <string>${MACOSX_BUNDLE_BUNDLE_NAME}</string> + <key>CFBundlePackageType</key> + <string>APPL</string> + <key>CFBundleShortVersionString</key> + <string>${MACOSX_BUNDLE_SHORT_VERSION_STRING}</string> + <key>CFBundleSignature</key> + <string>????</string> + <key>CFBundleVersion</key> + <string>${MACOSX_BUNDLE_BUNDLE_VERSION}</string> + <key>CSResourcesFileMapped</key> + <true/> + <key>NSHumanReadableCopyright</key> + <string>${MACOSX_BUNDLE_COPYRIGHT}</string> + <key>NSMainNibFile</key> + <string>MainMenu</string> + <key>NSPrincipalClass</key> + <string>NSApplication</string> +</dict> +</plist> diff --git a/cmake/cmake-modules/update-help.sh b/cmake/cmake-modules/update-help.sh new file mode 100755 index 000000000..0611b7519 --- /dev/null +++ b/cmake/cmake-modules/update-help.sh @@ -0,0 +1,7 @@ +#!/bin/sh + +src="$(dirname $(readlink -f $0))" +: ${CMAKE:=$(which cmake)} +$CMAKE "-DCMAKE_MODULE_PATH=$src" --help-custom-modules "$src/module-help.html" +$CMAKE "-DCMAKE_MODULE_PATH=$src" --help-custom-modules "$src/module-help.txt" + diff --git a/cmake/cmake-modules/workarounds/mac-alut-framework/AL/alut.h b/cmake/cmake-modules/workarounds/mac-alut-framework/AL/alut.h new file mode 100644 index 000000000..8e5b93925 --- /dev/null +++ b/cmake/cmake-modules/workarounds/mac-alut-framework/AL/alut.h @@ -0,0 +1 @@ +#include <OpenAL/alut.h> diff --git a/cmake/cmake-modules/workarounds/mac-gl/GL/gl.h b/cmake/cmake-modules/workarounds/mac-gl/GL/gl.h new file mode 100644 index 000000000..1cbb3cd93 --- /dev/null +++ b/cmake/cmake-modules/workarounds/mac-gl/GL/gl.h @@ -0,0 +1 @@ +#include <OpenGL/gl.h> diff --git a/cmake/cmake-modules/workarounds/mac-gl/GL/glui.h b/cmake/cmake-modules/workarounds/mac-gl/GL/glui.h new file mode 100644 index 000000000..f6a993a2f --- /dev/null +++ b/cmake/cmake-modules/workarounds/mac-gl/GL/glui.h @@ -0,0 +1 @@ +#include <GLUI/glui.h> diff --git a/cmake/cmake-modules/workarounds/mac-gl/GL/glut.h b/cmake/cmake-modules/workarounds/mac-gl/GL/glut.h new file mode 100644 index 000000000..d3182a29d --- /dev/null +++ b/cmake/cmake-modules/workarounds/mac-gl/GL/glut.h @@ -0,0 +1 @@ +#include <GLUT/glut.h> diff --git a/cmake/cmake-modules/workarounds/mac-openal/AL/al.h b/cmake/cmake-modules/workarounds/mac-openal/AL/al.h new file mode 100644 index 000000000..b032a6360 --- /dev/null +++ b/cmake/cmake-modules/workarounds/mac-openal/AL/al.h @@ -0,0 +1 @@ +#include <OpenAL/al.h> diff --git a/cmake/cmake-modules/workarounds/mac-openal/AL/alc.h b/cmake/cmake-modules/workarounds/mac-openal/AL/alc.h new file mode 100644 index 000000000..8ddbddcc5 --- /dev/null +++ b/cmake/cmake-modules/workarounds/mac-openal/AL/alc.h @@ -0,0 +1 @@ +#include <OpenAL/alc.h> diff --git a/cmake/cmake-modules/workarounds/tchar/tchar.h b/cmake/cmake-modules/workarounds/tchar/tchar.h new file mode 100644 index 000000000..aff036b8d --- /dev/null +++ b/cmake/cmake-modules/workarounds/tchar/tchar.h @@ -0,0 +1,2 @@ +#define _tmain main +#define _TCHAR char \ No newline at end of file -- GitLab