Merge branch 'gerrit/release-4-5-patches' into release-4-6
[alexxy/gromacs.git] / cmake / FindVMD.cmake
1 #  This file is part of Gromacs        Copyright (c) 1991-2008
2 #  David van der Spoel, Erik Lindahl, Berk Hess, University of Groningen.
3
4 #  This program is free software; you can redistribute it and/or
5 #  modify it under the terms of the GNU General Public License
6 #  as published by the Free Software Foundation; either version 2
7 #  of the License, or (at your option) any later version.
8
9 #  To help us fund GROMACS development, we humbly ask that you cite
10 #  the research papers on the package. Check out http://www.gromacs.org
11
12 # ================================================================
13
14 # This file is adapted from FindGit.cmake from CMake 2.8.5
15 # That file is copyright and redistribution outside
16 # CMake requires the following license statement.
17
18 # ================================================================
19
20 # CMake - Cross Platform Makefile Generator
21 # Copyright 2000-2009 Kitware, Inc., Insight Software Consortium
22 # All rights reserved.
23
24 # Redistribution and use in source and binary forms, with or without
25 # modification, are permitted provided that the following conditions
26 # are met:
27
28 # * Redistributions of source code must retain the above copyright
29 #   notice, this list of conditions and the following disclaimer.
30
31 # * Redistributions in binary form must reproduce the above copyright
32 #   notice, this list of conditions and the following disclaimer in the
33 #   documentation and/or other materials provided with the distribution.
34
35 # * Neither the names of Kitware, Inc., the Insight Software Consortium,
36 #   nor the names of their contributors may be used to endorse or promote
37 #   products derived from this software without specific prior written
38 #   permission.
39
40 # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
41 # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
42 # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
43 # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
44 # HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
45 # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
46 # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
47 # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
48 # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
49 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
50 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
51
52 # ------------------------------------------------------------------------------
53
54 # The above copyright and license notice applies to distributions of
55 # CMake in source and binary form.  Some source files contain additional
56 # notices of original copyright by their contributors; see each source
57 # for details.  Third-party software packages supplied with CMake under
58 # compatible licenses provide their own copyright notices documented in
59 # corresponding subdirectories.
60
61 # ------------------------------------------------------------------------------
62
63 # CMake was initially developed by Kitware with the following sponsorship:
64
65 #  * National Library of Medicine at the National Institutes of Health
66 #    as part of the Insight Segmentation and Registration Toolkit (ITK).
67
68 #  * US National Labs (Los Alamos, Livermore, Sandia) ASC Parallel
69 #    Visualization Initiative.
70
71 #  * National Alliance for Medical Image Computing (NAMIC) is funded by the
72 #    National Institutes of Health through the NIH Roadmap for Medical Research,
73 #    Grant U54 EB005149.
74
75 #  * Kitware, Inc.
76
77 # ================================================================
78
79 # The module defines the following variables:
80 #   VMD_EXECUTABLE - path to vmd command
81 #   VMD_FOUND - true if the command was found
82 # Example usage:
83 #   find_package(VMD)
84 #   if(VMD_FOUND)
85 #     message("vmd found: ${VMD_EXECUTABLE}")
86 #   endif()
87
88 set(vmd_names vmd)
89
90 find_program(VMD_EXECUTABLE
91   NAMES ${vmd_names}
92   PATHS ENV VMDDIR
93   PATH_SUFFIXES bin # I guess this allows for OS-independence
94   DOC "VMD command"
95   )
96 mark_as_advanced(VMD_EXECUTABLE)
97
98 # Handle the QUIETLY and REQUIRED arguments and set VMD_FOUND to TRUE if
99 # all listed variables are TRUE
100
101 include(FindPackageHandleStandardArgs)
102 find_package_handle_standard_args(VMD DEFAULT_MSG VMD_EXECUTABLE)