1cmakemodules(1)             General Commands Manual            cmakemodules(1)
2
3
4

NAME

6       cmakemodules - Reference of available CMake modules.
7
8

DESCRIPTION

10       The  "cmake" executable is the CMake command-line interface.  It may be
11       used to configure projects in scripts.  Project configuration  settings
12       may be specified on the command line with the -D option.  The -i option
13       will cause cmake to interactively prompt for such settings.
14
15
16       CMake is a cross-platform build  system  generator.   Projects  specify
17       their  build process with platform-independent CMake listfiles included
18       in each directory of a source tree with the name CMakeLists.txt.  Users
19       build  a project by using CMake to generate a build system for a native
20       tool on their platform.
21
22

MODULES

24       The following modules are provided with CMake. They can  be  used  with
25       INCLUDE(ModuleName).
26
27
28         CMake Modules - Modules coming with CMake, the Cross-Platform Makefile Generator.
29
30
31       This  is  the  documentation  for  the  modules and scripts coming with
32       CMake. Using these modules  you  can  check  the  computer  system  for
33       installed software packages, features of the compiler and the existance
34       of headers to name just a few.
35
36
37       AddFileDependencies
38              ADD_FILE_DEPENDENCIES(source_file depend_files...)
39
40              Adds the given files as dependencies to source_file
41
42
43
44       BundleUtilities
45              Functions to help assemble a standalone bundle application.
46
47              A collection of CMake utility functions useful for dealing  with
48              .app bundles on the Mac and bundle-like directories on any OS.
49
50
51              The following functions are provided by this module:
52
53
54                 fixup_bundle
55                 copy_and_fixup_bundle
56                 verify_app
57                 get_bundle_main_executable
58                 get_dotapp_dir
59                 get_bundle_and_executable
60                 get_bundle_all_executables
61                 get_item_key
62                 clear_bundle_keys
63                 set_bundle_key_values
64                 get_bundle_keys
65                 copy_resolved_item_into_bundle
66                 copy_resolved_framework_into_bundle
67                 fixup_bundle_item
68                 verify_bundle_prerequisites
69                 verify_bundle_symlinks
70
71              Requires  CMake  2.6  or greater because it uses function, break
72              and PARENT_SCOPE. Also depends on GetPrerequisites.cmake.
73
74
75                FIXUP_BUNDLE(<app> <libs> <dirs>)
76
77              Fix up a bundle in-place and make it standalone,  such  that  it
78              can  be  drag-n-drop  copied  to another machine and run on that
79              machine as long as all of the system libraries are compatible.
80
81
82              If you pass plugins to fixup_bundle as the libs  parameter,  you
83              should  install them or copy them into the bundle before calling
84              fixup_bundle. The "libs" parameter is a list of  libraries  that
85              must  be fixed up, but that cannot be determined by otool output
86              analysis. (i.e., plugins)
87
88
89              Gather all the keys for all the executables and libraries  in  a
90              bundle,  and then, for each key, copy each prerequisite into the
91              bundle. Then fix each one up according to its own list  of  pre‐
92              requisites.
93
94
95              Then  clear all the keys and call verify_app on the final bundle
96              to ensure that it is truly standalone.
97
98
99                COPY_AND_FIXUP_BUNDLE(<src> <dst> <libs> <dirs>)
100
101              Makes a copy of the bundle <src>  at  location  <dst>  and  then
102              fixes up the new copied bundle in-place at <dst>...
103
104
105                VERIFY_APP(<app>)
106
107              Verifies  that  an application <app> appears valid based on run‐
108              ning analysis tools on it. Calls  "message(FATAL_ERROR"  if  the
109              application is not verified.
110
111
112                GET_BUNDLE_MAIN_EXECUTABLE(<bundle> <result_var>)
113
114              The  result will be the full path name of the bundle's main exe‐
115              cutable file or an "error:" prefixed string if it could  not  be
116              determined.
117
118
119                GET_DOTAPP_DIR(<exe> <dotapp_dir_var>)
120
121              Returns the nearest parent dir whose name ends with ".app" given
122              the full path to an executable. If there is no such parent  dir,
123              then  return  a  dir  at the same level as the executable, named
124              with the executable's base name and ending with ".app"
125
126
127              The returned directory may or may not exist.
128
129
130                GET_BUNDLE_AND_EXECUTABLE(<app> <bundle_var> <executable_var> <valid_var>)
131
132              Takes either a ".app" directory name or  the  name  of  an  exe‐
133              cutable nested inside a ".app" directory and returns the path to
134              the ".app" directory in <bundle_var> and the path  to  its  main
135              executable in <executable_var>
136
137
138                GET_BUNDLE_ALL_EXECUTABLES(<bundle> <exes_var>)
139
140              Scans  the given bundle recursively for all executable files and
141              accumulates them into a variable.
142
143
144                GET_ITEM_KEY(<item> <key_var>)
145
146              Given a file (item) name, generate a key that should  be  unique
147              considering  the set of libraries that need copying or fixing up
148              to make a bundle standalone. This is essentially the  file  name
149              including extension with "." replaced by "_"
150
151
152              This  key is used as a prefix for CMake variables so that we can
153              associate a set of variables with a given item based on its key.
154
155
156                CLEAR_BUNDLE_KEYS(<keys_var>)
157
158              Loop over the list of keys, clearing all the  variables  associ‐
159              ated  with  each  key.  After  the  loop, clear the list of keys
160              itself.
161
162
163              Caller of get_bundle_keys  should  call  clear_bundle_keys  when
164              done with list of keys.
165
166
167                SET_BUNDLE_KEY_VALUES(<keys_var> <context> <item> <exepath> <dirs>
168                                      <copyflag>)
169
170              Add  a  key  to  the  list (if necessary) for the given item. If
171              added, also set all the variables associated with that key.
172
173
174                GET_BUNDLE_KEYS(<app> <libs> <dirs> <keys_var>)
175
176              Loop over all the executable and library files within the bundle
177              (and given as extra <libs>) and accumulate a list of keys repre‐
178              senting them. Set values associated with each key such  that  we
179              can  loop  over  all of them and copy prerequisite libs into the
180              bundle and then do appropriate install_name_tool fixups.
181
182
183                COPY_RESOLVED_ITEM_INTO_BUNDLE(<resolved_item> <resolved_embedded_item>)
184
185              Copy a resolved item into the bundle if necessary. Copy  is  not
186              necessary   if   the   resolved_item   is   "the  same  as"  the
187              resolved_embedded_item.
188
189
190                COPY_RESOLVED_FRAMEWORK_INTO_BUNDLE(<resolved_item> <resolved_embedded_item>)
191
192              Copy a resolved framework into the bundle if necessary. Copy  is
193              not  necessary  if  the  resolved_item  is  "the  same  as"  the
194              resolved_embedded_item.
195
196
197              By default, BU_COPY_FULL_FRAMEWORK_CONTENTS is not set.  If  you
198              want   full   frameworks   embedded   in   your   bundles,   set
199              BU_COPY_FULL_FRAMEWORK_CONTENTS to ON before calling  fixup_bun‐
200              dle.  By default, COPY_RESOLVED_FRAMEWORK_INTO_BUNDLE copies the
201              framework dylib itself plus the framework Resources directory.
202
203
204                FIXUP_BUNDLE_ITEM(<resolved_embedded_item> <exepath> <dirs>)
205
206              Get the direct/non-system prerequisites of the resolved embedded
207              item.  For each prerequisite, change the way it is referenced to
208              the value of the _EMBEDDED_ITEM keyed variable for that  prereq‐
209              uisite.  (Most  likely  changing  to an "@executable_path" style
210              reference.)
211
212
213              This  function  requires  that  the  resolved_embedded_item   be
214              "inside" the bundle already. In other words, if you pass plugins
215              to fixup_bundle as the libs parameter, you should  install  them
216              or  copy  them  into the bundle before calling fixup_bundle. The
217              "libs" parameter is a list of libraries that must be  fixed  up,
218              but  that  cannot be determined by otool output analysis. (i.e.,
219              plugins)
220
221
222              Also, change the id of the  item  being  fixed  up  to  its  own
223              _EMBEDDED_ITEM value.
224
225
226              Accumulate  changes  in  a local variable and make *one* call to
227              install_name_tool at the  end  of  the  function  with  all  the
228              changes at once.
229
230
231              If  the  BU_CHMOD_BUNDLE_ITEMS variable is set then bundle items
232              will be marked writable before install_name_tool tries to change
233              them.
234
235
236                VERIFY_BUNDLE_PREREQUISITES(<bundle> <result_var> <info_var>)
237
238              Verifies  that  the sum of all prerequisites of all files inside
239              the bundle are contained  within  the  bundle  or  are  "system"
240              libraries, presumed to exist everywhere.
241
242
243                VERIFY_BUNDLE_SYMLINKS(<bundle> <result_var> <info_var>)
244
245              Verifies  that  any  symlinks found in the bundle point to other
246              files that are already  also  in  the  bundle...  Anything  that
247              points to an external file causes this function to fail the ver‐
248              ification.
249
250
251       CMakeBackwardCompatibilityCXX
252              define a bunch of backwards compatibility variables
253
254                CMAKE_ANSI_CXXFLAGS - flag for ansi c++
255                CMAKE_HAS_ANSI_STRING_STREAM - has <strstream>
256                INCLUDE(TestForANSIStreamHeaders)
257                INCLUDE(CheckIncludeFileCXX)
258                INCLUDE(TestForSTDNamespace)
259                INCLUDE(TestForANSIForScope)
260
261
262       CMakeDependentOption
263              Macro to provide an option dependent on other options.
264
265              This macro presents an option to the user only if a set of other
266              conditions are true.  When the option is not presented a default
267              value is used, but any value set by the user  is  preserved  for
268              when the option is presented again. Example invocation:
269
270
271                CMAKE_DEPENDENT_OPTION(USE_FOO "Use Foo" ON
272                                       "USE_BAR;NOT USE_ZOT" OFF)
273
274              If USE_BAR is true and USE_ZOT is false, this provides an option
275              called USE_FOO that defaults to ON.  Otherwise, it sets  USE_FOO
276              to  OFF.   If the status of USE_BAR or USE_ZOT ever changes, any
277              value for the USE_FOO option is saved so that when the option is
278              re-enabled it retains its old value.
279
280
281       CMakeDetermineVSServicePack
282              Includes  a  public  function  for  assisting users in trying to
283              determine the
284
285              Visual Studio service pack in use.
286
287
288              Sets the passed in variable to one of the following values or an
289              empty string if unknown.
290
291
292                  vc80
293                  vc80sp1
294                  vc90
295                  vc90sp1
296
297
298
299
300              Usage: ===========================
301
302
303                  if(MSVC)
304                     include(CMakeDetermineVSServicePack)
305                     DetermineVSServicePack( my_service_pack )
306
307
308
309
310                     if( my_service_pack )
311                         message(STATUS "Detected: ${my_service_pack}")
312                     endif()
313                  endif()
314
315
316
317
318              ===========================
319
320
321       CMakeFindFrameworks
322              helper module to find OSX frameworks
323
324
325       CMakeForceCompiler
326
327
328              This  module  defines macros intended for use by cross-compiling
329              toolchain files when CMake is not able to  automatically  detect
330              the compiler identification.
331
332
333              Macro CMAKE_FORCE_C_COMPILER has the following signature:
334
335
336                 CMAKE_FORCE_C_COMPILER(<compiler> <compiler-id>)
337
338              It  sets  CMAKE_C_COMPILER  to  the given compiler and the cmake
339              internal variable CMAKE_C_COMPILER_ID to the given  compiler-id.
340              It  also  bypasses the check for working compiler and basic com‐
341              piler information tests.
342
343
344              Macro CMAKE_FORCE_CXX_COMPILER has the following signature:
345
346
347                 CMAKE_FORCE_CXX_COMPILER(<compiler> <compiler-id>)
348
349              It sets CMAKE_CXX_COMPILER to the given compiler and  the  cmake
350              internal   variable  CMAKE_CXX_COMPILER_ID  to  the  given  com‐
351              piler-id. It also bypasses the check for  working  compiler  and
352              basic compiler information tests.
353
354
355              Macro CMAKE_FORCE_Fortran_COMPILER has the following signature:
356
357
358                 CMAKE_FORCE_Fortran_COMPILER(<compiler> <compiler-id>)
359
360              It  sets  CMAKE_Fortran_COMPILER  to  the given compiler and the
361              cmake internal variable CMAKE_Fortran_COMPILER_ID to  the  given
362              compiler-id. It also bypasses the check for working compiler and
363              basic compiler information tests.
364
365
366              So a simple toolchain file could look like this:
367
368
369                 INCLUDE (CMakeForceCompiler)
370                 SET(CMAKE_SYSTEM_NAME Generic)
371                 CMAKE_FORCE_C_COMPILER   (chc12 MetrowerksHicross)
372                 CMAKE_FORCE_CXX_COMPILER (chc12 MetrowerksHicross)
373
374
375       CMakeParseArguments
376
377
378              CMAKE_PARSE_ARGUMENTS(<prefix>  <options>   <one_value_keywords>
379              <multi_value_keywords> args...)
380
381
382              CMAKE_PARSE_ARGUMENTS()  is  intended  to  be  used in macros or
383              functions for parsing the arguments given to that macro or func‐
384              tion.  It processes the arguments and defines a set of variables
385              which hold the values of the respective options.
386
387
388              The <options> argument contains all options for  the  respective
389              macro,  i.e.  keywords  which can be used when calling the macro
390              without any value following, like e.g. the OPTIONAL  keyword  of
391              the install() command.
392
393
394              The <one_value_keywords> argument contains all keywords for this
395              macro which are followed by one  value,  like  e.g.  DESTINATION
396              keyword of the install() command.
397
398
399              The  <multi_value_keywords>  argument  contains all keywords for
400              this macro which can be followed by more than  one  value,  like
401              e.g. the TARGETS or FILES keywords of the install() command.
402
403
404              When done, CMAKE_PARSE_ARGUMENTS() will have defined for each of
405              the  keywords  listed  in  <options>,  <one_value_keywords>  and
406              <multi_value_keywords> a variable composed of the given <prefix>
407              followed by "_" and the name of the  respective  keyword.  These
408              variables  will then hold the respective value from the argument
409              list. For the <options> keywords this will be TRUE or FALSE.
410
411
412              All remaining  arguments  are  collected  in  a  variable  <pre‐
413              fix>_UNPARSED_ARGUMENTS,  this  can be checked afterwards to see
414              whether your macro was called with unrecognized parameters.
415
416
417              As an example here a my_install()  macro,  which  takes  similar
418              arguments as the real install() command:
419
420
421                 function(MY_INSTALL)
422                   set(options OPTIONAL FAST)
423                   set(oneValueArgs DESTINATION RENAME)
424                   set(multiValueArgs TARGETS CONFIGURATIONS)
425                   cmake_parse_arguments(MY_INSTALL "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN} )
426                   ...
427
428
429
430
431              Assume my_install() has been called like this:
432
433
434                 my_install(TARGETS foo bar DESTINATION bin OPTIONAL blub)
435
436
437
438
439              After  the  cmake_parse_arguments() call the macro will have set
440              the following variables:
441
442
443                 MY_INSTALL_OPTIONAL = TRUE
444                 MY_INSTALL_FAST = FALSE (this option was not used when calling my_install()
445                 MY_INSTALL_DESTINATION = "bin"
446                 MY_INSTALL_RENAME = "" (was not used)
447                 MY_INSTALL_TARGETS = "foo;bar"
448                 MY_INSTALL_CONFIGURATIONS = "" (was not used)
449                 MY_INSTALL_UNPARSED_ARGUMENTS = "blub" (no value expected after "OPTIONAL"
450
451
452
453
454              You can the continue and process these variables.
455
456
457              Keywords terminate lists of values, e.g.  if  directly  after  a
458              one_value_keyword  another  recognized  keyword follows, this is
459              interpreted  as  the  beginning  of   the   new   option.   E.g.
460              my_install(TARGETS  foo  DESTINATION  OPTIONAL)  would result in
461              MY_INSTALL_DESTINATION set to "OPTIONAL", but  MY_INSTALL_DESTI‐
462              NATION  would  be  empty and MY_INSTALL_OPTIONAL would be set to
463              TRUE therefor.
464
465
466       CMakePrintSystemInformation
467              print system information
468
469              This file can be used for diagnostic purposes just include it in
470              a project to see various internal CMake variables.
471
472
473       CMakeVerifyManifest
474
475
476              CMakeVerifyManifest.cmake
477
478
479              This script is used to verify that embeded manifests and side by
480              side manifests for a project match.  To run this script, cd to a
481              directory  and run the script with cmake -P. On the command line
482              you can pass in versions that are OK even if not  found  in  the
483              .manifest    files.    For    example,     cmake    -Dallow_ver‐
484              sions=8.0.50608.0 -PCmakeVerifyManifest.cmake could be  used  to
485              allow an embeded manifest of 8.0.50608.0 to be used in a project
486              even if that version was not found in the .manifest file.
487
488
489       CPack  foreach generator, it then
490
491
492
493
494              The CPack module generates binary and  source  installers  in  a
495              variety  of  formats  using  the cpack program. Inclusion of the
496              CPack module adds two new targets to  the  resulting  makefiles,
497              package  and  package_source,  which build the binary and source
498              installers, respectively. The generated binary  installers  con‐
499              tain  everything  installed via CMake's INSTALL command (and the
500              deprecated INSTALL_FILES, INSTALL_PROGRAMS, and  INSTALL_TARGETS
501              commands).
502
503
504              For  certain kinds of binary installers (including the graphical
505              installers on Mac OS X and Windows), CPack generates  installers
506              that  allow users to select individual application components to
507              install. The contents of each of the components  are  identified
508              by the COMPONENT argument of CMake's INSTALL command. These com‐
509              ponents can be annotated with user-friendly names  and  descrip‐
510              tions,  inter-component dependencies, etc., and grouped in vari‐
511              ous  ways  to  customize  the  resulting  installer.   See   the
512              cpack_add_*  commands,  described  below,  for  more information
513              about component-specific installations.
514
515
516              The CPACK_GENERATOR variable has different meanings in different
517              contexts.  In  your  CMakeLists.txt  file,  CPACK_GENERATOR is a
518              *list of generators*: when run with no  other  arguments,  CPack
519              will  iterate  over  that  list and produce one package for each
520              generator. In a CPACK_PROJECT_CONFIG_FILE, though, CPACK_GENERA‐
521              TOR  is  a  *string  naming  a  single  generator*.  If you need
522              per-cpack- generator logic to control  *other*  cpack  settings,
523              then you need a CPACK_PROJECT_CONFIG_FILE.
524
525
526              The  CMake  source  tree  itself  contains  a CPACK_PROJECT_CON‐
527              FIG_FILE. See the top level file CMakeCPackOptions.cmake.in  for
528              an example.
529
530
531              If  set, the CPACK_PROJECT_CONFIG_FILE is included automatically
532              on a per-generator basis. It only need contain overrides.
533
534
535              Here's how it works:
536
537
538                   CPACK_GENERATOR list variable (unless told to use just a
539                   specific one via -G on the command line...)
540
541
542
543
544                 - sets CPACK_GENERATOR to the one currently being iterated
545                 - includes the CPACK_PROJECT_CONFIG_FILE
546                 - produces the package for that generator
547
548
549
550
551              This is the key: For each generator listed in CPACK_GENERATOR in
552              CPackConfig.cmake, cpack will *reset* CPACK_GENERATOR internally
553              to  *the  one  currently  being  used*  and  then  include   the
554              CPACK_PROJECT_CONFIG_FILE.
555
556
557              Before  including this CPack module in your CMakeLists.txt file,
558              there are a variety of variables that can be  set  to  customize
559              the resulting installers. The most commonly-used variables are:
560
561
562                 CPACK_PACKAGE_NAME - The name of the package (or application). If
563                 not specified, defaults to the project name.
564
565
566
567
568                 CPACK_PACKAGE_VENDOR - The name of the package vendor (e.g.,
569                 "Kitware").
570
571
572
573
574                 CPACK_PACKAGE_VERSION_MAJOR - Package major Version
575
576
577
578
579                 CPACK_PACKAGE_VERSION_MINOR - Package minor Version
580
581
582
583
584                 CPACK_PACKAGE_VERSION_PATCH - Package patch Version
585
586
587
588
589                 CPACK_PACKAGE_DESCRIPTION_FILE - A text file used to describe the
590                 project. Used, for example, the introduction screen of a
591                 CPack-generated Windows installer to describe the project.
592
593
594
595
596                 CPACK_PACKAGE_DESCRIPTION_SUMMARY - Short description of the
597                 project (only a few words).
598
599
600
601
602                 CPACK_PACKAGE_FILE_NAME - The name of the package file to generate,
603                 not including the extension. For example, cmake-2.6.1-Linux-i686.
604
605
606
607
608                 CPACK_PACKAGE_INSTALL_DIRECTORY - Installation directory on the
609                 target system, e.g., "CMake 2.5".
610
611
612
613
614                 CPACK_PROJECT_CONFIG_FILE - File included at cpack time, once per
615                 generator after setting CPACK_GENERATOR to the actual generator
616                 being used. Allows per-generator setting of CPACK_* variables at
617                 cpack time.
618
619
620
621
622                 CPACK_RESOURCE_FILE_LICENSE - License file for the project, which
623                 will typically be displayed to the user (often with an explicit
624                 "Accept" button, for graphical installers) prior to installation.
625
626
627
628
629                 CPACK_RESOURCE_FILE_README - ReadMe file for the project, which
630                 typically describes in some detail
631
632
633
634
635                 CPACK_RESOURCE_FILE_WELCOME - Welcome file for the project, which
636                 welcomes users to this installer. Typically used in the graphical
637                 installers on Windows and Mac OS X.
638
639
640
641
642                 CPACK_MONOLITHIC_INSTALL - Disables the component-based
643                 installation mechanism, so that all components are always installed.
644
645
646
647
648                 CPACK_GENERATOR - List of CPack generators to use. If not
649                 specified, CPack will create a set of options (e.g.,
650                 CPACK_BINARY_NSIS) allowing the user to enable/disable individual
651                 generators.
652
653
654
655
656                 CPACK_OUTPUT_CONFIG_FILE - The name of the CPack configuration file
657                 for binary installers that will be generated by the CPack
658                 module. Defaults to CPackConfig.cmake.
659
660
661
662
663                 CPACK_PACKAGE_EXECUTABLES - Lists each of the executables along
664                 with a text label, to be used to create Start Menu shortcuts on
665                 Windows. For example, setting this to the list ccmake;CMake will
666                 create a shortcut named "CMake" that will execute the installed
667                 executable ccmake.
668
669
670
671
672                 CPACK_STRIP_FILES - List of files to be stripped. Starting with
673                 CMake 2.6.0 CPACK_STRIP_FILES will be a boolean variable which
674                 enables stripping of all files (a list of files evaluates to TRUE
675                 in CMake, so this change is compatible).
676
677
678
679
680              The  following  CPack variables are specific to source packages,
681              and  will not affect binary packages:
682
683
684                 CPACK_SOURCE_PACKAGE_FILE_NAME - The name of the source package,
685                 e.g., cmake-2.6.1
686
687
688
689
690                 CPACK_SOURCE_STRIP_FILES - List of files in the source tree that
691                 will be stripped. Starting with CMake 2.6.0
692                 CPACK_SOURCE_STRIP_FILES will be a boolean variable which enables
693                 stripping of all files (a list of files evaluates to TRUE in CMake,
694                 so this change is compatible).
695
696
697
698
699                 CPACK_SOURCE_GENERATOR - List of generators used for the source
700                 packages. As with CPACK_GENERATOR, if this is not specified then
701                 CPack will create a set of options (e.g., CPACK_SOURCE_ZIP)
702                 allowing users to select which packages will be generated.
703
704
705
706
707                 CPACK_SOURCE_OUTPUT_CONFIG_FILE - The name of the CPack
708                 configuration file for source installers that will be generated by
709                 the CPack module. Defaults to CPackSourceConfig.cmake.
710
711
712
713
714                 CPACK_SOURCE_IGNORE_FILES - Pattern of files in the source tree
715                 that won't be packaged when building a source package. This is a
716                 list of patterns, e.g., /CVS/;/\\.svn/;\\.swp$;\\.#;/#;.*~;cscope.*
717
718
719
720
721              The following variables are specific to the DragNDrop installers
722              built on Mac OS X:
723
724
725                 CPACK_DMG_VOLUME_NAME - The volume name of the generated disk
726                 image. Defaults to CPACK_PACKAGE_FILE_NAME.
727
728
729
730
731                 CPACK_DMG_FORMAT - The disk image format. Common values are UDRO
732                 (UDIF read-only), UDZO (UDIF zlib-compressed) or UDBZ (UDIF
733                 bzip2-compressed). Refer to hdiutil(1) for more information on
734                 other available formats.
735
736
737
738
739                 CPACK_DMG_DS_STORE - Path to a custom .DS_Store file which e.g.
740                 can be used to specify the Finder window position/geometry and
741                 layout (such as hidden toolbars, placement of the icons etc.).
742                 This file has to be generated by the Finder (either manually or
743                 through OSA-script) using a normal folder from which the .DS_Store
744                 file can then be extracted.
745
746
747
748
749                 CPACK_DMG_BACKGROUND_IMAGE - Path to an image file which is to be
750                 used as the background for the Finder Window when the disk image
751                 is opened.  By default no background image is set. The background
752                 image is applied after applying the custom .DS_Store file.
753
754
755
756
757                 CPACK_COMMAND_HDIUTIL - Path to the hdiutil(1) command used to
758                 operate on disk image files on Mac OS X. This variable can be used
759                 to override the automatically detected command (or specify its
760                 location if the auto-detection fails to find it.)
761
762
763
764
765                 CPACK_COMMAND_SETFILE - Path to the SetFile(1) command used to set
766                 extended attributes on files and directories on Mac OS X. This
767                 variable can be used to override the automatically detected
768                 command (or specify its location if the auto-detection fails to
769                 find it.)
770
771
772
773
774                 CPACK_COMMAND_REZ - Path to the Rez(1) command used to compile
775                 resources on Mac OS X. This variable can be used to override the
776                 automatically detected command (or specify its location if the
777                 auto-detection fails to find it.)
778
779
780
781
782              Installers  built on Mac OS X using the Bundle generator use the
783              aforementioned DragNDrop  variables,  plus  the  following  Bun‐
784              dle-specific parameters:
785
786
787                 CPACK_BUNDLE_NAME - The name of the generated bundle.  This
788                 appears in the OSX finder as the bundle name.  Required.
789
790
791
792
793                 CPACK_BUNDLE_PLIST - Path to an OSX plist file that will be used
794                 as the Info.plist for the generated bundle.  This assumes that
795                 the caller has generated or specified their own Info.plist file.
796                 Required.
797
798
799
800
801                 CPACK_BUNDLE_ICON - Path to an OSX icns file that will be used as
802                 the icon for the generated bundle.  This is the icon that appears
803                 in the OSX finder for the bundle, and in the OSX dock when the
804                 bundle is opened.  Required.
805
806
807
808
809                 CPACK_BUNDLE_STARTUP_SCRIPT - Path to an executable or script that
810                 will be run whenever an end-user double-clicks the generated bundle
811                 in the OSX Finder.  Optional.
812
813
814
815
816              The following variables are specific to the graphical installers
817              built on Windows using the Nullsoft Installation System.
818
819
820                 CPACK_PACKAGE_INSTALL_REGISTRY_KEY - Registry key used when
821                 installing this project.
822
823
824
825
826                 CPACK_NSIS_INSTALL_ROOT - The default installation directory presented
827                 to the end user by the NSIS installer is under this root dir. The full
828                 directory presented to the end user is:
829                 ${CPACK_NSIS_INSTALL_ROOT}/${CPACK_PACKAGE_INSTALL_DIRECTORY}
830
831
832
833
834                 CPACK_NSIS_MUI_ICON - The icon file (.ico) for the generated
835                 install program.
836
837
838
839
840                 CPACK_NSIS_MUI_UNIICON - The icon file (.ico) for the generated
841                 uninstall program.
842
843
844
845
846                 CPACK_PACKAGE_ICON - A branding image that will be displayed inside
847                 the installer.
848
849
850
851
852                 CPACK_NSIS_EXTRA_INSTALL_COMMANDS - Extra NSIS commands that will
853                 be added to the install Section.
854
855
856
857
858                 CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS - Extra NSIS commands that will
859                 be added to the uninstall Section.
860
861
862
863
864                 CPACK_NSIS_COMPRESSOR - The arguments that will be passed to the
865                 NSIS SetCompressor command.
866
867
868
869
870                 CPACK_NSIS_MODIFY_PATH - If this is set to "ON", then an extra page
871                 will appear in the installer that will allow the user to choose
872                 whether the program directory should be added to the system PATH
873                 variable.
874
875
876
877
878                 CPACK_NSIS_DISPLAY_NAME - The display name string that appears in
879                 the Windows Add/Remove Program control panel
880
881
882
883
884                 CPACK_NSIS_PACKAGE_NAME - The title displayed at the top of the
885                 installer.
886
887
888
889
890                 CPACK_NSIS_INSTALLED_ICON_NAME - A path to the executable that
891                 contains the installer icon.
892
893
894
895
896                 CPACK_NSIS_HELP_LINK - URL to a web site providing assistance in
897                 installing your application.
898
899
900
901
902                 CPACK_NSIS_URL_INFO_ABOUT - URL to a web site providing more
903                 information about your application.
904
905
906
907
908                 CPACK_NSIS_CONTACT - Contact information for questions and comments
909                 about the installation process.
910
911
912
913
914                 CPACK_NSIS_CREATE_ICONS_EXTRA - Additional NSIS commands for
915                 creating start menu shortcuts.
916
917
918
919
920                 CPACK_NSIS_DELETE_ICONS_EXTRA -Additional NSIS commands to
921                 uninstall start menu shortcuts.
922
923
924
925
926                 CPACK_NSIS_EXECUTABLES_DIRECTORY - Creating NSIS start menu links
927                 assumes that they are in 'bin' unless this variable is set.
928                 For example, you would set this to 'exec' if your executables are
929                 in an exec directory.
930
931
932
933
934                 CPACK_NSIS_MUI_FINISHPAGE_RUN - Specify an executable to add an option
935                 to run on the finish page of the NSIS installer.
936
937
938
939
940              The following variable is specific to installers build on Mac OS
941              X using PackageMaker:
942
943
944                 CPACK_OSX_PACKAGE_VERSION - The version of Mac OS X that the
945                 resulting PackageMaker archive should be compatible
946                 with. Different versions of Mac OS X support different
947                 features. For example, CPack can only build component-based
948                 installers for Mac OS X 10.4 or newer, and can only build
949                 installers that download component son-the-fly for Mac OS X 10.5
950                 or newer. If left blank, this value will be set to the minimum
951                 version of Mac OS X that supports the requested features. Set this
952                 variable to some value (e.g., 10.4) only if you want to guarantee
953                 that your installer will work on that version of Mac OS X, and
954                 don't mind missing extra features available in the installer
955                 shipping with later versions of Mac OS X.
956
957
958
959
960              The following variables are for advanced uses of CPack:
961
962
963                 CPACK_CMAKE_GENERATOR - What CMake generator should be used if the
964                 project is CMake project. Defaults to the value of CMAKE_GENERATOR;
965                 few users will want to change this setting.
966
967
968
969
970                 CPACK_INSTALL_CMAKE_PROJECTS - List of four values that specify
971                 what project to install. The four values are: Build directory,
972                 Project Name, Project Component, Directory. If omitted, CPack will
973                 build an installer that installers everything.
974
975
976
977
978                 CPACK_SYSTEM_NAME - System name, defaults to the value of
979                 ${CMAKE_SYSTEM_NAME}.
980
981
982
983
984                 CPACK_PACKAGE_VERSION - Package full version, used internally. By
985                 default, this is built from CPACK_PACKAGE_VERSION_MAJOR,
986                 CPACK_PACKAGE_VERSION_MINOR, and CPACK_PACKAGE_VERSION_PATCH.
987
988
989
990
991                 CPACK_TOPLEVEL_TAG - Directory for the installed files.
992
993
994
995
996                 CPACK_INSTALL_COMMANDS - Extra commands to install components.
997
998
999
1000
1001                 CPACK_INSTALL_DIRECTORIES - Extra directories to install.
1002
1003
1004
1005
1006              Component-specific  installation allows users to select specific
1007              sets of  components  to  install  during  the  install  process.
1008              Installation components are identified by the COMPONENT argument
1009              of CMake's INSTALL commands, and should be further described  by
1010              the following CPack commands:
1011
1012
1013                 cpack_add_component - Describes a CPack installation component
1014                 named by the COMPONENT argument to a CMake INSTALL command.
1015
1016
1017
1018
1019                   cpack_add_component(compname
1020                                       [DISPLAY_NAME name]
1021                                       [DESCRIPTION description]
1022                                       [HIDDEN | REQUIRED | DISABLED ]
1023                                       [GROUP group]
1024                                       [DEPENDS comp1 comp2 ... ]
1025                                       [INSTALL_TYPES type1 type2 ... ]
1026                                       [DOWNLOADED]
1027                                       [ARCHIVE_FILE filename])
1028
1029
1030
1031
1032                 The cmake_add_component command describes an installation
1033                 component, which the user can opt to install or remove as part of
1034                 the graphical installation process. compname is the name of the
1035                 component, as provided to the COMPONENT argument of one or more
1036                 CMake INSTALL commands.
1037
1038
1039
1040
1041                 DISPLAY_NAME is the displayed name of the component, used in
1042                 graphical installers to display the component name. This value can
1043                 be any string.
1044
1045
1046
1047
1048                 DESCRIPTION is an extended description of the component, used in
1049                 graphical installers to give the user additional information about
1050                 the component. Descriptions can span multiple lines using "\n" as
1051                 the line separator. Typically, these descriptions should be no
1052                 more than a few lines long.
1053
1054
1055
1056
1057                 HIDDEN indicates that this component will be hidden in the
1058                 graphical installer, so that the user cannot directly change
1059                 whether it is installed or not.
1060
1061
1062
1063
1064                 REQUIRED indicates that this component is required, and therefore
1065                 will always be installed. It will be visible in the graphical
1066                 installer, but it cannot be unselected. (Typically, required
1067                 components are shown greyed out).
1068
1069
1070
1071
1072                 DISABLED indicates that this component should be disabled
1073                 (unselected) by default. The user is free to select this component
1074                 for installation, unless it is also HIDDEN.
1075
1076
1077
1078
1079                 DEPENDS lists the components on which this component depends. If
1080                 this component is selected, then each of the components listed
1081                 must also be selected. The dependency information is encoded
1082                 within the installer itself, so that users cannot install
1083                 inconsitent sets of components.
1084
1085
1086
1087
1088                 GROUP names the component group of which this component is a
1089                 part. If not provided, the component will be a standalone
1090                 component, not part of any component group. Component groups are
1091                 described with the cpack_add_component_group command, detailed
1092                 below.
1093
1094
1095
1096
1097                 INSTALL_TYPES lists the installation types of which this component
1098                 is a part. When one of these installations types is selected, this
1099                 component will automatically be selected. Installation types are
1100                 described with the cpack_add_install_type command, detailed below.
1101
1102
1103
1104
1105                 DOWNLOADED indicates that this component should be downloaded
1106                 on-the-fly by the installer, rather than packaged in with the
1107                 installer itself. For more information, see the cpack_configure_downloads
1108                 command.
1109
1110
1111
1112
1113                 ARCHIVE_FILE provides a name for the archive file created by CPack
1114                 to be used for downloaded components. If not supplied, CPack will
1115                 create a file with some name based on CPACK_PACKAGE_FILE_NAME and
1116                 the name of the component. See cpack_configure_downloads for more
1117                 information.
1118
1119
1120
1121
1122                 cpack_add_component_group - Describes a group of related CPack
1123                 installation components.
1124
1125
1126
1127
1128                   cpack_add_component_group(groupname
1129                                            [DISPLAY_NAME name]
1130                                            [DESCRIPTION description]
1131                                            [PARENT_GROUP parent]
1132                                            [EXPANDED]
1133                                            [BOLD_TITLE])
1134
1135
1136
1137
1138                 The cpack_add_component_group describes a group of installation
1139                 components, which will be placed together within the listing of
1140                 options. Typically, component groups allow the user to
1141                 select/deselect all of the components within a single group via a
1142                 single group-level option. Use component groups to reduce the
1143                 complexity of installers with many options. groupname is an
1144                 arbitrary name used to identify the group in the GROUP argument of
1145                 the cpack_add_component command, which is used to place a
1146                 component in a group. The name of the group must not conflict with
1147                 the name of any component.
1148
1149
1150
1151
1152                 DISPLAY_NAME is the displayed name of the component group, used in
1153                 graphical installers to display the component group name. This
1154                 value can be any string.
1155
1156
1157
1158
1159                 DESCRIPTION is an extended description of the component group,
1160                 used in graphical installers to give the user additional
1161                 information about the components within that group. Descriptions
1162                 can span multiple lines using "\n" as the line
1163                 separator. Typically, these descriptions should be no more than a
1164                 few lines long.
1165
1166
1167
1168
1169                 PARENT_GROUP, if supplied, names the parent group of this group.
1170                 Parent groups are used to establish a hierarchy of groups,
1171                 providing an arbitrary hierarchy of groups.
1172
1173
1174
1175
1176                 EXPANDED indicates that, by default, the group should show up as
1177                 "expanded", so that the user immediately sees all of the
1178                 components within the group. Otherwise, the group will initially
1179                 show up as a single entry.
1180
1181
1182
1183
1184                 BOLD_TITLE indicates that the group title should appear in bold,
1185                 to call the user's attention to the group.
1186
1187
1188
1189
1190                 cpack_add_install_type - Add a new installation type containing a
1191                 set of predefined component selections to the graphical installer.
1192
1193                   cpack_add_install_type(typename
1194                                          [DISPLAY_NAME name])
1195
1196
1197
1198
1199                 The cpack_add_install_type command identifies a set of preselected
1200                 components that represents a common use case for an
1201                 application. For example, a "Developer" install type might include
1202                 an application along with its header and library files, while an
1203                 "End user" install type might just include the application's
1204                 executable. Each component identifies itself with one or more
1205                 install types via the INSTALL_TYPES argument to
1206                 cpack_add_component.
1207
1208
1209
1210
1211                 DISPLAY_NAME is the displayed name of the install type, which will
1212                 typically show up in a drop-down box within a graphical
1213                 installer. This value can be any string.
1214
1215
1216
1217
1218                 cpack_configure_downloads - Configure CPack to download selected
1219                 components on-the-fly as part of the installation process.
1220
1221
1222
1223
1224                   cpack_configure_downloads(site
1225                                             [UPLOAD_DIRECTORY dirname]
1226                                             [ALL]
1227                                             [ADD_REMOVE|NO_ADD_REMOVE])
1228
1229
1230
1231
1232                 The cpack_configure_downloads command configures installation-time
1233                 downloads of selected components. For each downloadable component,
1234                 CPack will create an archive containing the contents of that
1235                 component, which should be uploaded to the given site. When the
1236                 user selects that component for installation, the installer will
1237                 download and extract the component in place. This feature is
1238                 useful for creating small installers that only download the
1239                 requested components, saving bandwidth. Additionally, the
1240                 installers are small enough that they will be installed as part of
1241                 the normal installation process, and the "Change" button in
1242                 Windows Add/Remove Programs control panel will allow one to add or
1243                 remove parts of the application after the original
1244                 installation. On Windows, the downloaded-components functionality
1245                 requires the ZipDLL plug-in for NSIS, available at:
1246
1247
1248
1249
1250                   http://nsis.sourceforge.net/ZipDLL_plug-in
1251
1252
1253
1254
1255                 On Mac OS X, installers that download components on-the-fly can
1256                 only be built and installed on system using Mac OS X 10.5 or
1257                 later.
1258
1259
1260
1261
1262                 The site argument is a URL where the archives for downloadable
1263                 components will reside, e.g., http://www.cmake.org/files/2.6.1/installer/
1264                 All of the archives produced by CPack should be uploaded to that location.
1265
1266
1267
1268
1269                 UPLOAD_DIRECTORY is the local directory where CPack will create the
1270                 various archives for each of the components. The contents of this
1271                 directory should be uploaded to a location accessible by the URL given
1272                 in the site argument. If omitted, CPack will use the directory
1273                 CPackUploads inside the CMake binary directory to store the generated
1274                 archives.
1275
1276
1277
1278
1279                 The ALL flag indicates that all components be downloaded. Otherwise, only
1280                 those components explicitly marked as DOWNLOADED or that have a specified
1281                 ARCHIVE_FILE will be downloaded. Additionally, the ALL option implies
1282                 ADD_REMOVE (unless NO_ADD_REMOVE is specified).
1283
1284
1285
1286
1287                 ADD_REMOVE indicates that CPack should install a copy of the installer
1288                 that can be called from Windows' Add/Remove Programs dialog (via the
1289                 "Modify" button) to change the set of installed components. NO_ADD_REMOVE
1290                 turns off this behavior. This option is ignored on Mac OS X.
1291
1292
1293       CPackDeb
1294              The builtin (binary) CPack Deb generator (Unix only)
1295
1296              CPackDeb may be used to create Deb package using CPack. CPackDeb
1297              is a CPack generator thus it uses the CPACK_XXX  variables  used
1298              by  CPack  : http://www.cmake.org/Wiki/CMake:CPackConfiguration.
1299              CPackDeb generator should work on any linux  host  but  it  will
1300              produce better deb package when Debian specific tools 'dpkg-xxx'
1301              are usable on the build system.
1302
1303
1304              CPackDeb has specific  features  which  are  controlled  by  the
1305              specifics  CPACK_DEBIAN_XXX  variables.You'll  find  a  detailed
1306              usage on the wiki:
1307
1308
1309                http://www.cmake.org/Wiki/CMake:CPackPackageGenerators#DEB_.28UNIX_only.29
1310
1311              However as a handy reminder here  comes  the  list  of  specific
1312              variables:
1313
1314
1315              CPACK_DEBIAN_PACKAGE_NAME
1316
1317
1318                   Mandatory : YES
1319                   Default   : CPACK_PACKAGE_NAME (lower case)
1320                   The debian package summary
1321
1322              CPACK_DEBIAN_PACKAGE_VERSION
1323
1324
1325                   Mandatory : YES
1326                   Default   : CPACK_PACKAGE_VERSION
1327                   The debian package version
1328
1329              CPACK_DEBIAN_PACKAGE_ARCHITECTURE)
1330
1331
1332                   Mandatory : YES
1333                   Default   : Output of dpkg --print-architecture (or i386 if dpkg is not found)
1334                   The debian package architecture
1335
1336              CPACK_DEBIAN_PACKAGE_DEPENDS
1337
1338
1339                   Mandatory : NO
1340                   Default   : -
1341                   May be used to set deb dependencies.
1342
1343              CPACK_DEBIAN_PACKAGE_MAINTAINER
1344
1345
1346                   Mandatory : YES
1347                   Default   : CPACK_PACKAGE_CONTACT
1348                   The debian package maintainer
1349
1350              CPACK_DEBIAN_PACKAGE_DESCRIPTION
1351
1352
1353                   Mandatory : YES
1354                   Default   : CPACK_PACKAGE_DESCRIPTION_SUMMARY
1355                   The debian package description
1356
1357              CPACK_DEBIAN_PACKAGE_SECTION
1358
1359
1360                   Mandatory : YES
1361                   Default   : 'devel'
1362                   The debian package section
1363
1364              CPACK_DEBIAN_PACKAGE_PRIORITY
1365
1366
1367                   Mandatory : YES
1368                   Default   : 'optional'
1369                   The debian package priority
1370
1371              CPACK_DEBIAN_PACKAGE_HOMEPAGE
1372
1373
1374                   Mandatory : NO
1375                   Default   : -
1376                   The URL of the web site for this package
1377
1378              CPACK_DEBIAN_PACKAGE_SHLIBDEPS
1379
1380
1381                   Mandatory : NO
1382                   Default   : OFF
1383                   May be set to ON in order to use dpkg-shlibdeps to generate
1384                   better package dependency list.
1385                   You may need set CMAKE_INSTALL_RPATH toi appropriate value
1386                   if you use this feature, because if you don't dpkg-shlibdeps
1387                   may fail to find your own shared libs.
1388                   See http://www.cmake.org/Wiki/CMake_RPATH_handling.
1389
1390              CPACK_DEBIAN_PACKAGE_DEBUG
1391
1392
1393                   Mandatory : NO
1394                   Default   : -
1395                   May be set when invoking cpack in order to trace debug informations
1396                   during CPackDeb run.
1397
1398              CPACK_DEBIAN_PACKAGE_PREDEPENDS
1399
1400
1401                   Mandatory : NO
1402                   Default   : -
1403                   see http://www.debian.org/doc/debian-policy/ch-relationships.html#s-binarydeps
1404                   This field is like Depends, except that it also forces dpkg to complete installation of
1405                   the packages named before even starting the installation of the package which declares
1406                   the pre-dependency.
1407
1408              CPACK_DEBIAN_PACKAGE_ENHANCES
1409
1410
1411                   Mandatory : NO
1412                   Default   : -
1413                   see http://www.debian.org/doc/debian-policy/ch-relationships.html#s-binarydeps
1414                   This field is similar to Suggests but works in the opposite direction.
1415                   It is used to declare that a package can enhance the functionality of another package.
1416
1417              CPACK_DEBIAN_PACKAGE_BREAKS
1418
1419
1420                   Mandatory : NO
1421                   Default   : -
1422                   see http://www.debian.org/doc/debian-policy/ch-relationships.html#s-binarydeps
1423                   When one binary package declares that it breaks another, dpkg will refuse to allow the
1424                   package which declares Breaks be installed unless the broken package is deconfigured first,
1425                   and it will refuse to allow the broken package to be reconfigured.
1426
1427              CPACK_DEBIAN_PACKAGE_CONFLICTS
1428
1429
1430                   Mandatory : NO
1431                   Default   : -
1432                   see http://www.debian.org/doc/debian-policy/ch-relationships.html#s-binarydeps
1433                   When one binary package declares a conflict with another using a Conflicts field,
1434                   dpkg will refuse to allow them to be installed on the system at the same time.
1435
1436              CPACK_DEBIAN_PACKAGE_PROVIDES
1437
1438
1439                   Mandatory : NO
1440                   Default   : -
1441                   see http://www.debian.org/doc/debian-policy/ch-relationships.html#s-binarydeps
1442                   A virtual package is one which appears in the Provides control field of another package.
1443
1444              CPACK_DEBIAN_PACKAGE_REPLACES
1445
1446
1447                   Mandatory : NO
1448                   Default   : -
1449                   see http://www.debian.org/doc/debian-policy/ch-relationships.html#s-binarydeps
1450                   Packages can declare in their control file that they should overwrite
1451                   files in certain other packages, or completely replace other packages.
1452
1453
1454       CPackRPM
1455              The builtin (binary) CPack RPM generator (Unix only)
1456
1457              CPackRPM may be used to create RPM package using CPack. CPackRPM
1458              is a CPack generator thus it uses the CPACK_XXX  variables  used
1459              by CPack : http://www.cmake.org/Wiki/CMake:CPackConfiguration
1460
1461
1462              However  CPackRPM  has specific features which are controlled by
1463              the specifics CPACK_RPM_XXX variables. You'll  find  a  detailed
1464              usage on the wiki:
1465
1466
1467                http://www.cmake.org/Wiki/CMake:CPackPackageGenerators#RPM_.28Unix_Only.29
1468
1469              However  as  a  handy  reminder  here comes the list of specific
1470              variables:
1471
1472
1473                CPACK_RPM_PACKAGE_SUMMARY
1474                   Mandatory : YES
1475                   Default   : CPACK_PACKAGE_DESCRIPTION_SUMMARY
1476                   The RPM package summary
1477                CPACK_RPM_PACKAGE_NAME
1478                   Mandatory : YES
1479                   Default   : CPACK_PACKAGE_NAME
1480                   The RPM package name
1481                CPACK_RPM_PACKAGE_VERSION
1482                   Mandatory : YES
1483                   Default   : CPACK_PACKAGE_VERSION
1484                   The RPM package version
1485                CPACK_RPM_PACKAGE_ARCHITECTURE
1486                   Mandatory : NO
1487                   Default   : -
1488                   The RPM package architecture. This may be set to "noarch" if you
1489                   know you are building a noarch package.
1490                CPACK_RPM_PACKAGE_RELEASE
1491                   Mandatory : YES
1492                   Default   : 1
1493                   The RPM package release. This is the numbering of the RPM package
1494                   itself, i.e. the version of the packaging and not the version of the
1495                   content (see CPACK_RPM_PACKAGE_VERSION). One may change the default
1496                   value if the previous packaging was buggy and/or you want to put here
1497                   a fancy Linux distro specific numbering.
1498                CPACK_RPM_PACKAGE_LICENSE
1499                   Mandatory : YES
1500                   Default   : "unknown"
1501                   The RPM package license policy.
1502                CPACK_RPM_PACKAGE_GROUP
1503                   Mandatory : YES
1504                   Default   : "unknown"
1505                   The RPM package group.
1506                CPACK_RPM_PACKAGE_VENDOR
1507                   Mandatory : YES
1508                   Default   : CPACK_PACKAGE_VENDOR if set or "unknown"
1509                   The RPM package vendor.
1510                CPACK_RPM_PACKAGE_URL
1511                   Mandatory : NO
1512                   Default   : -
1513                   The projects URL.
1514                CPACK_RPM_PACKAGE_DESCRIPTION
1515                   Mandatory : YES
1516                   Default   : CPACK_PACKAGE_DESCRIPTION_FILE if set or "no package description available"
1517                CPACK_RPM_COMPRESSION_TYPE
1518                   Mandatory : NO
1519                   Default   : -
1520                   May be used to override RPM compression type to be used
1521                   to build the RPM. For example some Linux distribution now default
1522                   to lzma or xz compression whereas older cannot use such RPM.
1523                   Using this one can enforce compression type to be used.
1524                   Possible value are: lzma, xz, bzip2 and gzip.
1525                CPACK_RPM_PACKAGE_REQUIRES
1526                   Mandatory : NO
1527                   Default   : -
1528                   May be used to set RPM dependencies (requires).
1529                   Note that you must enclose the complete requires string between quotes,
1530                   for example:
1531                   set(CPACK_RPM_PACKAGE_REQUIRES "python >= 2.5.0, cmake >= 2.8")
1532                CPACK_RPM_PACKAGE_SUGGESTS
1533                   Mandatory : NO
1534                   Default   : -
1535                   May be used to set weak RPM dependencies (suggests).
1536                   Note that you must enclose the complete requires string between quotes.
1537                CPACK_RPM_PACKAGE_PROVIDES
1538                   Mandatory : NO
1539                   Default   : -
1540                   May be used to set RPM dependencies (provides).
1541                CPACK_RPM_PACKAGE_OBSOLETES
1542                   Mandatory : NO
1543                   Default   : -
1544                   May be used to set RPM packages that are obsoleted by this one.
1545                CPACK_RPM_PACKAGE_RELOCATABLE
1546                   Mandatory : NO
1547                   Default   : CPACK_PACKAGE_RELOCATABLE
1548                   If this variable is set to TRUE or ON CPackRPM will try
1549                   to build a relocatable RPM package. A relocatable RPM may
1550                   be installed using rpm --prefix or --relocate in order to
1551                   install it at an alternate place see rpm(8).
1552                   Note that currently this may fail if CPACK_SET_DESTDIR is set to ON.
1553                   If CPACK_SET_DESTDIR is set then you will get a warning message
1554                   but if there is file installed with absolute path you'll get
1555                   unexpected behavior.
1556                CPACK_RPM_SPEC_INSTALL_POST
1557                   Mandatory : NO
1558                   Default   : -
1559                   May be used to set an RPM post-install command inside the spec file.
1560                   For example setting it to "/bin/true" may be used to prevent
1561                   rpmbuild to strip binaries.
1562                CPACK_RPM_SPEC_MORE_DEFINE
1563                   Mandatory : NO
1564                   Default   : -
1565                   May be used to add any %define lines to the generated spec file.
1566                CPACK_RPM_PACKAGE_DEBUG
1567                   Mandatory : NO
1568                   Default   : -
1569                   May be set when invoking cpack in order to trace debug information
1570                   during CPack RPM run. For example you may launch CPack like this
1571                   cpack -D CPACK_RPM_PACKAGE_DEBUG=1 -G RPM
1572                CPACK_RPM_USER_BINARY_SPECFILE
1573                   Mandatory : NO
1574                   Default   : -
1575                   May be set by the user in order to specify a USER binary spec file
1576                   to be used by CPackRPM instead of generating the file.
1577                   The specified file will be processed by CONFIGURE_FILE( @ONLY).
1578                CPACK_RPM_GENERATE_USER_BINARY_SPECFILE_TEMPLATE
1579                   Mandatory : NO
1580                   Default   : -
1581                   If set CPack will generate a template for USER specified binary
1582                   spec file and stop with an error. For example launch CPack like this
1583                   cpack -D CPACK_RPM_GENERATE_USER_BINARY_SPECFILE_TEMPLATE=1 -G RPM
1584                   The user may then use this file in order to hand-craft is own
1585                   binary spec file which may be used with CPACK_RPM_USER_BINARY_SPECFILE.
1586                CPACK_RPM_PRE_INSTALL_SCRIPT_FILE
1587                CPACK_RPM_PRE_UNINSTALL_SCRIPT_FILE
1588                   Mandatory : NO
1589                   Default   : -
1590                   May be used to embbed a pre (un)installation script in the spec file.
1591                   The refered script file(s) will be read and directly
1592                   put after the %pre or %preun section
1593                   One may verify which scriptlet has been included with
1594                    rpm -qp --scripts  package.rpm
1595                CPACK_RPM_POST_INSTALL_SCRIPT_FILE
1596                CPACK_RPM_POST_UNINSTALL_SCRIPT_FILE
1597                   Mandatory : NO
1598                   Default   : -
1599                   May be used to embbed a post (un)installation script in the spec file.
1600                   The refered script file(s) will be read and directly
1601                   put after the %post or %postun section
1602                   One may verify which scriptlet has been included with
1603                    rpm -qp --scripts  package.rpm
1604                CPACK_RPM_CHANGELOG_FILE
1605                   Mandatory : NO
1606                   Default   : -
1607                   May be used to embbed a changelog in the spec file.
1608                   The refered file will be read and directly  put after the %changelog
1609                   section.
1610
1611
1612       CTest  Configure a project for testing with CTest/CDash
1613
1614              Include this module in the top CMakeLists.txt file of a  project
1615              to enable testing with CTest and dashboard submissions to CDash:
1616
1617
1618                 project(MyProject)
1619                 ...
1620                 include(CTest)
1621
1622              The  module  automatically  creates  a BUILD_TESTING option that
1623              selects whether to  enable  testing  support  (ON  by  default).
1624              After including the module, use code like
1625
1626
1627                 if(BUILD_TESTING)
1628                   # ... CMake code to create tests ...
1629                 endif()
1630
1631              to creating tests when testing is enabled.
1632
1633
1634              To  enable  submissions  to  a  CDash server, create a CTestCon‐
1635              fig.cmake file at the top of the project with content such as
1636
1637
1638                 set(CTEST_PROJECT_NAME "MyProject")
1639                 set(CTEST_NIGHTLY_START_TIME "01:00:00 UTC")
1640                 set(CTEST_DROP_METHOD "http")
1641                 set(CTEST_DROP_SITE "my.cdash.org")
1642                 set(CTEST_DROP_LOCATION "/submit.php?project=MyProject")
1643                 set(CTEST_DROP_SITE_CDASH TRUE)
1644
1645              (the CDash server can provide the file to a project  administra‐
1646              tor who configures 'MyProject'). Settings in the config file are
1647              shared by both this CTest  module  and  the  CTest  command-line
1648              tool's dashboard script mode (ctest -S).
1649
1650
1651              While  building  a  project for submission to CDash, CTest scans
1652              the build output for errors and warnings and reports  them  with
1653              surrounding  context  from the build log.  This generic approach
1654              works for all build tools, but does not give details  about  the
1655              command  invocation  that produced a given problem.  One may get
1656              more detailed reports by adding
1657
1658
1659                 set(CTEST_USE_LAUNCHERS 1)
1660
1661              to the CTestConfig.cmake file.  When this option is enabled, the
1662              CTest  module  tells CMake's Makefile generators to invoke every
1663              command in the generated build system through a  CTest  launcher
1664              program.   (Currently  the CTEST_USE_LAUNCHERS option is ignored
1665              on  non-Makefile  generators.)   During  a  manual  build   each
1666              launcher  transparently  runs  the  command  it wraps.  During a
1667              CTest-driven build for submission to CDash each launcher reports
1668              detailed  information  when its command fails or warns. (Setting
1669              CTEST_USE_LAUNCHERS in CTestConfig.cmake is convenient, but also
1670              adds  the  launcher  overhead  even  for manual builds.  One may
1671              instead set it in a CTest dashboard script and  add  it  to  the
1672              CMake cache for the build tree.)
1673
1674
1675       CTestScriptMode
1676
1677
1678              This file is read by ctest in script mode (-S)
1679
1680
1681       CheckCCompilerFlag
1682              Check whether the C compiler supports a given flag.
1683
1684              CHECK_C_COMPILER_FLAG(<flag> <var>)
1685
1686
1687                <flag> - the compiler flag
1688                <var>  - variable to store the result
1689
1690              This  internally  calls  the  check_c_source_compiles macro. See
1691              help for CheckCSourceCompiles for a listing  of  variables  that
1692              can modify the build.
1693
1694
1695       CheckCSourceCompiles
1696              Check if given C source compiles and links into an executable
1697
1698              CHECK_C_SOURCE_COMPILES(<code> <var> [FAIL_REGEX <fail-regex>])
1699
1700
1701                <code>       - source code to try to compile, must define 'main'
1702                <var>        - variable to store whether the source code compiled
1703                <fail-regex> - fail if test output matches this regex
1704
1705              The  following variables may be set before calling this macro to
1706              modify the way the check is run:
1707
1708
1709                CMAKE_REQUIRED_FLAGS = string of compile command line flags
1710                CMAKE_REQUIRED_DEFINITIONS = list of macros to define (-DFOO=bar)
1711                CMAKE_REQUIRED_INCLUDES = list of include directories
1712                CMAKE_REQUIRED_LIBRARIES = list of libraries to link
1713
1714
1715       CheckCSourceRuns
1716              Check if the given C source code compiles and runs.
1717
1718              CHECK_C_SOURCE_RUNS(<code> <var>)
1719
1720
1721                <code>   - source code to try to compile
1722                <var>    - variable to store the result
1723                           (1 for success, empty for failure)
1724
1725              The following variables may be set before calling this macro  to
1726              modify the way the check is run:
1727
1728
1729                CMAKE_REQUIRED_FLAGS = string of compile command line flags
1730                CMAKE_REQUIRED_DEFINITIONS = list of macros to define (-DFOO=bar)
1731                CMAKE_REQUIRED_INCLUDES = list of include directories
1732                CMAKE_REQUIRED_LIBRARIES = list of libraries to link
1733
1734
1735       CheckCXXCompilerFlag
1736              Check whether the CXX compiler supports a given flag.
1737
1738              CHECK_CXX_COMPILER_FLAG(<flag> <var>)
1739
1740
1741                <flag> - the compiler flag
1742                <var>  - variable to store the result
1743
1744              This  internally calls the check_cxx_source_compiles macro.  See
1745              help for CheckCXXSourceCompiles for a listing of variables  that
1746              can modify the build.
1747
1748
1749       CheckCXXSourceCompiles
1750              Check if given C++ source compiles and links into an executable
1751
1752              CHECK_CXX_SOURCE_COMPILES(<code>        <var>        [FAIL_REGEX
1753              <fail-regex>])
1754
1755
1756                <code>       - source code to try to compile, must define 'main'
1757                <var>        - variable to store whether the source code compiled
1758                <fail-regex> - fail if test output matches this regex
1759
1760              The following variables may be set before calling this macro  to
1761              modify the way the check is run:
1762
1763
1764                CMAKE_REQUIRED_FLAGS = string of compile command line flags
1765                CMAKE_REQUIRED_DEFINITIONS = list of macros to define (-DFOO=bar)
1766                CMAKE_REQUIRED_INCLUDES = list of include directories
1767                CMAKE_REQUIRED_LIBRARIES = list of libraries to link
1768
1769
1770       CheckCXXSourceRuns
1771              Check if the given C++ source code compiles and runs.
1772
1773              CHECK_CXX_SOURCE_RUNS(<code> <var>)
1774
1775
1776                <code>   - source code to try to compile
1777                <var>    - variable to store the result
1778                           (1 for success, empty for failure)
1779
1780              The  following variables may be set before calling this macro to
1781              modify the way the check is run:
1782
1783
1784                CMAKE_REQUIRED_FLAGS = string of compile command line flags
1785                CMAKE_REQUIRED_DEFINITIONS = list of macros to define (-DFOO=bar)
1786                CMAKE_REQUIRED_INCLUDES = list of include directories
1787                CMAKE_REQUIRED_LIBRARIES = list of libraries to link
1788
1789
1790       CheckFortranFunctionExists
1791              macro which checks if the Fortran function exists
1792
1793              CHECK_FORTRAN_FUNCTION_EXISTS(FUNCTION VARIABLE)
1794
1795
1796                FUNCTION - the name of the Fortran function
1797                VARIABLE - variable to store the result
1798
1799
1800
1801
1802              The following variables may be set before calling this macro  to
1803              modify the way the check is run:
1804
1805
1806                CMAKE_REQUIRED_LIBRARIES = list of libraries to link
1807
1808
1809       CheckFunctionExists
1810              Check if a C function can be linked
1811
1812              CHECK_FUNCTION_EXISTS(<function> <variable>)
1813
1814
1815              Check that the <function> is provided by libraries on the system
1816              and store the result in a <variable>.  This does not verify that
1817              any  system  header file declares the function, only that it can
1818              be found at link time (considure using CheckSymbolExists).
1819
1820
1821              The following variables may be set before calling this macro  to
1822              modify the way the check is run:
1823
1824
1825                CMAKE_REQUIRED_FLAGS = string of compile command line flags
1826                CMAKE_REQUIRED_DEFINITIONS = list of macros to define (-DFOO=bar)
1827                CMAKE_REQUIRED_INCLUDES = list of include directories
1828                CMAKE_REQUIRED_LIBRARIES = list of libraries to link
1829
1830
1831       CheckIncludeFile
1832              macro which checks the include file exists.
1833
1834              CHECK_INCLUDE_FILE(INCLUDE VARIABLE)
1835
1836
1837                INCLUDE  - name of include file
1838                VARIABLE - variable to return result
1839
1840
1841              an  optional  third argument is the CFlags to add to the compile
1842              line  or you can use CMAKE_REQUIRED_FLAGS
1843
1844
1845              The following variables may be set before calling this macro  to
1846              modify the way the check is run:
1847
1848
1849                CMAKE_REQUIRED_FLAGS = string of compile command line flags
1850                CMAKE_REQUIRED_DEFINITIONS = list of macros to define (-DFOO=bar)
1851                CMAKE_REQUIRED_INCLUDES = list of include directories
1852
1853
1854
1855
1856
1857       CheckIncludeFileCXX
1858              Check if the include file exists.
1859
1860                CHECK_INCLUDE_FILE_CXX(INCLUDE VARIABLE)
1861
1862
1863
1864
1865                INCLUDE  - name of include file
1866                VARIABLE - variable to return result
1867
1868
1869              An  optional  third argument is the CFlags to add to the compile
1870              line  or you can use CMAKE_REQUIRED_FLAGS.
1871
1872
1873              The following variables may be set before calling this macro  to
1874              modify the way the check is run:
1875
1876
1877                CMAKE_REQUIRED_FLAGS = string of compile command line flags
1878                CMAKE_REQUIRED_DEFINITIONS = list of macros to define (-DFOO=bar)
1879                CMAKE_REQUIRED_INCLUDES = list of include directories
1880
1881
1882
1883
1884
1885       CheckIncludeFiles
1886              Check if the files can be included
1887
1888
1889
1890
1891              CHECK_INCLUDE_FILES(INCLUDE VARIABLE)
1892
1893
1894                INCLUDE  - list of files to include
1895                VARIABLE - variable to return result
1896
1897
1898
1899
1900              The  following variables may be set before calling this macro to
1901              modify the way the check is run:
1902
1903
1904                CMAKE_REQUIRED_FLAGS = string of compile command line flags
1905                CMAKE_REQUIRED_DEFINITIONS = list of macros to define (-DFOO=bar)
1906                CMAKE_REQUIRED_INCLUDES = list of include directories
1907
1908
1909       CheckLibraryExists
1910              Check if the function exists.
1911
1912              CHECK_LIBRARY_EXISTS (LIBRARY FUNCTION LOCATION VARIABLE)
1913
1914
1915                LIBRARY  - the name of the library you are looking for
1916                FUNCTION - the name of the function
1917                LOCATION - location where the library should be found
1918                VARIABLE - variable to store the result
1919
1920
1921
1922
1923              The following variables may be set before calling this macro  to
1924              modify the way the check is run:
1925
1926
1927                CMAKE_REQUIRED_FLAGS = string of compile command line flags
1928                CMAKE_REQUIRED_DEFINITIONS = list of macros to define (-DFOO=bar)
1929                CMAKE_REQUIRED_LIBRARIES = list of libraries to link
1930
1931
1932       CheckStructHasMember
1933              Check  if  the  given  struct  or class has the specified member
1934              variable
1935
1936              CHECK_STRUCT_HAS_MEMBER (STRUCT MEMBER HEADER VARIABLE)
1937
1938
1939                STRUCT - the name of the struct or class you are interested in
1940                MEMBER - the member which existence you want to check
1941                HEADER - the header(s) where the prototype should be declared
1942                VARIABLE - variable to store the result
1943
1944
1945
1946
1947              The following variables may be set before calling this macro  to
1948              modify the way the check is run:
1949
1950
1951                CMAKE_REQUIRED_FLAGS = string of compile command line flags
1952                CMAKE_REQUIRED_DEFINITIONS = list of macros to define (-DFOO=bar)
1953                CMAKE_REQUIRED_INCLUDES = list of include directories
1954
1955
1956
1957
1958              Example:    CHECK_STRUCT_HAS_MEMBER("struct    timeval"   tv_sec
1959              sys/select.h HAVE_TIMEVAL_TV_SEC)
1960
1961
1962       CheckSymbolExists
1963              Check if a symbol exists as a function, variable, or macro
1964
1965              CHECK_SYMBOL_EXISTS(<symbol> <files> <variable>)
1966
1967
1968              Check that the  <symbol>  is  available  after  including  given
1969              header  <files>  and  store the result in a <variable>.  Specify
1970              the list of files in one argument as a semicolon-separated list.
1971
1972
1973              If the header files define the symbol as a macro it  is  consid‐
1974              ered available and assumed to work.  If the header files declare
1975              the symbol as a function or variable then the symbol  must  also
1976              be available for linking.  If the symbol is a type or enum value
1977              it will not  be  recognized  (consider  using  CheckTypeSize  or
1978              CheckCSourceCompiles).
1979
1980
1981              The  following variables may be set before calling this macro to
1982              modify the way the check is run:
1983
1984
1985                CMAKE_REQUIRED_FLAGS = string of compile command line flags
1986                CMAKE_REQUIRED_DEFINITIONS = list of macros to define (-DFOO=bar)
1987                CMAKE_REQUIRED_INCLUDES = list of include directories
1988                CMAKE_REQUIRED_LIBRARIES = list of libraries to link
1989
1990
1991       CheckTypeSize
1992              Check sizeof a type
1993
1994                CHECK_TYPE_SIZE(TYPE VARIABLE [BUILTIN_TYPES_ONLY])
1995
1996              Check if the type exists and  determine  its  size.  On  return,
1997              "HAVE_${VARIABLE}" holds the existence of the type, and "${VARI‐
1998              ABLE}" holds one of the following:
1999
2000
2001                 <size> = type has non-zero size <size>
2002                 "0"    = type has arch-dependent size (see below)
2003                 ""     = type does not exist
2004
2005              Furthermore, the variable "${VARIABLE}_CODE" holds C  preproces‐
2006              sor  code  to  define the macro "${VARIABLE}" to the size of the
2007              type, or leave the macro undefined if the type does not exist.
2008
2009
2010              The variable "${VARIABLE}" may be "0"  when  CMAKE_OSX_ARCHITEC‐
2011              TURES  has  multiple  architectures  for building OS X universal
2012              binaries. This indicates that the type size varies across archi‐
2013              tectures.  In this case "${VARIABLE}_CODE" contains C preproces‐
2014              sor tests mapping from each architecture  macro  to  the  corre‐
2015              sponding type size. The list of architecture macros is stored in
2016              "${VARIABLE}_KEYS", and the value for  each  key  is  stored  in
2017              "${VARIABLE}-${KEY}".
2018
2019
2020              If  the BUILTIN_TYPES_ONLY option is not given, the macro checks
2021              for headers <sys/types.h>, <stdint.h>, and <stddef.h>, and saves
2022              results  in  HAVE_SYS_TYPES_H, HAVE_STDINT_H, and HAVE_STDDEF_H.
2023              The type size check automatically includes the  available  head‐
2024              ers, thus supporting checks of types defined in the headers.
2025
2026
2027              The  following variables may be set before calling this macro to
2028              modify the way the check is run:
2029
2030
2031                CMAKE_REQUIRED_FLAGS = string of compile command line flags
2032                CMAKE_REQUIRED_DEFINITIONS = list of macros to define (-DFOO=bar)
2033                CMAKE_REQUIRED_INCLUDES = list of include directories
2034                CMAKE_REQUIRED_LIBRARIES = list of libraries to link
2035                CMAKE_EXTRA_INCLUDE_FILES = list of extra headers to include
2036
2037
2038       CheckVariableExists
2039              Check if the variable exists.
2040
2041                CHECK_VARIABLE_EXISTS(VAR VARIABLE)
2042
2043                VAR      - the name of the variable
2044                VARIABLE - variable to store the result
2045
2046
2047
2048
2049              This macro is only for C variables.
2050
2051
2052              The following variables may be set before calling this macro  to
2053              modify the way the check is run:
2054
2055
2056                CMAKE_REQUIRED_FLAGS = string of compile command line flags
2057                CMAKE_REQUIRED_DEFINITIONS = list of macros to define (-DFOO=bar)
2058                CMAKE_REQUIRED_LIBRARIES = list of libraries to link
2059
2060
2061       Dart   Configure  a  project  for  testing  with  CTest or old Dart Tcl
2062              Client
2063
2064              This file is the backwards-compatibility version  of  the  CTest
2065              module.  It supports using the old Dart 1 Tcl client for driving
2066              dashboard submissions as well as testing with CTest.  This  mod‐
2067              ule  should be included in the CMakeLists.txt file at the top of
2068              a project.  Typical usage:
2069
2070
2071                INCLUDE(Dart)
2072                IF(BUILD_TESTING)
2073                  # ... testing related CMake code ...
2074                ENDIF(BUILD_TESTING)
2075
2076              The BUILD_TESTING option is created by the Dart module to deter‐
2077              mine  whether testing support should be enabled.  The default is
2078              ON.
2079
2080
2081       Documentation
2082              DocumentationVTK.cmake
2083
2084              This file provides support for the VTK documentation  framework.
2085              It relies on several tools (Doxygen, Perl, etc).
2086
2087
2088       ExternalProject
2089              Create custom targets to build projects in external trees
2090
2091              The  'ExternalProject_Add'  function  creates a custom target to
2092              drive download, update/patch, configure, build, install and test
2093              steps of an external project:
2094
2095
2096                ExternalProject_Add(<name>    # Name for custom target
2097                  [DEPENDS projects...]       # Targets on which the project depends
2098                  [PREFIX dir]                # Root dir for entire project
2099                  [LIST_SEPARATOR sep]        # Sep to be replaced by ; in cmd lines
2100                  [TMP_DIR dir]               # Directory to store temporary files
2101                  [STAMP_DIR dir]             # Directory to store step timestamps
2102                 #--Download step--------------
2103                  [DOWNLOAD_DIR dir]          # Directory to store downloaded files
2104                  [DOWNLOAD_COMMAND cmd...]   # Command to download source tree
2105                  [CVS_REPOSITORY cvsroot]    # CVSROOT of CVS repository
2106                  [CVS_MODULE mod]            # Module to checkout from CVS repo
2107                  [CVS_TAG tag]               # Tag to checkout from CVS repo
2108                  [SVN_REPOSITORY url]        # URL of Subversion repo
2109                  [SVN_REVISION rev]          # Revision to checkout from Subversion repo
2110                  [SVN_USERNAME john ]        # Username for Subversion checkout and update
2111                  [SVN_PASSWORD doe ]         # Password for Subversion checkout and update
2112                  [GIT_REPOSITORY url]        # URL of git repo
2113                  [GIT_TAG tag]               # Git branch name, commit id or tag
2114                  [URL /.../src.tgz]          # Full path or URL of source
2115                  [URL_MD5 md5]               # MD5 checksum of file at URL
2116                  [TIMEOUT seconds]           # Time allowed for file download operations
2117                 #--Update/Patch step----------
2118                  [UPDATE_COMMAND cmd...]     # Source work-tree update command
2119                  [PATCH_COMMAND cmd...]      # Command to patch downloaded source
2120                 #--Configure step-------------
2121                  [SOURCE_DIR dir]            # Source dir to be used for build
2122                  [CONFIGURE_COMMAND cmd...]  # Build tree configuration command
2123                  [CMAKE_COMMAND /.../cmake]  # Specify alternative cmake executable
2124                  [CMAKE_GENERATOR gen]       # Specify generator for native build
2125                  [CMAKE_ARGS args...]        # Arguments to CMake command line
2126                  [CMAKE_CACHE_ARGS args...]  # Initial cache arguments, of the form -Dvar:string=on
2127                 #--Build step-----------------
2128                  [BINARY_DIR dir]            # Specify build dir location
2129                  [BUILD_COMMAND cmd...]      # Command to drive the native build
2130                  [BUILD_IN_SOURCE 1]         # Use source dir for build dir
2131                 #--Install step---------------
2132                  [INSTALL_DIR dir]           # Installation prefix
2133                  [INSTALL_COMMAND cmd...]    # Command to drive install after build
2134                 #--Test step------------------
2135                  [TEST_BEFORE_INSTALL 1]     # Add test step executed before install step
2136                  [TEST_AFTER_INSTALL 1]      # Add test step executed after install step
2137                  [TEST_COMMAND cmd...]       # Command to drive test
2138                 #--Output logging-------------
2139                  [LOG_DOWNLOAD 1]            # Wrap download in script to log output
2140                  [LOG_UPDATE 1]              # Wrap update in script to log output
2141                  [LOG_CONFIGURE 1]           # Wrap configure in script to log output
2142                  [LOG_BUILD 1]               # Wrap build in script to log output
2143                  [LOG_TEST 1]                # Wrap test in script to log output
2144                  [LOG_INSTALL 1]             # Wrap install in script to log output
2145                 #--Custom targets-------------
2146                  [STEP_TARGETS st1 st2 ...]  # Generate custom targets for these steps
2147                  )
2148
2149              The  *_DIR  options  specify  directories  for the project, with
2150              default directories computed as follows. If the PREFIX option is
2151              given  to ExternalProject_Add() or the EP_PREFIX directory prop‐
2152              erty is set, then an external project  is  built  and  installed
2153              under the specified prefix:
2154
2155
2156                 TMP_DIR      = <prefix>/tmp
2157                 STAMP_DIR    = <prefix>/src/<name>-stamp
2158                 DOWNLOAD_DIR = <prefix>/src
2159                 SOURCE_DIR   = <prefix>/src/<name>
2160                 BINARY_DIR   = <prefix>/src/<name>-build
2161                 INSTALL_DIR  = <prefix>
2162
2163              Otherwise,  if the EP_BASE directory property is set then compo‐
2164              nents of an external project  are  stored  under  the  specified
2165              base:
2166
2167
2168                 TMP_DIR      = <base>/tmp/<name>
2169                 STAMP_DIR    = <base>/Stamp/<name>
2170                 DOWNLOAD_DIR = <base>/Download/<name>
2171                 SOURCE_DIR   = <base>/Source/<name>
2172                 BINARY_DIR   = <base>/Build/<name>
2173                 INSTALL_DIR  = <base>/Install/<name>
2174
2175              If  no  PREFIX,  EP_PREFIX,  or  EP_BASE  is  specified then the
2176              default is to set PREFIX to "<name>-prefix". Relative paths  are
2177              interpreted with respect to the build directory corresponding to
2178              the source directory in which ExternalProject_Add is invoked.
2179
2180
2181              If SOURCE_DIR is explicitly set to  an  existing  directory  the
2182              project will be built from it. Otherwise a download step must be
2183              specified using one of the DOWNLOAD_COMMAND,  CVS_*,  SVN_*,  or
2184              URL  options. The URL option may refer locally to a directory or
2185              source  tarball,  or   refer   to   a   remote   tarball   (e.g.
2186              http://.../src.tgz).
2187
2188
2189              The 'ExternalProject_Add_Step' function adds a custom step to an
2190              external project:
2191
2192
2193                ExternalProject_Add_Step(<name> <step> # Names of project and custom step
2194                  [COMMAND cmd...]        # Command line invoked by this step
2195                  [COMMENT "text..."]     # Text printed when step executes
2196                  [DEPENDEES steps...]    # Steps on which this step depends
2197                  [DEPENDERS steps...]    # Steps that depend on this step
2198                  [DEPENDS files...]      # Files on which this step depends
2199                  [ALWAYS 1]              # No stamp file, step always runs
2200                  [WORKING_DIRECTORY dir] # Working directory for command
2201                  [LOG 1]                 # Wrap step in script to log output
2202                  )
2203
2204              The command line, comment, and working directory of every  stan‐
2205              dard   and   custom   step   is   processed  to  replace  tokens
2206              <SOURCE_DIR>, <BINARY_DIR>, <INSTALL_DIR>,  and  <TMP_DIR>  with
2207              corresponding property values.
2208
2209
2210              The  'ExternalProject_Get_Property'  function retrieves external
2211              project target properties:
2212
2213
2214                ExternalProject_Get_Property(<name> [prop1 [prop2 [...]]])
2215
2216              It stores property values in variables of the same  name.  Prop‐
2217              erty  names  correspond to the keyword argument names of 'Exter‐
2218              nalProject_Add'.
2219
2220
2221              The 'ExternalProject_Add_StepTargets' function generates  custom
2222              targets for the steps listed:
2223
2224
2225                ExternalProject_Add_StepTargets(<name> [step1 [step2 [...]]])
2226
2227
2228
2229
2230              If  STEP_TARGETS  is set then ExternalProject_Add_StepTargets is
2231              automatically called at the end of matching calls  to  External‐
2232              Project_Add_Step.  Pass  STEP_TARGETS  explicitly  to individual
2233              ExternalProject_Add calls, or  implicitly  to  all  ExternalPro‐
2234              ject_Add  calls  by  setting the directory property EP_STEP_TAR‐
2235              GETS.
2236
2237
2238              If STEP_TARGETS is not set,  clients  may  still  manually  call
2239              ExternalProject_Add_StepTargets   after   calling   ExternalPro‐
2240              ject_Add or ExternalProject_Add_Step.
2241
2242
2243              This functionality is provided to make  it  easy  to  drive  the
2244              steps independently of each other by specifying targets on build
2245              command  lines.  For  example,  you  may  be  submitting  to   a
2246              sub-project based dashboard, where you want to drive the config‐
2247              ure portion of the build, then submit to the dashboard, followed
2248              by  the build portion, followed by tests. If you invoke a custom
2249              target that depends on a step halfway through  the  step  depen‐
2250              dency chain, then all the previous steps will also run to ensure
2251              everything is up to date.
2252
2253
2254              For example, to drive configure, build and test  steps  indepen‐
2255              dently  for each ExternalProject_Add call in your project, write
2256              the following line prior to  any  ExternalProject_Add  calls  in
2257              your CMakeLists file:
2258
2259
2260                 set_property(DIRECTORY PROPERTY EP_STEP_TARGETS configure build test)
2261
2262
2263       FeatureSummary
2264              Macros for generating a summary of enabled/disabled features
2265
2266
2267
2268
2269              This  module  provides  the  macros feature_summary(), set_pack‐
2270              age_info() and  add_feature_info().  For  compatiblity  it  also
2271              still  provides set_feature_info(), print_enabled_features() and
2272              print_disabled_features.
2273
2274
2275              These macros can be used to generate a summary  of  enabled  and
2276              disabled packages and/or feature for a build tree:
2277
2278
2279                  -- Enabled features:
2280                  LibXml2 (required version >= 2.4) , XML processing library. , <http://xmlsoft.org>
2281                  PNG , A PNG image library. , <http://www.libpng.org/pub/png/>
2282                  -- Disabled features:
2283                  Lua51 , The Lua scripting language. , <http://www.lua.org>
2284                  Foo , Foo provides cool stuff.
2285
2286
2287
2288
2289
2290
2291
2292                  FEATURE_SUMMARY( [FILENAME <file>]
2293                                   [APPEND]
2294                                   [VAR <variable_name>]
2295                                   [DESCRIPTION "Found packages:"]
2296                                   WHAT (ALL | PACKAGES_FOUND | PACKAGES_NOT_FOUND
2297                                        | ENABLED_FEATURES | DISABLED_FEATURES]
2298                                 )
2299
2300
2301
2302
2303              The  FEATURE_SUMMARY()  macro  can  be used to print information
2304              about enabled or disabled features or packages of a project.  By
2305              default, only the names of the features/packages will be printed
2306              and their required version when one was specified. Use  SET_FEA‐
2307              TURE_INFO() to add more useful information, like e.g. a download
2308              URL for the respective package.
2309
2310
2311              The WHAT option is the only mandatory option. Here  you  specify
2312              what information will be printed:
2313
2314
2315                  ENABLED_FEATURES: the list of all features and packages which are enabled,
2316                                    excluding the QUIET packages
2317                  DISABLED_FEATURES: the list of all features and packages which are disabled,
2318                                     excluding the QUIET packages
2319                  PACKAGES_FOUND: the list of all packages which have been found
2320                  PACKAGES_NOT_FOUND: the list of all packages which have not been found
2321                  ALL: this will give all packages which have or have not been found
2322
2323
2324
2325
2326              If  a  FILENAME  is  given, the information is printed into this
2327              file. If APPEND is used, it is appended to this file,  otherwise
2328              the file is overwritten if it already existed. If the VAR option
2329              is used, the information is "printed" into the  specified  vari‐
2330              able. If FILENAME is not used, the information is printed to the
2331              terminal. Using the DESCRIPTION option a description or headline
2332              can be set which will be printed above the actual content.
2333
2334
2335              Example 1, append everything to a file:
2336
2337
2338                 feature_summary(WHAT ALL
2339                                 FILENAME ${CMAKE_BINARY_DIR}/all.log APPEND)
2340
2341
2342
2343
2344              Example 2, print the enabled features into the variable enabled‐
2345              FeaturesText:
2346
2347
2348                 feature_summary(WHAT ENABLED_FEATURES
2349                                 DESCRIPTION "Enabled Features:"
2350                                 VAR enabledFeaturesText)
2351                 message(STATUS "${enabledFeaturesText}")
2352
2353
2354
2355
2356
2357
2358
2359                  SET_PACKAGE_INFO(<name> <description> [<url> [<comment>] ] )
2360
2361              Use this macro to set up information about  the  named  package,
2362              which  can  then be displayed via FEATURE_SUMMARY(). This can be
2363              done either directly in the Find-module or in the project  which
2364              uses  the module after the FIND_PACKAGE() call. The features for
2365              which information can be set  are  added  automatically  by  the
2366              find_package() command.
2367
2368
2369              Example for setting the info for a package:
2370
2371
2372                 find_package(LibXml2)
2373                 set_package_info(LibXml2 "XML processing library." "http://xmlsoft.org/")
2374
2375
2376
2377
2378
2379
2380
2381                  ADD_FEATURE_INFO(<name> <enabled> <description>)
2382
2383              Use this macro to add information about a feature with the given
2384              <name>. <enabled> contains whether this feature  is  enabled  or
2385              not, <description> is a text descibing the feature. The informa‐
2386              tion can be displayed using feature_summary()  for  ENABLED_FEA‐
2387              TURES and DISABLED_FEATURES respectively.
2388
2389
2390              Example for setting the info for a feature:
2391
2392
2393                 option(WITH_FOO "Help for foo" ON)
2394                 add_feature_info(Foo WITH_FOO "The Foo feature provides very cool stuff.")
2395
2396
2397
2398
2399
2400
2401
2402              The  following macros are provided for compatibility with previ‐
2403              ous CMake versions:
2404
2405
2406                  PRINT_ENABLED_FEATURES()
2407
2408              Does the same as FEATURE_SUMMARY(WHAT ENABLED_FEATURES  DESCRIP‐
2409              TION "Enabled features:")
2410
2411
2412                  PRINT_DISABLED_FEATURES()
2413
2414              Does   the   same   as   FEATURE_SUMMARY(WHAT  DISABLED_FEATURES
2415              DESCRIPTION "Disabled features:")
2416
2417
2418                  SET_FEATURE_INFO(<name> <description> [<url> [<comment>] ] )
2419
2420              Does the same  as  SET_PACKAGE_INFO(<name>  <description>  <url>
2421              <comment> )
2422
2423
2424       FindALSA
2425              Find alsa
2426
2427              Find the alsa libraries (asound)
2428
2429
2430                This module defines the following variables:
2431                   ALSA_FOUND       - True if ALSA_INCLUDE_DIR & ALSA_LIBRARY are found
2432                   ALSA_LIBRARIES   - Set when ALSA_LIBRARY is found
2433                   ALSA_INCLUDE_DIRS - Set when ALSA_INCLUDE_DIR is found
2434
2435
2436
2437
2438                   ALSA_INCLUDE_DIR - where to find asoundlib.h, etc.
2439                   ALSA_LIBRARY     - the asound library
2440
2441
2442
2443
2444
2445       FindASPELL
2446              Try to find ASPELL
2447
2448              Once done this will define
2449
2450
2451                ASPELL_FOUND - system has ASPELL
2452                ASPELL_INCLUDE_DIR - the ASPELL include directory
2453                ASPELL_LIBRARIES - The libraries needed to use ASPELL
2454                ASPELL_DEFINITIONS - Compiler switches required for using ASPELL
2455
2456
2457       FindAVIFile
2458              Locate AVIFILE library and include paths
2459
2460              AVIFILE  (http://avifile.sourceforge.net/)is  a set of libraries
2461              for  i386 machines to use various AVI codecs. Support is limited
2462              beyond  Linux.  Windows  provides  native  AVI  support,  and so
2463              doesn't need this library. This module defines
2464
2465
2466                AVIFILE_INCLUDE_DIR, where to find avifile.h , etc.
2467                AVIFILE_LIBRARIES, the libraries to link against
2468                AVIFILE_DEFINITIONS, definitions to use when compiling
2469                AVIFILE_FOUND, If false, don't try to use AVIFILE
2470
2471
2472       FindBISON
2473              Find bison executable and provides  macros  to  generate  custom
2474              build rules
2475
2476              The module defines the following variables:
2477
2478
2479                BISON_EXECUTABLE - path to the bison program
2480                BISON_VERSION - version of bison
2481                BISON_FOUND - true if the program was found
2482
2483
2484
2485
2486              The minimum required version of bison can be specified using the
2487              standard CMake syntax, e.g. find_package(BISON 2.1.3)
2488
2489
2490              If bison is found, the module defines the macros:
2491
2492
2493                BISON_TARGET(<Name> <YaccInput> <CodeOutput> [VERBOSE <file>]
2494                            [COMPILE_FLAGS <string>])
2495
2496              which will create  a custom rule to generate  a parser. <YaccIn‐
2497              put>  is  the path to  a yacc file. <CodeOutput> is the name  of
2498              the source file generated by bison.  A header file is  also   be
2499              generated,  and  contains  the   token  list.  If  COMPILE_FLAGS
2500              option is  specified,  the  next  parameter  is   added  in  the
2501              bison  command line.  if  VERBOSE option is specified, <file> is
2502              created  and contains verbose descriptions of  the  grammar  and
2503              parser. The macro defines a set of variables:
2504
2505
2506                BISON_${Name}_DEFINED - true is the macro ran successfully
2507                BISON_${Name}_INPUT - The input source file, an alias for <YaccInput>
2508                BISON_${Name}_OUTPUT_SOURCE - The source file generated by bison
2509                BISON_${Name}_OUTPUT_HEADER - The header file generated by bison
2510                BISON_${Name}_OUTPUTS - The sources files generated by bison
2511                BISON_${Name}_COMPILE_FLAGS - Options used in the bison command line
2512
2513
2514
2515
2516                ====================================================================
2517                Example:
2518
2519
2520
2521
2522                 find_package(BISON)
2523                 BISON_TARGET(MyParser parser.y ${CMAKE_CURRENT_BINARY_DIR}/parser.cpp)
2524                 add_executable(Foo main.cpp ${BISON_MyParser_OUTPUTS})
2525                ====================================================================
2526
2527
2528       FindBLAS
2529              Find BLAS library
2530
2531              This  module  finds an installed fortran library that implements
2532              the       BLAS       linear-algebra        interface        (see
2533              http://www.netlib.org/blas/). The list of libraries searched for
2534              is taken from the autoconf macro file, acx_blas.m4  (distributed
2535              at http://ac-archive.sourceforge.net/ac-archive/acx_blas.html).
2536
2537
2538              This module sets the following variables:
2539
2540
2541                BLAS_FOUND - set to true if a library implementing the BLAS interface
2542                  is found
2543                BLAS_LINKER_FLAGS - uncached list of required linker flags (excluding -l
2544                  and -L).
2545                BLAS_LIBRARIES - uncached list of libraries (using full path name) to
2546                  link against to use BLAS
2547                BLAS95_LIBRARIES - uncached list of libraries (using full path name)
2548                  to link against to use BLAS95 interface
2549                BLAS95_FOUND - set to true if a library implementing the BLAS f95 interface
2550                  is found
2551                BLA_STATIC  if set on this determines what kind of linkage we do (static)
2552                BLA_VENDOR  if set checks only the specified vendor, if not set checks
2553                   all the possibilities
2554                BLA_F95     if set on tries to find the f95 interfaces for BLAS/LAPACK
2555
2556              ######### ## List of vendors (BLA_VENDOR) valid in this module #
2557              ATLAS, PhiPACK,CXML,DXML,SunPerf,SCSL,SGIMATH,IBMESSL,Intel10_32
2558              (intel  mkl  v10  32  bit),Intel10_64lp (intel mkl v10 64 bit,lp
2559              thread model, lp64 model), #  Intel( older versions  of  mkl  32
2560              and 64 bit), ACML,Apple, NAS, Generic C/CXX should be enabled to
2561              use Intel mkl
2562
2563
2564       FindBZip2
2565              Try to find BZip2
2566
2567              Once done this will define
2568
2569
2570                BZIP2_FOUND - system has BZip2
2571                BZIP2_INCLUDE_DIR - the BZip2 include directory
2572                BZIP2_LIBRARIES - Link these to use BZip2
2573                BZIP2_NEED_PREFIX - this is set if the functions are prefixed with BZ2_
2574
2575
2576       FindBoost
2577              Try to find Boost include dirs and libraries
2578
2579              Usage of this module as follows:
2580
2581
2582              NOTE: Take note of the Boost_ADDITIONAL_VERSIONS variable below.
2583              Due  to  Boost  naming conventions and limitations in CMake this
2584              find module is NOT future safe with  respect  to  Boost  version
2585              numbers, and may break.
2586
2587
2588              == Using Header-Only libraries from within Boost: ==
2589
2590
2591                 find_package( Boost 1.36.0 )
2592                 if(Boost_FOUND)
2593                    include_directories(${Boost_INCLUDE_DIRS})
2594                    add_executable(foo foo.cc)
2595                 endif()
2596
2597
2598
2599
2600
2601
2602
2603              == Using actual libraries from within Boost: ==
2604
2605
2606                 set(Boost_USE_STATIC_LIBS        ON)
2607                 set(Boost_USE_MULTITHREADED      ON)
2608                 set(Boost_USE_STATIC_RUNTIME    OFF)
2609                 find_package( Boost 1.36.0 COMPONENTS date_time filesystem system ... )
2610
2611
2612
2613
2614                 if(Boost_FOUND)
2615                    include_directories(${Boost_INCLUDE_DIRS})
2616                    add_executable(foo foo.cc)
2617                    target_link_libraries(foo ${Boost_LIBRARIES})
2618                 endif()
2619
2620
2621
2622
2623
2624
2625
2626              The  components  list  needs  to  contain  actual names of boost
2627              libraries only, such as  "date_time"  for  "libboost_date_time".
2628              If  you're  using  parts of Boost that contain header files only
2629              (e.g. foreach) you do not need to specify COMPONENTS.
2630
2631
2632              You should provide a minimum version number that should be used.
2633              If  you  provide  this   version number and specify the REQUIRED
2634              attribute, this module will fail if it can't find the  specified
2635              or  a  later  version.  If  you specify a version number this is
2636              automatically put into the considered list  of  version  numbers
2637              and  thus  doesn't  need  to  be  specified  in  the Boost_ADDI‐
2638              TIONAL_VERSIONS variable (see below).
2639
2640
2641              NOTE for Visual Studio Users:
2642
2643
2644                   Automatic linking is used on MSVC & Borland compilers by default when
2645                   #including things in Boost.  It's important to note that setting
2646                   Boost_USE_STATIC_LIBS to OFF is NOT enough to get you dynamic linking,
2647                   should you need this feature.  Automatic linking typically uses static
2648                   libraries with a few exceptions (Boost.Python is one).
2649
2650
2651
2652
2653                   Please see the section below near Boost_LIB_DIAGNOSTIC_DEFINITIONS for
2654                   more details.  Adding a TARGET_LINK_LIBRARIES() as shown in the example
2655                   above appears to cause VS to link dynamically if Boost_USE_STATIC_LIBS
2656                   gets set to OFF.  It is suggested you avoid automatic linking since it
2657                   will make your application less portable.
2658
2659
2660
2661
2662              =========== The mess that is Boost_ADDITIONAL_VERSIONS  (sorry?)
2663              ============
2664
2665
2666              OK,  so  the  Boost_ADDITIONAL_VERSIONS  variable can be used to
2667              specify a list of boost version numbers  that  should  be  taken
2668              into  account when searching for Boost. Unfortunately boost puts
2669              the version number into the actual filename for  the  libraries,
2670              so this variable will certainly be needed in the future when new
2671              Boost versions are released.
2672
2673
2674              Currently this module searches for the  following  version  num‐
2675              bers:  1.33, 1.33.0, 1.33.1, 1.34, 1.34.0, 1.34.1, 1.35, 1.35.0,
2676              1.35.1, 1.36, 1.36.0, 1.36.1, 1.37, 1.37.0, 1.38, 1.38.0,  1.39,
2677              1.39.0,  1.40, 1.40.0, 1.41, 1.41.0, 1.42, 1.42.0, 1.43, 1.43.0,
2678              1.44, 1.44.0, 1.45, 1.45.0, 1.46, 1.46.0
2679
2680
2681              NOTE: If  you  add  a  new  major  1.x  version  in  Boost_ADDI‐
2682              TIONAL_VERSIONS  you  should  add  both  1.x  and 1.x.0 as shown
2683              above.  Official Boost include directories omit the 3rd  version
2684              number  from  include  paths  if it is 0 although not all binary
2685              Boost releases do so.
2686
2687
2688              set(Boost_ADDITIONAL_VERSIONS "1.78" "1.78.0" "1.79" "1.79.0")
2689
2690
2691              =====================================              =============
2692              ========================
2693
2694
2695              Variables  used  by this module, they can change the default be‐
2696              haviour and need to be set before calling find_package:
2697
2698
2699                 Boost_USE_MULTITHREADED      Can be set to OFF to use the non-multithreaded
2700                                              boost libraries.  If not specified, defaults
2701                                              to ON.
2702
2703
2704
2705
2706                 Boost_USE_STATIC_LIBS        Can be set to ON to force the use of the static
2707                                              boost libraries. Defaults to OFF.
2708
2709
2710
2711
2712                 Boost_NO_SYSTEM_PATHS        Set to TRUE to suppress searching in system
2713                                              paths (or other locations outside of BOOST_ROOT
2714                                              or BOOST_INCLUDEDIR).  Useful when specifying
2715                                              BOOST_ROOT. Defaults to OFF.
2716                                                [Since CMake 2.8.3]
2717
2718
2719
2720
2721                 Boost_USE_STATIC_RUNTIME     If enabled, searches for boost libraries
2722                                              linked against a static C++ standard library
2723                                              ('s' ABI tag). This option should be set to
2724                                              ON or OFF because the default behavior
2725                                              if not specified is platform dependent
2726                                              for backwards compatibility.
2727                                                [Since CMake 2.8.3]
2728
2729
2730
2731
2732                 Boost_USE_DEBUG_PYTHON       If enabled, searches for boost libraries
2733                                              compiled against a special debug build of
2734                                              Python ('y' ABI tag). Defaults to OFF.
2735                                                [Since CMake 2.8.3]
2736
2737
2738
2739
2740                 Boost_USE_STLPORT            If enabled, searches for boost libraries
2741                                              compiled against the STLPort standard
2742                                              library ('p' ABI tag). Defaults to OFF.
2743                                                [Since CMake 2.8.3]
2744
2745
2746
2747
2748                 Boost_USE_STLPORT_DEPRECATED_NATIVE_IOSTREAMS
2749                                              If enabled, searches for boost libraries
2750                                              compiled against the deprecated STLPort
2751                                              "native iostreams" feature ('n' ABI tag).
2752                                              Defaults to OFF.
2753                                                [Since CMake 2.8.3]
2754
2755
2756
2757
2758              Other Variables used by this module which you may want to set.
2759
2760
2761                 Boost_ADDITIONAL_VERSIONS    A list of version numbers to use for searching
2762                                              the boost include directory.  Please see
2763                                              the documentation above regarding this
2764                                              annoying, but necessary variable :(
2765
2766
2767
2768
2769                 Boost_DEBUG                  Set this to TRUE to enable debugging output
2770                                              of FindBoost.cmake if you are having problems.
2771                                              Please enable this before filing any bug
2772                                              reports.
2773
2774
2775
2776
2777                 Boost_DETAILED_FAILURE_MSG   FindBoost doesn't output detailed information
2778                                              about why it failed or how to fix the problem
2779                                              unless this is set to TRUE or the REQUIRED
2780                                              keyword is specified in find_package().
2781                                                [Since CMake 2.8.0]
2782
2783
2784
2785
2786                 Boost_COMPILER               Set this to the compiler suffix used by Boost
2787                                              (e.g. "-gcc43") if FindBoost has problems finding
2788                                              the proper Boost installation
2789
2790
2791
2792
2793                 Boost_THREADAPI                When building boost.thread, sometimes the name of the
2794                                              library contains an additional "pthread" or "win32"
2795                                              string known as the threadapi.  This can happen when
2796                                              compiling against pthreads on Windows or win32 threads
2797                                              on Cygwin.  You may specify this variable and if set
2798                                              when FindBoost searches for the Boost threading library
2799                                              it will first try to match the threadapi you specify.
2800                                                For Example: libboost_thread_win32-mgw45-mt-1_43.a
2801                                              might be found if you specified "win32" here before
2802                                              falling back on libboost_thread-mgw45-mt-1_43.a.
2803                                                [Since CMake 2.8.3]
2804
2805
2806
2807
2808                 Boost_REALPATH               Resolves symbolic links for discovered boost libraries
2809                                              to assist with packaging.  For example, instead of
2810                                              Boost_SYSTEM_LIBRARY_RELEASE being resolved to
2811                                              "/usr/lib/libboost_system.so" it would be
2812                                              "/usr/lib/libboost_system.so.1.42.0" instead.
2813                                              This does not affect linking and should not be
2814                                              enabled unless the user needs this information.
2815                                                [Since CMake 2.8.3]
2816
2817
2818
2819
2820
2821       FindBullet
2822              Try to find the Bullet physics engine
2823
2824
2825
2826
2827                This module defines the following variables
2828
2829
2830
2831
2832                BULLET_FOUND - Was bullet found
2833                BULLET_INCLUDE_DIRS - the Bullet include directories
2834                BULLET_LIBRARIES - Link to this, by default it includes
2835                                   all bullet components (Dynamics,
2836                                   Collision, LinearMath, & SoftBody)
2837
2838
2839
2840
2841                This module accepts the following variables
2842
2843
2844
2845
2846                BULLET_ROOT - Can be set to bullet install path or Windows build path
2847
2848
2849
2850
2851
2852       FindCABLE
2853              Find CABLE
2854
2855              This module finds if CABLE is installed and determines where the
2856              include  files  and libraries are.  This code sets the following
2857              variables:
2858
2859
2860                CABLE             the path to the cable executable
2861                CABLE_TCL_LIBRARY the path to the Tcl wrapper library
2862                CABLE_INCLUDE_DIR the path to the include directory
2863
2864
2865
2866
2867              To build Tcl wrappers, you should add shared library and link it
2868              to     ${CABLE_TCL_LIBRARY}.      You     should     also    add
2869              ${CABLE_INCLUDE_DIR} as an include directory.
2870
2871
2872       FindCUDA
2873              Tools for building CUDA C files: libraries and  build  dependen‐
2874              cies.
2875
2876              This  script  locates the NVIDIA CUDA C tools. It should work on
2877              linux, windows, and mac and should be reasonably up to date with
2878              CUDA C releases.
2879
2880
2881              This  script makes use of the standard find_package arguments of
2882              <VERSION>, REQUIRED and QUIET.  CUDA_FOUND  will  report  if  an
2883              acceptable version of CUDA was found.
2884
2885
2886              The script will prompt the user to specify CUDA_TOOLKIT_ROOT_DIR
2887              if the prefix cannot be determined by the location  of  nvcc  in
2888              the  system path and REQUIRED is specified to find_package(). To
2889              use a different installed version of the toolkit set  the  envi‐
2890              ronment   variable  CUDA_BIN_PATH  before  running  cmake  (e.g.
2891              CUDA_BIN_PATH=/usr/local/cuda1.0   instead   of   the    default
2892              /usr/local/cuda) or set CUDA_TOOLKIT_ROOT_DIR after configuring.
2893              If you change the value of CUDA_TOOLKIT_ROOT_DIR, various compo‐
2894              nents that depend on the path will be relocated.
2895
2896
2897              It  might  be necessary to set CUDA_TOOLKIT_ROOT_DIR manually on
2898              certain platforms, or to use a cuda runtime not installed in the
2899              default  location.  In  newer  versions  of the toolkit the cuda
2900              library is included with the graphics driver- be sure  that  the
2901              driver  version  matches what is needed by the cuda runtime ver‐
2902              sion.
2903
2904
2905              The following variables affect the behavior of the macros in the
2906              script  (in  alphebetical  order).  Note that any of these flags
2907              can be changed multiple times in the same directory before call‐
2908              ing    CUDA_ADD_EXECUTABLE,    CUDA_ADD_LIBRARY,   CUDA_COMPILE,
2909              CUDA_COMPILE_PTX or CUDA_WRAP_SRCS.
2910
2911
2912                CUDA_64_BIT_DEVICE_CODE (Default matches host bit size)
2913                -- Set to ON to compile for 64 bit device code, OFF for 32 bit device code.
2914                   Note that making this different from the host code when generating object
2915                   or C files from CUDA code just won't work, because size_t gets defined by
2916                   nvcc in the generated source.  If you compile to PTX and then load the
2917                   file yourself, you can mix bit sizes between device and host.
2918
2919
2920
2921
2922                CUDA_ATTACH_VS_BUILD_RULE_TO_CUDA_FILE (Default ON)
2923                -- Set to ON if you want the custom build rule to be attached to the source
2924                   file in Visual Studio.  Turn OFF if you add the same cuda file to multiple
2925                   targets.
2926
2927
2928
2929
2930                   This allows the user to build the target from the CUDA file; however, bad
2931                   things can happen if the CUDA source file is added to multiple targets.
2932                   When performing parallel builds it is possible for the custom build
2933                   command to be run more than once and in parallel causing cryptic build
2934                   errors.  VS runs the rules for every source file in the target, and a
2935                   source can have only one rule no matter how many projects it is added to.
2936                   When the rule is run from multiple targets race conditions can occur on
2937                   the generated file.  Eventually everything will get built, but if the user
2938                   is unaware of this behavior, there may be confusion.  It would be nice if
2939                   this script could detect the reuse of source files across multiple targets
2940                   and turn the option off for the user, but no good solution could be found.
2941
2942
2943
2944
2945                CUDA_BUILD_CUBIN (Default OFF)
2946                -- Set to ON to enable and extra compilation pass with the -cubin option in
2947                   Device mode. The output is parsed and register, shared memory usage is
2948                   printed during build.
2949
2950
2951
2952
2953                CUDA_BUILD_EMULATION (Default OFF for device mode)
2954                -- Set to ON for Emulation mode. -D_DEVICEEMU is defined for CUDA C files
2955                   when CUDA_BUILD_EMULATION is TRUE.
2956
2957
2958
2959
2960                CUDA_GENERATED_OUTPUT_DIR (Default CMAKE_CURRENT_BINARY_DIR)
2961                -- Set to the path you wish to have the generated files placed.  If it is
2962                   blank output files will be placed in CMAKE_CURRENT_BINARY_DIR.
2963                   Intermediate files will always be placed in
2964                   CMAKE_CURRENT_BINARY_DIR/CMakeFiles.
2965
2966
2967
2968
2969                CUDA_HOST_COMPILATION_CPP (Default ON)
2970                -- Set to OFF for C compilation of host code.
2971
2972
2973
2974
2975                CUDA_NVCC_FLAGS
2976                CUDA_NVCC_FLAGS_<CONFIG>
2977                -- Additional NVCC command line arguments.  NOTE: multiple arguments must be
2978                   semi-colon delimited (e.g. --compiler-options;-Wall)
2979
2980
2981
2982
2983                CUDA_PROPAGATE_HOST_FLAGS (Default ON)
2984                -- Set to ON to propagate CMAKE_{C,CXX}_FLAGS and their configuration
2985                   dependent counterparts (e.g. CMAKE_C_FLAGS_DEBUG) automatically to the
2986                   host compiler through nvcc's -Xcompiler flag.  This helps make the
2987                   generated host code match the rest of the system better.  Sometimes
2988                   certain flags give nvcc problems, and this will help you turn the flag
2989                   propagation off.  This does not affect the flags supplied directly to nvcc
2990                   via CUDA_NVCC_FLAGS or through the OPTION flags specified through
2991                   CUDA_ADD_LIBRARY, CUDA_ADD_EXECUTABLE, or CUDA_WRAP_SRCS.  Flags used for
2992                   shared library compilation are not affected by this flag.
2993
2994
2995
2996
2997                CUDA_VERBOSE_BUILD (Default OFF)
2998                -- Set to ON to see all the commands used when building the CUDA file.  When
2999                   using a Makefile generator the value defaults to VERBOSE (run make
3000                   VERBOSE=1 to see output), although setting CUDA_VERBOSE_BUILD to ON will
3001                   always print the output.
3002
3003
3004
3005
3006              The script creates the following macros (in alphebetical order):
3007
3008
3009                CUDA_ADD_CUFFT_TO_TARGET( cuda_target )
3010                -- Adds the cufft library to the target (can be any target).  Handles whether
3011                   you are in emulation mode or not.
3012
3013
3014
3015
3016                CUDA_ADD_CUBLAS_TO_TARGET( cuda_target )
3017                -- Adds the cublas library to the target (can be any target).  Handles
3018                   whether you are in emulation mode or not.
3019
3020
3021
3022
3023                CUDA_ADD_EXECUTABLE( cuda_target file0 file1 ...
3024                                     [WIN32] [MACOSX_BUNDLE] [EXCLUDE_FROM_ALL] [OPTIONS ...] )
3025                -- Creates an executable "cuda_target" which is made up of the files
3026                   specified.  All of the non CUDA C files are compiled using the standard
3027                   build rules specified by CMAKE and the cuda files are compiled to object
3028                   files using nvcc and the host compiler.  In addition CUDA_INCLUDE_DIRS is
3029                   added automatically to include_directories().  Some standard CMake target
3030                   calls can be used on the target after calling this macro
3031                   (e.g. set_target_properties and target_link_libraries), but setting
3032                   properties that adjust compilation flags will not affect code compiled by
3033                   nvcc.  Such flags should be modified before calling CUDA_ADD_EXECUTABLE,
3034                   CUDA_ADD_LIBRARY or CUDA_WRAP_SRCS.
3035
3036
3037
3038
3039                CUDA_ADD_LIBRARY( cuda_target file0 file1 ...
3040                                  [STATIC | SHARED | MODULE] [EXCLUDE_FROM_ALL] [OPTIONS ...] )
3041                -- Same as CUDA_ADD_EXECUTABLE except that a library is created.
3042
3043
3044
3045
3046                CUDA_BUILD_CLEAN_TARGET()
3047                -- Creates a convience target that deletes all the dependency files
3048                   generated.  You should make clean after running this target to ensure the
3049                   dependency files get regenerated.
3050
3051
3052
3053
3054                CUDA_COMPILE( generated_files file0 file1 ... [STATIC | SHARED | MODULE]
3055                              [OPTIONS ...] )
3056                -- Returns a list of generated files from the input source files to be used
3057                   with ADD_LIBRARY or ADD_EXECUTABLE.
3058
3059
3060
3061
3062                CUDA_COMPILE_PTX( generated_files file0 file1 ... [OPTIONS ...] )
3063                -- Returns a list of PTX files generated from the input source files.
3064
3065
3066
3067
3068                CUDA_INCLUDE_DIRECTORIES( path0 path1 ... )
3069                -- Sets the directories that should be passed to nvcc
3070                   (e.g. nvcc -Ipath0 -Ipath1 ... ). These paths usually contain other .cu
3071                   files.
3072
3073
3074
3075
3076                CUDA_WRAP_SRCS ( cuda_target format generated_files file0 file1 ...
3077                                 [STATIC | SHARED | MODULE] [OPTIONS ...] )
3078                -- This is where all the magic happens.  CUDA_ADD_EXECUTABLE,
3079                   CUDA_ADD_LIBRARY, CUDA_COMPILE, and CUDA_COMPILE_PTX all call this
3080                   function under the hood.
3081
3082
3083
3084
3085                   Given the list of files (file0 file1 ... fileN) this macro generates
3086                   custom commands that generate either PTX or linkable objects (use "PTX" or
3087                   "OBJ" for the format argument to switch).  Files that don't end with .cu
3088                   or have the HEADER_FILE_ONLY property are ignored.
3089
3090
3091
3092
3093                   The arguments passed in after OPTIONS are extra command line options to
3094                   give to nvcc.  You can also specify per configuration options by
3095                   specifying the name of the configuration followed by the options.  General
3096                   options must preceed configuration specific options.  Not all
3097                   configurations need to be specified, only the ones provided will be used.
3098
3099
3100
3101
3102                      OPTIONS -DFLAG=2 "-DFLAG_OTHER=space in flag"
3103                      DEBUG -g
3104                      RELEASE --use_fast_math
3105                      RELWITHDEBINFO --use_fast_math;-g
3106                      MINSIZEREL --use_fast_math
3107
3108
3109
3110
3111                   For certain configurations (namely VS generating object files with
3112                   CUDA_ATTACH_VS_BUILD_RULE_TO_CUDA_FILE set to ON), no generated file will
3113                   be produced for the given cuda file.  This is because when you add the
3114                   cuda file to Visual Studio it knows that this file produces an object file
3115                   and will link in the resulting object file automatically.
3116
3117
3118
3119
3120                   This script will also generate a separate cmake script that is used at
3121                   build time to invoke nvcc.  This is for several reasons.
3122
3123
3124
3125
3126                     1. nvcc can return negative numbers as return values which confuses
3127                     Visual Studio into thinking that the command succeeded.  The script now
3128                     checks the error codes and produces errors when there was a problem.
3129
3130
3131
3132
3133                     2. nvcc has been known to not delete incomplete results when it
3134                     encounters problems.  This confuses build systems into thinking the
3135                     target was generated when in fact an unusable file exists.  The script
3136                     now deletes the output files if there was an error.
3137
3138
3139
3140
3141                     3. By putting all the options that affect the build into a file and then
3142                     make the build rule dependent on the file, the output files will be
3143                     regenerated when the options change.
3144
3145
3146
3147
3148                   This script also looks at optional arguments STATIC, SHARED, or MODULE to
3149                   determine when to target the object compilation for a shared library.
3150                   BUILD_SHARED_LIBS is ignored in CUDA_WRAP_SRCS, but it is respected in
3151                   CUDA_ADD_LIBRARY.  On some systems special flags are added for building
3152                   objects intended for shared libraries.  A preprocessor macro,
3153                   <target_name>_EXPORTS is defined when a shared library compilation is
3154                   detected.
3155
3156
3157
3158
3159                   Flags passed into add_definitions with -D or /D are passed along to nvcc.
3160
3161
3162
3163
3164              The script defines the following variables:
3165
3166
3167                CUDA_VERSION_MAJOR    -- The major version of cuda as reported by nvcc.
3168                CUDA_VERSION_MINOR    -- The minor version.
3169                CUDA_VERSION
3170                CUDA_VERSION_STRING   -- CUDA_VERSION_MAJOR.CUDA_VERSION_MINOR
3171
3172
3173
3174
3175                CUDA_TOOLKIT_ROOT_DIR -- Path to the CUDA Toolkit (defined if not set).
3176                CUDA_SDK_ROOT_DIR     -- Path to the CUDA SDK.  Use this to find files in the
3177                                         SDK.  This script will not directly support finding
3178                                         specific libraries or headers, as that isn't
3179                                         supported by NVIDIA.  If you want to change
3180                                         libraries when the path changes see the
3181                                         FindCUDA.cmake script for an example of how to clear
3182                                         these variables.  There are also examples of how to
3183                                         use the CUDA_SDK_ROOT_DIR to locate headers or
3184                                         libraries, if you so choose (at your own risk).
3185                CUDA_INCLUDE_DIRS     -- Include directory for cuda headers.  Added automatically
3186                                         for CUDA_ADD_EXECUTABLE and CUDA_ADD_LIBRARY.
3187                CUDA_LIBRARIES        -- Cuda RT library.
3188                CUDA_CUFFT_LIBRARIES  -- Device or emulation library for the Cuda FFT
3189                                         implementation (alternative to:
3190                                         CUDA_ADD_CUFFT_TO_TARGET macro)
3191                CUDA_CUBLAS_LIBRARIES -- Device or emulation library for the Cuda BLAS
3192                                         implementation (alterative to:
3193                                         CUDA_ADD_CUBLAS_TO_TARGET macro).
3194
3195
3196
3197
3198
3199
3200
3201                James Bigler, NVIDIA Corp (nvidia.com - jbigler)
3202                Abe Stephens, SCI Institute -- http://www.sci.utah.edu/~abe/FindCuda.html
3203
3204
3205
3206
3207                Copyright (c) 2008 - 2009 NVIDIA Corporation.  All rights reserved.
3208
3209
3210
3211
3212                Copyright (c) 2007-2009
3213                Scientific Computing and Imaging Institute, University of Utah
3214
3215
3216
3217
3218                This code is licensed under the MIT License.  See the FindCUDA.cmake script
3219                for the text of the license.
3220
3221
3222       FindCURL
3223              Find curl
3224
3225              Find the native CURL headers and libraries.
3226
3227
3228                CURL_INCLUDE_DIRS - where to find curl/curl.h, etc.
3229                CURL_LIBRARIES    - List of libraries when using curl.
3230                CURL_FOUND        - True if curl found.
3231
3232
3233       FindCVS
3234
3235
3236              The module defines the following variables:
3237
3238
3239                 CVS_EXECUTABLE - path to cvs command line client
3240                 CVS_FOUND - true if the command line client was found
3241
3242              Example usage:
3243
3244
3245                 find_package(CVS)
3246                 if(CVS_FOUND)
3247                   message("CVS found: ${CVS_EXECUTABLE}")
3248                 endif(CVS_FOUND)
3249
3250
3251       FindCoin3D
3252              Find Coin3D (Open Inventor)
3253
3254              Coin3D is an implementation of the Open Inventor  API.  It  pro‐
3255              vides  data  structures  and  algorithms  for  3D  visualization
3256              http://www.coin3d.org/
3257
3258
3259              This module defines the following variables
3260
3261
3262                COIN3D_FOUND         - system has Coin3D - Open Inventor
3263                COIN3D_INCLUDE_DIRS  - where the Inventor include directory can be found
3264                COIN3D_LIBRARIES     - Link to this to use Coin3D
3265
3266
3267
3268
3269
3270       FindCups
3271              Try to find the Cups printing system
3272
3273              Once done this will define
3274
3275
3276                CUPS_FOUND - system has Cups
3277                CUPS_INCLUDE_DIR - the Cups include directory
3278                CUPS_LIBRARIES - Libraries needed to use Cups
3279                Set CUPS_REQUIRE_IPP_DELETE_ATTRIBUTE to TRUE if you need a version which
3280                features this function (i.e. at least 1.1.19)
3281
3282
3283       FindCurses
3284              Find the curses include file and library
3285
3286
3287
3288
3289                CURSES_FOUND - system has Curses
3290                CURSES_INCLUDE_DIR - the Curses include directory
3291                CURSES_LIBRARIES - The libraries needed to use Curses
3292                CURSES_HAVE_CURSES_H - true if curses.h is available
3293                CURSES_HAVE_NCURSES_H - true if ncurses.h is available
3294                CURSES_HAVE_NCURSES_NCURSES_H - true if ncurses/ncurses.h is available
3295                CURSES_HAVE_NCURSES_CURSES_H - true if ncurses/curses.h is available
3296                CURSES_LIBRARY - set for backwards compatibility with 2.4 CMake
3297
3298
3299
3300
3301              Set CURSES_NEED_NCURSES to TRUE before the  FIND_PACKAGE()  com‐
3302              mand if NCurses  functionality is required.
3303
3304
3305       FindCxxTest
3306              Find CxxTest
3307
3308              Find  the  CxxTest suite and declare a helper macro for creating
3309              unit tests and integrating them with CTest. For more details  on
3310              CxxTest see http://cxxtest.tigris.org
3311
3312
3313              INPUT Variables
3314
3315
3316                 CXXTEST_USE_PYTHON [deprecated since 1.3]
3317                     Only used in the case both Python & Perl
3318                     are detected on the system to control
3319                     which CxxTest code generator is used.
3320
3321
3322
3323
3324                     NOTE: In older versions of this Find Module,
3325                     this variable controlled if the Python test
3326                     generator was used instead of the Perl one,
3327                     regardless of which scripting language the
3328                     user had installed.
3329
3330
3331
3332
3333                 CXXTEST_TESTGEN_ARGS (since CMake 2.8.3)
3334                     Specify a list of options to pass to the CxxTest code
3335                     generator.  If not defined, --error-printer is
3336                     passed.
3337
3338
3339
3340
3341              OUTPUT Variables
3342
3343
3344                 CXXTEST_FOUND
3345                     True if the CxxTest framework was found
3346                 CXXTEST_INCLUDE_DIRS
3347                     Where to find the CxxTest include directory
3348                 CXXTEST_PERL_TESTGEN_EXECUTABLE
3349                     The perl-based test generator
3350                 CXXTEST_PYTHON_TESTGEN_EXECUTABLE
3351                     The python-based test generator
3352                 CXXTEST_TESTGEN_EXECUTABLE (since CMake 2.8.3)
3353                     The test generator that is actually used (chosen using user preferences
3354                     and interpreters found in the system)
3355                 CXXTEST_TESTGEN_INTERPRETER (since CMake 2.8.3)
3356                     The full path to the Perl or Python executable on the system
3357
3358
3359
3360
3361              MACROS for optional use by CMake users:
3362
3363
3364                  CXXTEST_ADD_TEST(<test_name> <gen_source_file> <input_files_to_testgen...>)
3365                     Creates a CxxTest runner and adds it to the CTest testing suite
3366                     Parameters:
3367                         test_name               The name of the test
3368                         gen_source_file         The generated source filename to be
3369                                                 generated by CxxTest
3370                         input_files_to_testgen  The list of header files containing the
3371                                                 CxxTest::TestSuite's to be included in
3372                                                 this runner
3373
3374                     #==============
3375                     Example Usage:
3376
3377
3378
3379
3380                         find_package(CxxTest)
3381                         if(CXXTEST_FOUND)
3382                             include_directories(${CXXTEST_INCLUDE_DIR})
3383                             enable_testing()
3384
3385
3386
3387
3388                             CXXTEST_ADD_TEST(unittest_foo foo_test.cc
3389                                               ${CMAKE_CURRENT_SOURCE_DIR}/foo_test.h)
3390                             target_link_libraries(unittest_foo foo) # as needed
3391                         endif()
3392
3393
3394
3395
3396                            This will (if CxxTest is found):
3397                            1. Invoke the testgen executable to autogenerate foo_test.cc in the
3398                               binary tree from "foo_test.h" in the current source directory.
3399                            2. Create an executable and test called unittest_foo.
3400
3401                    #=============
3402                    Example foo_test.h:
3403
3404
3405
3406
3407                        #include <cxxtest/TestSuite.h>
3408
3409                        class MyTestSuite : public CxxTest::TestSuite
3410                        {
3411                        public:
3412                           void testAddition( void )
3413                           {
3414                              TS_ASSERT( 1 + 1 > 1 );
3415                              TS_ASSERT_EQUALS( 1 + 1, 2 );
3416                           }
3417                        };
3418
3419
3420
3421
3422
3423       FindCygwin
3424              this module looks for Cygwin
3425
3426
3427
3428
3429
3430       FindDCMTK
3431              find DCMTK libraries and applications
3432
3433
3434
3435
3436
3437       FindDart
3438              Find DART
3439
3440              This  module  looks  for  the  dart  testing  software  and sets
3441              DART_ROOT to point to where it found it.
3442
3443
3444
3445       FindDevIL
3446
3447
3448              This module locates the developer's image  library.  http://ope
3449              nil.sourceforge.net/
3450
3451
3452              This module sets: IL_LIBRARIES the name of the IL library. These
3453              include the full path to the core DevIL library. This one has to
3454              be  linked  into  the application. ILU_LIBRARIES the name of the
3455              ILU library. Again, the full path. This library is  for  filters
3456              and effects, not actual loading. It doesn't have to be linked if
3457              the functionality it provides is not  used.  ILUT_LIBRARIES  the
3458              name  of  the  ILUT library. Full path. This part of the library
3459              interfaces with OpenGL. It is not strictly  needed  in  applica‐
3460              tions.  IL_INCLUDE_DIR  where to find the il.h, ilu.h and ilut.h
3461              files. IL_FOUND this is set to TRUE if all the  above  variables
3462              were  set.  This  will  be  set  to false if ILU or ILUT are not
3463              found, even if they are not needed.  In  most  systems,  if  one
3464              library  is found all the others are as well. That's the way the
3465              DevIL developers release it.
3466
3467
3468       FindDoxygen
3469              This module looks for Doxygen and the path to Graphviz's dot
3470
3471              Doxygen  is  a  documentation  generation  tool.    Please   see
3472              http://www.doxygen.org
3473
3474
3475              This module accepts the following optional variables:
3476
3477
3478                 DOXYGEN_SKIP_DOT       = If true this module will skip trying to find Dot
3479                                          (an optional component often used by Doxygen)
3480
3481
3482
3483
3484              This modules defines the following variables:
3485
3486
3487                 DOXYGEN_EXECUTABLE     = The path to the doxygen command.
3488                 DOXYGEN_FOUND          = Was Doxygen found or not?
3489
3490
3491
3492
3493                 DOXYGEN_DOT_EXECUTABLE = The path to the dot program used by doxygen.
3494                 DOXYGEN_DOT_FOUND      = Was Dot found or not?
3495                 DOXYGEN_DOT_PATH       = The path to dot not including the executable
3496
3497
3498
3499
3500
3501
3502
3503
3504       FindEXPAT
3505              Find expat
3506
3507              Find the native EXPAT headers and libraries.
3508
3509
3510                EXPAT_INCLUDE_DIRS - where to find expat.h, etc.
3511                EXPAT_LIBRARIES    - List of libraries when using expat.
3512                EXPAT_FOUND        - True if expat found.
3513
3514
3515       FindFLEX
3516              Find  flex  executable  and  provides a macro to generate custom
3517              build rules
3518
3519
3520
3521
3522              The module defines the following variables:
3523
3524
3525                FLEX_FOUND - true is flex executable is found
3526                FLEX_EXECUTABLE - the path to the flex executable
3527                FLEX_VERSION - the version of flex
3528                FLEX_LIBRARIES - The flex libraries
3529
3530
3531
3532
3533              The minimum required version of flex can be specified using  the
3534              standard syntax, e.g. FIND_PACKAGE(FLEX 2.5.13)
3535
3536
3537
3538
3539
3540              If flex is found on the system, the module provides the macro:
3541
3542
3543                FLEX_TARGET(Name FlexInput FlexOutput [COMPILE_FLAGS <string>])
3544
3545              which  creates  a  custom  command  to generate the <FlexOutput>
3546              file from the <FlexInput> file.   If   COMPILE_FLAGS  option  is
3547              specified,  the  next  parameter  is  added to the flex  command
3548              line. Name is an alias used to  get   details  of   this  custom
3549              command.  Indeed the  macro defines  the following variables:
3550
3551
3552                FLEX_${Name}_DEFINED - true is the macro ran successfully
3553                FLEX_${Name}_OUTPUTS - the source file generated by the custom rule, an
3554                alias for FlexOutput
3555                FLEX_${Name}_INPUT - the flex source file, an alias for ${FlexInput}
3556
3557
3558
3559
3560              Flex  scanners  oftenly  use  tokens  defined by Bison: the code
3561              generated by Flex  depends of the header   generated  by  Bison.
3562              This module also defines a macro:
3563
3564
3565                ADD_FLEX_BISON_DEPENDENCY(FlexTarget BisonTarget)
3566
3567              which   adds the  required dependency  between a  scanner and  a
3568              parser where  <FlexTarget>  and <BisonTarget>  are   the   first
3569              parameters  of respectively FLEX_TARGET and BISON_TARGET macros.
3570
3571
3572                ====================================================================
3573                Example:
3574
3575
3576
3577
3578                 find_package(BISON)
3579                 find_package(FLEX)
3580
3581
3582
3583
3584                 BISON_TARGET(MyParser parser.y ${CMAKE_CURRENT_BINARY_DIR}/parser.cpp)
3585                 FLEX_TARGET(MyScanner lexer.l  ${CMAKE_CURRENT_BINARY_DIR}/lexer.cpp)
3586                 ADD_FLEX_BISON_DEPENDENCY(MyScanner MyParser)
3587
3588
3589
3590
3591                 include_directories(${CMAKE_CURRENT_BINARY_DIR})
3592                 add_executable(Foo
3593                    Foo.cc
3594                    ${BISON_MyParser_OUTPUTS}
3595                    ${FLEX_MyScanner_OUTPUTS}
3596                 )
3597                ====================================================================
3598
3599
3600       FindFLTK
3601              Find the native FLTK includes and library
3602
3603
3604
3605
3606              By default FindFLTK.cmake will search for all of the FLTK compo‐
3607              nents and add them to the FLTK_LIBRARIES variable.
3608
3609
3610                 You can limit the components which get placed in FLTK_LIBRARIES by
3611                 defining one or more of the following three options:
3612
3613
3614
3615
3616                   FLTK_SKIP_OPENGL, set to true to disable searching for opengl and
3617                                     the FLTK GL library
3618                   FLTK_SKIP_FORMS, set to true to disable searching for fltk_forms
3619                   FLTK_SKIP_IMAGES, set to true to disable searching for fltk_images
3620
3621
3622
3623
3624                   FLTK_SKIP_FLUID, set to true if the fluid binary need not be present
3625                                    at build time
3626
3627
3628
3629
3630              The following variables will be defined:
3631
3632
3633                   FLTK_FOUND, True if all components not skipped were found
3634                   FLTK_INCLUDE_DIR, where to find include files
3635                   FLTK_LIBRARIES, list of fltk libraries you should link against
3636                   FLTK_FLUID_EXECUTABLE, where to find the Fluid tool
3637                   FLTK_WRAP_UI, This enables the FLTK_WRAP_UI command
3638
3639
3640
3641
3642              The following cache variables are assigned  but  should  not  be
3643              used. See the FLTK_LIBRARIES variable instead.
3644
3645
3646                   FLTK_BASE_LIBRARY   = the full path to fltk.lib
3647                   FLTK_GL_LIBRARY     = the full path to fltk_gl.lib
3648                   FLTK_FORMS_LIBRARY  = the full path to fltk_forms.lib
3649                   FLTK_IMAGES_LIBRARY = the full path to fltk_images.lib
3650
3651
3652       FindFLTK2
3653              Find the native FLTK2 includes and library
3654
3655              The following settings are defined
3656
3657
3658                FLTK2_FLUID_EXECUTABLE, where to find the Fluid tool
3659                FLTK2_WRAP_UI, This enables the FLTK2_WRAP_UI command
3660                FLTK2_INCLUDE_DIR, where to find include files
3661                FLTK2_LIBRARIES, list of fltk2 libraries
3662                FLTK2_FOUND, Don't use FLTK2 if false.
3663
3664              The following settings should not be used in general.
3665
3666
3667                FLTK2_BASE_LIBRARY   = the full path to fltk2.lib
3668                FLTK2_GL_LIBRARY     = the full path to fltk2_gl.lib
3669                FLTK2_IMAGES_LIBRARY = the full path to fltk2_images.lib
3670
3671
3672       FindFreetype
3673              Locate FreeType library
3674
3675              This module defines
3676
3677
3678                FREETYPE_LIBRARIES, the library to link against
3679                FREETYPE_FOUND, if false, do not try to link to FREETYPE
3680                FREETYPE_INCLUDE_DIRS, where to find headers.
3681                This is the concatenation of the paths:
3682                FREETYPE_INCLUDE_DIR_ft2build
3683                FREETYPE_INCLUDE_DIR_freetype2
3684
3685
3686
3687
3688              $FREETYPE_DIR  is  an environment variable that would correspond
3689              to  the  ./configure  --prefix=$FREETYPE_DIR  used  in  building
3690              FREETYPE.
3691
3692
3693       FindGCCXML
3694              Find the GCC-XML front-end executable.
3695
3696
3697
3698
3699              This module will define the following variables:
3700
3701
3702                GCCXML - the GCC-XML front-end executable.
3703
3704
3705       FindGDAL
3706
3707
3708              Locate gdal
3709
3710
3711              This module accepts the following environment variables:
3712
3713
3714                  GDAL_DIR or GDAL_ROOT - Specify the location of GDAL
3715
3716
3717
3718
3719              This module defines the following CMake variables:
3720
3721
3722                  GDAL_FOUND - True if libgdal is found
3723                  GDAL_LIBRARY - A variable pointing to the GDAL library
3724                  GDAL_INCLUDE_DIR - Where to find the headers
3725
3726
3727       FindGIF
3728
3729
3730              This  module  defines  GIF_LIBRARIES  -  libraries to link to in
3731              order to use GIF  GIF_FOUND,  if  false,  do  not  try  to  link
3732              GIF_INCLUDE_DIR, where to find the headers
3733
3734
3735              $GIF_DIR is an environment variable that would correspond to the
3736              ./configure --prefix=$GIF_DIR
3737
3738
3739       FindGLUT
3740              try to find glut library and include files
3741
3742                GLUT_INCLUDE_DIR, where to find GL/glut.h, etc.
3743                GLUT_LIBRARIES, the libraries to link against
3744                GLUT_FOUND, If false, do not try to use GLUT.
3745
3746              Also defined, but not for general use are:
3747
3748
3749                GLUT_glut_LIBRARY = the full path to the glut library.
3750                GLUT_Xmu_LIBRARY  = the full path to the Xmu library.
3751                GLUT_Xi_LIBRARY   = the full path to the Xi Library.
3752
3753
3754       FindGTK
3755              try to find GTK (and glib) and GTKGLArea
3756
3757                GTK_INCLUDE_DIR   - Directories to include to use GTK
3758                GTK_LIBRARIES     - Files to link against to use GTK
3759                GTK_FOUND         - GTK was found
3760                GTK_GL_FOUND      - GTK's GL features were found
3761
3762
3763       FindGTK2
3764              FindGTK2.cmake
3765
3766              This module can find the GTK2 widget libraries  and  several  of
3767              its other optional components like gtkmm, glade, and glademm.
3768
3769
3770              NOTE:  If  you  intend  to  use version checking, CMake 2.6.2 or
3771              later is
3772
3773
3774                     required.
3775
3776
3777
3778
3779              Specify one or more of the following components as you call this
3780              find module. See example below.
3781
3782
3783                 gtk
3784                 gtkmm
3785                 glade
3786                 glademm
3787
3788
3789
3790
3791              The following variables will be defined for your use
3792
3793
3794                 GTK2_FOUND - Were all of your specified components found?
3795                 GTK2_INCLUDE_DIRS - All include directories
3796                 GTK2_LIBRARIES - All libraries
3797
3798
3799
3800
3801                 GTK2_VERSION - The version of GTK2 found (x.y.z)
3802                 GTK2_MAJOR_VERSION - The major version of GTK2
3803                 GTK2_MINOR_VERSION - The minor version of GTK2
3804                 GTK2_PATCH_VERSION - The patch version of GTK2
3805
3806
3807
3808
3809              Optional variables you can define prior to calling this module:
3810
3811
3812                 GTK2_DEBUG - Enables verbose debugging of the module
3813                 GTK2_SKIP_MARK_AS_ADVANCED - Disable marking cache variables as advanced
3814                 GTK2_ADDITIONAL_SUFFIXES - Allows defining additional directories to
3815                                            search for include files
3816
3817
3818
3819
3820              ================= Example Usage:
3821
3822
3823                 Call find_package() once, here are some examples to pick from:
3824
3825
3826
3827
3828                 Require GTK 2.6 or later
3829                     find_package(GTK2 2.6 REQUIRED gtk)
3830
3831
3832
3833
3834                 Require GTK 2.10 or later and Glade
3835                     find_package(GTK2 2.10 REQUIRED gtk glade)
3836
3837
3838
3839
3840                 Search for GTK/GTKMM 2.8 or later
3841                     find_package(GTK2 2.8 COMPONENTS gtk gtkmm)
3842
3843
3844
3845
3846                 if(GTK2_FOUND)
3847                    include_directories(${GTK2_INCLUDE_DIRS})
3848                    add_executable(mygui mygui.cc)
3849                    target_link_libraries(mygui ${GTK2_LIBRARIES})
3850                 endif()
3851
3852
3853
3854
3855
3856       FindGTest
3857              --------------------
3858
3859              Locate the Google C++ Testing Framework.
3860
3861
3862              Defines the following variables:
3863
3864
3865                 GTEST_FOUND - Found the Google Testing framework
3866                 GTEST_INCLUDE_DIRS - Include directories
3867
3868
3869
3870
3871              Also  defines  the  library variables below as normal variables.
3872              These contain debug/optimized keywords when a debugging  library
3873              is found.
3874
3875
3876                 GTEST_BOTH_LIBRARIES - Both libgtest & libgtest-main
3877                 GTEST_LIBRARIES - libgtest
3878                 GTEST_MAIN_LIBRARIES - libgtest-main
3879
3880
3881
3882
3883              Accepts the following variables as input:
3884
3885
3886                 GTEST_ROOT - (as a CMake or environment variable)
3887                              The root directory of the gtest install prefix
3888
3889
3890
3891
3892                 GTEST_MSVC_SEARCH - If compiling with MSVC, this variable can be set to
3893                                     "MD" or "MT" to enable searching a GTest build tree
3894                                     (defaults: "MD")
3895
3896
3897
3898
3899              Example Usage:
3900
3901
3902                  enable_testing()
3903                  find_package(GTest REQUIRED)
3904                  include_directories(${GTEST_INCLUDE_DIRS})
3905
3906
3907
3908
3909                  add_executable(foo foo.cc)
3910                  target_link_libraries(foo ${GTEST_BOTH_LIBRARIES})
3911
3912
3913
3914
3915                  add_test(AllTestsInFoo foo)
3916
3917
3918
3919
3920
3921
3922
3923              If you would like each Google test to show up in CTest as a test
3924              you may use the following macro. NOTE: It will  slow  down  your
3925              tests  by  running an executable for each test and test fixture.
3926              You will also have to rerun CMake after adding or removing tests
3927              or test fixtures.
3928
3929
3930              GTEST_ADD_TESTS(executable extra_args ARGN)
3931
3932
3933                  executable = The path to the test executable
3934                  extra_args = Pass a list of extra arguments to be passed to
3935                               executable enclosed in quotes (or "" for none)
3936                  ARGN =       A list of source files to search for tests & test
3937                               fixtures.
3938
3939
3940
3941
3942                Example:
3943                   set(FooTestArgs --foo 1 --bar 2)
3944                   add_executable(FooTest FooUnitTest.cc)
3945                   GTEST_ADD_TESTS(FooTest "${FooTestArgs}" FooUnitTest.cc)
3946
3947
3948       FindGettext
3949              Find GNU gettext tools
3950
3951              This module looks for the GNU gettext tools. This module defines
3952              the  following values:
3953
3954
3955                GETTEXT_MSGMERGE_EXECUTABLE: the full path to the msgmerge tool.
3956                GETTEXT_MSGFMT_EXECUTABLE: the full path to the msgfmt tool.
3957                GETTEXT_FOUND: True if gettext has been found.
3958
3959
3960
3961
3962              Additionally it  provides  the  following  macros:  GETTEXT_CRE‐
3963              ATE_TRANSLATIONS ( outputFile [ALL] file1 ... fileN )
3964
3965
3966                  This will create a target "translations" which will convert the
3967                  given input po files into the binary output mo file. If the
3968                  ALL option is used, the translations will also be created when
3969                  building the default target.
3970
3971
3972       FindGit
3973
3974
3975              The module defines the following variables:
3976
3977
3978                 GIT_EXECUTABLE - path to git command line client
3979                 GIT_FOUND - true if the command line client was found
3980
3981              Example usage:
3982
3983
3984                 find_package(Git)
3985                 if(GIT_FOUND)
3986                   message("git found: ${GIT_EXECUTABLE}")
3987                 endif()
3988
3989
3990       FindGnuTLS
3991              Try to find the GNU Transport Layer Security library (gnutls)
3992
3993
3994
3995
3996              Once done this will define
3997
3998
3999                GNUTLS_FOUND - System has gnutls
4000                GNUTLS_INCLUDE_DIR - The gnutls include directory
4001                GNUTLS_LIBRARIES - The libraries needed to use gnutls
4002                GNUTLS_DEFINITIONS - Compiler switches required for using gnutls
4003
4004
4005       FindGnuplot
4006              this module looks for gnuplot
4007
4008
4009
4010
4011              Once done this will define
4012
4013
4014                GNUPLOT_FOUND - system has Gnuplot
4015                GNUPLOT_EXECUTABLE - the Gnuplot executable
4016
4017
4018       FindHDF5
4019              Find  HDF5,  a  library  for reading and writing self describing
4020              array data.
4021
4022
4023
4024
4025              This module invokes the HDF5 wrapper  compiler  that  should  be
4026              installed  alongside  HDF5.   Depending upon the HDF5 Configura‐
4027              tion, the wrapper compiler is called either h5cc or  h5pcc.   If
4028              this  succeeds,  the module will then call the compiler with the
4029              -show argument to see what flags are used when compiling an HDF5
4030              client application.
4031
4032
4033              The  module  will optionally accept the COMPONENTS argument.  If
4034              no COMPONENTS are specified, then the find module  will  default
4035              to  finding  only the HDF5 C library.  If one or more COMPONENTS
4036              are specified, the module will  attempt  to  find  the  language
4037              bindings  for  the  specified  components.   Currently, the only
4038              valid components are C and CXX.  The module does not yet support
4039              finding the Fortran bindings.  If the COMPONENTS argument is not
4040              given, the module will attempt to find only the C bindings.
4041
4042
4043              On  UNIX  systems,  this   module   will   read   the   variable
4044              HDF5_USE_STATIC_LIBRARIES  to determine whether or not to prefer
4045              a static link to a dynamic link for HDF5 and all of it's  depen‐
4046              dencies.    To   use   this   feature,   make   sure   that  the
4047              HDF5_USE_STATIC_LIBRARIES variable is set  before  the  call  to
4048              find_package.
4049
4050
4051              To  provide the module with a hint about where to find your HDF5
4052              installation, you can set the  environment  variable  HDF5_ROOT.
4053              The  Find  module will then look in this path when searching for
4054              HDF5 executables, paths, and libraries.
4055
4056
4057              In addition to finding the includes and  libraries  required  to
4058              compile  an  HDF5  client application, this module also makes an
4059              effort to find tools that come with the HDF5  distribution  that
4060              may be useful for regression testing.
4061
4062
4063              This module will define the following variables:
4064
4065
4066                HDF5_INCLUDE_DIRS - Location of the hdf5 includes
4067                HDF5_INCLUDE_DIR - Location of the hdf5 includes (deprecated)
4068                HDF5_DEFINITIONS - Required compiler definitions for HDF5
4069                HDF5_C_LIBRARIES - Required libraries for the HDF5 C bindings.
4070                HDF5_CXX_LIBRARIES - Required libraries for the HDF5 C++ bindings
4071                HDF5_LIBRARIES - Required libraries for all requested bindings
4072                HDF5_FOUND - true if HDF5 was found on the system
4073                HDF5_LIBRARY_DIRS - the full set of library directories
4074                HDF5_IS_PARALLEL - Whether or not HDF5 was found with parallel IO support
4075                HDF5_C_COMPILER_EXECUTABLE - the path to the HDF5 C wrapper compiler
4076                HDF5_CXX_COMPILER_EXECUTABLE - the path to the HDF5 C++ wrapper compiler
4077                HDF5_DIFF_EXECUTABLE - the path to the HDF5 dataset comparison tool
4078
4079
4080       FindHSPELL
4081              Try to find Hspell
4082
4083              Once done this will define
4084
4085
4086                HSPELL_FOUND - system has Hspell
4087                HSPELL_INCLUDE_DIR - the Hspell include directory
4088                HSPELL_LIBRARIES - The libraries needed to use Hspell
4089                HSPELL_DEFINITIONS - Compiler switches required for using Hspell
4090
4091
4092
4093
4094                HSPELL_VERSION_STRING - The version of Hspell found (x.y)
4095                HSPELL_MAJOR_VERSION  - the major version of Hspell
4096                HSPELL_MINOR_VERSION  - The minor version of Hspell
4097
4098
4099       FindHTMLHelp
4100              This module looks for Microsoft HTML Help Compiler
4101
4102              It defines:
4103
4104
4105                 HTML_HELP_COMPILER     : full path to the Compiler (hhc.exe)
4106                 HTML_HELP_INCLUDE_PATH : include path to the API (htmlhelp.h)
4107                 HTML_HELP_LIBRARY      : full path to the library (htmlhelp.lib)
4108
4109
4110
4111
4112
4113       FindITK
4114              Find an ITK installation or build tree.
4115
4116
4117       FindImageMagick
4118              Find the ImageMagick binary suite.
4119
4120              This module will search for a set of ImageMagick tools specified
4121              as components  in  the  FIND_PACKAGE  call.  Typical  components
4122              include,  but are not limited to (future versions of ImageMagick
4123              might have additional components not listed here):
4124
4125
4126                animate
4127                compare
4128                composite
4129                conjure
4130                convert
4131                display
4132                identify
4133                import
4134                mogrify
4135                montage
4136                stream
4137
4138
4139
4140
4141              If no component is specified in the FIND_PACKAGE call,  then  it
4142              only  searches  for  the  ImageMagick executable directory. This
4143              code defines the following variables:
4144
4145
4146                ImageMagick_FOUND                  - TRUE if all components are found.
4147                ImageMagick_EXECUTABLE_DIR         - Full path to executables directory.
4148                ImageMagick_<component>_FOUND      - TRUE if <component> is found.
4149                ImageMagick_<component>_EXECUTABLE - Full path to <component> executable.
4150
4151
4152
4153
4154              There are also components for the following ImageMagick APIs:
4155
4156
4157                Magick++
4158                MagickWand
4159                MagickCore
4160
4161
4162
4163
4164              For these components the following variables are set:
4165
4166
4167                ImageMagick_FOUND                    - TRUE if all components are found.
4168                ImageMagick_INCLUDE_DIRS             - Full paths to all include dirs.
4169                ImageMagick_LIBRARIES                - Full paths to all libraries.
4170                ImageMagick_<component>_FOUND        - TRUE if <component> is found.
4171                ImageMagick_<component>_INCLUDE_DIRS - Full path to <component> include dirs.
4172                ImageMagick_<component>_LIBRARIES    - Full path to <component> libraries.
4173
4174
4175
4176
4177              Example Usages:
4178
4179
4180                FIND_PACKAGE(ImageMagick)
4181                FIND_PACKAGE(ImageMagick COMPONENTS convert)
4182                FIND_PACKAGE(ImageMagick COMPONENTS convert mogrify display)
4183                FIND_PACKAGE(ImageMagick COMPONENTS Magick++)
4184                FIND_PACKAGE(ImageMagick COMPONENTS Magick++ convert)
4185
4186
4187
4188
4189              Note that  the  standard  FIND_PACKAGE  features  are  supported
4190              (i.e., QUIET, REQUIRED, etc.).
4191
4192
4193       FindJNI
4194              Find JNI java libraries.
4195
4196              This  module finds if Java is installed and determines where the
4197              include files and libraries are. It  also  determines  what  the
4198              name of the library is. This code sets the following variables:
4199
4200
4201
4202                JNI_INCLUDE_DIRS      = the include dirs to use
4203                JNI_LIBRARIES         = the libraries to use
4204                JNI_FOUND             = TRUE if JNI headers and libraries were found.
4205                JAVA_AWT_LIBRARY      = the path to the jawt library
4206                JAVA_JVM_LIBRARY      = the path to the jvm library
4207                JAVA_INCLUDE_PATH     = the include path to jni.h
4208                JAVA_INCLUDE_PATH2    = the include path to jni_md.h
4209                JAVA_AWT_INCLUDE_PATH = the include path to jawt.h
4210
4211
4212
4213
4214
4215       FindJPEG
4216              Find JPEG
4217
4218              Find the native JPEG includes and library This module defines
4219
4220
4221                JPEG_INCLUDE_DIR, where to find jpeglib.h, etc.
4222                JPEG_LIBRARIES, the libraries needed to use JPEG.
4223                JPEG_FOUND, If false, do not try to use JPEG.
4224
4225              also defined, but not for general use are
4226
4227
4228                JPEG_LIBRARY, where to find the JPEG library.
4229
4230
4231       FindJasper
4232              Try to find the Jasper JPEG2000 library
4233
4234              Once done this will define
4235
4236
4237                JASPER_FOUND - system has Jasper
4238                JASPER_INCLUDE_DIR - the Jasper include directory
4239                JASPER_LIBRARIES - The libraries needed to use Jasper
4240
4241
4242       FindJava
4243              Find Java
4244
4245              This  module finds if Java is installed and determines where the
4246              include files and libraries are. This code  sets  the  following
4247              variables:
4248
4249
4250                Java_JAVA_EXECUTABLE    = the full path to the Java runtime
4251                Java_JAVAC_EXECUTABLE   = the full path to the Java compiler
4252                Java_JAR_EXECUTABLE     = the full path to the Java archiver
4253                Java_VERSION_STRING     = Version of the package found (java version), eg. 1.6.0_12
4254                Java_VERSION_MAJOR      = The major version of the package found.
4255                Java_VERSION_MINOR      = The minor version of the package found.
4256                Java_VERSION_PATCH      = The patch version of the package found.
4257                Java_VERSION_TWEAK      = The tweak version of the package found (after '_')
4258                Java_VERSION            = This is set to: $major.$minor.$patch(.$tweak)
4259
4260
4261
4262
4263              The  minimum required version of Java can be specified using the
4264              standard CMake syntax, e.g. FIND_PACKAGE(Java 1.5)
4265
4266
4267              NOTE: ${Java_VERSION} and ${Java_VERSION_STRING} are not guaran‐
4268              teed  to be identical. For example some java version may return:
4269              Java_VERSION_STRING  =  1.5.0_17   and   Java_VERSION          =
4270              1.5.0.17
4271
4272
4273              another  example  is  the  Java OEM, with: Java_VERSION_STRING =
4274              1.6.0-oem and Java_VERSION        = 1.6.0
4275
4276
4277              For these components the following variables are set:
4278
4279
4280                Java_FOUND                    - TRUE if all components are found.
4281                Java_INCLUDE_DIRS             - Full paths to all include dirs.
4282                Java_LIBRARIES                - Full paths to all libraries.
4283                Java_<component>_FOUND        - TRUE if <component> is found.
4284
4285
4286
4287
4288              Example Usages:
4289
4290
4291                FIND_PACKAGE(Java)
4292                FIND_PACKAGE(Java COMPONENTS Runtime)
4293                FIND_PACKAGE(Java COMPONENTS Development)
4294
4295
4296
4297
4298
4299       FindKDE3
4300              Find the KDE3 include and library dirs,  KDE  preprocessors  and
4301              define a some macros
4302
4303
4304
4305
4306              This module defines the following variables:
4307
4308
4309                KDE3_DEFINITIONS         - compiler definitions required for compiling KDE software
4310                KDE3_INCLUDE_DIR         - the KDE include directory
4311                KDE3_INCLUDE_DIRS        - the KDE and the Qt include directory, for use with INCLUDE_DIRECTORIES()
4312                KDE3_LIB_DIR             - the directory where the KDE libraries are installed, for use with LINK_DIRECTORIES()
4313                QT_AND_KDECORE_LIBS      - this contains both the Qt and the kdecore library
4314                KDE3_DCOPIDL_EXECUTABLE  - the dcopidl executable
4315                KDE3_DCOPIDL2CPP_EXECUTABLE - the dcopidl2cpp executable
4316                KDE3_KCFGC_EXECUTABLE    - the kconfig_compiler executable
4317                KDE3_FOUND               - set to TRUE if all of the above has been found
4318
4319
4320
4321
4322              The following user adjustable options are provided:
4323
4324
4325                KDE3_BUILD_TESTS - enable this to build KDE testcases
4326
4327
4328
4329
4330
4331
4332
4333              It  also  adds  the  following  macros  (from  KDE3Macros.cmake)
4334              SRCS_VAR is always the  variable  which  contains  the  list  of
4335              source files for your application or library.
4336
4337
4338              KDE3_AUTOMOC(file1 ... fileN)
4339
4340
4341                  Call this if you want to have automatic moc file handling.
4342                  This means if you include "foo.moc" in the source file foo.cpp
4343                  a moc file for the header foo.h will be created automatically.
4344                  You can set the property SKIP_AUTOMAKE using SET_SOURCE_FILES_PROPERTIES()
4345                  to exclude some files in the list from being processed.
4346
4347
4348
4349
4350              KDE3_ADD_MOC_FILES(SRCS_VAR file1 ... fileN )
4351
4352
4353                  If you don't use the KDE3_AUTOMOC() macro, for the files
4354                  listed here moc files will be created (named "foo.moc.cpp")
4355
4356
4357
4358
4359              KDE3_ADD_DCOP_SKELS(SRCS_VAR header1.h ... headerN.h )
4360
4361
4362                  Use this to generate DCOP skeletions from the listed headers.
4363
4364
4365
4366
4367              KDE3_ADD_DCOP_STUBS(SRCS_VAR header1.h ... headerN.h )
4368
4369
4370                   Use this to generate DCOP stubs from the listed headers.
4371
4372
4373
4374
4375              KDE3_ADD_UI_FILES(SRCS_VAR file1.ui ... fileN.ui )
4376
4377
4378                  Use this to add the Qt designer ui files to your application/library.
4379
4380
4381
4382
4383              KDE3_ADD_KCFG_FILES(SRCS_VAR file1.kcfgc ... fileN.kcfgc )
4384
4385
4386                  Use this to add KDE kconfig compiler files to your application/library.
4387
4388
4389
4390
4391              KDE3_INSTALL_LIBTOOL_FILE(target)
4392
4393
4394                  This will create and install a simple libtool file for the given target.
4395
4396
4397
4398
4399              KDE3_ADD_EXECUTABLE(name file1 ... fileN )
4400
4401
4402                  Currently identical to ADD_EXECUTABLE(), may provide some advanced features in the future.
4403
4404
4405
4406
4407              KDE3_ADD_KPART(name [WITH_PREFIX] file1 ... fileN )
4408
4409
4410                  Create a KDE plugin (KPart, kioslave, etc.) from the given source files.
4411                  If WITH_PREFIX is given, the resulting plugin will have the prefix "lib", otherwise it won't.
4412                  It creates and installs an appropriate libtool la-file.
4413
4414
4415
4416
4417              KDE3_ADD_KDEINIT_EXECUTABLE(name file1 ... fileN )
4418
4419
4420                  Create a KDE application in the form of a module loadable via kdeinit.
4421                  A library named kdeinit_<name> will be created and a small executable which links to it.
4422
4423
4424
4425
4426              The option KDE3_ENABLE_FINAL to enable all-in-one compilation is
4427              no longer supported.
4428
4429
4430
4431
4432
4433              Author: Alexander Neundorf <neundorf@kde.org>
4434
4435
4436       FindKDE4
4437
4438
4439              Find KDE4 and provide all necessary variables and macros to com‐
4440              pile software for it. It looks for KDE 4 in the following direc‐
4441              tories in the given order:
4442
4443
4444                CMAKE_INSTALL_PREFIX
4445                KDEDIRS
4446                /opt/kde4
4447
4448
4449
4450
4451              Please look in FindKDE4Internal.cmake and  KDE4Macros.cmake  for
4452              more information. They are installed with the KDE 4 libraries in
4453              $KDEDIRS/share/apps/cmake/modules/.
4454
4455
4456              Author: Alexander Neundorf <neundorf@kde.org>
4457
4458
4459       FindLAPACK
4460              Find LAPACK library
4461
4462              This module finds an installed fortran library  that  implements
4463              the       LAPACK       linear-algebra       interface       (see
4464              http://www.netlib.org/lapack/).
4465
4466
4467              The approach follows that taken for  the  autoconf  macro  file,
4468              acx_lapack.m4    (distributed    at    http://ac-archive.source
4469              forge.net/ac-archive/acx_lapack.html).
4470
4471
4472              This module sets the following variables:
4473
4474
4475                LAPACK_FOUND - set to true if a library implementing the LAPACK interface
4476                  is found
4477                LAPACK_LINKER_FLAGS - uncached list of required linker flags (excluding -l
4478                  and -L).
4479                LAPACK_LIBRARIES - uncached list of libraries (using full path name) to
4480                  link against to use LAPACK
4481                LAPACK95_LIBRARIES - uncached list of libraries (using full path name) to
4482                  link against to use LAPACK95
4483                LAPACK95_FOUND - set to true if a library implementing the LAPACK f95
4484                  interface is found
4485                BLA_STATIC  if set on this determines what kind of linkage we do (static)
4486                BLA_VENDOR  if set checks only the specified vendor, if not set checks
4487                   all the possibilities
4488                BLA_F95     if set on tries to find the f95 interfaces for BLAS/LAPACK
4489
4490              ##  List  of  vendors  (BLA_VENDOR)  valid  in  this  module   #
4491              Intel(mkl), ACML,Apple, NAS, Generic
4492
4493
4494       FindLATEX
4495              Find Latex
4496
4497              This module finds if Latex is installed and determines where the
4498              executables are. This code sets the following variables:
4499
4500
4501
4502                LATEX_COMPILER:       path to the LaTeX compiler
4503                PDFLATEX_COMPILER:    path to the PdfLaTeX compiler
4504                BIBTEX_COMPILER:      path to the BibTeX compiler
4505                MAKEINDEX_COMPILER:   path to the MakeIndex compiler
4506                DVIPS_CONVERTER:      path to the DVIPS converter
4507                PS2PDF_CONVERTER:     path to the PS2PDF converter
4508                LATEX2HTML_CONVERTER: path to the LaTeX2Html converter
4509
4510
4511
4512
4513
4514       FindLibArchive
4515              Find libarchive library and headers
4516
4517              The module defines the following variables:
4518
4519
4520                LibArchive_FOUND        - true if libarchive was found
4521                LibArchive_INCLUDE_DIRS - include search path
4522                LibArchive_LIBRARIES    - libraries to link
4523                LibArchive_VERSION      - libarchive 3-component version number
4524
4525
4526       FindLibXml2
4527              Try to find the LibXml2 xml processing library
4528
4529              Once done this will define
4530
4531
4532                LIBXML2_FOUND - System has LibXml2
4533                LIBXML2_INCLUDE_DIR - The LibXml2 include directory
4534                LIBXML2_LIBRARIES - The libraries needed to use LibXml2
4535                LIBXML2_DEFINITIONS - Compiler switches required for using LibXml2
4536                LIBXML2_XMLLINT_EXECUTABLE - The XML checking tool xmllint coming with LibXml2
4537
4538
4539       FindLibXslt
4540              Try to find the LibXslt library
4541
4542              Once done this will define
4543
4544
4545                LIBXSLT_FOUND - system has LibXslt
4546                LIBXSLT_INCLUDE_DIR - the LibXslt include directory
4547                LIBXSLT_LIBRARIES - Link these to LibXslt
4548                LIBXSLT_DEFINITIONS - Compiler switches required for using LibXslt
4549
4550
4551       FindLua50
4552
4553
4554              Locate Lua library This module defines
4555
4556
4557                LUA50_FOUND, if false, do not try to link to Lua
4558                LUA_LIBRARIES, both lua and lualib
4559                LUA_INCLUDE_DIR, where to find lua.h and lualib.h (and probably lauxlib.h)
4560
4561
4562
4563
4564              Note that the expected include convention is
4565
4566
4567                #include "lua.h"
4568
4569              and not
4570
4571
4572                #include <lua/lua.h>
4573
4574              This is because, the lua location is not  standardized  and  may
4575              exist in locations other than lua/
4576
4577
4578       FindLua51
4579
4580
4581              Locate Lua library This module defines
4582
4583
4584                LUA51_FOUND, if false, do not try to link to Lua
4585                LUA_LIBRARIES
4586                LUA_INCLUDE_DIR, where to find lua.h
4587
4588
4589
4590
4591              Note that the expected include convention is
4592
4593
4594                #include "lua.h"
4595
4596              and not
4597
4598
4599                #include <lua/lua.h>
4600
4601              This  is  because,  the lua location is not standardized and may
4602              exist in locations other than lua/
4603
4604
4605       FindMFC
4606              Find MFC on Windows
4607
4608              Find the native MFC - i.e. decide if an application can link  to
4609              the MFC libraries.
4610
4611
4612                MFC_FOUND - Was MFC support found
4613
4614              You don't need to include anything or link anything to use it.
4615
4616
4617       FindMPEG
4618              Find the native MPEG includes and library
4619
4620              This module defines
4621
4622
4623                MPEG_INCLUDE_DIR, where to find MPEG.h, etc.
4624                MPEG_LIBRARIES, the libraries required to use MPEG.
4625                MPEG_FOUND, If false, do not try to use MPEG.
4626
4627              also defined, but not for general use are
4628
4629
4630                MPEG_mpeg2_LIBRARY, where to find the MPEG library.
4631                MPEG_vo_LIBRARY, where to find the vo library.
4632
4633
4634       FindMPEG2
4635              Find the native MPEG2 includes and library
4636
4637              This module defines
4638
4639
4640                MPEG2_INCLUDE_DIR, path to mpeg2dec/mpeg2.h, etc.
4641                MPEG2_LIBRARIES, the libraries required to use MPEG2.
4642                MPEG2_FOUND, If false, do not try to use MPEG2.
4643
4644              also defined, but not for general use are
4645
4646
4647                MPEG2_mpeg2_LIBRARY, where to find the MPEG2 library.
4648                MPEG2_vo_LIBRARY, where to find the vo library.
4649
4650
4651       FindMPI
4652              Message Passing Interface (MPI) module.
4653
4654
4655
4656
4657              The  Message  Passing Interface (MPI) is a library used to write
4658              high-performance parallel applications that use message passing,
4659              and is typically deployed on a cluster. MPI is a standard inter‐
4660              face (defined by the MPI forum) for which  many  implementations
4661              are  available.  All of these implementations have somewhat dif‐
4662              ferent  compilation   approaches   (different   include   paths,
4663              libraries  to  link  against,  etc.),  and  this module tries to
4664              smooth out those differences.
4665
4666
4667              This module will set the following variables:
4668
4669
4670                 MPI_FOUND                  TRUE if we have found MPI
4671                 MPI_COMPILE_FLAGS          Compilation flags for MPI programs
4672                 MPI_INCLUDE_PATH           Include path(s) for MPI header
4673                 MPI_LINK_FLAGS             Linking flags for MPI programs
4674                 MPI_LIBRARY                First MPI library to link against (cached)
4675                 MPI_EXTRA_LIBRARY          Extra MPI libraries to link against (cached)
4676                 MPI_LIBRARIES              All libraries to link MPI programs against
4677                 MPIEXEC                    Executable for running MPI programs
4678                 MPIEXEC_NUMPROC_FLAG       Flag to pass to MPIEXEC before giving it the
4679                                            number of processors to run on
4680                 MPIEXEC_PREFLAGS           Flags to pass to MPIEXEC directly before the
4681                                            executable to run.
4682                 MPIEXEC_POSTFLAGS          Flags to pass to MPIEXEC after all other flags.
4683
4684
4685
4686
4687              This module will attempt to auto-detect these settings, first by
4688              looking  for a MPI compiler, which many MPI implementations pro‐
4689              vide as a pass-through to the native compiler  to  simplify  the
4690              compilation  of  MPI programs. The MPI compiler is stored in the
4691              cache variable MPI_COMPILER, and will attempt to look  for  com‐
4692              monly-named drivers mpic++, mpicxx, mpiCC, or mpicc. If the com‐
4693              piler driver is found and recognized, it will be used to set all
4694              of  the  module  variables.  To  skip  this  auto-detection, set
4695              MPI_LIBRARY and MPI_INCLUDE_PATH in the CMake cache.
4696
4697
4698              If no compiler driver is found or the  compiler  driver  is  not
4699              recognized,  this  module  will  then  search for common include
4700              paths and library names to try to detect MPI.
4701
4702
4703              If CMake initially finds a different MPI than was intended,  and
4704              you  want to use the MPI compiler auto-detection for a different
4705              MPI implementation, set MPI_COMPILER to the MPI compiler  driver
4706              you  want  to use (e.g., mpicxx) and then set MPI_LIBRARY to the
4707              string MPI_LIBRARY-NOTFOUND. When you re-configure,  auto-detec‐
4708              tion  of  MPI  will  run again with the newly-specified MPI_COM‐
4709              PILER.
4710
4711
4712              When using MPIEXEC to execute MPI applications, you should typi‐
4713              cally use all of the MPIEXEC flags as follows:
4714
4715
4716                 ${MPIEXEC} ${MPIEXEC_NUMPROC_FLAG} PROCS ${MPIEXEC_PREFLAGS} EXECUTABLE
4717                   ${MPIEXEC_POSTFLAGS} ARGS
4718
4719              where  PROCS is the number of processors on which to execute the
4720              program, EXECUTABLE is the MPI program, and ARGS are  the  argu‐
4721              ments to pass to the MPI program.
4722
4723
4724       FindMatlab
4725              this module looks for Matlab
4726
4727              Defines:
4728
4729
4730                MATLAB_INCLUDE_DIR: include path for mex.h, engine.h
4731                MATLAB_LIBRARIES:   required libraries: libmex, etc
4732                MATLAB_MEX_LIBRARY: path to libmex.lib
4733                MATLAB_MX_LIBRARY:  path to libmx.lib
4734                MATLAB_ENG_LIBRARY: path to libeng.lib
4735
4736
4737       FindMotif
4738              Try to find Motif (or lesstif)
4739
4740              Once done this will define:
4741
4742
4743                MOTIF_FOUND        - system has MOTIF
4744                MOTIF_INCLUDE_DIR  - include paths to use Motif
4745                MOTIF_LIBRARIES    - Link these to use Motif
4746
4747
4748       FindOpenAL
4749
4750
4751              Locate  OpenAL  This module defines OPENAL_LIBRARY OPENAL_FOUND,
4752              if false, do not try  to  link  to  OpenAL   OPENAL_INCLUDE_DIR,
4753              where to find the headers
4754
4755
4756              $OPENALDIR  is  an environment variable that would correspond to
4757              the ./configure --prefix=$OPENALDIR used in building OpenAL.
4758
4759
4760              Created by Eric Wing. This was influenced by  the  FindSDL.cmake
4761              module.
4762
4763
4764       FindOpenGL
4765              Try to find OpenGL
4766
4767              Once done this will define
4768
4769
4770
4771                OPENGL_FOUND        - system has OpenGL
4772                OPENGL_XMESA_FOUND  - system has XMESA
4773                OPENGL_GLU_FOUND    - system has GLU
4774                OPENGL_INCLUDE_DIR  - the GL include directory
4775                OPENGL_LIBRARIES    - Link these to use OpenGL and GLU
4776
4777
4778              If you want to use just GL you can use these values
4779
4780
4781                OPENGL_gl_LIBRARY   - Path to OpenGL Library
4782                OPENGL_glu_LIBRARY  - Path to GLU Library
4783
4784
4785              On  OSX  default to using the framework version of opengl People
4786              will have to change the cache values of OPENGL_glu_LIBRARY   and
4787              OPENGL_gl_LIBRARY to use OpenGL with X11 on OSX
4788
4789
4790       FindOpenMP
4791              Finds OpenMP support
4792
4793              This  module can be used to detect OpenMP support in a compiler.
4794              If the compiler supports OpenMP, the flags required  to  compile
4795              with openmp support are set.
4796
4797
4798              The following variables are set:
4799
4800
4801                 OpenMP_C_FLAGS - flags to add to the C compiler for OpenMP support
4802                 OpenMP_CXX_FLAGS - flags to add to the CXX compiler for OpenMP support
4803                 OPENMP_FOUND - true if openmp is detected
4804
4805
4806
4807
4808              Supported       compilers       can       be       found      at
4809              http://openmp.org/wp/openmp-compilers/
4810
4811
4812       FindOpenSSL
4813              Try to find the OpenSSL encryption library
4814
4815              Once done this will define
4816
4817
4818                OPENSSL_ROOT_DIR - Set this variable to the root installation of OpenSSL
4819
4820
4821
4822
4823              Read-Only variables:
4824
4825
4826                OPENSSL_FOUND - system has the OpenSSL library
4827                OPENSSL_INCLUDE_DIR - the OpenSSL include directory
4828                OPENSSL_LIBRARIES - The libraries needed to use OpenSSL
4829
4830
4831       FindOpenSceneGraph
4832              Find OpenSceneGraph
4833
4834              This module searches for the OpenSceneGraph core  "osg"  library
4835              as  well  as  OpenThreads,  and  whatever  additional COMPONENTS
4836              (nodekits) that you specify.
4837
4838
4839                  See http://www.openscenegraph.org
4840
4841
4842
4843
4844              NOTE: To use this module effectively  you  must  either  require
4845              CMake  >=  2.6.3  with  cmake_minimum_required(VERSION 2.6.3) or
4846              download   and   place   FindOpenThreads.cmake,    Findosg_func‐
4847              tions.cmake,  Findosg.cmake, and Find<etc>.cmake files into your
4848              CMAKE_MODULE_PATH.
4849
4850
4851              ==================================
4852
4853
4854              This module accepts the following variables (note mixed case)
4855
4856
4857                  OpenSceneGraph_DEBUG - Enable debugging output
4858
4859
4860
4861
4862                  OpenSceneGraph_MARK_AS_ADVANCED - Mark cache variables as advanced
4863                                                    automatically
4864
4865
4866
4867
4868              The following environment variables are also respected for find‐
4869              ing  the OSG and it's various components.  CMAKE_PREFIX_PATH can
4870              also be used for this (see find_library() CMake documentation).
4871
4872
4873                  <MODULE>_DIR (where MODULE is of the form "OSGVOLUME" and there is a FindosgVolume.cmake file)
4874                  OSG_DIR
4875                  OSGDIR
4876                  OSG_ROOT
4877
4878
4879
4880
4881              This module defines the following output variables:
4882
4883
4884                  OPENSCENEGRAPH_FOUND - Was the OSG and all of the specified components found?
4885
4886
4887
4888
4889                  OPENSCENEGRAPH_VERSION - The version of the OSG which was found
4890
4891
4892
4893
4894                  OPENSCENEGRAPH_INCLUDE_DIRS - Where to find the headers
4895
4896
4897
4898
4899                  OPENSCENEGRAPH_LIBRARIES - The OSG libraries
4900
4901
4902
4903
4904              ================================== Example Usage:
4905
4906
4907                find_package(OpenSceneGraph 2.0.0 REQUIRED osgDB osgUtil)
4908                    # libOpenThreads & libosg automatically searched
4909                include_directories(${OPENSCENEGRAPH_INCLUDE_DIRS})
4910
4911
4912
4913
4914                add_executable(foo foo.cc)
4915                target_link_libraries(foo ${OPENSCENEGRAPH_LIBRARIES})
4916
4917
4918
4919
4920
4921       FindOpenThreads
4922
4923
4924              OpenThreads is a C++ based threading library. Its largest  user‐
4925              base   seems  to  OpenSceneGraph  so  you  might notice I accept
4926              OSGDIR as an environment path. I consider this part of the Find‐
4927              osg*  suite used to find OpenSceneGraph  components. Each compo‐
4928              nent is separate and you must opt in to each module.
4929
4930
4931              Locate  OpenThreads  This  module  defines   OPENTHREADS_LIBRARY
4932              OPENTHREADS_FOUND,  if  false, do not try to link to OpenThreads
4933              OPENTHREADS_INCLUDE_DIR, where to find the headers
4934
4935
4936              $OPENTHREADS_DIR is an environment variable  that  would  corre‐
4937              spond  to  the  ./configure  --prefix=$OPENTHREADS_DIR  used  in
4938              building osg.
4939
4940
4941              Created by Eric Wing.
4942
4943
4944       FindPHP4
4945              Find PHP4
4946
4947              This module finds if PHP4 is installed and determines where  the
4948              include  files  and  libraries  are. It also determines what the
4949              name of the library is. This code sets the following variables:
4950
4951
4952                PHP4_INCLUDE_PATH       = path to where php.h can be found
4953                PHP4_EXECUTABLE         = full path to the php4 binary
4954
4955
4956
4957
4958
4959       FindPNG
4960              Find the native PNG includes and library
4961
4962
4963
4964
4965              This module defines
4966
4967
4968                PNG_INCLUDE_DIR, where to find png.h, etc.
4969                PNG_LIBRARIES, the libraries to link against to use PNG.
4970                PNG_DEFINITIONS - You should add_definitons(${PNG_DEFINITIONS}) before compiling code that includes png library files.
4971                PNG_FOUND, If false, do not try to use PNG.
4972
4973              also defined, but not for general use are
4974
4975
4976                PNG_LIBRARY, where to find the PNG library.
4977
4978              None of the above will be defined unles zlib can be  found.  PNG
4979              depends on Zlib
4980
4981
4982       FindPackageHandleStandardArgs
4983
4984
4985              FIND_PACKAGE_HANDLE_STANDARD_ARGS(<name> ... )
4986
4987
4988              This  function  is  intended to be used in FindXXX.cmake modules
4989              files. It handles the REQUIRED, QUIET and version-related  argu‐
4990              ments    to   FIND_PACKAGE().   It   also   sets   the   <UPPER‐
4991              CASED_NAME>_FOUND variable. The package is considered  found  if
4992              all variables <var1>... listed contain valid results, e.g. valid
4993              filepaths.
4994
4995
4996              There are two modes of this function. The first argument in both
4997              modes  is  the  name  of  the Find-module where it is called (in
4998              original casing).
4999
5000
5001              The first simple mode looks like this:
5002
5003
5004                  FIND_PACKAGE_HANDLE_STANDARD_ARGS(<name> (DEFAULT_MSG|"Custom failure message") <var1>...<varN> )
5005
5006              If the variables <var1> to <varN> are all  valid,  then  <UPPER‐
5007              CASED_NAME>_FOUND  will  be set to TRUE. If DEFAULT_MSG is given
5008              as second argument, then the function will generate itself  use‐
5009              ful  success  and  error  messages. You can also supply a custom
5010              error message for the failure case. This is not recommended.
5011
5012
5013              The second mode is  more  powerful  and  also  supports  version
5014              checking:
5015
5016
5017                  FIND_PACKAGE_HANDLE_STANDARD_ARGS(NAME [REQUIRED_VARS <var1>...<varN>]
5018                                                         [VERSION_VAR   <versionvar>
5019                                                         [CONFIG_MODE]
5020                                                         [FAIL_MESSAGE "Custom failure message"] )
5021
5022
5023
5024
5025              As  above,  if  <var1>  through  <varN>  are  all valid, <UPPER‐
5026              CASED_NAME>_FOUND will be set to TRUE. After  REQUIRED_VARS  the
5027              variables  which  are required for this package are listed. Fol‐
5028              lowing VERSION_VAR the name of the  variable  can  be  specified
5029              which  holds the version of the package which has been found. If
5030              this is done, this version will be checked against  the  (poten‐
5031              tially)  specified  required  version used in the find_package()
5032              call. The EXACT keyword is also handled.  The  default  messages
5033              include  information  about the required version and the version
5034              which has been actually found, both if the version is ok or not.
5035              Use  the  option  CONFIG_MODE  if your FindXXX.cmake module is a
5036              wrapper for a find_package(... NO_MODULE) call, in this case all
5037              the  information  provided  by the config-mode of find_package()
5038              will be evaluated automatically. Via FAIL_MESSAGE a custom fail‐
5039              ure  message  can be specified, if this is not used, the default
5040              message will be displayed.
5041
5042
5043              Example for mode 1:
5044
5045
5046                  FIND_PACKAGE_HANDLE_STANDARD_ARGS(LibXml2  DEFAULT_MSG  LIBXML2_LIBRARY LIBXML2_INCLUDE_DIR)
5047
5048
5049
5050
5051              LibXml2 is considered to be found, if both  LIBXML2_LIBRARY  and
5052              LIBXML2_INCLUDE_DIR are valid. Then also LIBXML2_FOUND is set to
5053              TRUE. If it is not found and REQUIRED was used,  it  fails  with
5054              FATAL_ERROR, independent whether QUIET was used or not. If it is
5055              found, success  will  be  reported,  including  the  content  of
5056              <var1>.  On  repeated  Cmake  runs,  the  same  message won't be
5057              printed again.
5058
5059
5060              Example for mode 2:
5061
5062
5063                  FIND_PACKAGE_HANDLE_STANDARD_ARGS(BISON  REQUIRED_VARS BISON_EXECUTABLE
5064                                                           VERSION_VAR BISON_VERSION)
5065
5066              In this case, BISON is considered to be found if the variable(s)
5067              listed  after  REQUIRED_VAR are all valid, i.e. BISON_EXECUTABLE
5068              in this case. Also the version of BISON will be checked by using
5069              the version contained in BISON_VERSION. Since no FAIL_MESSAGE is
5070              given, the default messages will be printed.
5071
5072
5073              Another example for mode 2:
5074
5075
5076                  FIND_PACKAGE(Automoc4 QUIET NO_MODULE HINTS /opt/automoc4)
5077                  FIND_PACKAGE_HANDLE_STANDARD_ARGS(Automoc4  CONFIG_MODE)
5078
5079              In this case,  FindAutmoc4.cmake  wraps  a  call  to  FIND_PACK‐
5080              AGE(Automoc4  NO_MODULE) and adds an additional search directory
5081              for automoc4. The following  FIND_PACKAGE_HANDLE_STANDARD_ARGS()
5082              call produces a proper success/error message.
5083
5084
5085       FindPackageMessage
5086
5087
5088              FIND_PACKAGE_MESSAGE(<name>  "message  for  user"  "find  result
5089              details")
5090
5091
5092              This macro is intended  to  be  used  in  FindXXX.cmake  modules
5093              files. It will print a message once for each unique find result.
5094              This is useful for telling the user where a package  was  found.
5095              The  first argument specifies the name (XXX) of the package. The
5096              second argument specifies the  message  to  display.  The  third
5097              argument  lists  details  about  the find result so that if they
5098              change the message will be displayed again. The macro also obeys
5099              the QUIET argument to the find_package command.
5100
5101
5102              Example:
5103
5104
5105                IF(X11_FOUND)
5106                  FIND_PACKAGE_MESSAGE(X11 "Found X11: ${X11_X11_LIB}"
5107                    "[${X11_X11_LIB}][${X11_INCLUDE_DIR}]")
5108                ELSE(X11_FOUND)
5109                 ...
5110                ENDIF(X11_FOUND)
5111
5112
5113       FindPerl
5114              Find perl
5115
5116              this module looks for Perl
5117
5118
5119                PERL_EXECUTABLE - the full path to perl
5120                PERL_FOUND      - If false, don't attempt to use perl.
5121
5122
5123       FindPerlLibs
5124              Find Perl libraries
5125
5126              This  module finds if PERL is installed and determines where the
5127              include files and libraries are. It  also  determines  what  the
5128              name of the library is. This code sets the following variables:
5129
5130
5131                PERLLIBS_FOUND    = True if perl.h & libperl were found
5132                PERL_INCLUDE_PATH = path to where perl.h is found
5133                PERL_LIBRARY      = path to libperl
5134                PERL_EXECUTABLE   = full path to the perl binary
5135
5136
5137
5138
5139              The  minimum required version of Perl can be specified using the
5140              standard syntax, e.g. FIND_PACKAGE(PerlLibs 6.0)
5141
5142
5143                The following variables are also available if needed
5144                (introduced after CMake 2.6.4)
5145
5146
5147
5148
5149                PERL_SITESEARCH    = path to the sitesearch install dir
5150                PERL_SITELIB       = path to the sitelib install directory
5151                PERL_VENDORARCH    = path to the vendor arch install directory
5152                PERL_VENDORLIB     = path to the vendor lib install directory
5153                PERL_ARCHLIB       = path to the arch lib install directory
5154                PERL_PRIVLIB       = path to the priv lib install directory
5155                PERL_EXTRA_C_FLAGS = Compilation flags used to build perl
5156
5157
5158
5159
5160
5161       FindPhysFS
5162
5163
5164              Locate PhysFS library This module  defines  PHYSFS_LIBRARY,  the
5165              name  of  the library to link against PHYSFS_FOUND, if false, do
5166              not try to link to  PHYSFS  PHYSFS_INCLUDE_DIR,  where  to  find
5167              physfs.h
5168
5169
5170              $PHYSFSDIR  is  an environment variable that would correspond to
5171              the ./configure --prefix=$PHYSFSDIR used in building PHYSFS.
5172
5173
5174              Created by Eric Wing.
5175
5176
5177       FindPike
5178              Find Pike
5179
5180              This module finds if PIKE is installed and determines where  the
5181              include  files  and  libraries  are. It also determines what the
5182              name of the library is. This code sets the following variables:
5183
5184
5185                PIKE_INCLUDE_PATH       = path to where program.h is found
5186                PIKE_EXECUTABLE         = full path to the pike binary
5187
5188
5189
5190
5191
5192       FindPkgConfig
5193              a pkg-config module for CMake
5194
5195
5196
5197
5198              Usage:
5199
5200
5201                 pkg_check_modules(<PREFIX> [REQUIRED] [QUIET] <MODULE> [<MODULE>]*)
5202                   checks for all the given modules
5203
5204
5205
5206
5207                 pkg_search_module(<PREFIX> [REQUIRED] [QUIET] <MODULE> [<MODULE>]*)
5208                   checks for given modules and uses the first working one
5209
5210
5211
5212
5213              When the 'REQUIRED' argument was set, macros will fail  with  an
5214              error when module(s) could not be found
5215
5216
5217              When  the  'QUIET'  argument  is set, no status messages will be
5218              printed.
5219
5220
5221              It sets the following variables:
5222
5223
5224                 PKG_CONFIG_FOUND         ... true if pkg-config works on the system
5225                 PKG_CONFIG_EXECUTABLE    ... pathname of the pkg-config program
5226                 <PREFIX>_FOUND           ... set to 1 if module(s) exist
5227
5228
5229
5230
5231              For the following variables two sets of values exist; first  one
5232              is  the common one and has the given PREFIX. The second set con‐
5233              tains flags which are given out when pkgconfig was  called  with
5234              the '--static' option.
5235
5236
5237                 <XPREFIX>_LIBRARIES      ... only the libraries (w/o the '-l')
5238                 <XPREFIX>_LIBRARY_DIRS   ... the paths of the libraries (w/o the '-L')
5239                 <XPREFIX>_LDFLAGS        ... all required linker flags
5240                 <XPREFIX>_LDFLAGS_OTHER  ... all other linker flags
5241                 <XPREFIX>_INCLUDE_DIRS   ... the '-I' preprocessor flags (w/o the '-I')
5242                 <XPREFIX>_CFLAGS         ... all required cflags
5243                 <XPREFIX>_CFLAGS_OTHER   ... the other compiler flags
5244
5245
5246
5247
5248                 <XPREFIX> = <PREFIX>        for common case
5249                 <XPREFIX> = <PREFIX>_STATIC for static linking
5250
5251
5252
5253
5254              There  are  some  special  variables whose prefix depends on the
5255              count of given modules. When there is only one module,  <PREFIX>
5256              stays  unchanged.  When  there  are multiple modules, the prefix
5257              will be changed to <PREFIX>_<MODNAME>:
5258
5259
5260                 <XPREFIX>_VERSION    ... version of the module
5261                 <XPREFIX>_PREFIX     ... prefix-directory of the module
5262                 <XPREFIX>_INCLUDEDIR ... include-dir of the module
5263                 <XPREFIX>_LIBDIR     ... lib-dir of the module
5264
5265
5266
5267
5268                 <XPREFIX> = <PREFIX>  when |MODULES| == 1, else
5269                 <XPREFIX> = <PREFIX>_<MODNAME>
5270
5271
5272
5273
5274              A <MODULE> parameter can have the following formats:
5275
5276
5277                 {MODNAME}            ... matches any version
5278                 {MODNAME}>={VERSION} ... at least version <VERSION> is required
5279                 {MODNAME}={VERSION}  ... exactly version <VERSION> is required
5280                 {MODNAME}<={VERSION} ... modules must not be newer than <VERSION>
5281
5282
5283
5284
5285              Examples
5286
5287
5288                 pkg_check_modules (GLIB2   glib-2.0)
5289
5290
5291
5292
5293                 pkg_check_modules (GLIB2   glib-2.0>=2.10)
5294                   requires at least version 2.10 of glib2 and defines e.g.
5295                     GLIB2_VERSION=2.10.3
5296
5297
5298
5299
5300                 pkg_check_modules (FOO     glib-2.0>=2.10 gtk+-2.0)
5301                   requires both glib2 and gtk2, and defines e.g.
5302                     FOO_glib-2.0_VERSION=2.10.3
5303                     FOO_gtk+-2.0_VERSION=2.8.20
5304
5305
5306
5307
5308                 pkg_check_modules (XRENDER REQUIRED xrender)
5309                   defines e.g.:
5310                     XRENDER_LIBRARIES=Xrender;X11
5311                     XRENDER_STATIC_LIBRARIES=Xrender;X11;pthread;Xau;Xdmcp
5312
5313
5314
5315
5316                 pkg_search_module (BAR     libxml-2.0 libxml2 libxml>=2)
5317
5318
5319       FindPostgreSQL
5320              --------------------------------------------------------------------------
5321
5322              Find the PostgreSQL installation.
5323
5324
5325              Usage: In your CMakeLists.txt file do something like this: ... #
5326              PostgreSQL FIND_PACKAGE(PostgreSQL) ... if( PostgreSQL_FOUND )
5327
5328
5329                 include_directories(${PostgreSQL_INCLUDE_DIRS})
5330                 link_directories(${PostgreSQL_LIBRARY_DIRS})
5331
5332              endif(  PostgreSQL_FOUND  )  ...  Remember  to  include  ${Post‐
5333              greSQL_LIBRARIES} in the target_link_libraries() statement.
5334
5335
5336
5337
5338
5339              In Windows, we make the assumption that, if the PostgreSQL files
5340              are  installed,  the  default  directory  will   be   C:\Program
5341              Files\PostgreSQL.
5342
5343
5344
5345       FindProducer
5346
5347
5348              Though  Producer isn't directly part of OpenSceneGraph, its pri‐
5349              mary user is OSG so I consider this part of the  Findosg*  suite
5350              used  to  find   OpenSceneGraph components. You'll notice that I
5351              accept OSGDIR as an environment path.
5352
5353
5354              Each component is separate and you must opt in to  each  module.
5355              You must  also opt into OpenGL (and OpenThreads?) as these  mod‐
5356              ules won't do it for you. This is to allow you control over your
5357              own   system  piece by piece in case you need to opt out of cer‐
5358              tain components or change the Find  behavior  for  a  particular
5359              module  (perhaps  because  the  default  FindOpenGL.cmake module
5360              doesn't work with your system as an example). If you want to use
5361              a more convenient module that includes everything, use the Find‐
5362              OpenSceneGraph.cmake instead of the Findosg*.cmake modules.
5363
5364
5365              Locate  Producer  This  module  defines  PRODUCER_LIBRARY   PRO‐
5366              DUCER_FOUND,  if  false,  do  not  try  to link to Producer PRO‐
5367              DUCER_INCLUDE_DIR, where to find the headers
5368
5369
5370              $PRODUCER_DIR is an environment variable that  would  correspond
5371              to the ./configure --prefix=$PRODUCER_DIR used in building osg.
5372
5373
5374              Created by Eric Wing.
5375
5376
5377       FindProtobuf
5378
5379
5380              Locate  and  configure  the  Google  Protocol  Buffers  library.
5381              Defines the following variables:
5382
5383
5384                 PROTOBUF_FOUND - Found the Google Protocol Buffers library
5385                 PROTOBUF_INCLUDE_DIRS - Include directories for Google Protocol Buffers
5386                 PROTOBUF_LIBRARIES - The protobuf library
5387
5388
5389
5390
5391              The following cache variables are also defined:
5392
5393
5394                 PROTOBUF_LIBRARY - The protobuf library
5395                 PROTOBUF_PROTOC_LIBRARY   - The protoc library
5396                 PROTOBUF_INCLUDE_DIR - The include directory for protocol buffers
5397                 PROTOBUF_PROTOC_EXECUTABLE - The protoc compiler
5398
5399
5400
5401
5402                ====================================================================
5403                Example:
5404
5405
5406
5407
5408                 find_package(Protobuf REQUIRED)
5409                 include_directories(${PROTOBUF_INCLUDE_DIRS})
5410
5411
5412
5413
5414                 include_directories(${CMAKE_CURRENT_BINARY_DIR})
5415                 PROTOBUF_GENERATE_CPP(PROTO_SRCS PROTO_HDRS foo.proto)
5416                 add_executable(bar bar.cc ${PROTO_SRCS} ${PROTO_HDRS})
5417                 target_link_libraries(bar ${PROTOBUF_LIBRARY})
5418
5419
5420
5421
5422              NOTE: You may need to link against pthreads,  depending  on  the
5423              platform.
5424
5425
5426                ====================================================================
5427
5428
5429
5430
5431              PROTOBUF_GENERATE_CPP (public function)
5432
5433
5434                 SRCS = Variable to define with autogenerated
5435                        source files
5436                 HDRS = Variable to define with autogenerated
5437                        header files
5438                 ARGN = proto files
5439
5440
5441
5442
5443                ====================================================================
5444
5445
5446       FindPythonInterp
5447              Find python interpreter
5448
5449              This  module finds if Python interpreter is installed and deter‐
5450              mines where the executables are. This code  sets  the  following
5451              variables:
5452
5453
5454                PYTHONINTERP_FOUND         - Was the Python executable found
5455                PYTHON_EXECUTABLE          - path to the Python interpreter
5456                Python_ADDITIONAL_VERSIONS - list of additional Python versions to search for
5457
5458
5459
5460
5461
5462       FindPythonLibs
5463              Find python libraries
5464
5465              This  module  finds  if Python is installed and determines where
5466              the include files and libraries are. It also determines what the
5467              name of the library is. This code sets the following variables:
5468
5469
5470                PYTHONLIBS_FOUND           - have the Python libs been found
5471                PYTHON_LIBRARIES           - path to the python library
5472                PYTHON_INCLUDE_PATH        - path to where Python.h is found (deprecated)
5473                PYTHON_INCLUDE_DIRS        - path to where Python.h is found
5474                PYTHON_DEBUG_LIBRARIES     - path to the debug library
5475                Python_ADDITIONAL_VERSIONS - list of additional Python versions to search for
5476
5477
5478       FindQt Searches for all installed versions of QT.
5479
5480              This  should only be used if your project can work with multiple
5481              versions of QT.  If not, you should just directly use FindQt4 or
5482              FindQt3.  If  multiple  versions of QT are found on the machine,
5483              then The user must set the option DESIRED_QT_VERSION to the ver‐
5484              sion  they  want  to use.  If only one version of qt is found on
5485              the machine, then the DESIRED_QT_VERSION is set to that  version
5486              and  the   matching  FindQt3 or FindQt4 module is included. Once
5487              the user sets DESIRED_QT_VERSION, then the  FindQt3  or  FindQt4
5488              module is included.
5489
5490
5491                QT_REQUIRED if this is set to TRUE then if CMake can
5492                            not find QT4 or QT3 an error is raised
5493                            and a message is sent to the user.
5494
5495
5496
5497
5498                DESIRED_QT_VERSION OPTION is created
5499                QT4_INSTALLED is set to TRUE if qt4 is found.
5500                QT3_INSTALLED is set to TRUE if qt3 is found.
5501
5502
5503       FindQt3
5504              Locate Qt include paths and libraries
5505
5506              This module defines:
5507
5508
5509                QT_INCLUDE_DIR - where to find qt.h, etc.
5510                QT_LIBRARIES   - the libraries to link against to use Qt.
5511                QT_DEFINITIONS - definitions to use when
5512                                 compiling code that uses Qt.
5513                QT_FOUND       - If false, don't try to use Qt.
5514
5515
5516
5517
5518              If  you need the multithreaded version of Qt, set QT_MT_REQUIRED
5519              to TRUE
5520
5521
5522              Also defined, but not for general use are:
5523
5524
5525                QT_MOC_EXECUTABLE, where to find the moc tool.
5526                QT_UIC_EXECUTABLE, where to find the uic tool.
5527                QT_QT_LIBRARY, where to find the Qt library.
5528                QT_QTMAIN_LIBRARY, where to find the qtmain
5529                 library. This is only required by Qt3 on Windows.
5530
5531
5532       FindQt4
5533              Find QT 4
5534
5535              This module can be used to find Qt4. The most important issue is
5536              that  the Qt4 qmake is available via the system path. This qmake
5537              is then used to detect basically everything  else.  This  module
5538              defines  a  number  of  key  variables and macros.  The variable
5539              QT_USE_FILE is set which is the path to a CMake file that can be
5540              included   to  compile Qt 4 applications and libraries.  It sets
5541              up the compilation environment  for  include  directories,  pre‐
5542              processor defines and populates a QT_LIBRARIES variable.
5543
5544
5545              Typical usage could be something like:
5546
5547
5548                 find_package(Qt4 4.4.3 COMPONENTS QtCore QtGui QtXml REQUIRED )
5549                 include(${QT_USE_FILE})
5550                 add_executable(myexe main.cpp)
5551                 target_link_libraries(myexe ${QT_LIBRARIES})
5552
5553
5554
5555
5556              The minimum required version can be specified using the standard
5557              find_package()-syntax (see example  above).   For  compatibility
5558              with  older versions of FindQt4.cmake it is also possible to set
5559              the variable QT_MIN_VERSION to the minimum required  version  of
5560              Qt4  before  the   find_package(Qt4) command.  If both are used,
5561              the version used in the find_package() command overrides the one
5562              from QT_MIN_VERSION.
5563
5564
5565              When  using  the  components  argument, QT_USE_QT* variables are
5566              automatically set for the QT_USE_FILE to pick up.  If one wishes
5567              to manually set them, the available ones to set include:
5568
5569
5570                                  QT_DONT_USE_QTCORE
5571                                  QT_DONT_USE_QTGUI
5572                                  QT_USE_QT3SUPPORT
5573                                  QT_USE_QTASSISTANT
5574                                  QT_USE_QAXCONTAINER
5575                                  QT_USE_QAXSERVER
5576                                  QT_USE_QTDESIGNER
5577                                  QT_USE_QTMOTIF
5578                                  QT_USE_QTMAIN
5579                                  QT_USE_QTMULTIMEDIA
5580                                  QT_USE_QTNETWORK
5581                                  QT_USE_QTNSPLUGIN
5582                                  QT_USE_QTOPENGL
5583                                  QT_USE_QTSQL
5584                                  QT_USE_QTXML
5585                                  QT_USE_QTSVG
5586                                  QT_USE_QTTEST
5587                                  QT_USE_QTUITOOLS
5588                                  QT_USE_QTDBUS
5589                                  QT_USE_QTSCRIPT
5590                                  QT_USE_QTASSISTANTCLIENT
5591                                  QT_USE_QTHELP
5592                                  QT_USE_QTWEBKIT
5593                                  QT_USE_QTXMLPATTERNS
5594                                  QT_USE_PHONON
5595                                  QT_USE_QTSCRIPTTOOLS
5596                                  QT_USE_QTDECLARATIVE
5597
5598
5599
5600
5601                QT_USE_IMPORTED_TARGETS
5602                      If this variable is set to TRUE, FindQt4.cmake will create imported
5603                      library targets for the various Qt libraries and set the
5604                      library variables like QT_QTCORE_LIBRARY to point at these imported
5605                      targets instead of the library file on disk. This provides much better
5606                      handling of the release and debug versions of the Qt libraries and is
5607                     also always backwards compatible, except for the case that dependencies
5608                     of libraries are exported, these will then also list the names of the
5609                     imported targets as dependency and not the file location on disk. This
5610                     is much more flexible, but requires that FindQt4.cmake is executed before
5611                     such an exported dependency file is processed.
5612
5613
5614
5615
5616              There  are also some files that need processing by some Qt tools
5617              such as moc and uic.  Listed below are macros that may  be  used
5618              to process those files.
5619
5620
5621
5622                macro QT4_WRAP_CPP(outfiles inputfile ... OPTIONS ...)
5623                      create moc code from a list of files containing Qt class with
5624                      the Q_OBJECT declaration.  Per-direcotry preprocessor definitions
5625                      are also added.  Options may be given to moc, such as those found
5626                      when executing "moc -help".
5627
5628
5629
5630
5631                macro QT4_WRAP_UI(outfiles inputfile ... OPTIONS ...)
5632                      create code from a list of Qt designer ui files.
5633                      Options may be given to uic, such as those found
5634                      when executing "uic -help"
5635
5636
5637
5638
5639                macro QT4_ADD_RESOURCES(outfiles inputfile ... OPTIONS ...)
5640                      create code from a list of Qt resource files.
5641                      Options may be given to rcc, such as those found
5642                      when executing "rcc -help"
5643
5644
5645
5646
5647                macro QT4_GENERATE_MOC(inputfile outputfile )
5648                      creates a rule to run moc on infile and create outfile.
5649                      Use this if for some reason QT4_WRAP_CPP() isn't appropriate, e.g.
5650                      because you need a custom filename for the moc file or something similar.
5651
5652
5653
5654
5655                macro QT4_AUTOMOC(sourcefile1 sourcefile2 ... )
5656                      This macro is still experimental.
5657                      It can be used to have moc automatically handled.
5658                      So if you have the files foo.h and foo.cpp, and in foo.h a
5659                      a class uses the Q_OBJECT macro, moc has to run on it. If you don't
5660                      want to use QT4_WRAP_CPP() (which is reliable and mature), you can insert
5661                      #include "foo.moc"
5662                      in foo.cpp and then give foo.cpp as argument to QT4_AUTOMOC(). This will the
5663                      scan all listed files at cmake-time for such included moc files and if it finds
5664                      them cause a rule to be generated to run moc at build time on the
5665                      accompanying header file foo.h.
5666                      If a source file has the SKIP_AUTOMOC property set it will be ignored by this macro.
5667
5668
5669
5670
5671                macro QT4_ADD_DBUS_INTERFACE(outfiles interface basename)
5672                      create a the interface header and implementation files with the
5673                      given basename from the given interface xml file and add it to
5674                      the list of sources
5675
5676
5677
5678
5679                macro QT4_ADD_DBUS_INTERFACES(outfiles inputfile ... )
5680                      create the interface header and implementation files
5681                      for all listed interface xml files
5682                      the name will be automatically determined from the name of the xml file
5683
5684
5685
5686
5687                macro QT4_ADD_DBUS_ADAPTOR(outfiles xmlfile parentheader parentclassname [basename] [classname])
5688                      create a dbus adaptor (header and implementation file) from the xml file
5689                      describing the interface, and add it to the list of sources. The adaptor
5690                      forwards the calls to a parent class, defined in parentheader and named
5691                      parentclassname. The name of the generated files will be
5692                      <basename>adaptor.{cpp,h} where basename defaults to the basename of the xml file.
5693                      If <classname> is provided, then it will be used as the classname of the
5694                      adaptor itself.
5695
5696
5697
5698
5699                macro QT4_GENERATE_DBUS_INTERFACE( header [interfacename] OPTIONS ...)
5700                      generate the xml interface file from the given header.
5701                      If the optional argument interfacename is omitted, the name of the
5702                      interface file is constructed from the basename of the header with
5703                      the suffix .xml appended.
5704                      Options may be given to qdbuscpp2xml, such as those found when executing "qdbuscpp2xml --help"
5705
5706
5707
5708
5709                macro QT4_CREATE_TRANSLATION( qm_files directories ... sources ...
5710                                              ts_files ... OPTIONS ...)
5711                      out: qm_files
5712                      in:  directories sources ts_files
5713                      options: flags to pass to lupdate, such as -extensions to specify
5714                      extensions for a directory scan.
5715                      generates commands to create .ts (vie lupdate) and .qm
5716                      (via lrelease) - files from directories and/or sources. The ts files are
5717                      created and/or updated in the source tree (unless given with full paths).
5718                      The qm files are generated in the build tree.
5719                      Updating the translations can be done by adding the qm_files
5720                      to the source list of your library/executable, so they are
5721                      always updated, or by adding a custom target to control when
5722                      they get updated/generated.
5723
5724
5725
5726
5727                macro QT4_ADD_TRANSLATION( qm_files ts_files ... )
5728                      out: qm_files
5729                      in:  ts_files
5730                      generates commands to create .qm from .ts - files. The generated
5731                      filenames can be found in qm_files. The ts_files
5732                      must exists and are not updated in any way.
5733
5734
5735
5736
5737
5738
5739
5740                Below is a detailed list of variables that FindQt4.cmake sets.
5741                QT_FOUND         If false, don't try to use Qt.
5742                QT4_FOUND        If false, don't try to use Qt 4.
5743
5744
5745
5746
5747                QT_VERSION_MAJOR The major version of Qt found.
5748                QT_VERSION_MINOR The minor version of Qt found.
5749                QT_VERSION_PATCH The patch version of Qt found.
5750
5751
5752
5753
5754                QT_EDITION               Set to the edition of Qt (i.e. DesktopLight)
5755                QT_EDITION_DESKTOPLIGHT  True if QT_EDITION == DesktopLight
5756                QT_QTCORE_FOUND          True if QtCore was found.
5757                QT_QTGUI_FOUND           True if QtGui was found.
5758                QT_QT3SUPPORT_FOUND      True if Qt3Support was found.
5759                QT_QTASSISTANT_FOUND     True if QtAssistant was found.
5760                QT_QTASSISTANTCLIENT_FOUND  True if QtAssistantClient was found.
5761                QT_QAXCONTAINER_FOUND    True if QAxContainer was found (Windows only).
5762                QT_QAXSERVER_FOUND       True if QAxServer was found (Windows only).
5763                QT_QTDBUS_FOUND          True if QtDBus was found.
5764                QT_QTDESIGNER_FOUND      True if QtDesigner was found.
5765                QT_QTDESIGNERCOMPONENTS  True if QtDesignerComponents was found.
5766                QT_QTHELP_FOUND          True if QtHelp was found.
5767                QT_QTMOTIF_FOUND         True if QtMotif was found.
5768                QT_QTMULTIMEDIA_FOUND    True if QtMultimedia was found (since Qt 4.6.0).
5769                QT_QTNETWORK_FOUND       True if QtNetwork was found.
5770                QT_QTNSPLUGIN_FOUND      True if QtNsPlugin was found.
5771                QT_QTOPENGL_FOUND        True if QtOpenGL was found.
5772                QT_QTSQL_FOUND           True if QtSql was found.
5773                QT_QTSVG_FOUND           True if QtSvg was found.
5774                QT_QTSCRIPT_FOUND        True if QtScript was found.
5775                QT_QTSCRIPTTOOLS_FOUND   True if QtScriptTools was found.
5776                QT_QTTEST_FOUND          True if QtTest was found.
5777                QT_QTUITOOLS_FOUND       True if QtUiTools was found.
5778                QT_QTWEBKIT_FOUND        True if QtWebKit was found.
5779                QT_QTXML_FOUND           True if QtXml was found.
5780                QT_QTXMLPATTERNS_FOUND   True if QtXmlPatterns was found.
5781                QT_PHONON_FOUND          True if phonon was found.
5782                QT_QTDECLARATIVE_FOUND   True if QtDeclarative was found.
5783
5784
5785
5786
5787                QT_MAC_USE_COCOA    For Mac OS X, its whether Cocoa or Carbon is used.
5788                                    In general, this should not be used, but its useful
5789                                    when having platform specific code.
5790
5791
5792
5793
5794                QT_DEFINITIONS   Definitions to use when compiling code that uses Qt.
5795                                 You do not need to use this if you include QT_USE_FILE.
5796                                 The QT_USE_FILE will also define QT_DEBUG and QT_NO_DEBUG
5797                                 to fit your current build type.  Those are not contained
5798                                 in QT_DEFINITIONS.
5799
5800                QT_INCLUDES      List of paths to all include directories of
5801                                 Qt4 QT_INCLUDE_DIR and QT_QTCORE_INCLUDE_DIR are
5802                                 always in this variable even if NOTFOUND,
5803                                 all other INCLUDE_DIRS are
5804                                 only added if they are found.
5805                                 You do not need to use this if you include QT_USE_FILE.
5806
5807
5808
5809
5810
5811                Include directories for the Qt modules are listed here.
5812                You do not need to use these variables if you include QT_USE_FILE.
5813
5814
5815
5816
5817                QT_INCLUDE_DIR              Path to "include" of Qt4
5818                QT_QT3SUPPORT_INCLUDE_DIR   Path to "include/Qt3Support"
5819                QT_QTASSISTANT_INCLUDE_DIR  Path to "include/QtAssistant"
5820                QT_QTASSISTANTCLIENT_INCLUDE_DIR       Path to "include/QtAssistant"
5821                QT_QAXCONTAINER_INCLUDE_DIR Path to "include/ActiveQt" (Windows only)
5822                QT_QAXSERVER_INCLUDE_DIR    Path to "include/ActiveQt" (Windows only)
5823                QT_QTCORE_INCLUDE_DIR       Path to "include/QtCore"
5824                QT_QTDBUS_INCLUDE_DIR       Path to "include/QtDBus"
5825                QT_QTDESIGNER_INCLUDE_DIR   Path to "include/QtDesigner"
5826                QT_QTDESIGNERCOMPONENTS_INCLUDE_DIR   Path to "include/QtDesigner"
5827                QT_QTGUI_INCLUDE_DIR        Path to "include/QtGui"
5828                QT_QTHELP_INCLUDE_DIR       Path to "include/QtHelp"
5829                QT_QTMOTIF_INCLUDE_DIR      Path to "include/QtMotif"
5830                QT_QTMULTIMEDIA_INCLUDE_DIR Path to "include/QtMultimedia"
5831                QT_QTNETWORK_INCLUDE_DIR    Path to "include/QtNetwork"
5832                QT_QTNSPLUGIN_INCLUDE_DIR   Path to "include/QtNsPlugin"
5833                QT_QTOPENGL_INCLUDE_DIR     Path to "include/QtOpenGL"
5834                QT_QTSCRIPT_INCLUDE_DIR     Path to "include/QtScript"
5835                QT_QTSQL_INCLUDE_DIR        Path to "include/QtSql"
5836                QT_QTSVG_INCLUDE_DIR        Path to "include/QtSvg"
5837                QT_QTTEST_INCLUDE_DIR       Path to "include/QtTest"
5838                QT_QTWEBKIT_INCLUDE_DIR     Path to "include/QtWebKit"
5839                QT_QTXML_INCLUDE_DIR        Path to "include/QtXml"
5840                QT_QTXMLPATTERNS_INCLUDE_DIR  Path to "include/QtXmlPatterns"
5841                QT_PHONON_INCLUDE_DIR       Path to "include/phonon"
5842                QT_QTSCRIPTTOOLS_INCLUDE_DIR       Path to "include/QtScriptTools"
5843                QT_QTDECLARATIVE_INCLUDE_DIR       Path to "include/QtDeclarative"
5844
5845
5846
5847
5848                QT_BINARY_DIR               Path to "bin" of Qt4
5849                QT_LIBRARY_DIR              Path to "lib" of Qt4
5850                QT_PLUGINS_DIR              Path to "plugins" for Qt4
5851                QT_TRANSLATIONS_DIR         Path to "translations" of Qt4
5852                QT_IMPORTS_DIR              Path to "imports" of Qt4
5853                QT_DOC_DIR                  Path to "doc" of Qt4
5854                QT_MKSPECS_DIR              Path to "mkspecs" of Qt4
5855
5856
5857
5858
5859
5860
5861
5862              The  Qt toolkit may contain both debug and release libraries. In
5863              that case, the following library variables  will  contain  both.
5864              You   do  not  need  to  use  these  variables  if  you  include
5865              QT_USE_FILE, and use QT_LIBRARIES.
5866
5867
5868                QT_QT3SUPPORT_LIBRARY            The Qt3Support library
5869                QT_QTASSISTANT_LIBRARY           The QtAssistant library
5870                QT_QTASSISTANTCLIENT_LIBRARY     The QtAssistantClient library
5871                QT_QAXCONTAINER_LIBRARY           The QAxContainer library (Windows only)
5872                QT_QAXSERVER_LIBRARY                The QAxServer library (Windows only)
5873                QT_QTCORE_LIBRARY                The QtCore library
5874                QT_QTDBUS_LIBRARY                The QtDBus library
5875                QT_QTDESIGNER_LIBRARY            The QtDesigner library
5876                QT_QTDESIGNERCOMPONENTS_LIBRARY  The QtDesignerComponents library
5877                QT_QTGUI_LIBRARY                 The QtGui library
5878                QT_QTHELP_LIBRARY                The QtHelp library
5879                QT_QTMOTIF_LIBRARY               The QtMotif library
5880                QT_QTMULTIMEDIA_LIBRARY          The QtMultimedia library
5881                QT_QTNETWORK_LIBRARY             The QtNetwork library
5882                QT_QTNSPLUGIN_LIBRARY            The QtNsPLugin library
5883                QT_QTOPENGL_LIBRARY              The QtOpenGL library
5884                QT_QTSCRIPT_LIBRARY              The QtScript library
5885                QT_QTSQL_LIBRARY                 The QtSql library
5886                QT_QTSVG_LIBRARY                 The QtSvg library
5887                QT_QTTEST_LIBRARY                The QtTest library
5888                QT_QTUITOOLS_LIBRARY             The QtUiTools library
5889                QT_QTWEBKIT_LIBRARY              The QtWebKit library
5890                QT_QTXML_LIBRARY                 The QtXml library
5891                QT_QTXMLPATTERNS_LIBRARY         The QtXmlPatterns library
5892                QT_QTMAIN_LIBRARY                The qtmain library for Windows
5893                QT_PHONON_LIBRARY                The phonon library
5894                QT_QTSCRIPTTOOLS_LIBRARY         The QtScriptTools library
5895
5896
5897              The QtDeclarative library:             QT_QTDECLARATIVE_LIBRARY
5898
5899
5900              also defined, but NOT for general use are
5901
5902
5903                QT_MOC_EXECUTABLE                   Where to find the moc tool.
5904                QT_UIC_EXECUTABLE                   Where to find the uic tool.
5905                QT_UIC3_EXECUTABLE                  Where to find the uic3 tool.
5906                QT_RCC_EXECUTABLE                   Where to find the rcc tool
5907                QT_DBUSCPP2XML_EXECUTABLE           Where to find the qdbuscpp2xml tool.
5908                QT_DBUSXML2CPP_EXECUTABLE           Where to find the qdbusxml2cpp tool.
5909                QT_LUPDATE_EXECUTABLE               Where to find the lupdate tool.
5910                QT_LRELEASE_EXECUTABLE              Where to find the lrelease tool.
5911                QT_QCOLLECTIONGENERATOR_EXECUTABLE  Where to find the qcollectiongenerator tool.
5912                QT_DESIGNER_EXECUTABLE              Where to find the Qt designer tool.
5913                QT_LINGUIST_EXECUTABLE              Where to find the Qt linguist tool.
5914
5915
5916
5917
5918
5919              These are around for backwards compatibility  they will be set
5920
5921
5922                QT_WRAP_CPP  Set true if QT_MOC_EXECUTABLE is found
5923                QT_WRAP_UI   Set true if QT_UIC_EXECUTABLE is found
5924
5925
5926              These variables do _NOT_ have any effect  anymore  (compared  to
5927              FindQt.cmake)
5928
5929
5930                QT_MT_REQUIRED         Qt4 is now always multithreaded
5931
5932
5933              These  variables  are  set  to  ""  Because Qt structure changed
5934              (They make no sense in Qt4)
5935
5936
5937                QT_QT_LIBRARY        Qt-Library is now split
5938
5939
5940       FindQuickTime
5941
5942
5943              Locate QuickTime This module  defines  QUICKTIME_LIBRARY  QUICK‐
5944              TIME_FOUND,  if  false,  do  not  try  to  link  to gdal  QUICK‐
5945              TIME_INCLUDE_DIR, where to find the headers
5946
5947
5948              $QUICKTIME_DIR is an environment variable that would  correspond
5949              to the ./configure --prefix=$QUICKTIME_DIR
5950
5951
5952              Created by Eric Wing.
5953
5954
5955       FindRTI
5956              Try to find M&S HLA RTI libraries
5957
5958              This  module  finds  if any HLA RTI is installed and locates the
5959              standard RTI include files and libraries.
5960
5961
5962              RTI is a simulation  infrastructure  standardized  by  IEEE  and
5963              SISO. It has a well defined C++ API that assures that simulation
5964              applications are independent on a particular RTI implementation.
5965
5966
5967                http://en.wikipedia.org/wiki/Run-Time_Infrastructure_(simulation)
5968
5969
5970
5971
5972              This code sets the following variables:
5973
5974
5975                RTI_INCLUDE_DIR = the directory where RTI includes file are found
5976                RTI_LIBRARIES = The libraries to link against to use RTI
5977                RTI_DEFINITIONS = -DRTI_USES_STD_FSTREAM
5978                RTI_FOUND = Set to FALSE if any HLA RTI was not found
5979
5980
5981
5982
5983              Report problems to <certi-devel@nongnu.org>
5984
5985
5986       FindRuby
5987              Find Ruby
5988
5989              This module finds if Ruby is installed and determines where  the
5990              include files and libraries are. Ruby 1.8 and 1.9 are supported.
5991
5992
5993              The  minimum required version of Ruby can be specified using the
5994              standard syntax, e.g. FIND_PACKAGE(Ruby 1.8)
5995
5996
5997              It also determines what the name of the library  is.  This  code
5998              sets the following variables:
5999
6000
6001                RUBY_EXECUTABLE   = full path to the ruby binary
6002                RUBY_INCLUDE_DIRS = include dirs to be used when using the ruby library
6003                RUBY_LIBRARY      = full path to the ruby library
6004                RUBY_VERSION      = the version of ruby which was found, e.g. "1.8.7"
6005                RUBY_FOUND        = set to true if ruby ws found successfully
6006
6007
6008
6009
6010                RUBY_INCLUDE_PATH = same as RUBY_INCLUDE_DIRS, only provided for compatibility reasons, don't use it
6011
6012
6013       FindSDL
6014
6015
6016              Locate  SDL library This module defines SDL_LIBRARY, the name of
6017              the library to link against SDL_FOUND, if false, do not  try  to
6018              link to SDL SDL_INCLUDE_DIR, where to find SDL.h
6019
6020
6021              This  module  responds  to the the flag: SDL_BUILDING_LIBRARY If
6022              this is defined, then no SDL_main  will  be  linked  in  because
6023              only  applications need main(). Otherwise, it is assumed you are
6024              building an application and this module will attempt  to  locate
6025              and  set  the  the  proper  link  flags  as part of the returned
6026              SDL_LIBRARY variable.
6027
6028
6029              Don't forget to include SDLmain.h and SDLmain.m your project for
6030              the   OS  X  framework  based  version.  (Other versions link to
6031              -lSDLmain which this module will try to find  on  your  behalf.)
6032              Also  for  OS X, this  module will automatically add the -frame‐
6033              work Cocoa on your behalf.
6034
6035
6036
6037
6038
6039              Additional Note: If you see an empty  SDL_LIBRARY_TEMP  in  your
6040              configuration  and  no  SDL_LIBRARY, it means CMake did not find
6041              your SDL library  (SDL.dll, libsdl.so, SDL.framework, etc).  Set
6042              SDL_LIBRARY_TEMP  to  point  to  your SDL library, and configure
6043              again.  Similarly, if you  see  an  empty  SDLMAIN_LIBRARY,  you
6044              should  set  this value as appropriate. These values are used to
6045              generate the final SDL_LIBRARY variable, but when  these  values
6046              are unset, SDL_LIBRARY does not get created.
6047
6048
6049
6050
6051
6052              $SDLDIR  is an environment variable that would correspond to the
6053              ./configure --prefix=$SDLDIR used  in  building  SDL.  l.e.galup
6054              9-20-02
6055
6056
6057              Modified  by  Eric  Wing.   Added  code to assist with automated
6058              building by using environmental variables and providing  a  more
6059              controlled/consistent  search  behavior. Added new modifications
6060              to recognize OS X frameworks and  additional Unix  paths  (Free‐
6061              BSD,  etc).   Also  corrected  the  header search path to follow
6062              "proper" SDL guidelines. Added a search  for  SDLmain  which  is
6063              needed  by  some  platforms. Added a search for threads which is
6064              needed by some platforms.  Added  needed  compile  switches  for
6065              MinGW.
6066
6067
6068              On  OSX,  this will prefer the Framework version (if found) over
6069              others. People will have to manually change the cache values  of
6070              SDL_LIBRARY to override this selection or set the CMake environ‐
6071              ment CMAKE_INCLUDE_PATH to modify the search paths.
6072
6073
6074              Note that the header path has changed  from  SDL/SDL.h  to  just
6075              SDL.h  This  needed to change because "proper" SDL convention is
6076              #include "SDL.h", not <SDL/SDL.h>. This is done for  portability
6077              reasons  because not all systems place things in SDL/ (see Free‐
6078              BSD).
6079
6080
6081       FindSDL_image
6082
6083
6084              Locate SDL_image library This module  defines  SDLIMAGE_LIBRARY,
6085              the  name  of  the  library  to  link against SDLIMAGE_FOUND, if
6086              false, do not try to link to SDL SDLIMAGE_INCLUDE_DIR, where  to
6087              find SDL/SDL.h
6088
6089
6090              $SDLDIR  is an environment variable that would correspond to the
6091              ./configure --prefix=$SDLDIR used in building SDL.
6092
6093
6094              Created by Eric Wing. This was influenced by  the  FindSDL.cmake
6095              module,  but with modifications to recognize OS X frameworks and
6096              additional Unix paths (FreeBSD, etc).
6097
6098
6099       FindSDL_mixer
6100
6101
6102              Locate SDL_mixer library This module  defines  SDLMIXER_LIBRARY,
6103              the  name  of  the  library  to  link against SDLMIXER_FOUND, if
6104              false, do not try to link to SDL SDLMIXER_INCLUDE_DIR, where  to
6105              find SDL/SDL.h
6106
6107
6108              $SDLDIR  is an environment variable that would correspond to the
6109              ./configure --prefix=$SDLDIR used in building SDL.
6110
6111
6112              Created by Eric Wing. This was influenced by  the  FindSDL.cmake
6113              module,  but with modifications to recognize OS X frameworks and
6114              additional Unix paths (FreeBSD, etc).
6115
6116
6117       FindSDL_net
6118
6119
6120              Locate SDL_net library This module defines  SDLNET_LIBRARY,  the
6121              name  of  the library to link against SDLNET_FOUND, if false, do
6122              not try to link against SDLNET_INCLUDE_DIR, where  to  find  the
6123              headers
6124
6125
6126              $SDLDIR  is an environment variable that would correspond to the
6127              ./configure --prefix=$SDLDIR used in building SDL.
6128
6129
6130              Created by Eric Wing. This was influenced by  the  FindSDL.cmake
6131              module,  but with modifications to recognize OS X frameworks and
6132              additional Unix paths (FreeBSD, etc).
6133
6134
6135       FindSDL_sound
6136
6137
6138              Locates the SDL_sound library
6139
6140
6141       FindSDL_ttf
6142
6143
6144              Locate SDL_ttf library This module defines  SDLTTF_LIBRARY,  the
6145              name  of  the library to link against SDLTTF_FOUND, if false, do
6146              not try  to  link  to  SDL  SDLTTF_INCLUDE_DIR,  where  to  find
6147              SDL/SDL.h
6148
6149
6150              $SDLDIR  is an environment variable that would correspond to the
6151              ./configure --prefix=$SDLDIR used in building SDL.
6152
6153
6154              Created by Eric Wing. This was influenced by  the  FindSDL.cmake
6155              module,  but with modifications to recognize OS X frameworks and
6156              additional Unix paths (FreeBSD, etc).
6157
6158
6159       FindSWIG
6160              Find SWIG
6161
6162              This module finds an installed  SWIG.   It  sets  the  following
6163              variables:
6164
6165
6166                SWIG_FOUND - set to true if SWIG is found
6167                SWIG_DIR - the directory where swig is installed
6168                SWIG_EXECUTABLE - the path to the swig executable
6169                SWIG_VERSION   - the version number of the swig executable
6170
6171
6172
6173
6174              The  minimum required version of SWIG can be specified using the
6175              standard syntax, e.g. FIND_PACKAGE(SWIG 1.1)
6176
6177
6178              All information is collected from  the  SWIG_EXECUTABLE  so  the
6179              version  to  be  found  can  be changed from the command line by
6180              means of setting SWIG_EXECUTABLE
6181
6182
6183
6184       FindSelfPackers
6185              Find upx
6186
6187              This module looks for some executable  packers  (i.e.  softwares
6188              that   compress  executables  or  shared  libs  into  on-the-fly
6189              self-extracting executables or shared libs. Examples:
6190
6191
6192                UPX: http://wildsau.idv.uni-linz.ac.at/mfx/upx.html
6193
6194
6195       FindSquish
6196              -- Typical Use
6197
6198
6199
6200
6201              This module can be used to find  Squish  (currently  support  is
6202              aimed at version 3).
6203
6204
6205                SQUISH_FOUND                    If false, don't try to use Squish
6206
6207
6208
6209
6210                SQUISH_INSTALL_DIR              The Squish installation directory (containing bin, lib, etc)
6211                SQUISH_SERVER_EXECUTABLE        The squishserver executable
6212                SQUISH_CLIENT_EXECUTABLE        The squishrunner executable
6213
6214
6215
6216
6217                SQUISH_INSTALL_DIR_FOUND        Was the install directory found?
6218                SQUISH_SERVER_EXECUTABLE_FOUND  Was the server executable found?
6219                SQUISH_CLIENT_EXECUTABLE_FOUND  Was the client executable found?
6220
6221
6222
6223
6224              macro  SQUISH_ADD_TEST(testName  applicationUnderTest  testSuite
6225              testCase)
6226
6227
6228                ENABLE_TESTING()
6229                FIND_PACKAGE(Squish)
6230                IF (SQUISH_FOUND)
6231                  SQUISH_ADD_TEST(myTestName myApplication testSuiteName testCaseName)
6232                ENDIF (SQUISH_FOUND)
6233
6234
6235
6236
6237
6238       FindSubversion
6239              Extract information from a subversion working copy
6240
6241              The module defines the following variables:
6242
6243
6244                Subversion_SVN_EXECUTABLE - path to svn command line client
6245                Subversion_VERSION_SVN - version of svn command line client
6246                Subversion_FOUND - true if the command line client was found
6247                SUBVERSION_FOUND - same as Subversion_FOUND, set for compatiblity reasons
6248
6249
6250
6251
6252              The minimum required version  of  Subversion  can  be  specified
6253              using the standard syntax, e.g. FIND_PACKAGE(Subversion 1.4)
6254
6255
6256              If  the  command  line client executable is found two macros are
6257              defined:
6258
6259
6260                Subversion_WC_INFO(<dir> <var-prefix>)
6261                Subversion_WC_LOG(<dir> <var-prefix>)
6262
6263              Subversion_WC_INFO extracts information of a subversion  working
6264              copy at a given location. This macro defines the following vari‐
6265              ables:
6266
6267
6268                <var-prefix>_WC_URL - url of the repository (at <dir>)
6269                <var-prefix>_WC_ROOT - root url of the repository
6270                <var-prefix>_WC_REVISION - current revision
6271                <var-prefix>_WC_LAST_CHANGED_AUTHOR - author of last commit
6272                <var-prefix>_WC_LAST_CHANGED_DATE - date of last commit
6273                <var-prefix>_WC_LAST_CHANGED_REV - revision of last commit
6274                <var-prefix>_WC_INFO - output of command `svn info <dir>'
6275
6276              Subversion_WC_LOG retrieves the log message of the base revision
6277              of  a  subversion  working  copy at a given location. This macro
6278              defines the variable:
6279
6280
6281                <var-prefix>_LAST_CHANGED_LOG - last log of base revision
6282
6283              Example usage:
6284
6285
6286                FIND_PACKAGE(Subversion)
6287                IF(SUBVERSION_FOUND)
6288                  Subversion_WC_INFO(${PROJECT_SOURCE_DIR} Project)
6289                  MESSAGE("Current revision is ${Project_WC_REVISION}")
6290                  Subversion_WC_LOG(${PROJECT_SOURCE_DIR} Project)
6291                  MESSAGE("Last changed log is ${Project_LAST_CHANGED_LOG}")
6292                ENDIF(SUBVERSION_FOUND)
6293
6294
6295       FindTCL
6296              TK_INTERNAL_PATH was removed.
6297
6298              This module finds if Tcl is installed and determines  where  the
6299              include  files  and  libraries  are. It also determines what the
6300              name of the library is. This code sets the following variables:
6301
6302
6303                TCL_FOUND              = Tcl was found
6304                TK_FOUND               = Tk was found
6305                TCLTK_FOUND            = Tcl and Tk were found
6306                TCL_LIBRARY            = path to Tcl library (tcl tcl80)
6307                TCL_INCLUDE_PATH       = path to where tcl.h can be found
6308                TCL_TCLSH              = path to tclsh binary (tcl tcl80)
6309                TK_LIBRARY             = path to Tk library (tk tk80 etc)
6310                TK_INCLUDE_PATH        = path to where tk.h can be found
6311                TK_WISH                = full path to the wish executable
6312
6313
6314
6315
6316              In an effort to remove some clutter and clear up some issues for
6317              people  who  are  not necessarily Tcl/Tk gurus/developpers, some
6318              variables were moved or removed. Changes compared to  CMake  2.4
6319              are:
6320
6321
6322                 => they were only useful for people writing Tcl/Tk extensions.
6323                 => these libs are not packaged by default with Tcl/Tk distributions.
6324                    Even when Tcl/Tk is built from source, several flavors of debug libs
6325                    are created and there is no real reason to pick a single one
6326                    specifically (say, amongst tcl84g, tcl84gs, or tcl84sgx).
6327                    Let's leave that choice to the user by allowing him to assign
6328                    TCL_LIBRARY to any Tcl library, debug or not.
6329                 => this ended up being only a Win32 variable, and there is a lot of
6330                    confusion regarding the location of this file in an installed Tcl/Tk
6331                    tree anyway (see 8.5 for example). If you need the internal path at
6332                    this point it is safer you ask directly where the *source* tree is
6333                    and dig from there.
6334
6335
6336       FindTIFF
6337              Find TIFF library
6338
6339              Find the native TIFF includes and library This module defines
6340
6341
6342                TIFF_INCLUDE_DIR, where to find tiff.h, etc.
6343                TIFF_LIBRARIES, libraries to link against to use TIFF.
6344                TIFF_FOUND, If false, do not try to use TIFF.
6345
6346              also defined, but not for general use are
6347
6348
6349                TIFF_LIBRARY, where to find the TIFF library.
6350
6351
6352       FindTclStub
6353              TCL_STUB_LIBRARY_DEBUG and TK_STUB_LIBRARY_DEBUG were removed.
6354
6355              This module finds Tcl stub libraries. It first finds Tcl include
6356              files and libraries by calling FindTCL.cmake. How to Use the Tcl
6357              Stubs Library:
6358
6359
6360                 http://tcl.activestate.com/doc/howto/stubs.html
6361
6362              Using Stub Libraries:
6363
6364
6365                 http://safari.oreilly.com/0130385603/ch48lev1sec3
6366
6367              This code sets the following variables:
6368
6369
6370                TCL_STUB_LIBRARY       = path to Tcl stub library
6371                TK_STUB_LIBRARY        = path to Tk stub library
6372                TTK_STUB_LIBRARY       = path to ttk stub library
6373
6374
6375
6376
6377              In an effort to remove some clutter and clear up some issues for
6378              people who are not necessarily  Tcl/Tk  gurus/developpers,  some
6379              variables  were  moved or removed. Changes compared to CMake 2.4
6380              are:
6381
6382
6383                 => these libs are not packaged by default with Tcl/Tk distributions.
6384                    Even when Tcl/Tk is built from source, several flavors of debug libs
6385                    are created and there is no real reason to pick a single one
6386                    specifically (say, amongst tclstub84g, tclstub84gs, or tclstub84sgx).
6387                    Let's leave that choice to the user by allowing him to assign
6388                    TCL_STUB_LIBRARY to any Tcl library, debug or not.
6389
6390
6391       FindTclsh
6392              Find tclsh
6393
6394              This module finds if TCL is installed and determines  where  the
6395              include  files  and  libraries  are. It also determines what the
6396              name of the library is. This code sets the following variables:
6397
6398
6399                TCLSH_FOUND = TRUE if tclsh has been found
6400                TCL_TCLSH = the path to the tclsh executable
6401
6402              In cygwin, look for the cygwin version first.  Don't look for it
6403              later to avoid finding the cygwin version on a Win32 build.
6404
6405
6406       FindThreads
6407              This module determines the thread library of the system.
6408
6409              The following variables are set
6410
6411
6412                CMAKE_THREAD_LIBS_INIT     - the thread library
6413                CMAKE_USE_SPROC_INIT       - are we using sproc?
6414                CMAKE_USE_WIN32_THREADS_INIT - using WIN32 threads?
6415                CMAKE_USE_PTHREADS_INIT    - are we using pthreads
6416                CMAKE_HP_PTHREADS_INIT     - are we using hp pthreads
6417
6418              For systems with multiple thread libraries, caller can set
6419
6420
6421                CMAKE_THREAD_PREFER_PTHREAD
6422
6423
6424       FindUnixCommands
6425              Find unix commands from cygwin
6426
6427              This module looks for some usual Unix commands.
6428
6429
6430
6431       FindVTK
6432              Find a VTK installation or build tree.
6433
6434              The  following variables are set if VTK is found.  If VTK is not
6435              found, VTK_FOUND is set to false.
6436
6437
6438                VTK_FOUND         - Set to true when VTK is found.
6439                VTK_USE_FILE      - CMake file to use VTK.
6440                VTK_MAJOR_VERSION - The VTK major version number.
6441                VTK_MINOR_VERSION - The VTK minor version number
6442                                     (odd non-release).
6443                VTK_BUILD_VERSION - The VTK patch level
6444                                     (meaningless for odd minor).
6445                VTK_INCLUDE_DIRS  - Include directories for VTK
6446                VTK_LIBRARY_DIRS  - Link directories for VTK libraries
6447                VTK_KITS          - List of VTK kits, in CAPS
6448                                    (COMMON,IO,) etc.
6449                VTK_LANGUAGES     - List of wrapped languages, in CAPS
6450                                    (TCL, PYHTON,) etc.
6451
6452              The following cache entries must be set by the  user  to  locate
6453              VTK:
6454
6455
6456                VTK_DIR  - The directory containing VTKConfig.cmake.
6457                           This is either the root of the build tree,
6458                           or the lib/vtk directory.  This is the
6459                           only cache entry.
6460
6461              The  following  variables are set for backward compatibility and
6462              should not be used in new code:
6463
6464
6465                USE_VTK_FILE - The full path to the UseVTK.cmake file.
6466                               This is provided for backward
6467                               compatibility.  Use VTK_USE_FILE
6468                               instead.
6469
6470
6471
6472
6473
6474       FindWget
6475              Find wget
6476
6477              This module looks for wget. This module defines  the   following
6478              values:
6479
6480
6481                WGET_EXECUTABLE: the full path to the wget tool.
6482                WGET_FOUND: True if wget has been found.
6483
6484
6485       FindWish
6486              Find wish installation
6487
6488              This  module  finds if TCL is installed and determines where the
6489              include files and libraries are. It  also  determines  what  the
6490              name of the library is. This code sets the following variables:
6491
6492
6493                TK_WISH = the path to the wish executable
6494
6495
6496
6497
6498              if  UNIX  is  defined,  then it will look for the cygwin version
6499              first
6500
6501
6502       FindX11
6503              Find X11 installation
6504
6505              Try to find X11  on  UNIX  systems.  The  following  values  are
6506              defined
6507
6508
6509                X11_FOUND        - True if X11 is available
6510                X11_INCLUDE_DIR  - include directories to use X11
6511                X11_LIBRARIES    - link against these to use X11
6512
6513
6514
6515
6516              and  also  the  following  more  fine grained variables: Include
6517              paths:        X11_ICE_INCLUDE_PATH,                 X11_ICE_LIB,
6518              X11_ICE_FOUND
6519
6520
6521                              X11_X11_INCLUDE_PATH,          X11_X11_LIB
6522                              X11_Xaccessrules_INCLUDE_PATH,                     X11_Xaccess_FOUND
6523                              X11_Xaccessstr_INCLUDE_PATH,                       X11_Xaccess_FOUND
6524                              X11_Xau_INCLUDE_PATH,          X11_Xau_LIB,        X11_Xau_FOUND
6525                              X11_Xcomposite_INCLUDE_PATH,   X11_Xcomposite_LIB, X11_Xcomposite_FOUND
6526                              X11_Xcursor_INCLUDE_PATH,      X11_Xcursor_LIB,    X11_Xcursor_FOUND
6527                              X11_Xdamage_INCLUDE_PATH,      X11_Xdamage_LIB,    X11_Xdamage_FOUND
6528                              X11_Xdmcp_INCLUDE_PATH,        X11_Xdmcp_LIB,      X11_Xdmcp_FOUND
6529                                                             X11_Xext_LIB,       X11_Xext_FOUND
6530                              X11_dpms_INCLUDE_PATH,         (in X11_Xext_LIB),  X11_dpms_FOUND
6531                              X11_XShm_INCLUDE_PATH,         (in X11_Xext_LIB),  X11_XShm_FOUND
6532                              X11_Xshape_INCLUDE_PATH,       (in X11_Xext_LIB),  X11_Xshape_FOUND
6533                              X11_xf86misc_INCLUDE_PATH,     X11_Xxf86misc_LIB,  X11_xf86misc_FOUND
6534                              X11_xf86vmode_INCLUDE_PATH,                        X11_xf86vmode_FOUND
6535                              X11_Xfixes_INCLUDE_PATH,       X11_Xfixes_LIB,     X11_Xfixes_FOUND
6536                              X11_Xft_INCLUDE_PATH,          X11_Xft_LIB,        X11_Xft_FOUND
6537                              X11_Xi_INCLUDE_PATH,           X11_Xi_LIB,         X11_Xi_FOUND
6538                              X11_Xinerama_INCLUDE_PATH,     X11_Xinerama_LIB,   X11_Xinerama_FOUND
6539                              X11_Xinput_INCLUDE_PATH,       X11_Xinput_LIB,     X11_Xinput_FOUND
6540                              X11_Xkb_INCLUDE_PATH,                              X11_Xkb_FOUND
6541                              X11_Xkblib_INCLUDE_PATH,                           X11_Xkb_FOUND
6542                              X11_Xpm_INCLUDE_PATH,          X11_Xpm_LIB,        X11_Xpm_FOUND
6543                              X11_XTest_INCLUDE_PATH,        X11_XTest_LIB,      X11_XTest_FOUND
6544                              X11_Xrandr_INCLUDE_PATH,       X11_Xrandr_LIB,     X11_Xrandr_FOUND
6545                              X11_Xrender_INCLUDE_PATH,      X11_Xrender_LIB,    X11_Xrender_FOUND
6546                              X11_Xscreensaver_INCLUDE_PATH, X11_Xscreensaver_LIB, X11_Xscreensaver_FOUND
6547                              X11_Xt_INCLUDE_PATH,           X11_Xt_LIB,         X11_Xt_FOUND
6548                              X11_Xutil_INCLUDE_PATH,                            X11_Xutil_FOUND
6549                              X11_Xv_INCLUDE_PATH,           X11_Xv_LIB,         X11_Xv_FOUND
6550
6551
6552       FindXMLRPC
6553              Find xmlrpc
6554
6555              Find the native XMLRPC headers and libraries.
6556
6557
6558                XMLRPC_INCLUDE_DIRS      - where to find xmlrpc.h, etc.
6559                XMLRPC_LIBRARIES         - List of libraries when using xmlrpc.
6560                XMLRPC_FOUND             - True if xmlrpc found.
6561
6562              XMLRPC modules may be specified as components for this find mod‐
6563              ule. Modules may be listed by running  "xmlrpc-c-config".   Mod‐
6564              ules include:
6565
6566
6567                c++            C++ wrapper code
6568                libwww-client  libwww-based client
6569                cgi-server     CGI-based server
6570                abyss-server   ABYSS-based server
6571
6572              Typical usage:
6573
6574
6575                FIND_PACKAGE(XMLRPC REQUIRED libwww-client)
6576
6577
6578       FindZLIB
6579              Find zlib
6580
6581              Find  the  native ZLIB includes and library. Once done this will
6582              define
6583
6584
6585                ZLIB_INCLUDE_DIRS   - where to find zlib.h, etc.
6586                ZLIB_LIBRARIES      - List of libraries when using zlib.
6587                ZLIB_FOUND          - True if zlib found.
6588
6589
6590
6591
6592                ZLIB_VERSION_STRING - The version of zlib found (x.y.z)
6593                ZLIB_VERSION_MAJOR  - The major version of zlib
6594                ZLIB_VERSION_MINOR  - The minor version of zlib
6595                ZLIB_VERSION_PATCH  - The patch version of zlib
6596                ZLIB_VERSION_TWEAK  - The tweak version of zlib
6597
6598
6599
6600
6601              The following variable are provided for backward compatibility
6602
6603
6604                ZLIB_MAJOR_VERSION  - The major version of zlib
6605                ZLIB_MINOR_VERSION  - The minor version of zlib
6606                ZLIB_PATCH_VERSION  - The patch version of zlib
6607
6608
6609       Findosg
6610
6611
6612
6613
6614
6615              NOTE: It is highly recommended that you use  the  new  FindOpen‐
6616              SceneGraph.cmake introduced in CMake 2.6.3 and not use this Find
6617              module directly.
6618
6619
6620              This is part of the Findosg* suite used to  find  OpenSceneGraph
6621              components.  Each  component  is separate and you must opt in to
6622              each module. You must  also opt into OpenGL and OpenThreads (and
6623              Producer  if needed) as these  modules won't do it for you. This
6624              is to allow you control over your own  system piece by piece  in
6625              case  you  need  to  opt out of certain components or change the
6626              Find behavior for  a  particular  module  (perhaps  because  the
6627              default FindOpenGL.cmake module doesn't work with your system as
6628              an example). If you want to use a more  convenient  module  that
6629              includes everything, use the FindOpenSceneGraph.cmake instead of
6630              the Findosg*.cmake modules.
6631
6632
6633              Locate osg This module defines
6634
6635
6636              OSG_FOUND - Was the Osg found? OSG_INCLUDE_DIR - Where  to  find
6637              the  headers  OSG_LIBRARIES  - The libraries to link against for
6638              the OSG (use this)
6639
6640
6641              OSG_LIBRARY - The OSG library OSG_LIBRARY_DEBUG - The OSG  debug
6642              library
6643
6644
6645              $OSGDIR  is an environment variable that would correspond to the
6646              ./configure --prefix=$OSGDIR used in building osg.
6647
6648
6649              Created by Eric Wing.
6650
6651
6652       FindosgAnimation
6653
6654
6655              This is part of the Findosg* suite used to  find  OpenSceneGraph
6656              components.  Each  component  is separate and you must opt in to
6657              each module. You must  also opt into OpenGL and OpenThreads (and
6658              Producer  if needed) as these  modules won't do it for you. This
6659              is to allow you control over your own  system piece by piece  in
6660              case  you  need  to  opt out of certain components or change the
6661              Find behavior for  a  particular  module  (perhaps  because  the
6662              default FindOpenGL.cmake module doesn't work with your system as
6663              an example). If you want to use a more  convenient  module  that
6664              includes everything, use the FindOpenSceneGraph.cmake instead of
6665              the Findosg*.cmake modules.
6666
6667
6668              Locate osgAnimation This module defines
6669
6670
6671              OSGANIMATION_FOUND   -   Was   osgAnimation   found?   OSGANIMA‐
6672              TION_INCLUDE_DIR   -   Where   to  find  the  headers  OSGANIMA‐
6673              TION_LIBRARIES - The libraries to link against for the OSG  (use
6674              this)
6675
6676
6677              OSGANIMATION_LIBRARY     -    The    OSG    library    OSGANIMA‐
6678              TION_LIBRARY_DEBUG - The OSG debug library
6679
6680
6681              $OSGDIR is an environment variable that would correspond to  the
6682              ./configure --prefix=$OSGDIR used in building osg.
6683
6684
6685              Created by Eric Wing.
6686
6687
6688       FindosgDB
6689
6690
6691              This  is  part of the Findosg* suite used to find OpenSceneGraph
6692              components. Each component is separate and you must  opt  in  to
6693              each module. You must  also opt into OpenGL and OpenThreads (and
6694              Producer if needed) as these  modules won't do it for you.  This
6695              is  to allow you control over your own  system piece by piece in
6696              case you need to opt out of certain  components  or  change  the
6697              Find  behavior  for  a  particular  module  (perhaps because the
6698              default FindOpenGL.cmake module doesn't work with your system as
6699              an  example).  If  you want to use a more convenient module that
6700              includes everything, use the FindOpenSceneGraph.cmake instead of
6701              the Findosg*.cmake modules.
6702
6703
6704              Locate osgDB This module defines
6705
6706
6707              OSGDB_FOUND - Was osgDB found? OSGDB_INCLUDE_DIR - Where to find
6708              the headers OSGDB_LIBRARIES - The libraries to link against  for
6709              the osgDB (use this)
6710
6711
6712              OSGDB_LIBRARY  -  The  osgDB  library  OSGDB_LIBRARY_DEBUG - The
6713              osgDB debug library
6714
6715
6716              $OSGDIR is an environment variable that would correspond to  the
6717              ./configure --prefix=$OSGDIR used in building osg.
6718
6719
6720              Created by Eric Wing.
6721
6722
6723       FindosgFX
6724
6725
6726              This  is  part of the Findosg* suite used to find OpenSceneGraph
6727              components. Each component is separate and you must  opt  in  to
6728              each module. You must  also opt into OpenGL and OpenThreads (and
6729              Producer if needed) as these  modules won't do it for you.  This
6730              is  to allow you control over your own  system piece by piece in
6731              case you need to opt out of certain  components  or  change  the
6732              Find  behavior  for  a  particular  module  (perhaps because the
6733              default FindOpenGL.cmake module doesn't work with your system as
6734              an  example).  If  you want to use a more convenient module that
6735              includes everything, use the FindOpenSceneGraph.cmake instead of
6736              the Findosg*.cmake modules.
6737
6738
6739              Locate osgFX This module defines
6740
6741
6742              OSGFX_FOUND - Was osgFX found? OSGFX_INCLUDE_DIR - Where to find
6743              the headers OSGFX_LIBRARIES - The libraries to link against  for
6744              the osgFX (use this)
6745
6746
6747              OSGFX_LIBRARY  -  The  osgFX  library  OSGFX_LIBRARY_DEBUG - The
6748              osgFX debug library
6749
6750
6751              $OSGDIR is an environment variable that would correspond to  the
6752              ./configure --prefix=$OSGDIR used in building osg.
6753
6754
6755              Created by Eric Wing.
6756
6757
6758       FindosgGA
6759
6760
6761              This  is  part of the Findosg* suite used to find OpenSceneGraph
6762              components. Each component is separate and you must  opt  in  to
6763              each module. You must  also opt into OpenGL and OpenThreads (and
6764              Producer if needed) as these  modules won't do it for you.  This
6765              is  to allow you control over your own  system piece by piece in
6766              case you need to opt out of certain  components  or  change  the
6767              Find  behavior  for  a  particular  module  (perhaps because the
6768              default FindOpenGL.cmake module doesn't work with your system as
6769              an  example).  If  you want to use a more convenient module that
6770              includes everything, use the FindOpenSceneGraph.cmake instead of
6771              the Findosg*.cmake modules.
6772
6773
6774              Locate osgGA This module defines
6775
6776
6777              OSGGA_FOUND - Was osgGA found? OSGGA_INCLUDE_DIR - Where to find
6778              the headers OSGGA_LIBRARIES - The libraries to link against  for
6779              the osgGA (use this)
6780
6781
6782              OSGGA_LIBRARY  -  The  osgGA  library  OSGGA_LIBRARY_DEBUG - The
6783              osgGA debug library
6784
6785
6786              $OSGDIR is an environment variable that would correspond to  the
6787              ./configure --prefix=$OSGDIR used in building osg.
6788
6789
6790              Created by Eric Wing.
6791
6792
6793       FindosgIntrospection
6794
6795
6796              This  is  part of the Findosg* suite used to find OpenSceneGraph
6797              components. Each component is separate and you must  opt  in  to
6798              each module. You must  also opt into OpenGL and OpenThreads (and
6799              Producer if needed) as these  modules won't do it for you.  This
6800              is  to allow you control over your own  system piece by piece in
6801              case you need to opt out of certain  components  or  change  the
6802              Find  behavior  for  a  particular  module  (perhaps because the
6803              default FindOpenGL.cmake module doesn't work with your system as
6804              an  example).  If  you want to use a more convenient module that
6805              includes everything, use the FindOpenSceneGraph.cmake instead of
6806              the Findosg*.cmake modules.
6807
6808
6809              Locate osgINTROSPECTION This module defines
6810
6811
6812              OSGINTROSPECTION_FOUND  -  Was osgIntrospection found? OSGINTRO‐
6813              SPECTION_INCLUDE_DIR - Where to find the  headers  OSGINTROSPEC‐
6814              TION_LIBRARIES - The libraries to link for osgIntrospection (use
6815              this)
6816
6817
6818              OSGINTROSPECTION_LIBRARY - The osgIntrospection  library  OSGIN‐
6819              TROSPECTION_LIBRARY_DEBUG - The osgIntrospection debug library
6820
6821
6822              $OSGDIR  is an environment variable that would correspond to the
6823              ./configure --prefix=$OSGDIR used in building osg.
6824
6825
6826              Created by Eric Wing.
6827
6828
6829       FindosgManipulator
6830
6831
6832              This is part of the Findosg* suite used to  find  OpenSceneGraph
6833              components.  Each  component  is separate and you must opt in to
6834              each module. You must  also opt into OpenGL and OpenThreads (and
6835              Producer  if needed) as these  modules won't do it for you. This
6836              is to allow you control over your own  system piece by piece  in
6837              case  you  need  to  opt out of certain components or change the
6838              Find behavior for  a  particular  module  (perhaps  because  the
6839              default FindOpenGL.cmake module doesn't work with your system as
6840              an example). If you want to use a more  convenient  module  that
6841              includes everything, use the FindOpenSceneGraph.cmake instead of
6842              the Findosg*.cmake modules.
6843
6844
6845              Locate osgManipulator This module defines
6846
6847
6848              OSGMANIPULATOR_FOUND - Was  osgManipulator  found?  OSGMANIPULA‐
6849              TOR_INCLUDE_DIR   -  Where  to  find  the  headers  OSGMANIPULA‐
6850              TOR_LIBRARIES - The libraries to link  for  osgManipulator  (use
6851              this)
6852
6853
6854              OSGMANIPULATOR_LIBRARY - The osgManipulator library OSGMANIPULA‐
6855              TOR_LIBRARY_DEBUG - The osgManipulator debug library
6856
6857
6858              $OSGDIR is an environment variable that would correspond to  the
6859              ./configure --prefix=$OSGDIR used in building osg.
6860
6861
6862              Created by Eric Wing.
6863
6864
6865       FindosgParticle
6866
6867
6868              This  is  part of the Findosg* suite used to find OpenSceneGraph
6869              components. Each component is separate and you must  opt  in  to
6870              each module. You must  also opt into OpenGL and OpenThreads (and
6871              Producer if needed) as these  modules won't do it for you.  This
6872              is  to allow you control over your own  system piece by piece in
6873              case you need to opt out of certain  components  or  change  the
6874              Find  behavior  for  a  particular  module  (perhaps because the
6875              default FindOpenGL.cmake module doesn't work with your system as
6876              an  example).  If  you want to use a more convenient module that
6877              includes everything, use the FindOpenSceneGraph.cmake instead of
6878              the Findosg*.cmake modules.
6879
6880
6881              Locate osgParticle This module defines
6882
6883
6884              OSGPARTICLE_FOUND    -    Was   osgParticle   found?   OSGPARTI‐
6885              CLE_INCLUDE_DIR  -  Where  to   find   the   headers   OSGPARTI‐
6886              CLE_LIBRARIES - The libraries to link for osgParticle (use this)
6887
6888
6889              OSGPARTICLE_LIBRARY   -   The   osgParticle   library  OSGPARTI‐
6890              CLE_LIBRARY_DEBUG - The osgParticle debug library
6891
6892
6893              $OSGDIR is an environment variable that would correspond to  the
6894              ./configure --prefix=$OSGDIR used in building osg.
6895
6896
6897              Created by Eric Wing.
6898
6899
6900       FindosgProducer
6901
6902
6903              This  is  part of the Findosg* suite used to find OpenSceneGraph
6904              components. Each component is separate and you must  opt  in  to
6905              each module. You must  also opt into OpenGL and OpenThreads (and
6906              Producer if needed) as these  modules won't do it for you.  This
6907              is  to allow you control over your own  system piece by piece in
6908              case you need to opt out of certain  components  or  change  the
6909              Find  behavior  for  a  particular  module  (perhaps because the
6910              default FindOpenGL.cmake module doesn't work with your system as
6911              an  example).  If  you want to use a more convenient module that
6912              includes everything, use the FindOpenSceneGraph.cmake instead of
6913              the Findosg*.cmake modules.
6914
6915
6916              Locate osgProducer This module defines
6917
6918
6919              OSGPRODUCER_FOUND    -    Was    osgProducer    found?   OSGPRO‐
6920              DUCER_INCLUDE_DIR  -  Where  to   find   the   headers   OSGPRO‐
6921              DUCER_LIBRARIES  -  The  libraries  to link for osgProducer (use
6922              this)
6923
6924
6925              OSGPRODUCER_LIBRARY   -   The   osgProducer   library    OSGPRO‐
6926              DUCER_LIBRARY_DEBUG - The osgProducer debug library
6927
6928
6929              $OSGDIR  is an environment variable that would correspond to the
6930              ./configure --prefix=$OSGDIR used in building osg.
6931
6932
6933              Created by Eric Wing.
6934
6935
6936       FindosgShadow
6937
6938
6939              This is part of the Findosg* suite used to  find  OpenSceneGraph
6940              components.  Each  component  is separate and you must opt in to
6941              each module. You must  also opt into OpenGL and OpenThreads (and
6942              Producer  if needed) as these  modules won't do it for you. This
6943              is to allow you control over your own  system piece by piece  in
6944              case  you  need  to  opt out of certain components or change the
6945              Find behavior for  a  particular  module  (perhaps  because  the
6946              default FindOpenGL.cmake module doesn't work with your system as
6947              an example). If you want to use a more  convenient  module  that
6948              includes everything, use the FindOpenSceneGraph.cmake instead of
6949              the Findosg*.cmake modules.
6950
6951
6952              Locate osgShadow This module defines
6953
6954
6955              OSGSHADOW_FOUND - Was osgShadow found?  OSGSHADOW_INCLUDE_DIR  -
6956              Where to find the headers OSGSHADOW_LIBRARIES - The libraries to
6957              link for osgShadow (use this)
6958
6959
6960              OSGSHADOW_LIBRARY      -       The       osgShadow       library
6961              OSGSHADOW_LIBRARY_DEBUG - The osgShadow debug library
6962
6963
6964              $OSGDIR  is an environment variable that would correspond to the
6965              ./configure --prefix=$OSGDIR used in building osg.
6966
6967
6968              Created by Eric Wing.
6969
6970
6971       FindosgSim
6972
6973
6974              This is part of the Findosg* suite used to  find  OpenSceneGraph
6975              components.  Each  component  is separate and you must opt in to
6976              each module. You must  also opt into OpenGL and OpenThreads (and
6977              Producer  if needed) as these  modules won't do it for you. This
6978              is to allow you control over your own  system piece by piece  in
6979              case  you  need  to  opt out of certain components or change the
6980              Find behavior for  a  particular  module  (perhaps  because  the
6981              default FindOpenGL.cmake module doesn't work with your system as
6982              an example). If you want to use a more  convenient  module  that
6983              includes everything, use the FindOpenSceneGraph.cmake instead of
6984              the Findosg*.cmake modules.
6985
6986
6987              Locate osgSim This module defines
6988
6989
6990              OSGSIM_FOUND - Was osgSim found? OSGSIM_INCLUDE_DIR -  Where  to
6991              find  the  headers  OSGSIM_LIBRARIES - The libraries to link for
6992              osgSim (use this)
6993
6994
6995              OSGSIM_LIBRARY - The osgSim library OSGSIM_LIBRARY_DEBUG  -  The
6996              osgSim debug library
6997
6998
6999              $OSGDIR  is an environment variable that would correspond to the
7000              ./configure --prefix=$OSGDIR used in building osg.
7001
7002
7003              Created by Eric Wing.
7004
7005
7006       FindosgTerrain
7007
7008
7009              This is part of the Findosg* suite used to  find  OpenSceneGraph
7010              components.  Each  component  is separate and you must opt in to
7011              each module. You must  also opt into OpenGL and OpenThreads (and
7012              Producer  if needed) as these  modules won't do it for you. This
7013              is to allow you control over your own  system piece by piece  in
7014              case  you  need  to  opt out of certain components or change the
7015              Find behavior for  a  particular  module  (perhaps  because  the
7016              default FindOpenGL.cmake module doesn't work with your system as
7017              an example). If you want to use a more  convenient  module  that
7018              includes everything, use the FindOpenSceneGraph.cmake instead of
7019              the Findosg*.cmake modules.
7020
7021
7022              Locate osgTerrain This module defines
7023
7024
7025              OSGTERRAIN_FOUND - Was osgTerrain found?  OSGTERRAIN_INCLUDE_DIR
7026              - Where to find the headers OSGTERRAIN_LIBRARIES - The libraries
7027              to link for osgTerrain (use this)
7028
7029
7030              OSGTERRAIN_LIBRARY   -   The    osgTerrain    library    OSGTER‐
7031              RAIN_LIBRARY_DEBUG - The osgTerrain debug library
7032
7033
7034              $OSGDIR  is an environment variable that would correspond to the
7035              ./configure --prefix=$OSGDIR used in building osg.
7036
7037
7038              Created by Eric Wing.
7039
7040
7041       FindosgText
7042
7043
7044              This is part of the Findosg* suite used to  find  OpenSceneGraph
7045              components.  Each  component  is separate and you must opt in to
7046              each module. You must  also opt into OpenGL and OpenThreads (and
7047              Producer  if needed) as these  modules won't do it for you. This
7048              is to allow you control over your own  system piece by piece  in
7049              case  you  need  to  opt out of certain components or change the
7050              Find behavior for  a  particular  module  (perhaps  because  the
7051              default FindOpenGL.cmake module doesn't work with your system as
7052              an example). If you want to use a more  convenient  module  that
7053              includes everything, use the FindOpenSceneGraph.cmake instead of
7054              the Findosg*.cmake modules.
7055
7056
7057              Locate osgText This module defines
7058
7059
7060              OSGTEXT_FOUND - Was osgText found? OSGTEXT_INCLUDE_DIR  -  Where
7061              to  find  the  headers OSGTEXT_LIBRARIES - The libraries to link
7062              for osgText (use this)
7063
7064
7065              OSGTEXT_LIBRARY - The osgText  library  OSGTEXT_LIBRARY_DEBUG  -
7066              The osgText debug library
7067
7068
7069              $OSGDIR  is an environment variable that would correspond to the
7070              ./configure --prefix=$OSGDIR used in building osg.
7071
7072
7073              Created by Eric Wing.
7074
7075
7076       FindosgUtil
7077
7078
7079              This is part of the Findosg* suite used to  find  OpenSceneGraph
7080              components.  Each  component  is separate and you must opt in to
7081              each module. You must  also opt into OpenGL and OpenThreads (and
7082              Producer  if needed) as these  modules won't do it for you. This
7083              is to allow you control over your own  system piece by piece  in
7084              case  you  need  to  opt out of certain components or change the
7085              Find behavior for  a  particular  module  (perhaps  because  the
7086              default FindOpenGL.cmake module doesn't work with your system as
7087              an example). If you want to use a more  convenient  module  that
7088              includes everything, use the FindOpenSceneGraph.cmake instead of
7089              the Findosg*.cmake modules.
7090
7091
7092              Locate osgUtil This module defines
7093
7094
7095              OSGUTIL_FOUND - Was osgUtil found? OSGUTIL_INCLUDE_DIR  -  Where
7096              to  find  the  headers OSGUTIL_LIBRARIES - The libraries to link
7097              for osgUtil (use this)
7098
7099
7100              OSGUTIL_LIBRARY - The osgUtil  library  OSGUTIL_LIBRARY_DEBUG  -
7101              The osgUtil debug library
7102
7103
7104              $OSGDIR  is an environment variable that would correspond to the
7105              ./configure --prefix=$OSGDIR used in building osg.
7106
7107
7108              Created by Eric Wing.
7109
7110
7111       FindosgViewer
7112
7113
7114              This is part of the Findosg* suite used to  find  OpenSceneGraph
7115              components.  Each  component  is separate and you must opt in to
7116              each module. You must  also opt into OpenGL and OpenThreads (and
7117              Producer  if needed) as these  modules won't do it for you. This
7118              is to allow you control over your own  system piece by piece  in
7119              case  you  need  to  opt out of certain components or change the
7120              Find behavior for  a  particular  module  (perhaps  because  the
7121              default FindOpenGL.cmake module doesn't work with your system as
7122              an example). If you want to use a more  convenient  module  that
7123              includes everything, use the FindOpenSceneGraph.cmake instead of
7124              the Findosg*.cmake modules.
7125
7126
7127              Locate osgViewer This module defines
7128
7129
7130              OSGVIEWER_FOUND - Was osgViewer found?  OSGVIEWER_INCLUDE_DIR  -
7131              Where to find the headers OSGVIEWER_LIBRARIES - The libraries to
7132              link for osgViewer (use this)
7133
7134
7135              OSGVIEWER_LIBRARY      -       The       osgViewer       library
7136              OSGVIEWER_LIBRARY_DEBUG - The osgViewer debug library
7137
7138
7139              $OSGDIR  is an environment variable that would correspond to the
7140              ./configure --prefix=$OSGDIR used in building osg.
7141
7142
7143              Created by Eric Wing.
7144
7145
7146       FindosgVolume
7147
7148
7149              This is part of the Findosg* suite used to  find  OpenSceneGraph
7150              components.  Each  component  is separate and you must opt in to
7151              each module. You must  also opt into OpenGL and OpenThreads (and
7152              Producer  if needed) as these  modules won't do it for you. This
7153              is to allow you control over your own  system piece by piece  in
7154              case  you  need  to  opt out of certain components or change the
7155              Find behavior for  a  particular  module  (perhaps  because  the
7156              default FindOpenGL.cmake module doesn't work with your system as
7157              an example). If you want to use a more  convenient  module  that
7158              includes everything, use the FindOpenSceneGraph.cmake instead of
7159              the Findosg*.cmake modules.
7160
7161
7162              Locate osgVolume This module defines
7163
7164
7165              OSGVOLUME_FOUND - Was osgVolume found?  OSGVOLUME_INCLUDE_DIR  -
7166              Where to find the headers OSGVOLUME_LIBRARIES - The libraries to
7167              link for osgVolume (use this)
7168
7169
7170              OSGVOLUME_LIBRARY    -    The    osgVolume    library    OSGVOL‐
7171              UME_LIBRARY_DEBUG - The osgVolume debug library
7172
7173
7174              $OSGDIR  is an environment variable that would correspond to the
7175              ./configure --prefix=$OSGDIR used in building osg.
7176
7177
7178              Created by Eric Wing.
7179
7180
7181       FindosgWidget
7182
7183
7184              This is part of the Findosg* suite used to  find  OpenSceneGraph
7185              components.  Each  component  is separate and you must opt in to
7186              each module. You must  also opt into OpenGL and OpenThreads (and
7187              Producer  if needed) as these  modules won't do it for you. This
7188              is to allow you control over your own  system piece by piece  in
7189              case  you  need  to  opt out of certain components or change the
7190              Find behavior for  a  particular  module  (perhaps  because  the
7191              default FindOpenGL.cmake module doesn't work with your system as
7192              an example). If you want to use a more  convenient  module  that
7193              includes everything, use the FindOpenSceneGraph.cmake instead of
7194              the Findosg*.cmake modules.
7195
7196
7197              Locate osgWidget This module defines
7198
7199
7200              OSGWIDGET_FOUND - Was osgWidget found?  OSGWIDGET_INCLUDE_DIR  -
7201              Where to find the headers OSGWIDGET_LIBRARIES - The libraries to
7202              link for osgWidget (use this)
7203
7204
7205              OSGWIDGET_LIBRARY    -    The    osgWidget    library    OSGWID‐
7206              GET_LIBRARY_DEBUG - The osgWidget debug library
7207
7208
7209              $OSGDIR  is an environment variable that would correspond to the
7210              ./configure --prefix=$OSGDIR used in building osg.
7211
7212
7213              FindosgWidget.cmake tweaked from Findosg* suite  as  created  by
7214              Eric Wing.
7215
7216
7217       Findosg_functions
7218
7219
7220
7221
7222
7223              This CMake file contains two macros to assist with searching for
7224              OSG libraries and nodekits.
7225
7226
7227
7228       FindwxWidgets
7229              Find a wxWidgets (a.k.a., wxWindows) installation.
7230
7231              This module finds  if  wxWidgets  is  installed  and  selects  a
7232              default configuration to use. wxWidgets is a modular library. To
7233              specify the modules that you will use, you need to name them  as
7234              components to the package:
7235
7236
7237              FIND_PACKAGE(wxWidgets COMPONENTS core base ...)
7238
7239
7240              There are two search branches: a windows style and a unix style.
7241              For windows, the following variables are searched for and set to
7242              defaults  in  case  of  multiple  choices.  Change  them  if the
7243              defaults are not desired (i.e., these are the only variables you
7244              should change to select a configuration):
7245
7246
7247                wxWidgets_ROOT_DIR      - Base wxWidgets directory
7248                                          (e.g., C:/wxWidgets-2.6.3).
7249                wxWidgets_LIB_DIR       - Path to wxWidgets libraries
7250                                          (e.g., C:/wxWidgets-2.6.3/lib/vc_lib).
7251                wxWidgets_CONFIGURATION - Configuration to use
7252                                          (e.g., msw, mswd, mswu, mswunivud, etc.)
7253                wxWidgets_EXCLUDE_COMMON_LIBRARIES
7254                                        - Set to TRUE to exclude linking of
7255                                          commonly required libs (e.g., png tiff
7256                                          jpeg zlib regex expat).
7257
7258
7259
7260
7261              For  unix  style  it  uses the wx-config utility. You can select
7262              between  debug/release,  unicode/ansi,  universal/non-universal,
7263              and  static/shared in the QtDialog or ccmake interfaces by turn‐
7264              ing ON/OFF the following variables:
7265
7266
7267                wxWidgets_USE_DEBUG
7268                wxWidgets_USE_UNICODE
7269                wxWidgets_USE_UNIVERSAL
7270                wxWidgets_USE_STATIC
7271
7272
7273
7274
7275              There is also a wxWidgets_CONFIG_OPTIONS variable for all  other
7276              options  that  need  to  be passed to the wx-config utility. For
7277              example, to use the base toolkit found in the  /usr/local  path,
7278              set  the  variable  (before calling the FIND_PACKAGE command) as
7279              such:
7280
7281
7282                SET(wxWidgets_CONFIG_OPTIONS --toolkit=base --prefix=/usr)
7283
7284
7285
7286
7287              The following are set after the configuration is done  for  both
7288              windows and unix style:
7289
7290
7291                wxWidgets_FOUND            - Set to TRUE if wxWidgets was found.
7292                wxWidgets_INCLUDE_DIRS     - Include directories for WIN32
7293                                             i.e., where to find "wx/wx.h" and
7294                                             "wx/setup.h"; possibly empty for unices.
7295                wxWidgets_LIBRARIES        - Path to the wxWidgets libraries.
7296                wxWidgets_LIBRARY_DIRS     - compile time link dirs, useful for
7297                                             rpath on UNIX. Typically an empty string
7298                                             in WIN32 environment.
7299                wxWidgets_DEFINITIONS      - Contains defines required to compile/link
7300                                             against WX, e.g. WXUSINGDLL
7301                wxWidgets_DEFINITIONS_DEBUG- Contains defines required to compile/link
7302                                             against WX debug builds, e.g. __WXDEBUG__
7303                wxWidgets_CXX_FLAGS        - Include dirs and compiler flags for
7304                                             unices, empty on WIN32. Essentially
7305                                             "`wx-config --cxxflags`".
7306                wxWidgets_USE_FILE         - Convenience include file.
7307
7308
7309
7310
7311              Sample usage:
7312
7313
7314                 # Note that for MinGW users the order of libs is important!
7315                 FIND_PACKAGE(wxWidgets COMPONENTS net gl core base)
7316                 IF(wxWidgets_FOUND)
7317                   INCLUDE(${wxWidgets_USE_FILE})
7318                   # and for each of your dependent executable/library targets:
7319                   TARGET_LINK_LIBRARIES(<YourTarget> ${wxWidgets_LIBRARIES})
7320                 ENDIF(wxWidgets_FOUND)
7321
7322
7323
7324
7325              If wxWidgets is required (i.e., not an optional part):
7326
7327
7328                 FIND_PACKAGE(wxWidgets REQUIRED net gl core base)
7329                 INCLUDE(${wxWidgets_USE_FILE})
7330                 # and for each of your dependent executable/library targets:
7331                 TARGET_LINK_LIBRARIES(<YourTarget> ${wxWidgets_LIBRARIES})
7332
7333
7334       FindwxWindows
7335              Find wxWindows (wxWidgets) installation
7336
7337              This module finds if wxWindows/wxWidgets is installed and deter‐
7338              mines where the include files and libraries are. It also  deter‐
7339              mines  what the name of the library is. Please note this file is
7340              DEPRECATED and replaced by FindwxWidgets.cmake. This  code  sets
7341              the following variables:
7342
7343
7344                WXWINDOWS_FOUND     = system has WxWindows
7345                WXWINDOWS_LIBRARIES = path to the wxWindows libraries
7346                                      on Unix/Linux with additional
7347                                      linker flags from
7348                                      "wx-config --libs"
7349                CMAKE_WXWINDOWS_CXX_FLAGS  = Compiler flags for wxWindows,
7350                                             essentially "`wx-config --cxxflags`"
7351                                             on Linux
7352                WXWINDOWS_INCLUDE_DIR      = where to find "wx/wx.h" and "wx/setup.h"
7353                WXWINDOWS_LINK_DIRECTORIES = link directories, useful for rpath on
7354                                              Unix
7355                WXWINDOWS_DEFINITIONS      = extra defines
7356
7357
7358
7359
7360              OPTIONS If you need OpenGL support please
7361
7362
7363                SET(WXWINDOWS_USE_GL 1)
7364
7365              in your CMakeLists.txt *before* you include this file.
7366
7367
7368                HAVE_ISYSTEM      - true required to replace -I by -isystem on g++
7369
7370
7371
7372
7373              For  convenience  include  Use_wxWindows.cmake in your project's
7374              CMakeLists.txt using INCLUDE(Use_wxWindows).
7375
7376
7377              USAGE
7378
7379
7380                SET(WXWINDOWS_USE_GL 1)
7381                FIND_PACKAGE(wxWindows)
7382
7383
7384
7385
7386              NOTES wxWidgets 2.6.x is supported for  monolithic  builds  e.g.
7387              compiled  in wx/build/msw dir as:
7388
7389
7390                nmake -f makefile.vc BUILD=debug SHARED=0 USE_OPENGL=1 MONOLITHIC=1
7391
7392
7393
7394
7395              DEPRECATED
7396
7397
7398                CMAKE_WX_CAN_COMPILE
7399                WXWINDOWS_LIBRARY
7400                CMAKE_WX_CXX_FLAGS
7401                WXWINDOWS_INCLUDE_PATH
7402
7403
7404
7405
7406              AUTHOR  Jan  Woetzel <http://www.mip.informatik.uni-kiel.de/~jw>
7407              (07/2003-01/2006)
7408
7409
7410       FortranCInterface
7411              Fortran/C Interface Detection
7412
7413              This module automatically detects the API by which C and Fortran
7414              languages  interact.   Variables  indicate  if  the  mangling is
7415              found:
7416
7417
7418                 FortranCInterface_GLOBAL_FOUND = Global subroutines and functions
7419                 FortranCInterface_MODULE_FOUND = Module subroutines and functions
7420                                                  (declared by "MODULE PROCEDURE")
7421
7422              A function is provided to generate a C  header  file  containing
7423              macros to mangle symbol names:
7424
7425
7426                 FortranCInterface_HEADER(<file>
7427                                          [MACRO_NAMESPACE <macro-ns>]
7428                                          [SYMBOL_NAMESPACE <ns>]
7429                                          [SYMBOLS [<module>:]<function> ...])
7430
7431              It generates in <file> definitions of the following macros:
7432
7433
7434                 #define FortranCInterface_GLOBAL (name,NAME) ...
7435                 #define FortranCInterface_GLOBAL_(name,NAME) ...
7436                 #define FortranCInterface_MODULE (mod,name, MOD,NAME) ...
7437                 #define FortranCInterface_MODULE_(mod,name, MOD,NAME) ...
7438
7439              These  macros mangle four categories of Fortran symbols, respec‐
7440              tively:
7441
7442
7443                 - Global symbols without '_': call mysub()
7444                 - Global symbols with '_'   : call my_sub()
7445                 - Module symbols without '_': use mymod; call mysub()
7446                 - Module symbols with '_'   : use mymod; call my_sub()
7447
7448              If mangling for a category is not known, its macro is left unde‐
7449              fined. All macros require raw names in both lower case and upper
7450              case. The MACRO_NAMESPACE option replaces the default "FortranC‐
7451              Interface_" prefix with a given namespace "<macro-ns>".
7452
7453
7454              The  SYMBOLS option lists symbols to mangle automatically with C
7455              preprocessor definitions:
7456
7457
7458                 <function>          ==> #define <ns><function> ...
7459                 <module>:<function> ==> #define <ns><module>_<function> ...
7460
7461              If the mangling for some symbol is not known then no  preproces‐
7462              sor  definition is created, and a warning is displayed. The SYM‐
7463              BOL_NAMESPACE option prefixes all preprocessor definitions  gen‐
7464              erated by the SYMBOLS option with a given namespace "<ns>".
7465
7466
7467              Example usage:
7468
7469
7470                 include(FortranCInterface)
7471                 FortranCInterface_HEADER(FC.h MACRO_NAMESPACE "FC_")
7472
7473              This  creates  a  "FC.h"  header  that  defines  mangling macros
7474              FC_GLOBAL(), FC_GLOBAL_(), FC_MODULE(), and FC_MODULE_().
7475
7476
7477              Example usage:
7478
7479
7480                 include(FortranCInterface)
7481                 FortranCInterface_HEADER(FCMangle.h
7482                                          MACRO_NAMESPACE "FC_"
7483                                          SYMBOL_NAMESPACE "FC_"
7484                                          SYMBOLS mysub mymod:my_sub)
7485
7486              This creates a "FCMangle.h" header that defines the same  FC_*()
7487              mangling  macros  as the previous example plus preprocessor sym‐
7488              bols FC_mysub and FC_mymod_my_sub.
7489
7490
7491              Another function is provided to  verify  that  the  Fortran  and
7492              C/C++ compilers work together:
7493
7494
7495                 FortranCInterface_VERIFY([CXX] [QUIET])
7496
7497              It  tests  whether  a simple test executable using Fortran and C
7498              (and C++ when the CXX option is given) compiles and  links  suc‐
7499              cessfully.  The  result is stored in the cache entry FortranCIn‐
7500              terface_VERIFIED_C (or FortranCInterface_VERIFIED_CXX if CXX  is
7501              given)  as  a boolean. If the check fails and QUIET is not given
7502              the function terminates with a  FATAL_ERROR  message  describing
7503              the problem.  The purpose of this check is to stop a build early
7504              for incompatible compiler combinations.
7505
7506
7507              FortranCInterface is aware of possible GLOBAL  and  MODULE  man‐
7508              glings  for  many  Fortran  compilers,  but  it also provides an
7509              interface to specify new possible manglings.  Set the variables
7510
7511
7512                 FortranCInterface_GLOBAL_SYMBOLS
7513                 FortranCInterface_MODULE_SYMBOLS
7514
7515              before including FortranCInterface to specify manglings  of  the
7516              symbols   "MySub",   "My_Sub",  "MyModule:MySub",  and  "My_Mod‐
7517              ule:My_Sub". For example, the code:
7518
7519
7520                 set(FortranCInterface_GLOBAL_SYMBOLS mysub_ my_sub__ MYSUB_)
7521                   #                                  ^^^^^  ^^^^^^   ^^^^^
7522                 set(FortranCInterface_MODULE_SYMBOLS
7523                     __mymodule_MOD_mysub __my_module_MOD_my_sub)
7524                   #   ^^^^^^^^     ^^^^^   ^^^^^^^^^     ^^^^^^
7525                 include(FortranCInterface)
7526
7527              tells FortranCInterface to try  given  GLOBAL  and  MODULE  man‐
7528              glings.  (The  carets  point  at raw symbol names for clarity in
7529              this example but are not needed.)
7530
7531
7532       GetPrerequisites
7533              Functions to analyze and list executable file prerequisites.
7534
7535              This module provides functions to list the .dll, .dylib  or  .so
7536              files that an executable or shared library file depends on. (Its
7537              prerequisites.)
7538
7539
7540              It uses various tools to obtain  the  list  of  required  shared
7541              library files:
7542
7543
7544                 dumpbin (Windows)
7545                 ldd (Linux/Unix)
7546                 otool (Mac OSX)
7547
7548              The following functions are provided by this module:
7549
7550
7551                 get_prerequisites
7552                 list_prerequisites
7553                 list_prerequisites_by_glob
7554                 gp_append_unique
7555                 is_file_executable
7556                 gp_item_default_embedded_path
7557                   (projects can override with gp_item_default_embedded_path_override)
7558                 gp_resolve_item
7559                   (projects can override with gp_resolve_item_override)
7560                 gp_resolved_file_type
7561                   (projects can override with gp_resolved_file_type_override)
7562                 gp_file_type
7563
7564              Requires  CMake  2.6 or greater because it uses function, break,
7565              return and PARENT_SCOPE.
7566
7567
7568                GET_PREREQUISITES(<target> <prerequisites_var> <exclude_system> <recurse>
7569                                  <dirs>)
7570
7571              Get the list of shared library files required by  <target>.  The
7572              list  in  the variable named <prerequisites_var> should be empty
7573              on first entry to this function.  On  exit,  <prerequisites_var>
7574              will contain the list of required shared library files.
7575
7576
7577              <target>  is  the  full  path  to an executable file. <prerequi‐
7578              sites_var> is the name  of  a  CMake  variable  to  contain  the
7579              results.  <exclude_system>  must be 0 or 1 indicating whether to
7580              include or exclude "system" prerequisites. If <recurse>  is  set
7581              to  1  all  prerequisites will be found recursively, if set to 0
7582              only direct prerequisites are listed. <exepath> is the  path  to
7583              the top level executable used for @executable_path replacment on
7584              the Mac. <dirs> is a list of  paths  where  libraries  might  be
7585              found:  these paths are searched first when a target without any
7586              path info is given. Then  standard  system  locations  are  also
7587              searched: PATH, Framework locations, /usr/lib...
7588
7589
7590                LIST_PREREQUISITES(<target> [<recurse> [<exclude_system> [<verbose>]]])
7591
7592              Print a message listing the prerequisites of <target>.
7593
7594
7595              <target> is the name of a shared library or executable target or
7596              the full path  to  a  shared  library  or  executable  file.  If
7597              <recurse>  is  set  to  1 all prerequisites will be found recur‐
7598              sively, if set  to  0  only  direct  prerequisites  are  listed.
7599              <exclude_system> must be 0 or 1 indicating whether to include or
7600              exclude "system" prerequisites. With <verbose> set to 0 only the
7601              full path names of the prerequisites are printed, set to 1 extra
7602              informatin will be displayed.
7603
7604
7605                LIST_PREREQUISITES_BY_GLOB(<glob_arg> <glob_exp>)
7606
7607              Print the prerequisites of shared library and  executable  files
7608              matching  a globbing pattern. <glob_arg> is GLOB or GLOB_RECURSE
7609              and <glob_exp> is a globbing expression used with "file(GLOB" or
7610              "file(GLOB_RECURSE"  to  retrieve a list of matching files. If a
7611              matching file is executable, its prerequisites are listed.
7612
7613
7614              Any additional (optional) arguments provided are passed along as
7615              the optional arguments to the list_prerequisites calls.
7616
7617
7618                GP_APPEND_UNIQUE(<list_var> <value>)
7619
7620              Append <value> to the list variable <list_var> only if the value
7621              is not already in the list.
7622
7623
7624                IS_FILE_EXECUTABLE(<file> <result_var>)
7625
7626              Return 1 in <result_var> if <file> is  a  binary  executable,  0
7627              otherwise.
7628
7629
7630                GP_ITEM_DEFAULT_EMBEDDED_PATH(<item> <default_embedded_path_var>)
7631
7632              Return the path that others should refer to the item by when the
7633              item is embedded inside a bundle.
7634
7635
7636              Override on a per-project basis by providing a  project-specific
7637              gp_item_default_embedded_path_override function.
7638
7639
7640                GP_RESOLVE_ITEM(<context> <item> <exepath> <dirs> <resolved_item_var>)
7641
7642              Resolve an item into an existing full path file.
7643
7644
7645              Override  on a per-project basis by providing a project-specific
7646              gp_resolve_item_override function.
7647
7648
7649                GP_RESOLVED_FILE_TYPE(<original_file> <file> <exepath> <dirs> <type_var>)
7650
7651              Return the type  of  <file>  with  respect  to  <original_file>.
7652              String  describing  type of prerequisite is returned in variable
7653              named <type_var>.
7654
7655
7656              Use <exepath> and <dirs> if necessary  to  resolve  non-absolute
7657              <file> values -- but only for non-embedded items.
7658
7659
7660              Possible types are:
7661
7662
7663                 system
7664                 local
7665                 embedded
7666                 other
7667
7668              Override  on a per-project basis by providing a project-specific
7669              gp_resolved_file_type_override function.
7670
7671
7672                GP_FILE_TYPE(<original_file> <file> <type_var>)
7673
7674              Return the type  of  <file>  with  respect  to  <original_file>.
7675              String  describing  type of prerequisite is returned in variable
7676              named <type_var>.
7677
7678
7679              Possible types are:
7680
7681
7682                 system
7683                 local
7684                 embedded
7685                 other
7686
7687
7688       InstallRequiredSystemLibraries
7689
7690
7691              By including this file, all library files listed in the variable
7692              CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS   will   be   installed   with
7693              INSTALL(PROGRAMS ...) into bin for WIN32 and lib for  non-WIN32.
7694              If  CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP is set to TRUE before
7695              including this file, then the INSTALL command is not called. The
7696              user  can  use the variable CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS to
7697              use a custom install command and install them however they want.
7698              If  it  is  the  MSVC  compiler,  then  the  microsoft  run time
7699              libraries  will  be  found  and  automatically  added   to   the
7700              CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS,     and     installed.     If
7701              CMAKE_INSTALL_DEBUG_LIBRARIES is set and it  is  the  MSVC  com‐
7702              piler, then the debug libraries are installed when available. If
7703              CMAKE_INSTALL_DEBUG_LIBRARIES_ONLY is set then  only  the  debug
7704              libraries  are  installed when both debug and release are avail‐
7705              able. If CMAKE_INSTALL_MFC_LIBRARIES is set  then  the  MFC  run
7706              time  libraries  are  installed  as  well  as  the  CRT run time
7707              libraries. If  CMAKE_INSTALL_SYSTEM_RUNTIME_DESTINATION  is  set
7708              then  the  libraries are installed to that directory rather than
7709              the default. If CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_NO_WARNINGS is
7710              NOT  set,  then this file warns about required files that do not
7711              exist. You can set this variable to  ON  before  including  this
7712              file  to  avoid  the  warning.  For  example,  the Visual Studio
7713              Express editions do not include the redistributable files, so if
7714              you  include  this  file  on  a  machine  with  only  VS Express
7715              installed, you'll get the warning.
7716
7717
7718       MacroAddFileDependencies
7719              MACRO_ADD_FILE_DEPENDENCIES(<_file> depend_files...)
7720
7721              Using the macro  MACRO_ADD_FILE_DEPENDENCIES()  is  discouraged.
7722              There  are  usually better ways to specify the correct dependen‐
7723              cies.
7724
7725
7726              MACRO_ADD_FILE_DEPENDENCIES(<_file> depend_files...) is  just  a
7727              convenience  wrapper around the OBJECT_DEPENDS source file prop‐
7728              erty. You can just use SET_PROPERTY(SOURCE <file>  APPEND  PROP‐
7729              ERTY OBJECT_DEPENDS depend_files) instead.
7730
7731
7732       Qt4ConfigDependentSettings
7733
7734
7735              This  file  is  included  by  FindQt4.cmake,  don't  include  it
7736              directly.
7737
7738
7739       Qt4Macros
7740
7741
7742              This  file  is  included  by  FindQt4.cmake,  don't  include  it
7743              directly.
7744
7745
7746       SelectLibraryConfigurations
7747
7748
7749              select_library_configurations( basename )
7750
7751
7752              This  macro  takes  a library base name as an argument, and will
7753              choose good  values  for  basename_LIBRARY,  basename_LIBRARIES,
7754              basename_LIBRARY_DEBUG,  and  basename_LIBRARY_RELEASE depending
7755              on   what   has   been   found   and   set.    If   only   base‐
7756              name_LIBRARY_RELEASE   is   defined,   basename_LIBRARY,   base‐
7757              name_LIBRARY_DEBUG, and basename_LIBRARY_RELEASE will be set  to
7758              the  release  value.  If only basename_LIBRARY_DEBUG is defined,
7759              then   basename_LIBRARY,   basename_LIBRARY_DEBUG   and    base‐
7760              name_LIBRARY_RELEASE will take the debug value.
7761
7762
7763              If  the  generator  supports  configuration  types,  then  base‐
7764              name_LIBRARY and basename_LIBRARIES will be set with  debug  and
7765              optimized  flags specifying the library to be used for the given
7766              configuration.  If no build type has been set or  the  generator
7767              in   use  does  not  support  configuration  types,  then  base‐
7768              name_LIBRARY and basename_LIBRARIES will take only  the  release
7769              values.
7770
7771
7772       SquishTestScript
7773
7774
7775
7776
7777
7778              This  script  launches  a GUI test using Squish.  You should not
7779              call the script directly; instead, you should access it via  the
7780              SQUISH_ADD_TEST macro that is defined in FindSquish.cmake.
7781
7782
7783              This  script  starts the Squish server, launches the test on the
7784              client, and finally stops the squish server.  If  any  of  these
7785              steps  fail  (including  if  the tests do not pass) then a fatal
7786              error is raised.
7787
7788
7789
7790       TestBigEndian
7791              Define macro to determine endian type
7792
7793              Check if the system is big endian or little endian
7794
7795
7796                TEST_BIG_ENDIAN(VARIABLE)
7797                VARIABLE - variable to store the result to
7798
7799
7800
7801
7802
7803       TestCXXAcceptsFlag
7804              Test CXX compiler for a flag
7805
7806              Check if the CXX compiler accepts a flag
7807
7808
7809                Macro CHECK_CXX_ACCEPTS_FLAG(FLAGS VARIABLE) -
7810                   checks if the function exists
7811                FLAGS - the flags to try
7812                VARIABLE - variable to store the result
7813
7814
7815
7816
7817
7818       TestForANSIForScope
7819              Check for ANSI for scope support
7820
7821              Check if the compiler restricts the scope of variables  declared
7822              in a for-init-statement to the loop body.
7823
7824
7825                CMAKE_NO_ANSI_FOR_SCOPE - holds result
7826
7827
7828
7829
7830
7831       TestForANSIStreamHeaders
7832              Test for compiler support of ANSI stream headers iostream, etc.
7833
7834              check if the compiler supports the standard ANSI iostream header
7835              (without the .h)
7836
7837
7838                CMAKE_NO_ANSI_STREAM_HEADERS - defined by the results
7839
7840
7841
7842
7843
7844       TestForSSTREAM
7845              Test for compiler support of ANSI sstream header
7846
7847              check if the compiler supports the standard ANSI sstream header
7848
7849
7850                CMAKE_NO_ANSI_STRING_STREAM - defined by the results
7851
7852
7853
7854
7855
7856       TestForSTDNamespace
7857              Test for std:: namespace support
7858
7859              check if the compiler supports std:: on stl classes
7860
7861
7862                CMAKE_NO_STD_NAMESPACE - defined by the results
7863
7864
7865
7866
7867
7868       UseEcos
7869              This module defines variables and macros required to build  eCos
7870              application.
7871
7872              This file contains the following macros: ECOS_ADD_INCLUDE_DIREC‐
7873              TORIES() - add the eCos  include  dirs  ECOS_ADD_EXECUTABLE(name
7874              source1   ...   sourceN   )   -   create   an   eCos  executable
7875              ECOS_ADJUST_DIRECTORY(VAR source1 ... sourceN )  -  adjusts  the
7876              path of the source files and puts the result into VAR
7877
7878
7879              Macros  for  selecting  the  toolchain: ECOS_USE_ARM_ELF_TOOLS()
7880              - enable the ARM ELF toolchain for the  directory  where  it  is
7881              called  ECOS_USE_I386_ELF_TOOLS()       -  enable  the  i386 ELF
7882              toolchain   for   the   directory    where    it    is    called
7883              ECOS_USE_PPC_EABI_TOOLS()       -  enable  the PowerPC toolchain
7884              for the directory where it is called
7885
7886
7887              It contains the following variables:  ECOS_DEFINITIONS  ECOSCON‐
7888              FIG_EXECUTABLE   ECOS_CONFIG_FILE                -  defaults  to
7889              ecos.ecc, if your eCos configuration file has a different  name,
7890              adjust this variable for internal use only:
7891
7892
7893                ECOS_ADD_TARGET_LIB
7894
7895
7896       UsePkgConfig
7897              obsolete pkg-config module for CMake
7898
7899
7900
7901
7902              Defines the following macros:
7903
7904
7905              PKGCONFIG(package includedir libdir linkflags cflags)
7906
7907
7908              Calling  PKGCONFIG  will fill the desired information into the 4
7909              given arguments,  e.g.  PKGCONFIG(libart-2.0  LIBART_INCLUDE_DIR
7910              LIBART_LINK_DIR  LIBART_LINK_FLAGS  LIBART_CFLAGS) if pkg-config
7911              was NOT found or the specified software package  doesn't  exist,
7912              the  variable will be empty when the function returns, otherwise
7913              they will contain the respective information
7914
7915
7916
7917       UseQt4 Use Module for QT4
7918
7919              Sets up C and C++ to use Qt 4.  It is assumed that  FindQt.cmake
7920              has  already  been  loaded.  See FindQt.cmake for information on
7921              how to load Qt 4 into your CMake project.
7922
7923
7924       UseSWIG
7925              SWIG module for CMake
7926
7927              Defines the following macros:
7928
7929
7930                 SWIG_ADD_MODULE(name language [ files ])
7931                   - Define swig module with given name and specified language
7932                 SWIG_LINK_LIBRARIES(name [ libraries ])
7933                   - Link libraries to swig module
7934
7935              All other macros are for internal use only. To  get  the  actual
7936              name  of the swig module, use: ${SWIG_MODULE_${name}_REAL_NAME}.
7937              Set Source files properties such as CPLUSPLUS and SWIG_FLAGS  to
7938              specify  special  behavior of SWIG. Also global CMAKE_SWIG_FLAGS
7939              can be used to add special flags to all swig calls. Another spe‐
7940              cial  variable  is  CMAKE_SWIG_OUTDIR,  it allows one to specify
7941              where to write all  the  swig  generated  module  (swig  -outdir
7942              option) The name-specific variable SWIG_MODULE_<name>_EXTRA_DEPS
7943              may be used to specify extra dependencies for the generated mod‐
7944              ules.  If  the  source  file generated by swig need some special
7945              flag  you  can  use  SET_SOURCE_FILES_PROPERTIES(  ${swig_gener‐
7946              ated_file_fullname}
7947
7948
7949                      PROPERTIES COMPILE_FLAGS "-bla")
7950
7951
7952       Use_wxWindows
7953              ---------------------------------------------------
7954
7955
7956
7957
7958              This convenience include finds if wxWindows is installed and set
7959              the appropriate libs, incdirs, flags etc. author Jan Woetzel <jw
7960              -at- mip.informatik.uni-kiel.de> (07/2003)
7961
7962
7963              USAGE:
7964
7965
7966                 just include Use_wxWindows.cmake
7967                 in your projects CMakeLists.txt
7968
7969              INCLUDE( ${CMAKE_MODULE_PATH}/Use_wxWindows.cmake)
7970
7971
7972                 if you are sure you need GL then
7973
7974              SET(WXWINDOWS_USE_GL 1)
7975
7976
7977                 *before* you include this file.
7978
7979
7980       UsewxWidgets
7981              Convenience include for using wxWidgets library.
7982
7983              Determines if wxWidgets was FOUND and sets the appropriate libs,
7984              incdirs, flags, etc.  INCLUDE_DIRECTORIES  and  LINK_DIRECTORIES
7985              are called.
7986
7987
7988              USAGE
7989
7990
7991                # Note that for MinGW users the order of libs is important!
7992                FIND_PACKAGE(wxWidgets REQUIRED net gl core base)
7993                INCLUDE(${wxWidgets_USE_FILE})
7994                # and for each of your dependant executable/library targets:
7995                TARGET_LINK_LIBRARIES(<YourTarget> ${wxWidgets_LIBRARIES})
7996
7997
7998
7999
8000              DEPRECATED
8001
8002
8003                LINK_LIBRARIES is not called in favor of adding dependencies per target.
8004
8005
8006
8007
8008              AUTHOR
8009
8010
8011                Jan Woetzel <jw -at- mip.informatik.uni-kiel.de>
8012
8013
8015       Copyright  2000-2009  Kitware,  Inc., Insight Software Consortium.  All
8016       rights reserved.
8017
8018
8019       Redistribution and use in source and binary forms, with or without mod‐
8020       ification,  are  permitted  provided  that the following conditions are
8021       met:
8022
8023
8024       Redistributions of source code must retain the above copyright  notice,
8025       this list of conditions and the following disclaimer.
8026
8027
8028       Redistributions  in  binary  form  must  reproduce  the above copyright
8029       notice, this list of conditions and the  following  disclaimer  in  the
8030       documentation and/or other materials provided with the distribution.
8031
8032
8033       Neither  the  names  of Kitware, Inc., the Insight Software Consortium,
8034       nor the names of their contributors may be used to endorse  or  promote
8035       products derived from this software without specific prior written per‐
8036       mission.
8037
8038
8039       THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
8040       IS"  AND  ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
8041       TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTIC‐
8042       ULAR  PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
8043       CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,  INCIDENTAL,  SPECIAL,
8044       EXEMPLARY,  OR  CONSEQUENTIAL  DAMAGES  (INCLUDING, BUT NOT LIMITED TO,
8045       PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;  LOSS  OF  USE,  DATA,  OR
8046       PROFITS;  OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
8047       LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,  OR  TORT  (INCLUDING
8048       NEGLIGENCE  OR  OTHERWISE)  ARISING  IN  ANY WAY OUT OF THE USE OF THIS
8049       SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
8050
8051

SEE ALSO

8053       ccmake(1), cpack(1), ctest(1), cmakecommands(1), cmakecompat(1), cmake‐
8054       modules(1), cmakeprops(1), cmakevars(1)
8055
8056
8057       The following resources are available to get help using CMake:
8058
8059
8060       Home Page
8061              http://www.cmake.org
8062
8063              The primary starting point for learning about CMake.
8064
8065
8066       Frequently Asked Questions
8067              http://www.cmake.org/Wiki/CMake_FAQ
8068
8069              A  Wiki is provided containing answers to frequently asked ques‐
8070              tions.
8071
8072
8073       Online Documentation
8074              http://www.cmake.org/HTML/Documentation.html
8075
8076              Links to available documentation may be found on this web page.
8077
8078
8079       Mailing List
8080              http://www.cmake.org/HTML/MailingLists.html
8081
8082              For help and discussion about using cmake,  a  mailing  list  is
8083              provided  at  cmake@cmake.org.  The list is member-post-only but
8084              one may sign up on the CMake web page.  Please  first  read  the
8085              full  documentation at http://www.cmake.org before posting ques‐
8086              tions to the list.
8087
8088
8089       Summary of helpful links:
8090
8091
8092         Home: http://www.cmake.org
8093         Docs: http://www.cmake.org/HTML/Documentation.html
8094         Mail: http://www.cmake.org/HTML/MailingLists.html
8095         FAQ:  http://www.cmake.org/Wiki/CMake_FAQ
8096
8097
8098
8099
8100cmake 2.8.4                     March 31, 2011                 cmakemodules(1)
Impressum