Skip to content
My collection of CMake modules
CMake HTML Other
Find file
Failed to load latest commit information.
cmake-2.8.0-modules fix up the cmake BSD licenses Oct 14, 2010
cmake-2.8.1-modules/patchctestbug10149 fix up the cmake BSD licenses Oct 14, 2010
cmake-2.8.12-modules Update backported module and add backported ParseArguments. Dec 5, 2013
cmake-2.8.3-modules Update comment. Feb 3, 2015
cmake-2.8.4-modules Improve formatting of copyright notice when rendered to html Dec 13, 2010
cmake-3.2.0-modules Add an upstream "FindGit" from CMake 3.2.0 Sep 21, 2015
cmake-3.3.0-modules Backported bugfixed version of WriteCompilerDetectionHeader. Apr 25, 2016
cmake-4.0.0-modules Impending CMake 3.0 implies that 2.9.0 is no longer ~= infinity. Dec 5, 2013
ghost-fake-stl Add some more ghost fake ehaders. Feb 3, 2015
launcher-templates Update launcher templates to match attributes. Nov 20, 2014
module-docs Improve formatting of copyright notice when rendered to html Dec 13, 2010
nested_targets Fix up OpenHaptics nested targets. Sep 30, 2013
package-licensing VR JuggLua is no longer unreleased research software - ditch the scar… Mar 20, 2012
package move fixupbundle.cmake.in and improve finding it Feb 18, 2011
workarounds Add cmake build files, fix config - it builds and links! Jun 10, 2010
.gitattributes Add gitattributes file, primarily to handle launcher templates. Nov 20, 2014
AboutTheseModules.cmake Run cmake-bulk-decrufter. Jan 10, 2012
BoostTestTargets.cmake BoostTestTargets: fix setting FAIL_REGULAR_EXPRESSION without TESTS list May 8, 2014
BoostTestTargetsDynamic.h Update cmake files Jun 23, 2010
BoostTestTargetsIncluded.h Update cmake files Jun 23, 2010
BoostTestTargetsStatic.h Update cmake files Jun 23, 2010
BundleOSGPlugins.cmake Run cmake-bulk-decrufter. Jan 10, 2012
BundleOSGRuntime.cmake Improve formatting of copyright notice when rendered to html Dec 13, 2010
BundleVRJ22Runtime.cmake Improve formatting of copyright notice when rendered to html Dec 13, 2010
BundleVRJ30Runtime.cmake Added Juggler 3.0 files Nov 10, 2010
CheckMacHIDAPI.cmake Improve formatting of copyright notice when rendered to html Dec 13, 2010
CheckMacHIDAPI.cpp remove unused variables in test file Aug 30, 2011
CheckVersion.cmake Improve formatting of copyright notice when rendered to html Dec 13, 2010
CleanDirectoryList.cmake Improve formatting of copyright notice when rendered to html Dec 13, 2010
CleanLibraryList.cmake Improve formatting of copyright notice when rendered to html Dec 13, 2010
CompatibilityVersionFile-BASIC.cmake.in Add GenerateCompatibilityVersionFile, for keeping your msvc from comp… Sep 21, 2015
CompatibilityVersionFile-CXX_ABI.cmake.in Add GenerateCompatibilityVersionFile, for keeping your msvc from comp… Sep 21, 2015
CompatibilityVersionFile-CXX_LAYOUT.cmake.in Add GenerateCompatibilityVersionFile, for keeping your msvc from comp… Sep 21, 2015
CompatibilityVersionFile-C_ABI.cmake.in Add GenerateCompatibilityVersionFile, for keeping your msvc from comp… Sep 21, 2015
CopyImportedTarget.cmake Trailing newline Aug 18, 2015
CopyResourcesToBuildTree.cmake Improve formatting of copyright notice when rendered to html Dec 13, 2010
CppcheckTargets.cmake added FORCE parameter to enable checking all preprocessor configurations May 9, 2014
CreateDashboardScripts.cmake Fix up create dashboard scripts to use a shared Git location. Sep 21, 2015
CreateImportedTarget.cmake Improve formatting of copyright notice when rendered to html Dec 13, 2010
CreateLaunchers.cmake allow to use semi colon in var like ENVIRONMENT. We need this on wind… Feb 10, 2014
DashboardScript.cmake.in handle config types in dashboard scripts Jan 25, 2011
DoxygenTargets.cmake Find and use MSCGEN in Doxygen. Feb 3, 2015
DoxygenTargets.doxyfile.in Find and use MSCGEN in Doxygen. Feb 3, 2015
EnableExtraCompilerWarnings.cmake Another flag in ExtraCompilerWarnings, to get GCC to stop whining abo… Apr 25, 2016
EnableProfiling.cmake Improve formatting of copyright notice when rendered to html Dec 13, 2010
FileCopyTargets.cmake Run cmake-bulk-decrufter. Jan 10, 2012
FindALUT.cmake Improve formatting of copyright notice when rendered to html Dec 13, 2010
FindAdrienne.cmake Adrienne timecode generator finder Oct 17, 2012
FindBluez.cmake Improve formatting of copyright notice when rendered to html Dec 13, 2010
FindCPPDOM.cmake Try handling new versions of cppdom that have their own config file. Feb 15, 2013
FindColibriApi.cmake ColibriApi: Module written for VRPN. Apr 25, 2016
FindDCubed.cmake improve dcubed include dirs May 11, 2011
FindDirectShow.cmake Formatting fix in finddirectshow Apr 25, 2016
FindDirectX.cmake Improve quiet finding. Aug 18, 2015
FindFlagpoll.cmake Improve formatting of copyright notice when rendered to html Dec 13, 2010
FindGDB.cmake Run cmake-bulk-decrufter. Jan 10, 2012
FindGHOST.cmake clean up some modules Dec 12, 2012
FindGLUI.cmake Improve formatting of copyright notice when rendered to html Dec 13, 2010
FindGLUT.cmake fix up the cmake BSD licenses Oct 14, 2010
FindGMTL.cmake Add additional versions of cppdom and gmtl. Jan 10, 2012
FindGPM.cmake Improve formatting of copyright notice when rendered to html Dec 13, 2010
FindGadgeteer12.cmake Improve formatting of copyright notice when rendered to html Dec 13, 2010
FindGadgeteer20.cmake Generate, rather than enumerate, juggler lib names. May 10, 2012
FindGlove5DT.cmake Improve glove5dt finder Jan 3, 2011
FindHIDAPI.cmake Minor HIDAPI finding changes. Feb 3, 2015
FindIDLJ.cmake IDLJ finder/script Oct 17, 2012
FindInterSense.cmake Updated the InterSense finder to look in default install locations. Apr 25, 2016
FindJCCL12.cmake Improve formatting of copyright notice when rendered to html Dec 13, 2010
FindJCCL14.cmake Generate, rather than enumerate, juggler lib names. May 10, 2012
FindJsonCpp.cmake Add a FindJsonCpp module I wrote for various OSVR projects. Apr 25, 2016
FindJtTk.cmake actually use the jttk root dir specified May 11, 2011
FindJtTk.stampkey.cmake.in Add cmake build files, fix config - it builds and links! Jun 10, 2010
FindLAPACKLibs.cmake Improve formatting of copyright notice when rendered to html Dec 13, 2010
FindLibFreespace.cmake Fix copyright line. Aug 4, 2015
FindLibusb1.cmake Get better at finding libusb1 without pkg-config Nov 20, 2014
FindLuabind.cmake Improve formatting of copyright notice when rendered to html Dec 13, 2010
FindLyX.cmake Run cmake-bulk-decrufter. Jan 10, 2012
FindMacHID.cmake Improve formatting of copyright notice when rendered to html Dec 13, 2010
FindMarkdown.cmake Add markdown scripts (finding and targets) Jan 9, 2012
FindOVR.cmake Add Oculus SDK finder - initial version by @godbyk, tweaks by me. Feb 3, 2015
FindOpenCV1.cmake Rename opencv finder to indicate it only looks for old OpenCV. Feb 20, 2015
FindOpenHaptics.cmake Fix tabs Nov 20, 2014
FindParasolid.cmake Improve formatting of copyright notice when rendered to html Dec 13, 2010
FindPerformer.cmake Just a little cleanup. Apr 18, 2012
FindPerlModules.cmake clean up some modules Dec 12, 2012
FindQVRPN.cmake Run cmake-bulk-decrufter. Jan 10, 2012
FindSDL2.cmake FindSDL2: standardize indentation within the file. Apr 26, 2016
FindSonix12.cmake Improve formatting of copyright notice when rendered to html Dec 13, 2010
FindSonix14.cmake Generate, rather than enumerate, juggler lib names. May 10, 2012
FindTR1.cmake Run cmake-bulk-decrufter. Jan 10, 2012
FindTooN.cmake Improve formatting of copyright notice when rendered to html Dec 13, 2010
FindTooNtag.cmake Improve formatting of copyright notice when rendered to html Dec 13, 2010
FindTweek12.cmake Improve formatting of copyright notice when rendered to html Dec 13, 2010
FindTweek14.cmake Generate, rather than enumerate, juggler lib names. May 10, 2012
FindVPR20.cmake Improve formatting of copyright notice when rendered to html Dec 13, 2010
FindVPR22.cmake Conditionally use libuuid for VPR22 Oct 17, 2012
FindVPS.cmake Improve formatting of copyright notice when rendered to html Dec 13, 2010
FindVRJ22.cmake Improve formatting of copyright notice when rendered to html Dec 13, 2010
FindVRJ30.cmake Generate, rather than enumerate, juggler lib names. May 10, 2012
FindVRJOGL22.cmake Improve formatting of copyright notice when rendered to html Dec 13, 2010
FindVRJOGL30.cmake Generate, rather than enumerate, juggler lib names. May 10, 2012
FindVRJuggler.cmake Fix FindVRJuggler for newer cmake versions Aug 6, 2013
FindVRJuggler22.cmake don't force MACOSX_BUNDLE to be on. Feb 18, 2011
FindVRJuggler30.cmake Fix VR Juggler base path determination. Sep 13, 2013
FindVRPN.cmake Add a minor tweak to the VRPN module Apr 25, 2016
FindViewPoint.cmake Add new FindViewPoint Mar 16, 2012
FindVirtuoseAPI.cmake Run the decrufter on it all Oct 25, 2010
FindVirtuoseVPP.cmake Run the decrufter on it all Oct 25, 2010
FindWayland.cmake Added FindWayland.cmake Jan 31, 2015
FindWiiSCAAT.cmake Improve formatting of copyright notice when rendered to html Dec 13, 2010
FindWiiUse.cmake Set WIIUSE_RUNTIME_LIBRARY in Wiiuse even not on Windows Nov 16, 2011
FindWinHID.cmake Update list of dependencies in FindWinHID Apr 25, 2016
FindWindowsSDK.cmake Add two new functions to FindWindowsSDK Apr 25, 2016
FindXrandr.cmake Add udev and Xrandr finder, by @godbyk Feb 3, 2015
Findargp.cmake Improve formatting of copyright notice when rendered to html Dec 13, 2010
Findcppcheck.cmake Fixed cppcheck unusedFunction option May 28, 2013
Findcppcheck.cpp Add cmake build files, fix config - it builds and links! Jun 10, 2010
Findcppunit.cmake Fix copy-pasteo in findcppunit Nov 16, 2011
Findcutil.cmake Run cmake-bulk-decrufter. Jan 10, 2012
Finddb2pdf.cmake Improve formatting of copyright notice when rendered to html Dec 13, 2010
FindosgLua.cmake Improve formatting of copyright notice when rendered to html Dec 13, 2010
Findquatlib.cmake VRPN/quatlib: Look in where the VRPN CMake installs by default. Feb 3, 2015
Findudev.cmake Add udev and Xrandr finder, by @godbyk Feb 3, 2015
GenerateCompatibilityVersionFile.cmake Add GenerateCompatibilityVersionFile, for keeping your msvc from comp… Sep 21, 2015
GetCPUDetails.cmake Set CPU_Count in GetCPUDetails Nov 29, 2014
GetCompilerInfoString.cmake Handle other compilers better by using compiler ID Sep 9, 2011
GetDefineString.cmake Add a module to extract a preprocessor definition. Nov 20, 2014
GetDefineString.cpp.in Add a module to extract a preprocessor definition. Nov 20, 2014
GetDirectoryList.cmake Improve formatting of copyright notice when rendered to html Dec 13, 2010
GetFileList.cmake Improve formatting of copyright notice when rendered to html Dec 13, 2010
GetForceIncludeDefinitions.cmake Improve formatting of copyright notice when rendered to html Dec 13, 2010
GetGitRevisionDescription.cmake Use CMAKE_CURRENT_SOURCE_DIR consistently Jul 8, 2015
GetGitRevisionDescription.cmake.in Use .git/packed-refs if ref is not found. Mar 28, 2015
GetMSVCVersion.cmake Add a handful of new modules. Aug 4, 2015
GetSubprojectStatus.cmake Improve formatting of copyright notice when rendered to html Dec 13, 2010
LICENSE_1_0.txt Put BSL 1.0 license notice on all cmake files Oct 14, 2010
Licensing.cmake Improve formatting of copyright notice when rendered to html Dec 13, 2010
ListCombinations.cmake Improve formatting of copyright notice when rendered to html Dec 13, 2010
ListFilter.cmake Improve formatting of copyright notice when rendered to html Dec 13, 2010
LuaTargets.cmake Run cmake-bulk-decrufter. Jan 10, 2012
MSVCMultipleProcessCompile.cmake Improve formatting of copyright notice when rendered to html Dec 13, 2010
MSVCStaticRuntime.cmake Improve formatting of copyright notice when rendered to html Dec 13, 2010
MSVCVerboseLinking.cmake Improve formatting of copyright notice when rendered to html Dec 13, 2010
MapImportedReleaseVariants.cmake Add a handful of new modules. Aug 4, 2015
MinGWSearchPathExtras.cmake MinGW: build a list of prefixes too. Apr 26, 2016
OptionRequires.cmake Run cmake-bulk-decrufter. Jan 10, 2012
PlatformDefinitions.cmake Add a handful of new modules. Aug 4, 2015
PrefixListGlob.cmake Improve formatting of copyright notice when rendered to html Dec 13, 2010
ProgramFilesGlob.cmake CMake >= 3.1 doesn't like the construction "$ENV{ProgramFiles(x86)}",… Feb 3, 2015
README.markdown Update readme. Feb 3, 2015
ResetConfigurations.cmake Re-enable the debug configuration Feb 18, 2011
SearchProgramFilesForOpenSceneGraph.cmake Fix program files osg search Mar 28, 2011
SetDefaultBuildType.cmake Improve formatting of copyright notice when rendered to html Dec 13, 2010
SplitLibraryList.cmake Improve formatting of copyright notice when rendered to html Dec 13, 2010
StampSourcesWithVersion.cmake Improve formatting of copyright notice when rendered to html Dec 13, 2010
StampSourcesWithVersion.sed.in Add cmake build files, fix config - it builds and links! Jun 10, 2010
TCHARWorkaround.cmake Improve formatting of copyright notice when rendered to html Dec 13, 2010
UseBackportedModules.cmake Improve formatting of copyright notice when rendered to html Dec 13, 2010
UseFolders.cmake Add a handful of new modules. Aug 4, 2015
UseMarkdown.cmake Run cmake-bulk-decrufter. Jan 10, 2012
UseTR1.cmake Improve formatting of copyright notice when rendered to html Dec 13, 2010
WarningDev.cmake Improve formatting of copyright notice when rendered to html Dec 13, 2010
export-to-directory.sh Fix directory export script Nov 1, 2010
module-help.html Set CPU_Count in GetCPUDetails Nov 29, 2014
module-help.txt Set CPU_Count in GetCPUDetails Nov 29, 2014
update-help.sh Generate text too, and rename Dec 13, 2010

README.markdown

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 (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.

Something went wrong with that request. Please try again.