ARK_AS_ADVANCED - Disable marking cache variables as advanced GTK2_ADDITIONAL_SUFFIXES - Allows defining additional directories to search for include files ================= Example Usage: Call find_package() once, here are some examples to pick from: Require GTK 2.6 or later find_package(GTK2 2.6 REQUIRED gtk) Require GTK 2.10 or later and Glade find_package(GTK2 2.10 REQUIRED gtk glade) Search for GTK/GTKMM 2.8 or later find_package(GTK2 2.8 COMPONENTS gtk gtkmm) if(GTK2_FOUND) include_directories(${GTK2_INCLUDE_DIRS}) add_executable(mygui mygui.cc) target_link_libraries(mygui ${GTK2_LIBRARIES}) endif() FindGTest -------------------- Locate the Google C++ Testing Framework. Defines the following variables: GTEST_FOUND - Found the Google Testing framework GTEST_INCLUDE_DIRS - Include directories Also defines the library variables below as normal variables. These contain debug/optimized keywords when a debugging library is found. GTEST_BOTH_LIBRARIES - Both libgtest & libgtest-main GTEST_LIBRARIES - libgtest GTEST_MAIN_LIBRARIES - libgtest-main Accepts the following variables as input: GTEST_ROOT - (as a CMake or environment variable) The root directory of the gtest install prefix GTEST_MSVC_SEARCH - If compiling with MSVC, this variable can be set to "MD" or "MT" to enable searching a GTest build tree (defaults: "MD") Example Usage: enable_testing() find_package(GTest REQUIRED) include_directories(${GTEST_INCLUDE_DIRS}) add_executable(foo foo.cc) target_link_libraries(foo ${GTEST_BOTH_LIBRARIES}) add_test(AllTestsInFoo foo) If you would like each Google test to show up in CTest as a test you may use the following macro. NOTE: It will slow down your tests by running an executable for each test and test fixture. You will also have to rerun CMake after adding or removing tests or test fixtures. GTEST_ADD_TESTS(executable extra_args ARGN) executable = The path to the test executable extra_args = Pass a list of extra arguments to be passed to executable enclosed in quotes (or "" for none) ARGN = A list of source files to search for tests & test fixtures. Example: set(FooTestArgs --foo 1 --bar 2) add_executable(FooTest FooUnitTest.cc) GTEST_ADD_TESTS(FooTest "${FooTestArgs}" FooUnitTest.cc) FindGettext Find GNU gettext tools This module looks for the GNU gettext tools. This module defines the following values: GETTEXT_MSGMERGE_EXECUTABLE: the full path to the msgmerge tool. GETTEXT_MSGFMT_EXECUTABLE: the full path to the msgfmt tool. GETTEXT_FOUND: True if gettext has been found. GETTEXT_VERSION_STRING: the version of gettext found (since CMake 2.8.8) Additionally it provides the following macros: GETTEXT_CRE‐ ATE_TRANSLATIONS ( outputFile [ALL] file1 ... fileN ) This will create a target "translations" which will convert the given input po files into the binary output mo file. If the ALL option is used, the translations will also be created when building the default target. GETTEXT_PROCESS_POT( <potfile> [ALL] [INSTALL_DESTINATION <dest‐ dir>] LANGUAGES <lang1> <lang2> ... ) Process the given pot file to mo files. If INSTALL_DESTINATION is given then automatically install rules will be created, the language subdirectory will be taken into account (by default use share/locale/). If ALL is specified, the pot file is processed when building the all traget. It creates a custom target "potfile". GETTEXT_PROCESS_PO_FILES( <lang> [ALL] [INSTALL_DESTINATION <dir>] PO_FILES <po1> <po2> ... ) Process the given po files to mo files for the given language. If INSTALL_DESTINATION is given then automatically install rules will be created, the language subdirectory will be taken into account (by default use share/locale/). If ALL is specified, the po files are processed when building the all traget. It creates a custom target "pofiles". FindGit The module defines the following variables: GIT_EXECUTABLE - path to git command line client GIT_FOUND - true if the command line client was found GIT_VERSION_STRING - the version of git found (since CMake 2.8.8) Example usage: find_package(Git) if(GIT_FOUND) message("git found: ${GIT_EXECUTABLE}") endif() FindGnuTLS Try to find the GNU Transport Layer Security library (gnutls) Once done this will define GNUTLS_FOUND - System has gnutls GNUTLS_INCLUDE_DIR - The gnutls include directory GNUTLS_LIBRARIES - The libraries needed to use gnutls GNUTLS_DEFINITIONS - Compiler switches required for using gnutls FindGnuplot this module looks for gnuplot Once done this will define GNUPLOT_FOUND - system has Gnuplot GNUPLOT_EXECUTABLE - the Gnuplot executable GNUPLOT_VERSION_STRING - the version of Gnuplot found (since CMake 2.8.8) GNUPLOT_VERSION_STRING will not work for old versions like 3.7.1. FindHDF5 Find HDF5, a library for reading and writing self describing array data. This module invokes the HDF5 wrapper compiler that should be installed alongside HDF5. Depending upon the HDF5 Configuration, the wrapper compiler is called either h5cc or h5pcc. If this suc‐ ceeds, the module will then call the compiler with the -show argu‐ ment to see what flags are used when compiling an HDF5 client application. The module will optionally accept the COMPONENTS argument. If no COMPONENTS are specified, then the find module will default to finding only the HDF5 C library. If one or more COMPONENTS are specified, the module will attempt to find the language bindings for the specified components. The only valid components are C, CXX, Fortran, HL, and Fortran_HL. If the COMPONENTS argument is not given, the module will attempt to find only the C bindings. On UNIX systems, this module will read the variable HDF5_USE_STATIC_LIBRARIES to determine whether or not to prefer a static link to a dynamic link for HDF5 and all of it's dependen‐ cies. To use this feature, make sure that the HDF5_USE_STATIC_LIBRARIES variable is set before the call to find_package. To provide the module with a hint about where to find your HDF5 installation, you can set the environment variable HDF5_ROOT. The Find module will then look in this path when searching for HDF5 executables, paths, and libraries. In addition to finding the includes and libraries required to com‐ pile an HDF5 client application, this module also makes an effort to find tools that come with the HDF5 distribution that may be useful for regression testing. This module will define the following variables: HDF5_INCLUDE_DIRS - Location of the hdf5 includes HDF5_INCLUDE_DIR - Location of the hdf5 includes (deprecated) HDF5_DEFINITIONS - Required compiler definitions for HDF5 HDF5_C_LIBRARIES - Required libraries for the HDF5 C bindings. HDF5_CXX_LIBRARIES - Required libraries for the HDF5 C++ bindings HDF5_Fortran_LIBRARIES - Required libraries for the HDF5 Fortran bindings HDF5_HL_LIBRARIES - Required libraries for the HDF5 high level API HDF5_Fortran_HL_LIBRARIES - Required libraries for the high level Fortran bindings. HDF5_LIBRARIES - Required libraries for all requested bindings HDF5_FOUND - true if HDF5 was found on the system HDF5_LIBRARY_DIRS - the full set of library directories HDF5_IS_PARALLEL - Whether or not HDF5 was found with parallel IO support HDF5_C_COMPILER_EXECUTABLE - the path to the HDF5 C wrapper compiler HDF5_CXX_COMPILER_EXECUTABLE - the path to the HDF5 C++ wrapper compiler HDF5_Fortran_COMPILER_EXECUTABLE - the path to the HDF5 Fortran wrapper compiler HDF5_DIFF_EXECUTABLE - the path to the HDF5 dataset comparison tool FindHSPELL Try to find Hspell Once done this will define HSPELL_FOUND - system has Hspell HSPELL_INCLUDE_DIR - the Hspell include directory HSPELL_LIBRARIES - The libraries needed to use Hspell HSPELL_DEFINITIONS - Compiler switches required for using Hspell HSPELL_VERSION_STRING - The version of Hspell found (x.y) HSPELL_MAJOR_VERSION - the major version of Hspell HSPELL_MINOR_VERSION - The minor version of Hspell FindHTMLHelp This module looks for Microsoft HTML Help Compiler It defines: HTML_HELP_COMPILER : full path to the Compiler (hhc.exe) HTML_HELP_INCLUDE_PATH : include path to the API (htmlhelp.h) HTML_HELP_LIBRARY : full path to the library (htmlhelp.lib) FindITK Find an ITK installation or build tree. FindImageMagick Find the ImageMagick binary suite. This module will search for a set of ImageMagick tools specified as components in the FIND_PACKAGE call. Typical components include, but are not limited to (future versions of ImageMagick might have additional components not listed here): animate compare composite conjure convert display identify import mogrify montage stream If no component is specified in the FIND_PACKAGE call, then it only searches for the ImageMagick executable directory. This code defines the following variables: ImageMagick_FOUND - TRUE if all components are found. ImageMagick_EXECUTABLE_DIR - Full path to executables directory. ImageMagick_<component>_FOUND - TRUE if <component> is found. ImageMagick_<component>_EXECUTABLE - Full path to <component> executable. ImageMagick_VERSION_STRING - the version of ImageMagick found (since CMake 2.8.8) ImageMagick_VERSION_STRING will not work for old versions like 5.2.3. There are also components for the following ImageMagick APIs: Magick++ MagickWand MagickCore For these components the following variables are set: ImageMagick_FOUND - TRUE if all components are found. ImageMagick_INCLUDE_DIRS - Full paths to all include dirs. ImageMagick_LIBRARIES - Full paths to all libraries. ImageMagick_<component>_FOUND - TRUE if <component> is found. ImageMagick_<component>_INCLUDE_DIRS - Full path to <component> include dirs. ImageMagick_<component>_LIBRARIES - Full path to <component> libraries. Example Usages: FIND_PACKAGE(ImageMagick) FIND_PACKAGE(ImageMagick COMPONENTS convert) FIND_PACKAGE(ImageMagick COMPONENTS convert mogrify display) FIND_PACKAGE(ImageMagick COMPONENTS Magick++) FIND_PACKAGE(ImageMagick COMPONENTS Magick++ convert) Note that the standard FIND_PACKAGE features are supported (i.e., QUIET, REQUIRED, etc.). FindJNI Find JNI java libraries. This module finds if Java is installed and determines where the include files and libraries are. It also determines what the name of the library is. This code sets the following variables: JNI_INCLUDE_DIRS = the include dirs to use JNI_LIBRARIES = the libraries to use JNI_FOUND = TRUE if JNI headers and libraries were found. JAVA_AWT_LIBRARY = the path to the jawt library JAVA_JVM_LIBRARY = the path to the jvm library JAVA_INCLUDE_PATH = the include path to jni.h JAVA_INCLUDE_PATH2 = the include path to jni_md.h JAVA_AWT_INCLUDE_PATH = the include path to jawt.h FindJPEG Find JPEG Find the native JPEG includes and library This module defines JPEG_INCLUDE_DIR, where to find jpeglib.h, etc. JPEG_LIBRARIES, the libraries needed to use JPEG. JPEG_FOUND, If false, do not try to use JPEG. also defined, but not for general use are JPEG_LIBRARY, where to find the JPEG library. FindJasper Try to find the Jasper JPEG2000 library Once done this will define JASPER_FOUND - system has Jasper JASPER_INCLUDE_DIR - the Jasper include directory JASPER_LIBRARIES - the libraries needed to use Jasper JASPER_VERSION_STRING - the version of Jasper found (since CMake 2.8.8) FindJava Find Java This module finds if Java is installed and determines where the include files and libraries are. This code sets the following variables: Java_JAVA_EXECUTABLE = the full path to the Java runtime Java_JAVAC_EXECUTABLE = the full path to the Java compiler Java_JAVAH_EXECUTABLE = the full path to the Java header generator Java_JAVADOC_EXECUTABLE = the full path to the Java documention generator Java_JAR_EXECUTABLE = the full path to the Java archiver Java_VERSION_STRING = Version of the package found (java version), eg. 1.6.0_12 Java_VERSION_MAJOR = The major version of the package found. Java_VERSION_MINOR = The minor version of the package found. Java_VERSION_PATCH = The patch version of the package found. Java_VERSION_TWEAK = The tweak version of the package found (after '_') Java_VERSION = This is set to: $major.$minor.$patch(.$tweak) The minimum required version of Java can be specified using the standard CMake syntax, e.g. FIND_PACKAGE(Java 1.5) NOTE: ${Java_VERSION} and ${Java_VERSION_STRING} are not guaran‐ teed to be identical. For example some java version may return: Java_VERSION_STRING = 1.5.0_17 and Java_VERSION = <IP_ADDRESS> another example is the Java OEM, with: Java_VERSION_STRING = 1.6.0-oem and Java_VERSION = 1.6.0 For these components the following variables are set: Java_FOUND - TRUE if all components are found. Java_INCLUDE_DIRS - Full paths to all include dirs. Java_LIBRARIES - Full paths to all libraries. Java_<component>_FOUND - TRUE if <component> is found. Example Usages: FIND_PACKAGE(Java) FIND_PACKAGE(Java COMPONENTS Runtime) FIND_PACKAGE(Java COMPONENTS Development) FindKDE3 Find the KDE3 include and library dirs, KDE preprocessors and define a some macros This module defines the following variables: KDE3_DEFINITIONS - compiler definitions required for compiling KDE software KDE3_INCLUDE_DIR - the KDE include directory KDE3_INCLUDE_DIRS - the KDE and the Qt include directory, for use with INCLUDE_DIRECTORIES() KDE3_LIB_DIR - the directory where the KDE libraries are installed, for use with LINK_DIRECTORIES() QT_AND_KDECORE_LIBS - this contains both the Qt and the kdecore library KDE3_DCOPIDL_EXECUTABLE - the dcopidl executable KDE3_DCOPIDL2CPP_EXECUTABLE - the dcopidl2cpp executable KDE3_KCFGC_EXECUTABLE - the kconfig_compiler executable KDE3_FOUND - set to TRUE if all of the above has been found The following user adjustable options are provided: KDE3_BUILD_TESTS - enable this to build KDE testcases It also adds the following macros (from KDE3Macros.cmake) SRCS_VAR is always the variable which contains the list of source files for your application or library. KDE3_AUTOMOC(file1 ... fileN) Call this if you want to have automatic moc file handling. This means if you include "foo.moc" in the source file foo.cpp a moc file for the header foo.h will be created automatically. You can set the property SKIP_AUTOMAKE using SET_SOURCE_FILES_PROPERTIES() to exclude some files in the list from being processed. KDE3_ADD_MOC_FILES(SRCS_VAR file1 ... fileN ) If you don't use the KDE3_AUTOMOC() macro, for the files listed here moc files will be created (named "foo.moc.cpp") KDE3_ADD_DCOP_SKELS(SRCS_VAR header1.h ... headerN.h ) Use this to generate DCOP skeletions from the listed headers. KDE3_ADD_DCOP_STUBS(SRCS_VAR header1.h ... headerN.h ) Use this to generate DCOP stubs from the listed headers. KDE3_ADD_UI_FILES(SRCS_VAR file1.ui ... fileN.ui ) Use this to add the Qt designer ui files to your application/library. KDE3_ADD_KCFG_FILES(SRCS_VAR file1.kcfgc ... fileN.kcfgc ) Use this to add KDE kconfig compiler files to your application/library. KDE3_INSTALL_LIBTOOL_FILE(target) This will create and install a simple libtool file for the given target. KDE3_ADD_EXECUTABLE(name file1 ... fileN ) Currently identical to ADD_EXECUTABLE(), may provide some advanced features in the future. KDE3_ADD_KPART(name [WITH_PREFIX] file1 ... fileN ) Create a KDE plugin (KPart, kioslave, etc.) from the given source files. If WITH_PREFIX is given, the resulting plugin will have the prefix "lib", otherwise it won't. It creates and installs an appropriate libtool la-file. KDE3_ADD_KDEINIT_EXECUTABLE(name file1 ... fileN ) Create a KDE application in the form of a module loadable via kdeinit. A library named kdeinit_<name> will be created and a small executable which links to it. The option KDE3_ENABLE_FINAL to enable all-in-one compilation is no longer supported. Author: Alexander Neundorf<EMAIL_ADDRESS>FindKDE4 Find KDE4 and provide all necessary variables and macros to com‐ pile software for it. It looks for KDE 4 in the following directo‐ ries in the given order: CMAKE_INSTALL_PREFIX KDEDIRS /opt/kde4 Please look in FindKDE4Internal.cmake and KDE4Macros.cmake for more information. They are installed with the KDE 4 libraries in $KDEDIRS/share/apps/cmake/modules/. Author: Alexander Neundorf<EMAIL_ADDRESS>FindLAPACK Find LAPACK library This module finds an installed fortran library that implements the LAPACK linear-algebra interface (see http://www.netlib.org/lapack/). The approach follows that taken for the autoconf macro file, acx_lapack.m4 (distributed at http://ac-archive.source‐ forge.net/ac-archive/acx_lapack.html). This module sets the following variables: LAPACK_FOUND - set to true if a library implementing the LAPACK interface is found LAPACK_LINKER_FLAGS - uncached list of required linker flags (excluding -l and -L). LAPACK_LIBRARIES - uncached list of libraries (using full path name) to link against to use LAPACK LAPACK95_LIBRARIES - uncached list of libraries (using full path name) to link against to use LAPACK95 LAPACK95_FOUND - set to true if a library implementing the LAPACK f95 interface is found BLA_STATIC if set on this determines what kind of linkage we do (static) BLA_VENDOR if set checks only the specified vendor, if not set checks all the possibilities BLA_F95 if set on tries to find the f95 interfaces for BLAS/LAPACK FindLATEX Find Latex This module finds if Latex is installed and determines where the executables are. This code sets the following variables: LATEX_COMPILER: path to the LaTeX compiler PDFLATEX_COMPILER: path to the PdfLaTeX compiler BIBTEX_COMPILER: path to the BibTeX compiler MAKEINDEX_COMPILER: path to the MakeIndex compiler DVIPS_CONVERTER: path to the DVIPS converter PS2PDF_CONVERTER: path to the PS2PDF converter LATEX2HTML_CONVERTER: path to the LaTeX2Html converter FindLibArchive Find libarchive library and headers The module defines the following variables: LibArchive_FOUND - true if libarchive was found LibArchive_INCLUDE_DIRS - include search path LibArchive_LIBRARIES - libraries to link LibArchive_VERSION - libarchive 3-component version number FindLibLZMA Find LibLZMA Find LibLZMA headers and library LIBLZMA_FOUND - True if liblzma is found. LIBLZMA_INCLUDE_DIRS - Directory where liblzma headers are located. LIBLZMA_LIBRARIES - Lzma libraries to link against. LIBLZMA_HAS_AUTO_DECODER - True if lzma_auto_decoder() is found (required). LIBLZMA_HAS_EASY_ENCODER - True if lzma_easy_encoder() is found (required). LIBLZMA_HAS_LZMA_PRESET - True if lzma_lzma_preset() is found (required). LIBLZMA_VERSION_MAJOR - The major version of lzma LIBLZMA_VERSION_MINOR - The minor version of lzma LIBLZMA_VERSION_PATCH - The patch version of lzma LIBLZMA_VERSION_STRING - version number as a string (ex: "5.0.3") FindLibXml2 Try to find the LibXml2 xml processing library Once done this will define LIBXML2_FOUND - System has LibXml2 LIBXML2_INCLUDE_DIR - The LibXml2 include directory LIBXML2_LIBRARIES - The libraries needed to use LibXml2 LIBXML2_DEFINITIONS - Compiler switches required for using LibXml2 LIBXML2_XMLLINT_EXECUTABLE - The XML checking tool xmllint coming with LibXml2 LIBXML2_VERSION_STRING - the version of LibXml2 found (since CMake 2.8.8) FindLibXslt Try to find the LibXslt library Once done this will define LIBXSLT_FOUND - system has LibXslt LIBXSLT_INCLUDE_DIR - the LibXslt include directory LIBXSLT_LIBRARIES - Link these to LibXslt LIBXSLT_DEFINITIONS - Compiler switches required for using LibXslt LIBXSLT_VERSION_STRING - version of LibXslt found (since CMake 2.8.8) Additionally, the following two variables are set (but not required for using xslt): LIBXSLT_EXSLT_LIBRARIES - Link to these if you need to link against the exslt library LIBXSLT_XSLTPROC_EXECUTABLE - Contains the full path to the xsltproc executable if found FindLua50 Locate Lua library This module defines LUA50_FOUND, if false, do not try to link to Lua LUA_LIBRARIES, both lua and lualib LUA_INCLUDE_DIR, where to find lua.h and lualib.h (and probably lauxlib.h) Note that the expected include convention is #include "lua.h" and not #include <lua/lua.h> This is because, the lua location is not standardized and may exist in locations other than lua/ FindLua51 Locate Lua library This module defines LUA51_FOUND, if false, do not try to link to Lua LUA_LIBRARIES LUA_INCLUDE_DIR, where to find lua.h LUA_VERSION_STRING, the version of Lua found (since CMake 2.8.8) Note that the expected include convention is #include "lua.h" and not #include <lua/lua.h> This is because, the lua location is not standardized and may exist in locations other than lua/ FindMFC Find MFC on Windows Find the native MFC - i.e. decide if an application can link to the MFC libraries. MFC_FOUND - Was MFC support found You don't need to include anything or link anything to use it. FindMPEG Find the native MPEG includes and library This module defines MPEG_INCLUDE_DIR, where to find MPEG.h, etc. MPEG_LIBRARIES, the libraries required to use MPEG. MPEG_FOUND, If false, do not try to use MPEG. also defined, but not for general use are MPEG_mpeg2_LIBRARY, where to find the MPEG library. MPEG_vo_LIBRARY, where to find the vo library. FindMPEG2 Find the native MPEG2 includes and library This module defines MPEG2_INCLUDE_DIR, path to mpeg2dec/mpeg2.h, etc. MPEG2_LIBRARIES, the libraries required to use MPEG2. MPEG2_FOUND, If false, do not try to use MPEG2. also defined, but not for general use are MPEG2_mpeg2_LIBRARY, where to find the MPEG2 library. MPEG2_vo_LIBRARY, where to find the vo library. FindMPI Find a Message Passing Interface (MPI) implementation The Message Passing Interface (MPI) is a library used to write high-performance distributed-memory parallel applications, and is typically deployed on a cluster. MPI is a standard interface (defined by the MPI forum) for which many implementations are available. All of them have somewhat different include paths, libraries to link against, etc., and this module tries to smooth out those differences. === Variables === This module will set the following variables per language in your project, where <lang> is one of C, CXX, or Fortran: MPI_<lang>_FOUND TRUE if FindMPI found MPI flags for <lang> MPI_<lang>_COMPILER MPI Compiler wrapper for <lang> MPI_<lang>_COMPILE_FLAGS Compilation flags for MPI programs MPI_<lang>_INCLUDE_PATH Include path(s) for MPI header MPI_<lang>_LINK_FLAGS Linking flags for MPI programs MPI_<lang>_LIBRARIES All libraries to link MPI programs against Additionally, FindMPI sets the following variables for running MPI programs from the command line: MPIEXEC Executable for running MPI programs MPIEXEC_NUMPROC_FLAG Flag to pass to MPIEXEC before giving it the number of processors to run on MPIEXEC_PREFLAGS Flags to pass to MPIEXEC directly before the executable to run. MPIEXEC_POSTFLAGS Flags to pass to MPIEXEC after other flags === Usage === To use this module, simply call FindMPI from a CMakeLists.txt file, or run find_package(MPI), then run CMake. If you are happy with the auto- detected configuration for your language, then you're done. If not, you have two options: 1. Set MPI_<lang>_COMPILER to the MPI wrapper (mpicc, etc.) of your choice and reconfigure. FindMPI will attempt to determine all the necessary variables using THAT compiler's compile and link flags. 2. If this fails, or if your MPI implementation does not come with a compiler wrapper, then set both MPI_<lang>_LIBRARIES and MPI_<lang>_INCLUDE_PATH. You may also set any other variables listed above, but these two are required. This will circumvent autodetection entirely. When configuration is successful, MPI_<lang>_COMPILER will be set to the compiler wrapper for <lang>, if it was found. MPI_<lang>_FOUND and other variables above will be set if any MPI implementation was found for <lang>, regardless of whether a com‐ piler was found. When using MPIEXEC to execute MPI applications, you should typi‐ cally use all of the MPIEXEC flags as follows: ${MPIEXEC} ${MPIEXEC_NUMPROC_FLAG} PROCS ${MPIEXEC_PREFLAGS} EXECUTABLE ${MPIEXEC_POSTFLAGS} ARGS where PROCS is the number of processors on which to execute the program, EXECUTABLE is the MPI program, and ARGS are the arguments to pass to the MPI program. === Backward Compatibility === For backward compatibility with older versions of FindMPI, these variables are set, but deprecated: MPI_FOUND MPI_COMPILER MPI_LIBRARY MPI_COMPILE_FLAGS MPI_INCLUDE_PATH MPI_EXTRA_LIBRARY MPI_LINK_FLAGS MPI_LIBRARIES In new projects, please use the MPI_<lang>_XXX equivalents. FindMatlab this module looks for Matlab Defines: MATLAB_INCLUDE_DIR: include path for mex.h, engine.h MATLAB_LIBRARIES: required libraries: libmex, etc MATLAB_MEX_LIBRARY: path to libmex.lib MATLAB_MX_LIBRARY: path to libmx.lib MATLAB_ENG_LIBRARY: path to libeng.lib FindMotif Try to find Motif (or lesstif) Once done this will define: MOTIF_FOUND - system has MOTIF MOTIF_INCLUDE_DIR - include paths to use Motif MOTIF_LIBRARIES - Link these to use Motif FindOpenAL Locate OpenAL This module defines OPENAL_LIBRARY OPENAL_FOUND, if false, do not try to link to OpenAL OPENAL_INCLUDE_DIR, where to find the headers $OPENALDIR is an environment variable that would correspond to the ./configure --prefix=$OPENALDIR used in building OpenAL. Created by Eric Wing. This was influenced by the FindSDL.cmake module. FindOpenGL Try to find OpenGL Once done this will define OPENGL_FOUND - system has OpenGL OPENGL_XMESA_FOUND - system has XMESA OPENGL_GLU_FOUND - system has GLU OPENGL_INCLUDE_DIR - the GL include directory OPENGL_LIBRARIES - Link these to use OpenGL and GLU If you want to use just GL you can use these values OPENGL_gl_LIBRARY - Path to OpenGL Library OPENGL_glu_LIBRARY - Path to GLU Library On OSX default to using the framework version of opengl People will have to change the cache values of OPENGL_glu_LIBRARY and OPENGL_gl_LIBRARY to use OpenGL with X11 on OSX FindOpenMP Finds OpenMP support This module can be used to detect OpenMP support in a compiler. If the compiler supports OpenMP, the flags required to compile with openmp support are set. The following variables are set: OpenMP_C_FLAGS - flags to add to the C compiler for OpenMP support OpenMP_CXX_FLAGS - flags to add to the CXX compiler for OpenMP support OPENMP_FOUND - true if openmp is detected Supported compilers can be found at http://openmp.org/wp/openmp-compilers/ FindOpenSSL Try to find the OpenSSL encryption library Once done this will define OPENSSL_ROOT_DIR - Set this variable to the root installation of OpenSSL Read-Only variables: OPENSSL_FOUND - system has the OpenSSL library OPENSSL_INCLUDE_DIR - the OpenSSL include directory OPENSSL_LIBRARIES - The libraries needed to use OpenSSL OPENSSL_VERSION - This is set to $major.$minor.$revision$path (eg. 0.9.8s) FindOpenSceneGraph Find OpenSceneGraph This module searches for the OpenSceneGraph core "osg" library as well as OpenThreads, and whatever additional COMPONENTS (nodekits) that you specify. See http://www.openscenegraph.org NOTE: To use this module effectively you must either require CMake >= 2.6.3 with cmake_minimum_required(VERSION 2.6.3) or download and place FindOpenThreads.cmake, Findosg_functions.cmake, Find‐ osg.cmake, and Find<etc>.cmake files into your CMAKE_MODULE_PATH. ================================== This module accepts the following variables (note mixed case) OpenSceneGraph_DEBUG - Enable debugging output OpenSceneGraph_MARK_AS_ADVANCED - Mark cache variables as advanced automatically The following environment variables are also respected for finding the OSG and it's various components. CMAKE_PREFIX_PATH can also be used for this (see find_library() CMake documentation). <MODULE>_DIR (where MODULE is of the form "OSGVOLUME" and there is a FindosgVolume.cmake file) OSG_DIR OSGDIR OSG_ROOT This module defines the following output variables: OPENSCENEGRAPH_FOUND - Was the OSG and all of the specified components found? OPENSCENEGRAPH_VERSION - The version of the OSG which was found OPENSCENEGRAPH_INCLUDE_DIRS - Where to find the headers OPENSCENEGRAPH_LIBRARIES - The OSG libraries ================================== Example Usage: find_package(OpenSceneGraph 2.0.0 REQUIRED osgDB osgUtil) # libOpenThreads & libosg automatically searched include_directories(${OPENSCENEGRAPH_INCLUDE_DIRS}) add_executable(foo foo.cc) target_link_libraries(foo ${OPENSCENEGRAPH_LIBRARIES}) FindOpenThreads OpenThreads is a C++ based threading library. Its largest userbase seems to OpenSceneGraph so you might notice I accept OSGDIR as an environment path. I consider this part of the Findosg* suite used to find OpenSceneGraph components. Each component is separate and you must opt in to each module. Locate OpenThreads This module defines OPENTHREADS_LIBRARY OPENTHREADS_FOUND, if false, do not try to link to OpenThreads OPENTHREADS_INCLUDE_DIR, where to find the headers $OPENTHREADS_DIR is an environment variable that would correspond to the ./configure --prefix=$OPENTHREADS_DIR used in building osg. Created by Eric Wing. FindPHP4 Find PHP4 This module finds if PHP4 is installed and determines where the include files and libraries are. It also determines what the name of the library is. This code sets the following variables: PHP4_INCLUDE_PATH = path to where php.h can be found PHP4_EXECUTABLE = full path to the php4 binary FindPNG Find the native PNG includes and library This module searches libpng, the library for working with PNG images. It defines the following variables PNG_INCLUDE_DIRS, where to find png.h, etc. PNG_LIBRARIES, the libraries to link against to use PNG. PNG_DEFINITIONS - You should add_definitons(${PNG_DEFINITIONS}) before compiling code that includes png library files. PNG_FOUND, If false, do not try to use PNG. PNG_VERSION_STRING - the version of the PNG library found (since CMake 2.8.8) Also defined, but not for general use are PNG_LIBRARY, where to find the PNG library. For backward compatiblity the variable PNG_INCLUDE_DIR is also set. It has the same value as PNG_INCLUDE_DIRS. Since PNG depends on the ZLib compression library, none of the above will be defined unless ZLib can be found. FindPackageHandleStandardArgs FIND_PACKAGE_HANDLE_STANDARD_ARGS(<name> ... ) This function is intended to be used in FindXXX.cmake modules files. It handles the REQUIRED, QUIET and version-related argu‐ ments to FIND_PACKAGE(). It also sets the <UPPERCASED_NAME>_FOUND variable. The package is considered found if all variables <var1>... listed contain valid results, e.g. valid filepaths. There are two modes of this function. The first argument in both modes is the name of the Find-module where it is called (in origi‐ nal casing). The first simple mode looks like this: FIND_PACKAGE_HANDLE_STANDARD_ARGS(<name> (DEFAULT_MSG|"Custom failure message") <var1>...<varN> ) If the variables <var1> to <varN> are all valid, then <UPPER‐ CASED_NAME>_FOUND will be set to TRUE. If DEFAULT_MSG is given as second argument, then the function will generate itself useful success and error messages. You can also supply a custom error message for the failure case. This is not recommended. The second mode is more powerful and also supports version check‐ ing: FIND_PACKAGE_HANDLE_STANDARD_ARGS(NAME [REQUIRED_VARS <var1>...<varN>] [VERSION_VAR <versionvar>] [HANDLE_COMPONENTS] [CONFIG_MODE] [FAIL_MESSAGE "Custom failure message"] ) As above, if <var1> through <varN> are all valid, <UPPER‐ CASED_NAME>_FOUND will be set to TRUE. After REQUIRED_VARS the variables which are required for this package are listed. Follow‐ ing VERSION_VAR the name of the variable can be specified which holds the version of the package which has been found. If this is done, this version will be checked against the (potentially) spec‐ ified required version used in the find_package() call. The EXACT keyword is also handled. The default messages include information about the required version and the version which has been actually found, both if the version is ok or not. If the package supports components, use the HANDLE_COMPONENTS option to enable handling them. In this case, find_package_handle_standard_args() will report which components have been found and which are missing, and the <NAME>_FOUND variable will be set to FALSE if any of the required components (i.e. not the ones listed after OPTIONAL_COM‐ PONENTS) are missing. Use the option CONFIG_MODE if your Find‐ XXX.cmake module is a wrapper for a find_package(... NO_MODULE) call. In this case VERSION_VAR will be set to <NAME>_VERSION and the macro will automatically check whether the Config module was found. Via FAIL_MESSAGE a custom failure message can be specified, if this is not used, the default message will be displayed. Example for mode 1: FIND_PACKAGE_HANDLE_STANDARD_ARGS(LibXml2 DEFAULT_MSG LIBXML2_LIBRARY LIBXML2_INCLUDE_DIR) LibXml2 is considered to be found, if both LIBXML2_LIBRARY and LIBXML2_INCLUDE_DIR are valid. Then also LIBXML2_FOUND is set to TRUE. If it is not found and REQUIRED was used, it fails with FATAL_ERROR, independent whether QUIET was used or not. If it is found, success will be reported, including the content of <var1>. On repeated Cmake runs, the same message won't be printed again. Example for mode 2: FIND_PACKAGE_HANDLE_STANDARD_ARGS(BISON REQUIRED_VARS BISON_EXECUTABLE VERSION_VAR BISON_VERSION) In this case, BISON is considered to be found if the variable(s) listed after REQUIRED_VAR are all valid, i.e. BISON_EXECUTABLE in this case. Also the version of BISON will be checked by using the version contained in BISON_VERSION. Since no FAIL_MESSAGE is given, the default messages will be printed. Another example for mode 2: FIND_PACKAGE(Automoc4 QUIET NO_MODULE HINTS /opt/automoc4) FIND_PACKAGE_HANDLE_STANDARD_ARGS(Automoc4 CONFIG_MODE) In this case, FindAutmoc4.cmake wraps a call to FIND_PACKAGE(Auto‐ moc4 NO_MODULE) and adds an additional search directory for auto‐ moc4. The following FIND_PACKAGE_HANDLE_STANDARD_ARGS() call pro‐ duces a proper success/error message. FindPackageMessage FIND_PACKAGE_MESSAGE(<name> "message for user" "find result details") This macro is intended to be used in FindXXX.cmake modules files. It will print a message once for each unique find result. This is useful for telling the user where a package was found. The first argument specifies the name (XXX) of the package. The second argu‐ ment specifies the message to display. The third argument lists details about the find result so that if they change the message will be displayed again. The macro also obeys the QUIET argument to the find_package command. Example: IF(X11_FOUND) FIND_PACKAGE_MESSAGE(X11 "Found X11: ${X11_X11_LIB}" "[${X11_X11_LIB}][${X11_INCLUDE_DIR}]") ELSE(X11_FOUND) ... ENDIF(X11_FOUND) FindPerl Find perl this module looks for Perl PERL_EXECUTABLE - the full path to perl PERL_FOUND - If false, don't attempt to use perl. PERL_VERSION_STRING - version of perl found (since CMake 2.8.8) FindPerlLibs Find Perl libraries This module finds if PERL is installed and determines where the include files and libraries are. It also determines what the name of the library is. This code sets the following variables: PERLLIBS_FOUND = True if perl.h & libperl were found PERL_INCLUDE_PATH = path to where perl.h is found PERL_LIBRARY = path to libperl PERL_EXECUTABLE = full path to the perl binary The minimum required version of Perl can be specified using the standard syntax, e.g. FIND_PACKAGE(PerlLibs 6.0) The following variables are also available if needed (introduced after CMake 2.6.4) PERL_SITESEARCH = path to the sitesearch install dir PERL_SITELIB = path to the sitelib install directory PERL_VENDORARCH = path to the vendor arch install directory PERL_VENDORLIB = path to the vendor lib install directory PERL_ARCHLIB = path to the arch lib install directory PERL_PRIVLIB = path to the priv lib install directory PERL_EXTRA_C_FLAGS = Compilation flags used to build perl FindPhysFS Locate PhysFS library This module defines PHYSFS_LIBRARY, the name of the library to link against PHYSFS_FOUND, if false, do not try to link to PHYSFS PHYSFS_INCLUDE_DIR, where to find physfs.h $PHYSFSDIR is an environment variable that would correspond to the ./configure --prefix=$PHYSFSDIR used in building PHYSFS. Created by Eric Wing. FindPike Find Pike This module finds if PIKE is installed and determines where the include files and libraries are. It also determines what the name of the library is. This code sets the following variables: PIKE_INCLUDE_PATH = path to where program.h is found PIKE_EXECUTABLE = full path to the pike binary FindPkgConfig a pkg-config module for CMake Usage: pkg_check_modules(<PREFIX> [REQUIRED] [QUIET] <MODULE> [<MODULE>]*) checks for all the given modules pkg_search_module(<PREFIX> [REQUIRED] [QUIET] <MODULE> [<MODULE>]*) checks for given modules and uses the first working one When the 'REQUIRED' argument was set, macros will fail with an error when module(s) could not be found When the 'QUIET' argument is set, no status messages will be printed. It sets the following variables: PKG_CONFIG_FOUND ... if pkg-config executable was found PKG_CONFIG_EXECUTABLE ... pathname of the pkg-config program PKG_CONFIG_VERSION_STRING ... the version of the pkg-config program found (since CMake 2.8.8) For the following variables two sets of values exist; first one is the common one and has the given PREFIX. The second set contains flags which are given out when pkgconfig was called with the '--static' option. <XPREFIX>_FOUND ... set to 1 if module(s) exist <XPREFIX>_LIBRARIES ... only the libraries (w/o the '-l') <XPREFIX>_LIBRARY_DIRS ... the paths of the libraries (w/o the '-L') <XPREFIX>_LDFLAGS ... all required linker flags <XPREFIX>_LDFLAGS_OTHER ... all other linker flags <XPREFIX>_INCLUDE_DIRS ... the '-I' preprocessor flags (w/o the '-I') <XPREFIX>_CFLAGS ... all required cflags <XPREFIX>_CFLAGS_OTHER ... the other compiler flags <XPREFIX> = <PREFIX> for common case <XPREFIX> = <PREFIX>_STATIC for static linking There are some special variables whose prefix depends on the count of given modules. When there is only one module, <PREFIX> stays unchanged. When there are multiple modules, the prefix will be changed to <PREFIX>_<MODNAME>: <XPREFIX>_VERSION ... version of the module <XPREFIX>_PREFIX ... prefix-directory of the module <XPREFIX>_INCLUDEDIR ... include-dir of the module <XPREFIX>_LIBDIR ... lib-dir of the module <XPREFIX> = <PREFIX> when |MODULES| == 1, else <XPREFIX> = <PREFIX>_<MODNAME> A <MODULE> parameter can have the following formats: {MODNAME} ... matches any version {MODNAME}>={VERSION} ... at least version <VERSION> is required {MODNAME}={VERSION} ... exactly version <VERSION> is required {MODNAME}<={VERSION} ... modules must not be newer than <VERSION> Examples pkg_check_modules (GLIB2 glib-2.0) pkg_check_modules (GLIB2 glib-2.0>=2.10) requires at least version 2.10 of glib2 and defines e.g. GLIB2_VERSION=2.10.3 pkg_check_modules (FOO glib-2.0>=2.10 gtk+-2.0) requires both glib2 and gtk2, and defines e.g. FOO_glib-2.0_VERSION=2.10.3 FOO_gtk+-2.0_VERSION=2.8.20 pkg_check_modules (XRENDER REQUIRED xrender) defines e.g.: XRENDER_LIBRARIES=Xrender;X11 XRENDER_STATIC_LIBRARIES=Xrender;X11;pthread;Xau;Xdmcp pkg_search_module (BAR libxml-2.0 libxml2 libxml>=2) FindPostgreSQL Find the PostgreSQL installation. In Windows, we make the assumption that, if the PostgreSQL files are installed, the default directory will be C:\Program Files\PostgreSQL. This module defines PostgreSQL_LIBRARIES - the PostgreSQL libraries needed for linking PostgreSQL_INCLUDE_DIRS - the directories of the PostgreSQL headers PostgreSQL_VERSION_STRING - the version of PostgreSQL found (since CMake 2.8.8) FindProducer Though Producer isn't directly part of OpenSceneGraph, its primary user is OSG so I consider this part of the Findosg* suite used to find OpenSceneGraph components. You'll notice that I accept OSGDIR as an environment path. Each component is separate and you must opt in to each module. You must also opt into OpenGL (and OpenThreads?) as these modules won't do it for you. This is to allow you control over your own system piece by piece in case you need to opt out of certain com‐ ponents or change the Find behavior for a particular module (per‐ haps because the default FindOpenGL.cmake module doesn't work with your system as an example). If you want to use a more convenient module that includes everything, use the FindOpenSceneGraph.cmake instead of the Findosg*.cmake modules. Locate Producer This module defines PRODUCER_LIBRARY PRO‐ DUCER_FOUND, if false, do not try to link to Producer PRO‐ DUCER_INCLUDE_DIR, where to find the headers $PRODUCER_DIR is an environment variable that would correspond to the ./configure --prefix=$PRODUCER_DIR used in building osg. Created by Eric Wing. FindProtobuf Locate and configure the Google Protocol Buffers library. The following variables can be set and are optional: PROTOBUF_SRC_ROOT_FOLDER - When compiling with MSVC, if this cache variable is set the protobuf-default VS project build locations (vsprojects/Debug & vsprojects/Release) will be searched for libraries and binaries. PROTOBUF_IMPORT_DIRS - List of additional directories to be searched for imported .proto files. (New in CMake 2.8.8) Defines the following variables: PROTOBUF_FOUND - Found the Google Protocol Buffers library (libprotobuf & header files) PROTOBUF_INCLUDE_DIRS - Include directories for Google Protocol Buffers PROTOBUF_LIBRARIES - The protobuf libraries [New in CMake 2.8.5] PROTOBUF_PROTOC_LIBRARIES - The protoc libraries PROTOBUF_LITE_LIBRARIES - The protobuf-lite libraries The following cache variables are also available to set or use: PROTOBUF_LIBRARY - The protobuf library PROTOBUF_PROTOC_LIBRARY - The protoc library PROTOBUF_INCLUDE_DIR - The include directory for protocol buffers PROTOBUF_PROTOC_EXECUTABLE - The protoc compiler [New in CMake 2.8.5] PROTOBUF_LIBRARY_DEBUG - The protobuf library (debug) PROTOBUF_PROTOC_LIBRARY_DEBUG - The protoc library (debug) PROTOBUF_LITE_LIBRARY - The protobuf lite library PROTOBUF_LITE_LIBRARY_DEBUG - The protobuf lite library (debug) ==================================================================== Example: find_package(Protobuf REQUIRED) include_directories(${PROTOBUF_INCLUDE_DIRS}) include_directories(${CMAKE_CURRENT_BINARY_DIR}) PROTOBUF_GENERATE_CPP(PROTO_SRCS PROTO_HDRS foo.proto) add_executable(bar bar.cc ${PROTO_SRCS} ${PROTO_HDRS}) target_link_libraries(bar ${PROTOBUF_LIBRARIES}) NOTE: You may need to link against pthreads, depending on the platform. NOTE: The PROTOBUF_GENERATE_CPP macro & add_executable() or add_library() calls only work properly within the same directory. ==================================================================== PROTOBUF_GENERATE_CPP (public function) SRCS = Variable to define with autogenerated source files HDRS = Variable to define with autogenerated header files ARGN = proto files ==================================================================== FindPythonInterp Find python interpreter This module finds if Python interpreter is installed and deter‐ mines where the executables are. This code sets the following variables: PYTHONINTERP_FOUND - Was the Python executable found PYTHON_EXECUTABLE - path to the Python interpreter PYTHON_VERSION_STRING - Python version found e.g. 2.5.2 PYTHON_VERSION_MAJOR - Python major version found e.g. 2 PYTHON_VERSION_MINOR - Python minor version found e.g. 5 PYTHON_VERSION_PATCH - Python patch version found e.g. 2 The Python_ADDITIONAL_VERSIONS variable can be used to specify a list of version numbers that should be taken into account when searching for Python. You need to set this variable before calling find_package(PythonInterp). FindPythonLibs Find python libraries This module finds if Python is installed and determines where the include files and libraries are. It also determines what the name of the library is. This code sets the following variables: PYTHONLIBS_FOUND - have the Python libs been found PYTHON_LIBRARIES - path to the python library PYTHON_INCLUDE_PATH - path to where Python.h is found (deprecated) PYTHON_INCLUDE_DIRS - path to where Python.h is found PYTHON_DEBUG_LIBRARIES - path to the debug library (deprecated) PYTHONLIBS_VERSION_STRING - version of the Python libs found (since CMake 2.8.8) The Python_ADDITIONAL_VERSIONS variable can be used to specify a list of version numbers that should be taken into account when searching for Python. You need to set this variable before calling find_package(PythonLibs). If you'd like to specify the installation of Python to use, you should modify the following cache variables: PYTHON_LIBRARY - path to the python library PYTHON_INCLUDE_DIR - path to where Python.h is found FindQt Searches for all installed versions of QT. This should only be used if your project can work with multiple versions of QT. If not, you should just directly use FindQt4 or FindQt3. If multiple versions of QT are found on the machine, then The user must set the option DESIRED_QT_VERSION to the version they want to use. If only one version of qt is found on the machine, then the DESIRED_QT_VERSION is set to that version and the matching FindQt3 or FindQt4 module is included. Once the user sets DESIRED_QT_VERSION, then the FindQt3 or FindQt4 module is included. QT_REQUIRED if this is set to TRUE then if CMake can not find QT4 or QT3 an error is raised and a message is sent to the user. DESIRED_QT_VERSION OPTION is created QT4_INSTALLED is set to TRUE if qt4 is found. QT3_INSTALLED is set to TRUE if qt3 is found. FindQt3 Locate Qt include paths and libraries This module defines: QT_INCLUDE_DIR - where to find qt.h, etc. QT_LIBRARIES - the libraries to link against to use Qt. QT_DEFINITIONS - definitions to use when compiling code that uses Qt. QT_FOUND - If false, don't try to use Qt. QT_VERSION_STRING - the version of Qt found If you need the multithreaded version of Qt, set QT_MT_REQUIRED to TRUE Also defined, but not for general use are: QT_MOC_EXECUTABLE, where to find the moc tool. QT_UIC_EXECUTABLE, where to find the uic tool. QT_QT_LIBRARY, where to find the Qt library. QT_QTMAIN_LIBRARY, where to find the qtmain library. This is only required by Qt3 on Windows. FindQt4 Find QT 4 This module can be used to find Qt4. The most important issue is that the Qt4 qmake is available via the system path. This qmake is then used to detect basically everything else. This module defines a number of key variables and macros. The variable QT_USE_FILE is set which is the path to a CMake file that can be included to compile Qt 4 applications and libraries. It sets up the compila‐ tion environment for include directories, preprocessor defines and populates a QT_LIBRARIES variable. Typical usage could be something like: find_package(Qt4 4.4.3 REQUIRED QtCore QtGui QtXml) include(${QT_USE_FILE}) add_executable(myexe main.cpp) target_link_libraries(myexe ${QT_LIBRARIES}) The minimum required version can be specified using the standard find_package()-syntax (see example above). For compatibility with older versions of FindQt4.cmake it is also possible to set the variable QT_MIN_VERSION to the minimum required version of Qt4 before the find_package(Qt4) command. If both are used, the ver‐ sion used in the find_package() command overrides the one from QT_MIN_VERSION. When using the components argument, QT_USE_QT* variables are auto‐ matically set for the QT_USE_FILE to pick up. If one wishes to manually set them, the available ones to set include: QT_DONT_USE_QTCORE QT_DONT_USE_QTGUI QT_USE_QT3SUPPORT QT_USE_QTASSISTANT QT_USE_QAXCONTAINER QT_USE_QAXSERVER QT_USE_QTDESIGNER QT_USE_QTMOTIF QT_USE_QTMAIN QT_USE_QTMULTIMEDIA QT_USE_QTNETWORK QT_USE_QTNSPLUGIN QT_USE_QTOPENGL QT_USE_QTSQL QT_USE_QTXML QT_USE_QTSVG QT_USE_QTTEST QT_USE_QTUITOOLS QT_USE_QTDBUS QT_USE_QTSCRIPT QT_USE_QTASSISTANTCLIENT QT_USE_QTHELP QT_USE_QTWEBKIT QT_USE_QTXMLPATTERNS QT_USE_PHONON QT_USE_QTSCRIPTTOOLS QT_USE_QTDECLARATIVE QT_USE_IMPORTED_TARGETS If this variable is set to TRUE, FindQt4.cmake will create imported library targets for the various Qt libraries and set the library variables like QT_QTCORE_LIBRARY to point at these imported targets instead of the library file on disk. This provides much better handling of the release and debug versions of the Qt libraries and is also always backwards compatible, except for the case that dependencies of libraries are exported, these will then also list the names of the imported targets as dependency and not the file location on disk. This is much more flexible, but requires that FindQt4.cmake is executed before such an exported dependency file is processed. There are also some files that need processing by some Qt tools such as moc and uic. Listed below are macros that may be used to process those files. macro QT4_WRAP_CPP(outfiles inputfile ... OPTIONS ...) create moc code from a list of files containing Qt class with the Q_OBJECT declaration. Per-direcotry preprocessor definitions are also added. Options may be given to moc, such as those found when executing "moc -help". macro QT4_WRAP_UI(outfiles inputfile ... OPTIONS ...) create code from a list of Qt designer ui files. Options may be given to uic, such as those found when executing "uic -help" macro QT4_ADD_RESOURCES(outfiles inputfile ... OPTIONS ...) create code from a list of Qt resource files. Options may be given to rcc, such as those found when executing "rcc -help" macro QT4_GENERATE_MOC(inputfile outputfile ) creates a rule to run moc on infile and create outfile. Use this if for some reason QT4_WRAP_CPP() isn't appropriate, e.g. because you need a custom filename for the moc file or something similar. macro QT4_AUTOMOC(sourcefile1 sourcefile2 ... ) This macro is still experimental. It can be used to have moc automatically handled. So if you have the files foo.h and foo.cpp, and in foo.h a a class uses the Q_OBJECT macro, moc has to run on it. If you don't want to use QT4_WRAP_CPP() (which is reliable and mature), you can insert #include "foo.moc" in foo.cpp and then give foo.cpp as argument to QT4_AUTOMOC(). This will the scan all listed files at cmake-time for such included moc files and if it finds them cause a rule to be generated to run moc at build time on the accompanying header file foo.h. If a source file has the SKIP_AUTOMOC property set it will be ignored by this macro. You should have a look on the AUTOMOC property for targets to achieve the same results. macro QT4_ADD_DBUS_INTERFACE(outfiles interface basename) Create a the interface header and implementation files with the given basename from the given interface xml file and add it to the list of sources. You can pass additional parameters to the qdbusxml2cpp call by setting properties on the input file: INCLUDE the given file will be included in the generate interface header CLASSNAME the generated class is named accordingly NO_NAMESPACE the generated class is not wrapped in a namespace macro QT4_ADD_DBUS_INTERFACES(outfiles inputfile ... ) Create the interface header and implementation files for all listed interface xml files. The basename will be automatically determined from the name of the xml file. The source file properties described for QT4_ADD_DBUS_INTERFACE also apply here. macro QT4_ADD_DBUS_ADAPTOR(outfiles xmlfile parentheader parentclassname [basename] [classname]) create a dbus adaptor (header and implementation file) from the xml file describing the interface, and add it to the list of sources. The adaptor forwards the calls to a parent class, defined in parentheader and named parentclassname. The name of the generated files will be <basename>adaptor.{cpp,h} where basename defaults to the basename of the xml file. If <classname> is provided, then it will be used as the classname of the adaptor itself. macro QT4_GENERATE_DBUS_INTERFACE( header [interfacename] OPTIONS ...) generate the xml interface file from the given header. If the optional argument interfacename is omitted, the name of the interface file is constructed from the basename of the header with the suffix .xml appended. Options may be given to qdbuscpp2xml, such as those found when executing "qdbuscpp2xml --help" macro QT4_CREATE_TRANSLATION( qm_files directories ... sources ... ts_files ... OPTIONS ...) out: qm_files in: directories sources ts_files options: flags to pass to lupdate, such as -extensions to specify extensions for a directory scan. generates commands to create .ts (vie lupdate) and .qm (via lrelease) - files from directories and/or sources. The ts files are created and/or updated in the source tree (unless given with full paths). The qm files are generated in the build tree. Updating the translations can be done by adding the qm_files to the source list of your library/executable, so they are always updated, or by adding a custom target to control when they get updated/generated. macro QT4_ADD_TRANSLATION( qm_files ts_files ... ) out: qm_files in: ts_files generates commands to create .qm from .ts - files. The generated filenames can be found in qm_files. The ts_files must exists and are not updated in any way. Below is a detailed list of variables that FindQt4.cmake sets. QT_FOUND If false, don't try to use Qt. QT4_FOUND If false, don't try to use Qt 4. QT_VERSION_MAJOR The major version of Qt found. QT_VERSION_MINOR The minor version of Qt found. QT_VERSION_PATCH The patch version of Qt found. QT_EDITION Set to the edition of Qt (i.e. DesktopLight) QT_EDITION_DESKTOPLIGHT True if QT_EDITION == DesktopLight QT_QTCORE_FOUND True if QtCore was found. QT_QTGUI_FOUND True if QtGui was found. QT_QT3SUPPORT_FOUND True if Qt3Support was found. QT_QTASSISTANT_FOUND True if QtAssistant was found. QT_QTASSISTANTCLIENT_FOUND True if QtAssistantClient was found. QT_QAXCONTAINER_FOUND True if QAxContainer was found (Windows only). QT_QAXSERVER_FOUND True if QAxServer was found (Windows only). QT_QTDBUS_FOUND True if QtDBus was found. QT_QTDESIGNER_FOUND True if QtDesigner was found. QT_QTDESIGNERCOMPONENTS True if QtDesignerComponents was found. QT_QTHELP_FOUND True if QtHelp was found. QT_QTMOTIF_FOUND True if QtMotif was found. QT_QTMULTIMEDIA_FOUND True if QtMultimedia was found (since Qt 4.6.0). QT_QTNETWORK_FOUND True if QtNetwork was found. QT_QTNSPLUGIN_FOUND True if QtNsPlugin was found. QT_QTOPENGL_FOUND True if QtOpenGL was found. QT_QTSQL_FOUND True if QtSql was found. QT_QTSVG_FOUND True if QtSvg was found. QT_QTSCRIPT_FOUND True if QtScript was found. QT_QTSCRIPTTOOLS_FOUND True if QtScriptTools was found. QT_QTTEST_FOUND True if QtTest was found. QT_QTUITOOLS_FOUND True if QtUiTools was found. QT_QTWEBKIT_FOUND True if QtWebKit was found. QT_QTXML_FOUND True if QtXml was found. QT_QTXMLPATTERNS_FOUND True if QtXmlPatterns was found. QT_PHONON_FOUND True if phonon was found. QT_QTDECLARATIVE_FOUND True if QtDeclarative was found. QT_MAC_USE_COCOA For Mac OS X, its whether Cocoa or Carbon is used. In general, this should not be used, but its useful when having platform specific code. QT_DEFINITIONS Definitions to use when compiling code that uses Qt. You do not need to use this if you include QT_USE_FILE. The QT_USE_FILE will also define QT_DEBUG and QT_NO_DEBUG to fit your current build type. Those are not contained in QT_DEFINITIONS. QT_INCLUDES List of paths to all include directories of Qt4 QT_INCLUDE_DIR and QT_QTCORE_INCLUDE_DIR are always in this variable even if NOTFOUND, all other INCLUDE_DIRS are only added if they are found. You do not need to use this if you include QT_USE_FILE. Include directories for the Qt modules are listed here. You do not need to use these variables if you include QT_USE_FILE. QT_INCLUDE_DIR Path to "include" of Qt4 QT_QT3SUPPORT_INCLUDE_DIR Path to "include/Qt3Support" QT_QTASSISTANT_INCLUDE_DIR Path to "include/QtAssistant" QT_QTASSISTANTCLIENT_INCLUDE_DIR Path to "include/QtAssistant" QT_QAXCONTAINER_INCLUDE_DIR Path to "include/ActiveQt" (Windows only) QT_QAXSERVER_INCLUDE_DIR Path to "include/ActiveQt" (Windows only) QT_QTCORE_INCLUDE_DIR Path to "include/QtCore" QT_QTDBUS_INCLUDE_DIR Path to "include/QtDBus" QT_QTDESIGNER_INCLUDE_DIR Path to "include/QtDesigner" QT_QTDESIGNERCOMPONENTS_INCLUDE_DIR Path to "include/QtDesigner" QT_QTGUI_INCLUDE_DIR Path to "include/QtGui" QT_QTHELP_INCLUDE_DIR Path to "include/QtHelp" QT_QTMOTIF_INCLUDE_DIR Path to "include/QtMotif" QT_QTMULTIMEDIA_INCLUDE_DIR Path to "include/QtMultimedia" QT_QTNETWORK_INCLUDE_DIR Path to "include/QtNetwork" QT_QTNSPLUGIN_INCLUDE_DIR Path to "include/QtNsPlugin" QT_QTOPENGL_INCLUDE_DIR Path to "include/QtOpenGL" QT_QTSCRIPT_INCLUDE_DIR Path to "include/QtScript" QT_QTSQL_INCLUDE_DIR Path to "include/QtSql" QT_QTSVG_INCLUDE_DIR Path to "include/QtSvg" QT_QTTEST_INCLUDE_DIR Path to "include/QtTest" QT_QTWEBKIT_INCLUDE_DIR Path to "include/QtWebKit" QT_QTXML_INCLUDE_DIR Path to "include/QtXml" QT_QTXMLPATTERNS_INCLUDE_DIR Path to "include/QtXmlPatterns" QT_PHONON_INCLUDE_DIR Path to "include/phonon" QT_QTSCRIPTTOOLS_INCLUDE_DIR Path to "include/QtScriptTools" QT_QTDECLARATIVE_INCLUDE_DIR Path to "include/QtDeclarative" QT_BINARY_DIR Path to "bin" of Qt4 QT_LIBRARY_DIR Path to "lib" of Qt4 QT_PLUGINS_DIR Path to "plugins" for Qt4 QT_TRANSLATIONS_DIR Path to "translations" of Qt4 QT_IMPORTS_DIR Path to "imports" of Qt4 QT_DOC_DIR Path to "doc" of Qt4 QT_MKSPECS_DIR Path to "mkspecs" of Qt4 The Qt toolkit may contain both debug and release libraries. In that case, the following library variables will contain both. You do not need to use these variables if you include QT_USE_FILE, and use QT_LIBRARIES. QT_QT3SUPPORT_LIBRARY The Qt3Support library QT_QTASSISTANT_LIBRARY The QtAssistant library QT_QTASSISTANTCLIENT_LIBRARY The QtAssistantClient library QT_QAXCONTAINER_LIBRARY The QAxContainer library (Windows only) QT_QAXSERVER_LIBRARY The QAxServer library (Windows only) QT_QTCORE_LIBRARY The QtCore library QT_QTDBUS_LIBRARY The QtDBus library QT_QTDESIGNER_LIBRARY The QtDesigner library QT_QTDESIGNERCOMPONENTS_LIBRARY The QtDesignerComponents library QT_QTGUI_LIBRARY The QtGui library QT_QTHELP_LIBRARY The QtHelp library QT_QTMOTIF_LIBRARY The QtMotif library QT_QTMULTIMEDIA_LIBRARY The QtMultimedia library QT_QTNETWORK_LIBRARY The QtNetwork library QT_QTNSPLUGIN_LIBRARY The QtNsPLugin library QT_QTOPENGL_LIBRARY The QtOpenGL library QT_QTSCRIPT_LIBRARY The QtScript library QT_QTSQL_LIBRARY The QtSql library QT_QTSVG_LIBRARY The QtSvg library QT_QTTEST_LIBRARY The QtTest library QT_QTUITOOLS_LIBRARY The QtUiTools library QT_QTWEBKIT_LIBRARY The QtWebKit library QT_QTXML_LIBRARY The QtXml library QT_QTXMLPATTERNS_LIBRARY The QtXmlPatterns library QT_QTMAIN_LIBRARY The qtmain library for Windows QT_PHONON_LIBRARY The phonon library QT_QTSCRIPTTOOLS_LIBRARY The QtScriptTools library The QtDeclarative library: QT_QTDECLARATIVE_LIBRARY also defined, but NOT for general use are QT_MOC_EXECUTABLE Where to find the moc tool. QT_UIC_EXECUTABLE Where to find the uic tool. QT_UIC3_EXECUTABLE Where to find the uic3 tool. QT_RCC_EXECUTABLE Where to find the rcc tool QT_DBUSCPP2XML_EXECUTABLE Where to find the qdbuscpp2xml tool. QT_DBUSXML2CPP_EXECUTABLE Where to find the qdbusxml2cpp tool. QT_LUPDATE_EXECUTABLE Where to find the lupdate tool. QT_LRELEASE_EXECUTABLE Where to find the lrelease tool. QT_QCOLLECTIONGENERATOR_EXECUTABLE Where to find the qcollectiongenerator tool. QT_DESIGNER_EXECUTABLE Where to find the Qt designer tool. QT_LINGUIST_EXECUTABLE Where to find the Qt linguist tool. These are around for backwards compatibility they will be set QT_WRAP_CPP Set true if QT_MOC_EXECUTABLE is found QT_WRAP_UI Set true if QT_UIC_EXECUTABLE is found These variables do _NOT_ have any effect anymore (compared to FindQt.cmake) QT_MT_REQUIRED Qt4 is now always multithreaded These variables are set to "" Because Qt structure changed (They make no sense in Qt4) QT_QT_LIBRARY Qt-Library is now split FindQuickTime Locate QuickTime This module defines QUICKTIME_LIBRARY QUICK‐ TIME_FOUND, if false, do not try to link to gdal QUICK‐ TIME_INCLUDE_DIR, where to find the headers $QUICKTIME_DIR is an environment variable that would correspond to the ./configure --prefix=$QUICKTIME_DIR Created by Eric Wing. FindRTI Try to find M&S HLA RTI libraries This module finds if any HLA RTI is installed and locates the standard RTI include files and libraries. RTI is a simulation infrastructure standardized by IEEE and SISO. It has a well defined C++ API that assures that simulation appli‐ cations are independent on a particular RTI implementation. http://en.wikipedia.org/wiki/Run-Time_Infrastructure_(simulation) This code sets the following variables: RTI_INCLUDE_DIR = the directory where RTI includes file are found RTI_LIBRARIES = The libraries to link against to use RTI RTI_DEFINITIONS = -DRTI_USES_STD_FSTREAM RTI_FOUND = Set to FALSE if any HLA RTI was not found Report problems to<EMAIL_ADDRESS>FindRuby Find Ruby This module finds if Ruby is installed and determines where the include files and libraries are. Ruby 1.8 and 1.9 are supported. The minimum required version of Ruby can be specified using the standard syntax, e.g. FIND_PACKAGE(Ruby 1.8) It also determines what the name of the library is. This code sets the following variables: RUBY_EXECUTABLE = full path to the ruby binary RUBY_INCLUDE_DIRS = include dirs to be used when using the ruby library RUBY_LIBRARY = full path to the ruby library RUBY_VERSION = the version of ruby which was found, e.g. "1.8.7" RUBY_FOUND = set to true if ruby ws found successfully RUBY_INCLUDE_PATH = same as RUBY_INCLUDE_DIRS, only provided for compatibility reasons, don't use it FindSDL Locate SDL library This module defines SDL_LIBRARY, the name of the library to link against SDL_FOUND, if false, do not try to link to SDL SDL_INCLUDE_DIR, where to find SDL.h This module responds to the the flag: SDL_BUILDING_LIBRARY If this is defined, then no SDL_main will be linked in because only applications need main(). Otherwise, it is assumed you are build‐ ing an application and this module will attempt to locate and set the the proper link flags as part of the returned SDL_LIBRARY variable. Don't forget to include SDLmain.h and SDLmain.m your project for the OS X framework based version. (Other versions link to -lSDL‐ main which this module will try to find on your behalf.) Also for OS X, this module will automatically add the -framework Cocoa on your behalf. Additional Note: If you see an empty SDL_LIBRARY_TEMP in your con‐ figuration and no SDL_LIBRARY, it means CMake did not find your SDL library (SDL.dll, libsdl.so, SDL.framework, etc). Set SDL_LIBRARY_TEMP to point to your SDL library, and configure again. Similarly, if you see an empty SDLMAIN_LIBRARY, you should set this value as appropriate. These values are used to generate the final SDL_LIBRARY variable, but when these values are unset, SDL_LIBRARY does not get created. $SDLDIR is an environment variable that would correspond to the ./configure --prefix=$SDLDIR used in building SDL. l.e.galup 9-20-02 Modified by Eric Wing. Added code to assist with automated build‐ ing by using environmental variables and providing a more con‐ trolled/consistent search behavior. Added new modifications to recognize OS X frameworks and additional Unix paths (FreeBSD, etc). Also corrected the header search path to follow "proper" SDL guidelines. Added a search for SDLmain which is needed by some platforms. Added a search for threads which is needed by some platforms. Added needed compile switches for MinGW. On OSX, this will prefer the Framework version (if found) over others. People will have to manually change the cache values of SDL_LIBRARY to override this selection or set the CMake environ‐ ment CMAKE_INCLUDE_PATH to modify the search paths. Note that the header path has changed from SDL/SDL.h to just SDL.h This needed to change because "proper" SDL convention is #include "SDL.h", not <SDL/SDL.h>. This is done for portability reasons because not all systems place things in SDL/ (see FreeBSD). FindSDL_image Locate SDL_image library This module defines SDLIMAGE_LIBRARY, the name of the library to link against SDLIMAGE_FOUND, if false, do not try to link to SDL SDLIMAGE_INCLUDE_DIR, where to find SDL/SDL.h $SDLDIR is an environment variable that would correspond to the ./configure --prefix=$SDLDIR used in building SDL. Created by Eric Wing. This was influenced by the FindSDL.cmake module, but with modifications to recognize OS X frameworks and additional Unix paths (FreeBSD, etc). FindSDL_mixer Locate SDL_mixer library This module defines SDLMIXER_LIBRARY, the name of the library to link against SDLMIXER_FOUND, if false, do not try to link to SDL SDLMIXER_INCLUDE_DIR, where to find SDL/SDL.h $SDLDIR is an environment variable that would correspond to the ./configure --prefix=$SDLDIR used in building SDL. Created by Eric Wing. This was influenced by the FindSDL.cmake module, but with modifications to recognize OS X frameworks and additional Unix paths (FreeBSD, etc). FindSDL_net Locate SDL_net library This module defines SDLNET_LIBRARY, the name of the library to link against SDLNET_FOUND, if false, do not try to link against SDLNET_INCLUDE_DIR, where to find the headers $SDLDIR is an environment variable that would correspond to the ./configure --prefix=$SDLDIR used in building SDL. Created by Eric Wing. This was influenced by the FindSDL.cmake module, but with modifications to recognize OS X frameworks and additional Unix paths (FreeBSD, etc). FindSDL_sound Locates the SDL_sound library FindSDL_ttf Locate SDL_ttf library This module defines SDLTTF_LIBRARY, the name of the library to link against SDLTTF_FOUND, if false, do not try to link to SDL SDLTTF_INCLUDE_DIR, where to find SDL/SDL.h $SDLDIR is an environment variable that would correspond to the ./configure --prefix=$SDLDIR used in building SDL. Created by Eric Wing. This was influenced by the FindSDL.cmake module, but with modifications to recognize OS X frameworks and additional Unix paths (FreeBSD, etc). FindSWIG Find SWIG This module finds an installed SWIG. It sets the following vari‐ ables: SWIG_FOUND - set to true if SWIG is found SWIG_DIR - the directory where swig is installed SWIG_EXECUTABLE - the path to the swig executable SWIG_VERSION - the version number of the swig executable The minimum required version of SWIG can be specified using the standard syntax, e.g. FIND_PACKAGE(SWIG 1.1) All information is collected from the SWIG_EXECUTABLE so the ver‐ sion to be found can be changed from the command line by means of setting SWIG_EXECUTABLE FindSelfPackers Find upx This module looks for some executable packers (i.e. softwares that compress executables or shared libs into on-the-fly self-extract‐ ing executables or shared libs. Examples: UPX: http://wildsau.idv.uni-linz.ac.at/mfx/upx.html FindSquish -- Typical Use This module can be used to find Squish (currently support is aimed at version 3). SQUISH_FOUND If false, don't try to use Squish SQUISH_INSTALL_DIR The Squish installation directory (containing bin, lib, etc) SQUISH_SERVER_EXECUTABLE The squishserver executable SQUISH_CLIENT_EXECUTABLE The squishrunner executable SQUISH_INSTALL_DIR_FOUND Was the install directory found? SQUISH_SERVER_EXECUTABLE_FOUND Was the server executable found? SQUISH_CLIENT_EXECUTABLE_FOUND Was the client executable found? macro SQUISH_ADD_TEST(testName applicationUnderTest testSuite testCase) ENABLE_TESTING() FIND_PACKAGE(Squish) IF (SQUISH_FOUND) SQUISH_ADD_TEST(myTestName myApplication testSuiteName testCaseName) ENDIF (SQUISH_FOUND) FindSubversion Extract information from a subversion working copy The module defines the following variables: Subversion_SVN_EXECUTABLE - path to svn command line client Subversion_VERSION_SVN - version of svn command line client Subversion_FOUND - true if the command line client was found SUBVERSION_FOUND - same as Subversion_FOUND, set for compatiblity reasons The minimum required version of Subversion can be specified using the standard syntax, e.g. FIND_PACKAGE(Subversion 1.4) If the command line client executable is found two macros are defined: Subversion_WC_INFO(<dir> <var-prefix>) Subversion_WC_LOG(<dir> <var-prefix>) Subversion_WC_INFO extracts information of a subversion working copy at a given location. This macro defines the following vari‐ ables: <var-prefix>_WC_URL - url of the repository (at <dir>) <var-prefix>_WC_ROOT - root url of the repository <var-prefix>_WC_REVISION - current revision <var-prefix>_WC_LAST_CHANGED_AUTHOR - author of last commit <var-prefix>_WC_LAST_CHANGED_DATE - date of last commit <var-prefix>_WC_LAST_CHANGED_REV - revision of last commit <var-prefix>_WC_INFO - output of command `svn info <dir>' Subversion_WC_LOG retrieves the log message of the base revision of a subversion working copy at a given location. This macro defines the variable: <var-prefix>_LAST_CHANGED_LOG - last log of base revision Example usage: FIND_PACKAGE(Subversion) IF(SUBVERSION_FOUND) Subversion_WC_INFO(${PROJECT_SOURCE_DIR} Project) MESSAGE("Current revision is ${Project_WC_REVISION}") Subversion_WC_LOG(${PROJECT_SOURCE_DIR} Project) MESSAGE("Last changed log is ${Project_LAST_CHANGED_LOG}") ENDIF(SUBVERSION_FOUND) FindTCL TK_INTERNAL_PATH was removed. This module finds if Tcl is installed and determines where the include files and libraries are. It also determines what the name of the library is. This code sets the following variables: TCL_FOUND = Tcl was found TK_FOUND = Tk was found TCLTK_FOUND = Tcl and Tk were found TCL_LIBRARY = path to Tcl library (tcl tcl80) TCL_INCLUDE_PATH = path to where tcl.h can be found TCL_TCLSH = path to tclsh binary (tcl tcl80) TK_LIBRARY = path to Tk library (tk tk80 etc) TK_INCLUDE_PATH = path to where tk.h can be found TK_WISH = full path to the wish executable In an effort to remove some clutter and clear up some issues for people who are not necessarily Tcl/Tk gurus/developpers, some variables were moved or removed. Changes compared to CMake 2.4 are: => they were only useful for people writing Tcl/Tk extensions. => these libs are not packaged by default with Tcl/Tk distributions. Even when Tcl/Tk is built from source, several flavors of debug libs are created and there is no real reason to pick a single one specifically (say, amongst tcl84g, tcl84gs, or tcl84sgx). Let's leave that choice to the user by allowing him to assign TCL_LIBRARY to any Tcl library, debug or not. => this ended up being only a Win32 variable, and there is a lot of confusion regarding the location of this file in an installed Tcl/Tk tree anyway (see 8.5 for example). If you need the internal path at this point it is safer you ask directly where the *source* tree is and dig from there. FindTIFF Find TIFF library Find the native TIFF includes and library This module defines TIFF_INCLUDE_DIR, where to find tiff.h, etc. TIFF_LIBRARIES, libraries to link against to use TIFF. TIFF_FOUND, If false, do not try to use TIFF. also defined, but not for general use are TIFF_LIBRARY, where to find the TIFF library. FindTclStub TCL_STUB_LIBRARY_DEBUG and TK_STUB_LIBRARY_DEBUG were removed. This module finds Tcl stub libraries. It first finds Tcl include files and libraries by calling FindTCL.cmake. How to Use the Tcl Stubs Library: http://tcl.activestate.com/doc/howto/stubs.html Using Stub Libraries: http://safari.oreilly.com/0130385603/ch48lev1sec3 This code sets the following variables: TCL_STUB_LIBRARY = path to Tcl stub library TK_STUB_LIBRARY = path to Tk stub library TTK_STUB_LIBRARY = path to ttk stub library In an effort to remove some clutter and clear up some issues for people who are not necessarily Tcl/Tk gurus/developpers, some variables were moved or removed. Changes compared to CMake 2.4 are: => these libs are not packaged by default with Tcl/Tk distributions. Even when Tcl/Tk is built from source, several flavors of debug libs are created and there is no real reason to pick a single one specifically (say, amongst tclstub84g, tclstub84gs, or tclstub84sgx). Let's leave that choice to the user by allowing him to assign TCL_STUB_LIBRARY to any Tcl library, debug or not. FindTclsh Find tclsh This module finds if TCL is installed and determines where the include files and libraries are. It also determines what the name of the library is. This code sets the following variables: TCLSH_FOUND = TRUE if tclsh has been found TCL_TCLSH = the path to the tclsh executable In cygwin, look for the cygwin version first. Don't look for it later to avoid finding the cygwin version on a Win32 build. FindThreads This module determines the thread library of the system. The following variables are set CMAKE_THREAD_LIBS_INIT - the thread library CMAKE_USE_SPROC_INIT - are we using sproc? CMAKE_USE_WIN32_THREADS_INIT - using WIN32 threads? CMAKE_USE_PTHREADS_INIT - are we using pthreads CMAKE_HP_PTHREADS_INIT - are we using hp pthreads For systems with multiple thread libraries, caller can set CMAKE_THREAD_PREFER_PTHREAD FindUnixCommands Find unix commands from cygwin This module looks for some usual Unix commands. FindVTK Find a VTK installation or build tree. The following variables are set if VTK is found. If VTK is not found, VTK_FOUND is set to false. VTK_FOUND - Set to true when VTK is found. VTK_USE_FILE - CMake file to use VTK. VTK_MAJOR_VERSION - The VTK major version number. VTK_MINOR_VERSION - The VTK minor version number (odd non-release). VTK_BUILD_VERSION - The VTK patch level (meaningless for odd minor). VTK_INCLUDE_DIRS - Include directories for VTK VTK_LIBRARY_DIRS - Link directories for VTK libraries VTK_KITS - List of VTK kits, in CAPS (COMMON,IO,) etc. VTK_LANGUAGES - List of wrapped languages, in CAPS (TCL, PYHTON,) etc. The following cache entries must be set by the user to locate VTK: VTK_DIR - The directory containing VTKConfig.cmake. This is either the root of the build tree, or the lib/vtk directory. This is the only cache entry. The following variables are set for backward compatibility and should not be used in new code: USE_VTK_FILE - The full path to the UseVTK.cmake file. This is provided for backward compatibility. Use VTK_USE_FILE instead. FindWget Find wget This module looks for wget. This module defines the following values: WGET_EXECUTABLE: the full path to the wget tool. WGET_FOUND: True if wget has been found. FindWish Find wish installation This module finds if TCL is installed and determines where the include files and libraries are. It also determines what the name of the library is. This code sets the following variables: TK_WISH = the path to the wish executable if UNIX is defined, then it will look for the cygwin version first FindX11 Find X11 installation Try to find X11 on UNIX systems. The following values are defined X11_FOUND - True if X11 is available X11_INCLUDE_DIR - include directories to use X11 X11_LIBRARIES - link against these to use X11 and also the following more fine grained variables: Include paths: X11_ICE_INCLUDE_PATH, X11_ICE_LIB, X11_ICE_FOUND X11_SM_INCLUDE_PATH, X11_SM_LIB, X11_SM_FOUND X11_X11_INCLUDE_PATH, X11_X11_LIB X11_Xaccessrules_INCLUDE_PATH, X11_Xaccess_FOUND X11_Xaccessstr_INCLUDE_PATH, X11_Xaccess_FOUND X11_Xau_INCLUDE_PATH, X11_Xau_LIB, X11_Xau_FOUND X11_Xcomposite_INCLUDE_PATH, X11_Xcomposite_LIB, X11_Xcomposite_FOUND X11_Xcursor_INCLUDE_PATH, X11_Xcursor_LIB, X11_Xcursor_FOUND X11_Xdamage_INCLUDE_PATH, X11_Xdamage_LIB, X11_Xdamage_FOUND X11_Xdmcp_INCLUDE_PATH, X11_Xdmcp_LIB, X11_Xdmcp_FOUND X11_Xext_LIB, X11_Xext_FOUND X11_dpms_INCLUDE_PATH, (in X11_Xext_LIB), X11_dpms_FOUND X11_XShm_INCLUDE_PATH, (in X11_Xext_LIB), X11_XShm_FOUND X11_Xshape_INCLUDE_PATH, (in X11_Xext_LIB), X11_Xshape_FOUND X11_xf86misc_INCLUDE_PATH, X11_Xxf86misc_LIB, X11_xf86misc_FOUND X11_xf86vmode_INCLUDE_PATH, X11_Xxf86vm_LIB X11_xf86vmode_FOUND X11_Xfixes_INCLUDE_PATH, X11_Xfixes_LIB, X11_Xfixes_FOUND X11_Xft_INCLUDE_PATH, X11_Xft_LIB, X11_Xft_FOUND X11_Xi_INCLUDE_PATH, X11_Xi_LIB, X11_Xi_FOUND X11_Xinerama_INCLUDE_PATH, X11_Xinerama_LIB, X11_Xinerama_FOUND X11_Xinput_INCLUDE_PATH, X11_Xinput_LIB, X11_Xinput_FOUND X11_Xkb_INCLUDE_PATH, X11_Xkb_FOUND X11_Xkblib_INCLUDE_PATH, X11_Xkb_FOUND X11_Xkbfile_INCLUDE_PATH, X11_Xkbfile_LIB, X11_Xkbfile_FOUND X11_Xmu_INCLUDE_PATH, X11_Xmu_LIB, X11_Xmu_FOUND X11_Xpm_INCLUDE_PATH, X11_Xpm_LIB, X11_Xpm_FOUND X11_XTest_INCLUDE_PATH, X11_XTest_LIB, X11_XTest_FOUND X11_Xrandr_INCLUDE_PATH, X11_Xrandr_LIB, X11_Xrandr_FOUND X11_Xrender_INCLUDE_PATH, X11_Xrender_LIB, X11_Xrender_FOUND X11_Xscreensaver_INCLUDE_PATH, X11_Xscreensaver_LIB, X11_Xscreensaver_FOUND X11_Xt_INCLUDE_PATH, X11_Xt_LIB, X11_Xt_FOUND X11_Xutil_INCLUDE_PATH, X11_Xutil_FOUND X11_Xv_INCLUDE_PATH, X11_Xv_LIB, X11_Xv_FOUND X11_XSync_INCLUDE_PATH, (in X11_Xext_LIB), X11_XSync_FOUND FindXMLRPC Find xmlrpc Find the native XMLRPC headers and libraries. XMLRPC_INCLUDE_DIRS - where to find xmlrpc.h, etc. XMLRPC_LIBRARIES - List of libraries when using xmlrpc. XMLRPC_FOUND - True if xmlrpc found. XMLRPC modules may be specified as components for this find mod‐ ule. Modules may be listed by running "xmlrpc-c-config". Modules include: c++ C++ wrapper code libwww-client libwww-based client cgi-server CGI-based server abyss-server ABYSS-based server Typical usage: FIND_PACKAGE(XMLRPC REQUIRED libwww-client) FindZLIB Find zlib Find the native ZLIB includes and library. Once done this will define ZLIB_INCLUDE_DIRS - where to find zlib.h, etc. ZLIB_LIBRARIES - List of libraries when using zlib. ZLIB_FOUND - True if zlib found. ZLIB_VERSION_STRING - The version of zlib found (x.y.z) ZLIB_VERSION_MAJOR - The major version of zlib ZLIB_VERSION_MINOR - The minor version of zlib ZLIB_VERSION_PATCH - The patch version of zlib ZLIB_VERSION_TWEAK - The tweak version of zlib The following variable are provided for backward compatibility ZLIB_MAJOR_VERSION - The major version of zlib ZLIB_MINOR_VERSION - The minor version of zlib ZLIB_PATCH_VERSION - The patch version of zlib An includer may set ZLIB_ROOT to a zlib installation root to tell this module where to look. Findosg NOTE: It is highly recommended that you use the new FindOpenScene‐ Graph.cmake introduced in CMake 2.6.3 and not use this Find module directly. This is part of the Findosg* suite used to find OpenSceneGraph components. Each component is separate and you must opt in to each module. You must also opt into OpenGL and OpenThreads (and Pro‐ ducer if needed) as these modules won't do it for you. This is to allow you control over your own system piece by piece in case you need to opt out of certain components or change the Find behavior for a particular module (perhaps because the default Find‐ OpenGL.cmake module doesn't work with your system as an example). If you want to use a more convenient module that includes every‐ thing, use the FindOpenSceneGraph.cmake instead of the Find‐ osg*.cmake modules. Locate osg This module defines OSG_FOUND - Was the Osg found? OSG_INCLUDE_DIR - Where to find the headers OSG_LIBRARIES - The libraries to link against for the OSG (use this) OSG_LIBRARY - The OSG library OSG_LIBRARY_DEBUG - The OSG debug library $OSGDIR is an environment variable that would correspond to the ./configure --prefix=$OSGDIR used in building osg. Created by Eric Wing. FindosgAnimation This is part of the Findosg* suite used to find OpenSceneGraph components. Each component is separate and you must opt in to each module. You must also opt into OpenGL and OpenThreads (and Pro‐ ducer if needed) as these modules won't do it for you. This is to allow you control over your own system piece by piece in case you need to opt out of certain components or change the Find behavior for a particular module (perhaps because the default Find‐ OpenGL.cmake module doesn't work with your system as an example). If you want to use a more convenient module that includes every‐ thing, use the FindOpenSceneGraph.cmake instead of the Find‐ osg*.cmake modules. Locate osgAnimation This module defines OSGANIMATION_FOUND - Was osgAnimation found? OSGANIMA‐ TION_INCLUDE_DIR - Where to find the headers OSGANIMA‐ TION_LIBRARIES - The libraries to link against for the OSG (use this) OSGANIMATION_LIBRARY - The OSG library OSGANIMATION_LIBRARY_DEBUG - The OSG debug library $OSGDIR is an environment variable that would correspond to the ./configure --prefix=$OSGDIR used in building osg. Created by Eric Wing. FindosgDB This is part of the Findosg* suite used to find OpenSceneGraph components. Each component is separate and you must opt in to each module. You must also opt into OpenGL and OpenThreads (and Pro‐ ducer if needed) as these modules won't do it for you. This is to allow you control over your own system piece by piece in case you need to opt out of certain components or change the Find behavior for a particular module (perhaps because the default Find‐ OpenGL.cmake module doesn't work with your system as an example). If you want to use a more convenient module that includes every‐ thing, use the FindOpenSceneGraph.cmake instead of the Find‐ osg*.cmake modules. Locate osgDB This module defines OSGDB_FOUND - Was osgDB found? OSGDB_INCLUDE_DIR - Where to find the headers OSGDB_LIBRARIES - The libraries to link against for the osgDB (use this) OSGDB_LIBRARY - The osgDB library OSGDB_LIBRARY_DEBUG - The osgDB debug library $OSGDIR is an environment variable that would correspond to the ./configure --prefix=$OSGDIR used in building osg. Created by Eric Wing. FindosgFX This is part of the Findosg* suite used to find OpenSceneGraph components. Each component is separate and you must opt in to each module. You must also opt into OpenGL and OpenThreads (and Pro‐ ducer if needed) as these modules won't do it for you. This is to allow you control over your own system piece by piece in case you need to opt out of certain components or change the Find behavior for a particular module (perhaps because the default Find‐ OpenGL.cmake module doesn't work with your system as an example). If you want to use a more convenient module that includes every‐ thing, use the FindOpenSceneGraph.cmake instead of the Find‐ osg*.cmake modules. Locate osgFX This module defines OSGFX_FOUND - Was osgFX found? OSGFX_INCLUDE_DIR - Where to find the headers OSGFX_LIBRARIES - The libraries to link against for the osgFX (use this) OSGFX_LIBRARY - The osgFX library OSGFX_LIBRARY_DEBUG - The osgFX debug library $OSGDIR is an environment variable that would correspond to the ./configure --prefix=$OSGDIR used in building osg. Created by Eric Wing. FindosgGA This is part of the Findosg* suite used to find OpenSceneGraph components. Each component is separate and you must opt in to each module. You must also opt into OpenGL and OpenThreads (and Pro‐ ducer if needed) as these modules won't do it for you. This is to allow you control over your own system piece by piece in case you need to opt out of certain components or change the Find behavior for a particular module (perhaps because the default Find‐ OpenGL.cmake module doesn't work with your system as an example). If you want to use a more convenient module that includes every‐ thing, use the FindOpenSceneGraph.cmake instead of the Find‐ osg*.cmake modules. Locate osgGA This module defines OSGGA_FOUND - Was osgGA found? OSGGA_INCLUDE_DIR - Where to find the headers OSGGA_LIBRARIES - The libraries to link against for the osgGA (use this) OSGGA_LIBRARY - The osgGA library OSGGA_LIBRARY_DEBUG - The osgGA debug library $OSGDIR is an environment variable that would correspond to the ./configure --prefix=$OSGDIR used in building osg. Created by Eric Wing. FindosgIntrospection This is part of the Findosg* suite used to find OpenSceneGraph components. Each component is separate and you must opt in to each module. You must also opt into OpenGL and OpenThreads (and Pro‐ ducer if needed) as these modules won't do it for you. This is to allow you control over your own system piece by piece in case you need to opt out of certain components or change the Find behavior for a particular module (perhaps because the default Find‐ OpenGL.cmake module doesn't work with your system as an example). If you want to use a more convenient module that includes every‐ thing, use the FindOpenSceneGraph.cmake instead of the Find‐ osg*.cmake modules. Locate osgINTROSPECTION This module defines OSGINTROSPECTION_FOUND - Was osgIntrospection found? OSGINTROSPEC‐ TION_INCLUDE_DIR - Where to find the headers OSGINTROSPEC‐ TION_LIBRARIES - The libraries to link for osgIntrospection (use this) OSGINTROSPECTION_LIBRARY - The osgIntrospection library OSGINTRO‐ SPECTION_LIBRARY_DEBUG - The osgIntrospection debug library $OSGDIR is an environment variable that would correspond to the ./configure --prefix=$OSGDIR used in building osg. Created by Eric Wing. FindosgManipulator This is part of the Findosg* suite used to find OpenSceneGraph components. Each component is separate and you must opt in to each module. You must also opt into OpenGL and OpenThreads (and Pro‐ ducer if needed) as these modules won't do it for you. This is to allow you control over your own system piece by piece in case you need to opt out of certain components or change the Find behavior for a particular module (perhaps because the default Find‐ OpenGL.cmake module doesn't work with your system as an example). If you want to use a more convenient module that includes every‐ thing, use the FindOpenSceneGraph.cmake instead of the Find‐ osg*.cmake modules. Locate osgManipulator This module defines OSGMANIPULATOR_FOUND - Was osgManipulator found? OSGMANIPULA‐ TOR_INCLUDE_DIR - Where to find the headers OSGMANIPULA‐ TOR_LIBRARIES - The libraries to link for osgManipulator (use this) OSGMANIPULATOR_LIBRARY - The osgManipulator library OSGMANIPULA‐ TOR_LIBRARY_DEBUG - The osgManipulator debug library $OSGDIR is an environment variable that would correspond to the ./configure --prefix=$OSGDIR used in building osg. Created by Eric Wing. FindosgParticle This is part of the Findosg* suite used to find OpenSceneGraph components. Each component is separate and you must opt in to each module. You must also opt into OpenGL and OpenThreads (and Pro‐ ducer if needed) as these modules won't do it for you. This is to allow you control over your own system piece by piece in case you need to opt out of certain components or change the Find behavior for a particular module (perhaps because the default Find‐ OpenGL.cmake module doesn't work with your system as an example). If you want to use a more convenient module that includes every‐ thing, use the FindOpenSceneGraph.cmake instead of the Find‐ osg*.cmake modules. Locate osgParticle This module defines OSGPARTICLE_FOUND - Was osgParticle found? OSGPARTICLE_INCLUDE_DIR - Where to find the headers OSGPARTICLE_LIBRARIES - The libraries to link for osgParticle (use this) OSGPARTICLE_LIBRARY - The osgParticle library OSGPARTI‐ CLE_LIBRARY_DEBUG - The osgParticle debug library $OSGDIR is an environment variable that would correspond to the ./configure --prefix=$OSGDIR used in building osg. Created by Eric Wing. FindosgPresentation This is part of the Findosg* suite used to find OpenSceneGraph components. Each component is separate and you must opt in to each module. You must also opt into OpenGL and OpenThreads (and Pro‐ ducer if needed) as these modules won't do it for you. This is to allow you control over your own system piece by piece in case you need to opt out of certain components or change the Find behavior for a particular module (perhaps because the default Find‐ OpenGL.cmake module doesn't work with your system as an example). If you want to use a more convenient module that includes every‐ thing, use the FindOpenSceneGraph.cmake instead of the Find‐ osg*.cmake modules. Locate osgPresentation This module defines OSGPRESENTATION_FOUND - Was osgPresentation found? OSGPRESENTA‐ TION_INCLUDE_DIR - Where to find the headers OSGPRESENTA‐ TION_LIBRARIES - The libraries to link for osgPresentation (use this) OSGPRESENTATION_LIBRARY - The osgPresentation library OSGPRESENTA‐ TION_LIBRARY_DEBUG - The osgPresentation debug library $OSGDIR is an environment variable that would correspond to the ./configure --prefix=$OSGDIR used in building osg. Created by Eric Wing. Modified to work with osgPresentation by Robert Osfield, January 2012. FindosgProducer This is part of the Findosg* suite used to find OpenSceneGraph components. Each component is separate and you must opt in to each module. You must also opt into OpenGL and OpenThreads (and Pro‐ ducer if needed) as these modules won't do it for you. This is to allow you control over your own system piece by piece in case you need to opt out of certain components or change the Find behavior for a particular module (perhaps because the default Find‐ OpenGL.cmake module doesn't work with your system as an example). If you want to use a more convenient module that includes every‐ thing, use the FindOpenSceneGraph.cmake instead of the Find‐ osg*.cmake modules. Locate osgProducer This module defines OSGPRODUCER_FOUND - Was osgProducer found? OSGPRODUCER_INCLUDE_DIR - Where to find the headers OSGPRODUCER_LIBRARIES - The libraries to link for osgProducer (use this) OSGPRODUCER_LIBRARY - The osgProducer library OSGPRO‐ DUCER_LIBRARY_DEBUG - The osgProducer debug library $OSGDIR is an environment variable that would correspond to the ./configure --prefix=$OSGDIR used in building osg. Created by Eric Wing. FindosgQt This is part of the Findosg* suite used to find OpenSceneGraph components. Each component is separate and you must opt in to each module. You must also opt into OpenGL and OpenThreads (and Pro‐ ducer if needed) as these modules won't do it for you. This is to allow you control over your own system piece by piece in case you need to opt out of certain components or change the Find behavior for a particular module (perhaps because the default Find‐ OpenGL.cmake module doesn't work with your system as an example). If you want to use a more convenient module that includes every‐ thing, use the FindOpenSceneGraph.cmake instead of the Find‐ osg*.cmake modules. Locate osgQt This module defines OSGQT_FOUND - Was osgQt found? OSGQT_INCLUDE_DIR - Where to find the headers OSGQT_LIBRARIES - The libraries to link for osgQt (use this) OSGQT_LIBRARY - The osgQt library OSGQT_LIBRARY_DEBUG - The osgQt debug library $OSGDIR is an environment variable that would correspond to the ./configure --prefix=$OSGDIR used in building osg. Created by Eric Wing. Modified to work with osgQt by Robert Osfield, January 2012. FindosgShadow This is part of the Findosg* suite used to find OpenSceneGraph components. Each component is separate and you must opt in to each module. You must also opt into OpenGL and OpenThreads (and Pro‐ ducer if needed) as these modules won't do it for you. This is to allow you control over your own system piece by piece in case you need to opt out of certain components or change the Find behavior for a particular module (perhaps because the default Find‐ OpenGL.cmake module doesn't work with your system as an example). If you want to use a more convenient module that includes every‐ thing, use the FindOpenSceneGraph.cmake instead of the Find‐ osg*.cmake modules. Locate osgShadow This module defines OSGSHADOW_FOUND - Was osgShadow found? OSGSHADOW_INCLUDE_DIR - Where to find the headers OSGSHADOW_LIBRARIES - The libraries to link for osgShadow (use this) OSGSHADOW_LIBRARY - The osgShadow library OSGSHADOW_LIBRARY_DEBUG - The osgShadow debug library $OSGDIR is an environment variable that would correspond to the ./configure --prefix=$OSGDIR used in building osg. Created by Eric Wing. FindosgSim This is part of the Findosg* suite used to find OpenSceneGraph components. Each component is separate and you must opt in to each module. You must also opt into OpenGL and OpenThreads (and Pro‐ ducer if needed) as these modules won't do it for you. This is to allow you control over your own system piece by piece in case you need to opt out of certain components or change the Find behavior for a particular module (perhaps because the default Find‐ OpenGL.cmake module doesn't work with your system as an example). If you want to use a more convenient module that includes every‐ thing, use the FindOpenSceneGraph.cmake instead of the Find‐ osg*.cmake modules. Locate osgSim This module defines OSGSIM_FOUND - Was osgSim found? OSGSIM_INCLUDE_DIR - Where to find the headers OSGSIM_LIBRARIES - The libraries to link for osgSim (use this) OSGSIM_LIBRARY - The osgSim library OSGSIM_LIBRARY_DEBUG - The osgSim debug library $OSGDIR is an environment variable that would correspond to the ./configure --prefix=$OSGDIR used in building osg. Created by Eric Wing. FindosgTerrain This is part of the Findosg* suite used to find OpenSceneGraph components. Each component is separate and you must opt in to each module. You must also opt into OpenGL and OpenThreads (and Pro‐ ducer if needed) as these modules won't do it for you. This is to allow you control over your own system piece by piece in case you need to opt out of certain components or change the Find behavior for a particular module (perhaps because the default Find‐ OpenGL.cmake module doesn't work with your system as an example). If you want to use a more convenient module that includes every‐ thing, use the FindOpenSceneGraph.cmake instead of the Find‐ osg*.cmake modules. Locate osgTerrain This module defines OSGTERRAIN_FOUND - Was osgTerrain found? OSGTERRAIN_INCLUDE_DIR - Where to find the headers OSGTERRAIN_LIBRARIES - The libraries to link for osgTerrain (use this) OSGTERRAIN_LIBRARY - The osgTerrain library OSGTER‐ RAIN_LIBRARY_DEBUG - The osgTerrain debug library $OSGDIR is an environment variable that would correspond to the ./configure --prefix=$OSGDIR used in building osg. Created by Eric Wing. FindosgText This is part of the Findosg* suite used to find OpenSceneGraph components. Each component is separate and you must opt in to each module. You must also opt into OpenGL and OpenThreads (and Pro‐ ducer if needed) as these modules won't do it for you. This is to allow you control over your own system piece by piece in case you need to opt out of certain components or change the Find behavior for a particular module (perhaps because the default Find‐ OpenGL.cmake module doesn't work with your system as an example). If you want to use a more convenient module that includes every‐ thing, use the FindOpenSceneGraph.cmake instead of the Find‐ osg*.cmake modules. Locate osgText This module defines OSGTEXT_FOUND - Was osgText found? OSGTEXT_INCLUDE_DIR - Where to find the headers OSGTEXT_LIBRARIES - The libraries to link for osgText (use this) OSGTEXT_LIBRARY - The osgText library OSGTEXT_LIBRARY_DEBUG - The osgText debug library $OSGDIR is an environment variable that would correspond to the ./configure --prefix=$OSGDIR used in building osg. Created by Eric Wing. FindosgUtil This is part of the Findosg* suite used to find OpenSceneGraph components. Each component is separate and you must opt in to each module. You must also opt into OpenGL and OpenThreads (and Pro‐ ducer if needed) as these modules won't do it for you. This is to allow you control over your own system piece by piece in case you need to opt out of certain components or change the Find behavior for a particular module (perhaps because the default Find‐ OpenGL.cmake module doesn't work with your system as an example). If you want to use a more convenient module that includes every‐ thing, use the FindOpenSceneGraph.cmake instead of the Find‐ osg*.cmake modules. Locate osgUtil This module defines OSGUTIL_FOUND - Was osgUtil found? OSGUTIL_INCLUDE_DIR - Where to find the headers OSGUTIL_LIBRARIES - The libraries to link for osgUtil (use this) OSGUTIL_LIBRARY - The osgUtil library OSGUTIL_LIBRARY_DEBUG - The osgUtil debug library $OSGDIR is an environment variable that would correspond to the ./configure --prefix=$OSGDIR used in building osg. Created by Eric Wing. FindosgViewer This is part of the Findosg* suite used to find OpenSceneGraph components. Each component is separate and you must opt in to each module. You must also opt into OpenGL and OpenThreads (and Pro‐ ducer if needed) as these modules won't do it for you. This is to allow you control over your own system piece by piece in case you need to opt out of certain components or change the Find behavior for a particular module (perhaps because the default Find‐ OpenGL.cmake module doesn't work with your system as an example). If you want to use a more convenient module that includes every‐ thing, use the FindOpenSceneGraph.cmake instead of the Find‐ osg*.cmake modules. Locate osgViewer This module defines OSGVIEWER_FOUND - Was osgViewer found? OSGVIEWER_INCLUDE_DIR - Where to find the headers OSGVIEWER_LIBRARIES - The libraries to link for osgViewer (use this) OSGVIEWER_LIBRARY - The osgViewer library OSGVIEWER_LIBRARY_DEBUG - The osgViewer debug library $OSGDIR is an environment variable that would correspond to the ./configure --prefix=$OSGDIR used in building osg. Created by Eric Wing. FindosgVolume This is part of the Findosg* suite used to find OpenSceneGraph components. Each component is separate and you must opt in to each module. You must also opt into OpenGL and OpenThreads (and Pro‐ ducer if needed) as these modules won't do it for you. This is to allow you control over your own system piece by piece in case you need to opt out of certain components or change the Find behavior for a particular module (perhaps because the default Find‐ OpenGL.cmake module doesn't work with your system as an example). If you want to use a more convenient module that includes every‐ thing, use the FindOpenSceneGraph.cmake instead of the Find‐ osg*.cmake modules. Locate osgVolume This module defines OSGVOLUME_FOUND - Was osgVolume found? OSGVOLUME_INCLUDE_DIR - Where to find the headers OSGVOLUME_LIBRARIES - The libraries to link for osgVolume (use this) OSGVOLUME_LIBRARY - The osgVolume library OSGVOLUME_LIBRARY_DEBUG - The osgVolume debug library $OSGDIR is an environment variable that would correspond to the ./configure --prefix=$OSGDIR used in building osg. Created by Eric Wing. FindosgWidget This is part of the Findosg* suite used to find OpenSceneGraph components. Each component is separate and you must opt in to each module. You must also opt into OpenGL and OpenThreads (and Pro‐ ducer if needed) as these modules won't do it for you. This is to allow you control over your own system piece by piece in case you need to opt out of certain components or change the Find behavior for a particular module (perhaps because the default Find‐ OpenGL.cmake module doesn't work with your system as an example). If you want to use a more convenient module that includes every‐ thing, use the FindOpenSceneGraph.cmake instead of the Find‐ osg*.cmake modules. Locate osgWidget This module defines OSGWIDGET_FOUND - Was osgWidget found? OSGWIDGET_INCLUDE_DIR - Where to find the headers OSGWIDGET_LIBRARIES - The libraries to link for osgWidget (use this) OSGWIDGET_LIBRARY - The osgWidget library OSGWIDGET_LIBRARY_DEBUG - The osgWidget debug library $OSGDIR is an environment variable that would correspond to the ./configure --prefix=$OSGDIR used in building osg. FindosgWidget.cmake tweaked from Findosg* suite as created by Eric Wing. Findosg_functions This CMake file contains two macros to assist with searching for OSG libraries and nodekits. FindwxWidgets Find a wxWidgets (a.k.a., wxWindows) installation. This module finds if wxWidgets is installed and selects a default configuration to use. wxWidgets is a modular library. To specify the modules that you will use, you need to name them as components to the package: FIND_PACKAGE(wxWidgets COMPONENTS core base ...) There are two search branches: a windows style and a unix style. For windows, the following variables are searched for and set to defaults in case of multiple choices. Change them if the defaults are not desired (i.e., these are the only variables you should change to select a configuration): wxWidgets_ROOT_DIR - Base wxWidgets directory (e.g., C:/wxWidgets-2.6.3). wxWidgets_LIB_DIR - Path to wxWidgets libraries (e.g., C:/wxWidgets-2.6.3/lib/vc_lib). wxWidgets_CONFIGURATION - Configuration to use (e.g., msw, mswd, mswu, mswunivud, etc.) wxWidgets_EXCLUDE_COMMON_LIBRARIES - Set to TRUE to exclude linking of commonly required libs (e.g., png tiff jpeg zlib regex expat). For unix style it uses the wx-config utility. You can select between debug/release, unicode/ansi, universal/non-universal, and static/shared in the QtDialog or ccmake interfaces by turning ON/OFF the following variables: wxWidgets_USE_DEBUG wxWidgets_USE_UNICODE wxWidgets_USE_UNIVERSAL wxWidgets_USE_STATIC There is also a wxWidgets_CONFIG_OPTIONS variable for all other options that need to be passed to the wx-config utility. For exam‐ ple, to use the base toolkit found in the /usr/local path, set the variable (before calling the FIND_PACKAGE command) as such: SET(wxWidgets_CONFIG_OPTIONS --toolkit=base --prefix=/usr) The following are set after the configuration is done for both windows and unix style: wxWidgets_FOUND - Set to TRUE if wxWidgets was found. wxWidgets_INCLUDE_DIRS - Include directories for WIN32 i.e., where to find "wx/wx.h" and "wx/setup.h"; possibly empty for unices. wxWidgets_LIBRARIES - Path to the wxWidgets libraries. wxWidgets_LIBRARY_DIRS - compile time link dirs, useful for rpath on UNIX. Typically an empty string in WIN32 environment. wxWidgets_DEFINITIONS - Contains defines required to compile/link against WX, e.g. WXUSINGDLL wxWidgets_DEFINITIONS_DEBUG- Contains defines required to compile/link against WX debug builds, e.g. __WXDEBUG__ wxWidgets_CXX_FLAGS - Include dirs and compiler flags for unices, empty on WIN32. Essentially "`wx-config --cxxflags`". wxWidgets_USE_FILE - Convenience include file. Sample usage: # Note that for MinGW users the order of libs is important! FIND_PACKAGE(wxWidgets COMPONENTS net gl core base) IF(wxWidgets_FOUND) INCLUDE(${wxWidgets_USE_FILE}) # and for each of your dependent executable/library targets: TARGET_LINK_LIBRARIES(<YourTarget> ${wxWidgets_LIBRARIES}) ENDIF(wxWidgets_FOUND) If wxWidgets is required (i.e., not an optional part): FIND_PACKAGE(wxWidgets REQUIRED net gl core base) INCLUDE(${wxWidgets_USE_FILE}) # and for each of your dependent executable/library targets: TARGET_LINK_LIBRARIES(<YourTarget> ${wxWidgets_LIBRARIES}) FindwxWindows Find wxWindows (wxWidgets) installation This module finds if wxWindows/wxWidgets is installed and deter‐ mines where the include files and libraries are. It also deter‐ mines what the name of the library is. Please note this file is DEPRECATED and replaced by FindwxWidgets.cmake. This code sets the following variables: WXWINDOWS_FOUND = system has WxWindows WXWINDOWS_LIBRARIES = path to the wxWindows libraries on Unix/Linux with additional linker flags from "wx-config --libs" CMAKE_WXWINDOWS_CXX_FLAGS = Compiler flags for wxWindows, essentially "`wx-config --cxxflags`" on Linux WXWINDOWS_INCLUDE_DIR = where to find "wx/wx.h" and "wx/setup.h" WXWINDOWS_LINK_DIRECTORIES = link directories, useful for rpath on Unix WXWINDOWS_DEFINITIONS = extra defines OPTIONS If you need OpenGL support please SET(WXWINDOWS_USE_GL 1) in your CMakeLists.txt *before* you include this file. HAVE_ISYSTEM - true required to replace -I by -isystem on g++ For convenience include Use_wxWindows.cmake in your project's CMakeLists.txt using INCLUDE(Use_wxWindows). USAGE SET(WXWINDOWS_USE_GL 1) FIND_PACKAGE(wxWindows) NOTES wxWidgets 2.6.x is supported for monolithic builds e.g. com‐ piled in wx/build/msw dir as: nmake -f makefile.vc BUILD=debug SHARED=0 USE_OPENGL=1 MONOLITHIC=1 DEPRECATED CMAKE_WX_CAN_COMPILE WXWINDOWS_LIBRARY CMAKE_WX_CXX_FLAGS WXWINDOWS_INCLUDE_PATH AUTHOR Jan Woetzel <http://www.mip.informatik.uni-kiel.de/~jw> (07/2003-01/2006) FortranCInterface Fortran/C Interface Detection This module automatically detects the API by which C and Fortran languages interact. Variables indicate if the mangling is found: FortranCInterface_GLOBAL_FOUND = Global subroutines and functions FortranCInterface_MODULE_FOUND = Module subroutines and functions (declared by "MODULE PROCEDURE") A function is provided to generate a C header file containing macros to mangle symbol names: FortranCInterface_HEADER(<file> [MACRO_NAMESPACE <macro-ns>] [SYMBOL_NAMESPACE <ns>] [SYMBOLS [<module>:]<function> ...]) It generates in <file> definitions of the following macros: #define FortranCInterface_GLOBAL (name,NAME) ... #define FortranCInterface_GLOBAL_(name,NAME) ... #define FortranCInterface_MODULE (mod,name, MOD,NAME) ... #define FortranCInterface_MODULE_(mod,name, MOD,NAME) ... These macros mangle four categories of Fortran symbols, respec‐ tively: - Global symbols without '_': call mysub() - Global symbols with '_' : call my_sub() - Module symbols without '_': use mymod; call mysub() - Module symbols with '_' : use mymod; call my_sub() If mangling for a category is not known, its macro is left unde‐ fined. All macros require raw names in both lower case and upper case. The MACRO_NAMESPACE option replaces the default "FortranCIn‐ terface_" prefix with a given namespace "<macro-ns>". The SYMBOLS option lists symbols to mangle automatically with C preprocessor definitions: <function> ==> #define <ns><function> ... <module>:<function> ==> #define <ns><module>_<function> ... If the mangling for some symbol is not known then no preprocessor definition is created, and a warning is displayed. The SYM‐ BOL_NAMESPACE option prefixes all preprocessor definitions gener‐ ated by the SYMBOLS option with a given namespace "<ns>". Example usage: include(FortranCInterface) FortranCInterface_HEADER(FC.h MACRO_NAMESPACE "FC_") This creates a "FC.h" header that defines mangling macros FC_GLOBAL(), FC_GLOBAL_(), FC_MODULE(), and FC_MODULE_(). Example usage: include(FortranCInterface) FortranCInterface_HEADER(FCMangle.h MACRO_NAMESPACE "FC_" SYMBOL_NAMESPACE "FC_" SYMBOLS mysub mymod:my_sub) This creates a "FCMangle.h" header that defines the same FC_*() mangling macros as the previous example plus preprocessor symbols FC_mysub and FC_mymod_my_sub. Another function is provided to verify that the Fortran and C/C++ compilers work together: FortranCInterface_VERIFY([CXX] [QUIET]) It tests whether a simple test executable using Fortran and C (and C++ when the CXX option is given) compiles and links successfully. The result is stored in the cache entry FortranCInterface_VERI‐ FIED_C (or FortranCInterface_VERIFIED_CXX if CXX is given) as a boolean. If the check fails and QUIET is not given the function terminates with a FATAL_ERROR message describing the problem. The purpose of this check is to stop a build early for incompatible compiler combinations. FortranCInterface is aware of possible GLOBAL and MODULE manglings for many Fortran compilers, but it also provides an interface to specify new possible manglings. Set the variables FortranCInterface_GLOBAL_SYMBOLS FortranCInterface_MODULE_SYMBOLS before including FortranCInterface to specify manglings of the symbols "MySub", "My_Sub", "MyModule:MySub", and "My_Mod‐ ule:My_Sub". For example, the code: set(FortranCInterface_GLOBAL_SYMBOLS mysub_ my_sub__ MYSUB_) # ^^^^^ ^^^^^^ ^^^^^ set(FortranCInterface_MODULE_SYMBOLS __mymodule_MOD_mysub __my_module_MOD_my_sub) # ^^^^^^^^ ^^^^^ ^^^^^^^^^ ^^^^^^ include(FortranCInterface) tells FortranCInterface to try given GLOBAL and MODULE manglings. (The carets point at raw symbol names for clarity in this example but are not needed.) GNUInstallDirs Define GNU standard installation directories Provides install directory variables as defined for GNU software: http://www.gnu.org/prep/standards/html_node/Directory-Variables.html Inclusion of this module defines the following variables: CMAKE_INSTALL_<dir> - destination for files of a given type CMAKE_INSTALL_FULL_<dir> - corresponding absolute path where <dir> is one of: BINDIR - user executables (bin) SBINDIR - system admin executables (sbin) LIBEXECDIR - program executables (libexec) SYSCONFDIR - read-only single-machine data (etc) SHAREDSTATEDIR - modifiable architecture-independent data (com) LOCALSTATEDIR - modifiable single-machine data (var) LIBDIR - object code libraries (lib or lib64 or lib/<multiarch-tuple> on Debian) INCLUDEDIR - C header files (include) OLDINCLUDEDIR - C header files for non-gcc (/usr/include) DATAROOTDIR - read-only architecture-independent data root (share) DATADIR - read-only architecture-independent data (DATAROOTDIR) INFODIR - info documentation (DATAROOTDIR/info) LOCALEDIR - locale-dependent data (DATAROOTDIR/locale) MANDIR - man documentation (DATAROOTDIR/man) DOCDIR - documentation root (DATAROOTDIR/doc/PROJECT_NAME) Each CMAKE_INSTALL_<dir> value may be passed to the DESTINATION options of install() commands for the corresponding file type. If the includer does not define a value the above-shown default will be used and the value will appear in the cache for editing by the user. Each CMAKE_INSTALL_FULL_<dir> value contains an absolute path constructed from the corresponding destination by prepending (if necessary) the value of CMAKE_INSTALL_PREFIX. GenerateExportHeader Function for generation of export macros for libraries This module provides the function GENERATE_EXPORT_HEADER() and the accompanying ADD_COMPILER_EXPORT_FLAGS() function. The GENERATE_EXPORT_HEADER function can be used to generate a file suitable for preprocessor inclusion which contains EXPORT macros to be used in library classes. GENERATE_EXPORT_HEADER( LIBRARY_TARGET [BASE_NAME <base_name>] [EXPORT_MACRO_NAME <export_macro_name>] [EXPORT_FILE_NAME <export_file_name>] [DEPRECATED_MACRO_NAME <deprecated_macro_name>] [NO_EXPORT_MACRO_NAME <no_export_macro_name>] [STATIC_DEFINE <static_define>] [NO_DEPRECATED_MACRO_NAME <no_deprecated_macro_name>] [DEFINE_NO_DEPRECATED] [PREFIX_NAME <prefix_name>] ) ADD_COMPILER_EXPORT_FLAGS( [<output_variable>] ) By default GENERATE_EXPORT_HEADER() generates macro names in a file name determined by the name of the library. The ADD_COM‐ PILER_EXPORT_FLAGS function adds -fvisibility=hidden to CMAKE_CXX_FLAGS if supported, and is a no-op on Windows which does not need extra compiler flags for exporting support. You may optionally pass a single argument to ADD_COMPILER_EXPORT_FLAGS that will be populated with the required CXX_FLAGS required to enable visibility support for the compiler/architecture in use. This means that in the simplest case, users of these functions will be equivalent to: add_compiler_export_flags() add_library(somelib someclass.cpp) generate_export_header(somelib) install(TARGETS somelib DESTINATION ${LIBRARY_INSTALL_DIR}) install(FILES someclass.h ${PROJECT_BINARY_DIR}/somelib_export.h DESTINATION ${INCLUDE_INSTALL_DIR} ) And in the ABI header files: #include "somelib_export.h" class SOMELIB_EXPORT SomeClass { ... }; The CMake fragment will generate a file in the ${CMAKE_CUR‐ RENT_BUILD_DIR} called somelib_export.h containing the macros SOMELIB_EXPORT, SOMELIB_NO_EXPORT, SOMELIB_DEPRECATED, SOMELIB_DEPRECATED_EXPORT and SOMELIB_DEPRECATED_NO_EXPORT. The resulting file should be installed with other headers in the library. The BASE_NAME argument can be used to override the file name and the names used for the macros add_library(somelib someclass.cpp) generate_export_header(somelib BASE_NAME other_name ) Generates a file called other_name_export.h containing the macros OTHER_NAME_EXPORT, OTHER_NAME_NO_EXPORT and OTHER_NAME_DEPRECATED etc. The BASE_NAME may be overridden by specifiying other options in the function. For example: add_library(somelib someclass.cpp) generate_export_header(somelib EXPORT_MACRO_NAME OTHER_NAME_EXPORT ) creates the macro OTHER_NAME_EXPORT instead of SOMELIB_EXPORT, but other macros and the generated file name is as default. add_library(somelib someclass.cpp) generate_export_header(somelib DEPRECATED_MACRO_NAME KDE_DEPRECATED ) creates the macro KDE_DEPRECATED instead of SOMELIB_DEPRECATED. If LIBRARY_TARGET is a static library, macros are defined without values. If the same sources are used to create both a shared and a static library, the uppercased symbol ${BASE_NAME}_STATIC_DEFINE should be used when building the static library add_library(shared_variant SHARED ${lib_SRCS}) add_library(static_variant ${lib_SRCS}) generate_export_header(shared_variant BASE_NAME libshared_and_static) set_target_properties(static_variant PROPERTIES COMPILE_FLAGS -DLIBSHARED_AND_STATIC_STATIC_DEFINE) This will cause the export macros to expand to nothing when build‐ ing the static library. If DEFINE_NO_DEPRECATED is specified, then a macro ${BASE_NAME}_NO_DEPRECATED will be defined This macro can be used to remove deprecated code from preprocessor output. option(EXCLUDE_DEPRECATED "Exclude deprecated parts of the library" FALSE) if (EXCLUDE_DEPRECATED) set(NO_BUILD_DEPRECATED DEFINE_NO_DEPRECATED) endif() generate_export_header(somelib ${NO_BUILD_DEPRECATED}) And then in somelib: class SOMELIB_EXPORT SomeClass { public: #ifndef SOMELIB_NO_DEPRECATED SOMELIB_DEPRECATED void oldMethod(); #endif }; #ifndef SOMELIB_NO_DEPRECATED void SomeClass::oldMethod() { } #endif If PREFIX_NAME is specified, the argument will be used as a prefix to all generated macros. For example: generate_export_header(somelib PREFIX_NAME VTK_) Generates the macros VTK_SOMELIB_EXPORT etc. GetPrerequisites Functions to analyze and list executable file prerequisites. This module provides functions to list the .dll, .dylib or .so files that an executable or shared library file depends on. (Its prerequisites.) It uses various tools to obtain the list of required shared library files: dumpbin (Windows) ldd (Linux/Unix) otool (Mac OSX) The following functions are provided by this module: get_prerequisites list_prerequisites list_prerequisites_by_glob gp_append_unique is_file_executable gp_item_default_embedded_path (projects can override with gp_item_default_embedded_path_override) gp_resolve_item (projects can override with gp_resolve_item_override) gp_resolved_file_type (projects can override with gp_resolved_file_type_override) gp_file_type Requires CMake 2.6 or greater because it uses function, break, return and PARENT_SCOPE. GET_PREREQUISITES(<target> <prerequisites_var> <exclude_system> <recurse> <exepath> <dirs>) Get the list of shared library files required by <target>. The list in the variable named <prerequisites_var> should be empty on first entry to this function. On exit, <prerequisites_var> will contain the list of required shared library files. <target> is the full path to an executable file. <prerequi‐ sites_var> is the name of a CMake variable to contain the results. <exclude_system> must be 0 or 1 indicating whether to include or exclude "system" prerequisites. If <recurse> is set to 1 all pre‐ requisites will be found recursively, if set to 0 only direct pre‐ requisites are listed. <exepath> is the path to the top level exe‐ cutable used for @executable_path replacment on the Mac. <dirs> is a list of paths where libraries might be found: these paths are searched first when a target without any path info is given. Then standard system locations are also searched: PATH, Framework loca‐ tions, /usr/lib... LIST_PREREQUISITES(<target> [<recurse> [<exclude_system> [<verbose>]]]) Print a message listing the prerequisites of <target>. <target> is the name of a shared library or executable target or the full path to a shared library or executable file. If <recurse> is set to 1 all prerequisites will be found recursively, if set to 0 only direct prerequisites are listed. <exclude_system> must be 0 or 1 indicating whether to include or exclude "system" prerequi‐ sites. With <verbose> set to 0 only the full path names of the prerequisites are printed, set to 1 extra informatin will be dis‐ played. LIST_PREREQUISITES_BY_GLOB(<glob_arg> <glob_exp>) Print the prerequisites of shared library and executable files matching a globbing pattern. <glob_arg> is GLOB or GLOB_RECURSE and <glob_exp> is a globbing expression used with "file(GLOB" or "file(GLOB_RECURSE" to retrieve a list of matching files. If a matching file is executable, its prerequisites are listed. Any additional (optional) arguments provided are passed along as the optional arguments to the list_prerequisites calls. GP_APPEND_UNIQUE(<list_var> <value>) Append <value> to the list variable <list_var> only if the value is not already in the list. IS_FILE_EXECUTABLE(<file> <result_var>) Return 1 in <result_var> if <file> is a binary executable, 0 oth‐ erwise. GP_ITEM_DEFAULT_EMBEDDED_PATH(<item> <default_embedded_path_var>) Return the path that others should refer to the item by when the item is embedded inside a bundle. Override on a per-project basis by providing a project-specific gp_item_default_embedded_path_override function. GP_RESOLVE_ITEM(<context> <item> <exepath> <dirs> <resolved_item_var>) Resolve an item into an existing full path file. Override on a per-project basis by providing a project-specific gp_resolve_item_override function. GP_RESOLVED_FILE_TYPE(<original_file> <file> <exepath> <dirs> <type_var>) Return the type of <file> with respect to <original_file>. String describing type of prerequisite is returned in variable named <type_var>. Use <exepath> and <dirs> if necessary to resolve non-absolute <file> values -- but only for non-embedded items. Possible types are: system local embedded other Override on a per-project basis by providing a project-specific gp_resolved_file_type_override function. GP_FILE_TYPE(<original_file> <file> <type_var>) Return the type of <file> with respect to <original_file>. String describing type of prerequisite is returned in variable named <type_var>. Possible types are: system local embedded other InstallRequiredSystemLibraries By including this file, all library files listed in the variable CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS will be installed with INSTALL(PROGRAMS ...) into bin for WIN32 and lib for non-WIN32. If CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP is set to TRUE before including this file, then the INSTALL command is not called. The user can use the variable CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS to use a custom install command and install them however they want. If it is the MSVC compiler, then the microsoft run time libraries will be found and automatically added to the CMAKE_INSTALL_SYSTEM_RUN‐ TIME_LIBS, and installed. If CMAKE_INSTALL_DEBUG_LIBRARIES is set and it is the MSVC compiler, then the debug libraries are installed when available. If CMAKE_INSTALL_DEBUG_LIBRARIES_ONLY is set then only the debug libraries are installed when both debug and release are available. If CMAKE_INSTALL_MFC_LIBRARIES is set then the MFC run time libraries are installed as well as the CRT run time libraries. If CMAKE_INSTALL_SYSTEM_RUNTIME_DESTINATION is set then the libraries are installed to that directory rather than the default. If CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_NO_WARNINGS is NOT set, then this file warns about required files that do not exist. You can set this variable to ON before including this file to avoid the warning. For example, the Visual Studio Express edi‐ tions do not include the redistributable files, so if you include this file on a machine with only VS Express installed, you'll get the warning. MacroAddFileDependencies MACRO_ADD_FILE_DEPENDENCIES(<_file> depend_files...) Using the macro MACRO_ADD_FILE_DEPENDENCIES() is discouraged. There are usually better ways to specify the correct dependencies. MACRO_ADD_FILE_DEPENDENCIES(<_file> depend_files...) is just a convenience wrapper around the OBJECT_DEPENDS source file prop‐ erty. You can just use SET_PROPERTY(SOURCE <file> APPEND PROPERTY OBJECT_DEPENDS depend_files) instead. ProcessorCount ProcessorCount(var) Determine the number of processors/cores and save value in ${var} Sets the variable named ${var} to the number of physical cores available on the machine if the information can be determined. Otherwise it is set to 0. Currently this functionality is imple‐ mented for AIX, cygwin, FreeBSD, HPUX, IRIX, Linux, Mac OS X, QNX, Sun and Windows. This function is guaranteed to return a positive integer (>=1) if it succeeds. It returns 0 if there's a problem determining the processor count. Example use, in a ctest -S dashboard script: include(ProcessorCount) ProcessorCount(N) if(NOT N EQUAL 0) set(CTEST_BUILD_FLAGS -j${N}) set(ctest_test_args ${ctest_test_args} PARALLEL_LEVEL ${N}) endif() This function is intended to offer an approximation of the value of the number of compute cores available on the current machine, such that you may use that value for parallel building and paral‐ lel testing. It is meant to help utilize as much of the machine as seems reasonable. Of course, knowledge of what else might be run‐ ning on the machine simultaneously should be used when deciding whether to request a machine's full capacity all for yourself. Qt4ConfigDependentSettings This file is included by FindQt4.cmake, don't include it directly. Qt4Macros This file is included by FindQt4.cmake, don't include it directly. SelectLibraryConfigurations select_library_configurations( basename ) This macro takes a library base name as an argument, and will choose good values for basename_LIBRARY, basename_LIBRARIES, base‐ name_LIBRARY_DEBUG, and basename_LIBRARY_RELEASE depending on what has been found and set. If only basename_LIBRARY_RELEASE is defined, basename_LIBRARY, basename_LIBRARY_DEBUG, and base‐ name_LIBRARY_RELEASE will be set to the release value. If only basename_LIBRARY_DEBUG is defined, then basename_LIBRARY, base‐ name_LIBRARY_DEBUG and basename_LIBRARY_RELEASE will take the debug value. If the generator supports configuration types, then base‐ name_LIBRARY and basename_LIBRARIES will be set with debug and optimized flags specifying the library to be used for the given configuration. If no build type has been set or the generator in use does not support configuration types, then basename_LIBRARY and basename_LIBRARIES will take only the release values. SquishTestScript This script launches a GUI test using Squish. You should not call the script directly; instead, you should access it via the SQUISH_ADD_TEST macro that is defined in FindSquish.cmake. This script starts the Squish server, launches the test on the client, and finally stops the squish server. If any of these steps fail (including if the tests do not pass) then a fatal error is raised. TestBigEndian Define macro to determine endian type Check if the system is big endian or little endian TEST_BIG_ENDIAN(VARIABLE) VARIABLE - variable to store the result to TestCXXAcceptsFlag Test CXX compiler for a flag Check if the CXX compiler accepts a flag Macro CHECK_CXX_ACCEPTS_FLAG(FLAGS VARIABLE) - checks if the function exists FLAGS - the flags to try VARIABLE - variable to store the result TestForANSIForScope Check for ANSI for scope support Check if the compiler restricts the scope of variables declared in a for-init-statement to the loop body. CMAKE_NO_ANSI_FOR_SCOPE - holds result TestForANSIStreamHeaders Test for compiler support of ANSI stream headers iostream, etc. check if the compiler supports the standard ANSI iostream header (without the .h) CMAKE_NO_ANSI_STREAM_HEADERS - defined by the results TestForSSTREAM Test for compiler support of ANSI sstream header check if the compiler supports the standard ANSI sstream header CMAKE_NO_ANSI_STRING_STREAM - defined by the results TestForSTDNamespace Test for std:: namespace support check if the compiler supports std:: on stl classes CMAKE_NO_STD_NAMESPACE - defined by the results UseEcos This module defines variables and macros required to build eCos application. This file contains the following macros: ECOS_ADD_INCLUDE_DIRECTO‐ RIES() - add the eCos include dirs ECOS_ADD_EXECUTABLE(name source1 ... sourceN ) - create an eCos executable ECOS_ADJUST_DIRECTORY(VAR source1 ... sourceN ) - adjusts the path of the source files and puts the result into VAR Macros for selecting the toolchain: ECOS_USE_ARM_ELF_TOOLS() - enable the ARM ELF toolchain for the directory where it is called ECOS_USE_I386_ELF_TOOLS() - enable the i386 ELF toolchain for the directory where it is called ECOS_USE_PPC_EABI_TOOLS() - enable the PowerPC toolchain for the directory where it is called It contains the following variables: ECOS_DEFINITIONS ECOSCON‐ FIG_EXECUTABLE ECOS_CONFIG_FILE - defaults to ecos.ecc, if your eCos configuration file has a different name, adjust this variable for internal use only: ECOS_ADD_TARGET_LIB UseJava Use Module for Java This file provides functions for Java. It is assumed that Find‐ Java.cmake has already been loaded. See FindJava.cmake for infor‐ mation on how to load Java into your CMake project. add_jar(TARGET_NAME SRC1 SRC2 .. SRCN RCS1 RCS2 .. RCSN) This command creates a <TARGET_NAME>.jar. It compiles the given source files (SRC) and adds the given resource files (RCS) to the jar file. If only resource files are given then just a jar file is created. Additional instructions: To add compile flags to the target you can set these flags with the following variable: set(CMAKE_JAVA_COMPILE_FLAGS -nowarn) To add a path or a jar file to the class path you can do this with the CMAKE_JAVA_INCLUDE_PATH variable. set(CMAKE_JAVA_INCLUDE_PATH /usr/share/java/shibboleet.jar) To use a different output name for the target you can set it with: set(CMAKE_JAVA_TARGET_OUTPUT_NAME shibboleet.jar) add_jar(foobar foobar.java) To use a different output directory than CMAKE_CURRENT_BINARY_DIR you can set it with: set(CMAKE_JAVA_TARGET_OUTPUT_DIR ${PROJECT_BINARY_DIR}/bin) To define an entry point in your jar you can set it with: set(CMAKE_JAVA_JAR_ENTRY_POINT com/examples/MyProject/Main) To add a VERSION to the target output name you can set it using CMAKE_JAVA_TARGET_VERSION. This will create a jar file with the name shibboleet-1.0.0.jar and will create a symlink shibboleet.jar pointing to the jar with the version information. set(CMAKE_JAVA_TARGET_VERSION 1.2.0) add_jar(shibboleet shibbotleet.java) If the target is a JNI library, utilize the following commands to create a JNI symbolic link: set(CMAKE_JNI_TARGET TRUE) set(CMAKE_JAVA_TARGET_VERSION 1.2.0) add_jar(shibboleet shibbotleet.java) install_jar(shibboleet ${LIB_INSTALL_DIR}/shibboleet) install_jni_symlink(shibboleet ${JAVA_LIB_INSTALL_DIR}) If a single target needs to produce more than one jar from its java source code, to prevent the accumulation of duplicate class files in subsequent jars, set/reset CMAKE_JAR_CLASSES_PREFIX prior to calling the add_jar() function: set(CMAKE_JAR_CLASSES_PREFIX com/redhat/foo) add_jar(foo foo.java) set(CMAKE_JAR_CLASSES_PREFIX com/redhat/bar) add_jar(bar bar.java) Target Properties: The add_jar() functions sets some target properties. You can get these properties with the get_property(TARGET <target_name> PROPERTY <propery_name>) command. INSTALL_FILES The files which should be installed. This is used by install_jar(). JNI_SYMLINK The JNI symlink which should be installed. This is used by install_jni_symlink(). JAR_FILE The location of the jar file so that you can include it. CLASS_DIR The directory where the class files can be found. For example to use them with javah. find_jar(<VAR> name | NAMES name1 [name2 ...] [PATHS path1 [path2 ... ENV var]] [VERSIONS version1 [version2]] [DOC "cache documentation string"] ) This command is used to find a full path to the named jar. A cache entry named by <VAR> is created to stor the result of this com‐ mand. If the full path to a jar is found the result is stored in the variable and the search will not repeated unless the variable is cleared. If nothing is found, the result will be <VAR>-NOT‐ FOUND, and the search will be attempted again next time find_jar is invoked with the same variable. The name of the full path to a file that is searched for is specified by