Git Product home page Git Product logo

cmake-modules's Introduction

Ryan's CMake Modules

Ryan A. Pavlik, Ph.D.

[email protected] [email protected] 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.

cmake-modules's People

Contributors

alessandromenti avatar bnewendorp avatar casallas avatar freitass avatar gunnarbeutner avatar inolen avatar janisz avatar luis-pereira avatar meinersbur avatar nickbroon avatar noma avatar phire avatar redstar avatar rpavlik avatar studioetrange avatar tomgey avatar wmamrak avatar zzag avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.