1Ryan's CMake Modules
2====================
3
4Ryan A. Pavlik, Ph.D.
5
6<ryan.pavlik@gmail.com> <abiryan@ryand.net>
7<http://academic.cleardefinition.com>
8
9Introduction
10------------
11
12This is a collection of CMake modules that I've produced during the course
13of a variety of software development.  There are a number of find modules,
14especially for virtual reality and physical simulation packages, some utility
15modules of more general interest, and some patches or workarounds for
16CMake itself.
17
18Each module is generally documented, and depending on how busy I was
19when I created it, the documentation can be fairly complete.
20
21By now, it also includes contributions both from open-source projects I work on,
22as well as friendly strangers on the Internet contributing their modules. I am
23very grateful for improvements/fixes/pull requests!
24
25How to Integrate
26----------------
27
28These modules are probably best placed wholesale into a `cmake` subdirectory
29of your project source.
30
31If you use Git, try installing [git-subtree][1] (included by default on
32Git for Windows and perhaps for your Linux distro, especially post-1.9.1), so
33you can easily use this repository for subtree merges, updating simply.
34
35For the initial checkout:
36
37	cd projectdir
38
39	git subtree add --squash --prefix=cmake https://github.com/rpavlik/cmake-modules.git master
40
41For updates:
42
43	cd projectdir
44
45	git subtree pull --squash --prefix=cmake https://github.com/rpavlik/cmake-modules.git master
46
47If you originally installed this by just copying the files, you'll sadly have
48to delete the directory, commit that, then do the `git subtree add`. Annoying,
49but I don't know a workaround.
50
51If you use some other version control, you can export a copy of this directory
52without the git metadata by calling:
53
54    ./export-to-directory.sh yourprojectdir/cmake
55
56You might also consider exporting to a temp directory and merging changes, since
57this will not overwrite by default.  You can pass -f to overwrite existing files.
58
59How to Use
60----------
61
62At the minimum, all you have to do is add a line like this near the top
63of your root CMakeLists.txt file (but not before your `project()` call):
64
65	list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
66
67You might also want the extra automatic features/fixes included with the
68modules, for that, just add another line following the first one:
69
70	include(UseBackportedModules)
71
72Look at `module-help.html`/`.txt` (generated by `update-help.sh` on a unix-like shell with a pre-3.0 version of CMake.)
73either in this directory or online at <http://github.com/rpavlik/cmake-modules/blob/master/module-help.txt>
74for more information on individual modules. Since it requires an older CMake for generation,
75the docs might get out of date, sorry - but you can always look at the files themselves.
76
77
78Licenses
79--------
80
81The modules that I wrote myself are all subject to this license:
82
83> Copyright Iowa State University 2009-2014,
84> or Copyright Sensics, Inc. 2014-2015,
85> or Copyright Ryan A. Pavlik 2009-2015
86>
87> Distributed under the Boost Software License, Version 1.0.
88>
89> (See accompanying file `LICENSE_1_0.txt` or copy at
90> <http://www.boost.org/LICENSE_1_0.txt>)
91
92Modules based on those included with CMake are under the OSI-approved
93BSD license, which is included in each of those modules.  A few other modules
94are modified from other sources - when in doubt, look at the `.cmake`.
95
96If you'd like to contribute, that would be great! Just make sure to include
97the license boilerplate in your module, and send a pull request.
98
99Important License Note!
100-----------------------
101
102If you find this file inside of another project, rather at the top-level
103directory, you're in a separate project that is making use of these modules.
104That separate project can (and probably does) have its own license specifics.
105
106
107[1]: http://github.com/apenwarr/git-subtree  "Git Subtree master"
108