.\" Man page generated from reStructuredText. . .TH "CMAKE-MODULES" "7" "November 04, 2016" "3.6.2" "CMake" .SH NAME cmake-modules \- CMake Modules Reference . .nr rst2man-indent-level 0 . .de1 rstReportMargin \\$1 \\n[an-margin] level \\n[rst2man-indent-level] level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] - \\n[rst2man-indent0] \\n[rst2man-indent1] \\n[rst2man-indent2] .. .de1 INDENT .\" .rstReportMargin pre: . RS \\$1 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] . nr rst2man-indent-level +1 .\" .rstReportMargin post: .. .de UNINDENT . RE .\" indent \\n[an-margin] .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] .nr rst2man-indent-level -1 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. .SH ALL MODULES .SS AddFileDependencies .sp ADD_FILE_DEPENDENCIES(source_file depend_files...) .sp Adds the given files as dependencies to source_file .SS BundleUtilities .sp Functions to help assemble a standalone bundle application. .sp A collection of CMake utility functions useful for dealing with .app bundles on the Mac and bundle\-like directories on any OS. .sp The following functions are provided by this module: .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C fixup_bundle copy_and_fixup_bundle verify_app get_bundle_main_executable get_dotapp_dir get_bundle_and_executable get_bundle_all_executables get_item_key get_item_rpaths clear_bundle_keys set_bundle_key_values get_bundle_keys copy_resolved_item_into_bundle copy_resolved_framework_into_bundle fixup_bundle_item verify_bundle_prerequisites verify_bundle_symlinks .ft P .fi .UNINDENT .UNINDENT .sp Requires CMake 2.6 or greater because it uses function, break and PARENT_SCOPE. Also depends on GetPrerequisites.cmake. .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C FIXUP_BUNDLE( ) .ft P .fi .UNINDENT .UNINDENT .sp Fix up a bundle in\-place and make it standalone, such that it can be drag\-n\-drop copied to another machine and run on that machine as long as all of the system libraries are compatible. .sp If you pass plugins to fixup_bundle as the libs parameter, you should install them or copy them into the bundle before calling fixup_bundle. The "libs" parameter is a list of libraries that must be fixed up, but that cannot be determined by otool output analysis. (i.e., plugins) .sp Gather all the keys for all the executables and libraries in a bundle, and then, for each key, copy each prerequisite into the bundle. Then fix each one up according to its own list of prerequisites. .sp Then clear all the keys and call verify_app on the final bundle to ensure that it is truly standalone. .sp As an optional parameter (IGNORE_ITEM) a list of file names can be passed, which are then ignored (e.g. IGNORE_ITEM "vcredist_x86.exe;vcredist_x64.exe") .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C COPY_AND_FIXUP_BUNDLE( ) .ft P .fi .UNINDENT .UNINDENT .sp Makes a copy of the bundle at location and then fixes up the new copied bundle in\-place at ... .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C VERIFY_APP() .ft P .fi .UNINDENT .UNINDENT .sp Verifies that an application appears valid based on running analysis tools on it. Calls "message(FATAL_ERROR" if the application is not verified. .sp As an optional parameter (IGNORE_ITEM) a list of file names can be passed, which are then ignored (e.g. IGNORE_ITEM "vcredist_x86.exe;vcredist_x64.exe") .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C GET_BUNDLE_MAIN_EXECUTABLE( ) .ft P .fi .UNINDENT .UNINDENT .sp The result will be the full path name of the bundle\(aqs main executable file or an "error:" prefixed string if it could not be determined. .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C GET_DOTAPP_DIR( ) .ft P .fi .UNINDENT .UNINDENT .sp Returns the nearest parent dir whose name ends with ".app" given the full path to an executable. If there is no such parent dir, then simply return the dir containing the executable. .sp The returned directory may or may not exist. .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C GET_BUNDLE_AND_EXECUTABLE( ) .ft P .fi .UNINDENT .UNINDENT .sp Takes either a ".app" directory name or the name of an executable nested inside a ".app" directory and returns the path to the ".app" directory in and the path to its main executable in .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C GET_BUNDLE_ALL_EXECUTABLES( ) .ft P .fi .UNINDENT .UNINDENT .sp Scans the given bundle recursively for all executable files and accumulates them into a variable. .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C GET_ITEM_KEY( ) .ft P .fi .UNINDENT .UNINDENT .sp Given a file (item) name, generate a key that should be unique considering the set of libraries that need copying or fixing up to make a bundle standalone. This is essentially the file name including extension with "." replaced by "_" .sp This key is used as a prefix for CMake variables so that we can associate a set of variables with a given item based on its key. .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C CLEAR_BUNDLE_KEYS() .ft P .fi .UNINDENT .UNINDENT .sp Loop over the list of keys, clearing all the variables associated with each key. After the loop, clear the list of keys itself. .sp Caller of get_bundle_keys should call clear_bundle_keys when done with list of keys. .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C SET_BUNDLE_KEY_VALUES( []) .ft P .fi .UNINDENT .UNINDENT .sp Add a key to the list (if necessary) for the given item. If added, also set all the variables associated with that key. .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C GET_BUNDLE_KEYS( ) .ft P .fi .UNINDENT .UNINDENT .sp Loop over all the executable and library files within the bundle (and given as extra ) and accumulate a list of keys representing them. Set values associated with each key such that we can loop over all of them and copy prerequisite libs into the bundle and then do appropriate install_name_tool fixups. .sp As an optional parameter (IGNORE_ITEM) a list of file names can be passed, which are then ignored (e.g. IGNORE_ITEM "vcredist_x86.exe;vcredist_x64.exe") .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C COPY_RESOLVED_ITEM_INTO_BUNDLE( ) .ft P .fi .UNINDENT .UNINDENT .sp Copy a resolved item into the bundle if necessary. Copy is not necessary if the resolved_item is "the same as" the resolved_embedded_item. .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C COPY_RESOLVED_FRAMEWORK_INTO_BUNDLE( ) .ft P .fi .UNINDENT .UNINDENT .sp Copy a resolved framework into the bundle if necessary. Copy is not necessary if the resolved_item is "the same as" the resolved_embedded_item. .sp By default, BU_COPY_FULL_FRAMEWORK_CONTENTS is not set. If you want full frameworks embedded in your bundles, set BU_COPY_FULL_FRAMEWORK_CONTENTS to ON before calling fixup_bundle. By default, COPY_RESOLVED_FRAMEWORK_INTO_BUNDLE copies the framework dylib itself plus the framework Resources directory. .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C FIXUP_BUNDLE_ITEM( ) .ft P .fi .UNINDENT .UNINDENT .sp Get the direct/non\-system prerequisites of the resolved embedded item. For each prerequisite, change the way it is referenced to the value of the _EMBEDDED_ITEM keyed variable for that prerequisite. (Most likely changing to an "@executable_path" style reference.) .sp This function requires that the resolved_embedded_item be "inside" the bundle already. In other words, if you pass plugins to fixup_bundle as the libs parameter, you should install them or copy them into the bundle before calling fixup_bundle. The "libs" parameter is a list of libraries that must be fixed up, but that cannot be determined by otool output analysis. (i.e., plugins) .sp Also, change the id of the item being fixed up to its own _EMBEDDED_ITEM value. .sp Accumulate changes in a local variable and make \fIone\fP call to install_name_tool at the end of the function with all the changes at once. .sp If the BU_CHMOD_BUNDLE_ITEMS variable is set then bundle items will be marked writable before install_name_tool tries to change them. .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C VERIFY_BUNDLE_PREREQUISITES( ) .ft P .fi .UNINDENT .UNINDENT .sp Verifies that the sum of all prerequisites of all files inside the bundle are contained within the bundle or are "system" libraries, presumed to exist everywhere. .sp As an optional parameter (IGNORE_ITEM) a list of file names can be passed, which are then ignored (e.g. IGNORE_ITEM "vcredist_x86.exe;vcredist_x64.exe") .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C VERIFY_BUNDLE_SYMLINKS( ) .ft P .fi .UNINDENT .UNINDENT .sp Verifies that any symlinks found in the bundle point to other files that are already also in the bundle... Anything that points to an external file causes this function to fail the verification. .SS CheckCCompilerFlag .sp Check whether the C compiler supports a given flag. .sp CHECK_C_COMPILER_FLAG( ) .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C \- the compiler flag \- variable to store the result Will be created as an internal cache variable. .ft P .fi .UNINDENT .UNINDENT .sp This internally calls the check_c_source_compiles macro and sets CMAKE_REQUIRED_DEFINITIONS to . See help for CheckCSourceCompiles for a listing of variables that can otherwise modify the build. The result only tells that the compiler does not give an error message when it encounters the flag. If the flag has any effect or even a specific one is beyond the scope of this module. .SS CheckCSourceCompiles .sp Check if given C source compiles and links into an executable .sp CHECK_C_SOURCE_COMPILES( [FAIL_REGEX ]) .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C \- source code to try to compile, must define \(aqmain\(aq \- variable to store whether the source code compiled Will be created as an internal cache variable. \- fail if test output matches this regex .ft P .fi .UNINDENT .UNINDENT .sp The following variables may be set before calling this macro to modify the way the check is run: .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C CMAKE_REQUIRED_FLAGS = string of compile command line flags CMAKE_REQUIRED_DEFINITIONS = list of macros to define (\-DFOO=bar) CMAKE_REQUIRED_INCLUDES = list of include directories CMAKE_REQUIRED_LIBRARIES = list of libraries to link CMAKE_REQUIRED_QUIET = execute quietly without messages .ft P .fi .UNINDENT .UNINDENT .SS CheckCSourceRuns .sp Check if the given C source code compiles and runs. .sp CHECK_C_SOURCE_RUNS( ) .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C \- source code to try to compile \- variable to store the result (1 for success, empty for failure) Will be created as an internal cache variable. .ft P .fi .UNINDENT .UNINDENT .sp The following variables may be set before calling this macro to modify the way the check is run: .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C CMAKE_REQUIRED_FLAGS = string of compile command line flags CMAKE_REQUIRED_DEFINITIONS = list of macros to define (\-DFOO=bar) CMAKE_REQUIRED_INCLUDES = list of include directories CMAKE_REQUIRED_LIBRARIES = list of libraries to link CMAKE_REQUIRED_QUIET = execute quietly without messages .ft P .fi .UNINDENT .UNINDENT .SS CheckCXXCompilerFlag .sp Check whether the CXX compiler supports a given flag. .sp CHECK_CXX_COMPILER_FLAG( ) .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C \- the compiler flag \- variable to store the result .ft P .fi .UNINDENT .UNINDENT .sp This internally calls the check_cxx_source_compiles macro and sets CMAKE_REQUIRED_DEFINITIONS to . See help for CheckCXXSourceCompiles for a listing of variables that can otherwise modify the build. The result only tells that the compiler does not give an error message when it encounters the flag. If the flag has any effect or even a specific one is beyond the scope of this module. .SS CheckCXXSourceCompiles .sp Check if given C++ source compiles and links into an executable .sp CHECK_CXX_SOURCE_COMPILES( [FAIL_REGEX ]) .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C \- source code to try to compile, must define \(aqmain\(aq \- variable to store whether the source code compiled Will be created as an internal cache variable. \- fail if test output matches this regex .ft P .fi .UNINDENT .UNINDENT .sp The following variables may be set before calling this macro to modify the way the check is run: .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C CMAKE_REQUIRED_FLAGS = string of compile command line flags CMAKE_REQUIRED_DEFINITIONS = list of macros to define (\-DFOO=bar) CMAKE_REQUIRED_INCLUDES = list of include directories CMAKE_REQUIRED_LIBRARIES = list of libraries to link CMAKE_REQUIRED_QUIET = execute quietly without messages .ft P .fi .UNINDENT .UNINDENT .SS CheckCXXSourceRuns .sp Check if the given C++ source code compiles and runs. .sp CHECK_CXX_SOURCE_RUNS( ) .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C \- source code to try to compile \- variable to store the result (1 for success, empty for failure) Will be created as an internal cache variable. .ft P .fi .UNINDENT .UNINDENT .sp The following variables may be set before calling this macro to modify the way the check is run: .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C CMAKE_REQUIRED_FLAGS = string of compile command line flags CMAKE_REQUIRED_DEFINITIONS = list of macros to define (\-DFOO=bar) CMAKE_REQUIRED_INCLUDES = list of include directories CMAKE_REQUIRED_LIBRARIES = list of libraries to link CMAKE_REQUIRED_QUIET = execute quietly without messages .ft P .fi .UNINDENT .UNINDENT .SS CheckCXXSymbolExists .sp Check if a symbol exists as a function, variable, or macro in C++ .sp CHECK_CXX_SYMBOL_EXISTS( ) .sp Check that the is available after including given header and store the result in a . Specify the list of files in one argument as a semicolon\-separated list. CHECK_CXX_SYMBOL_EXISTS() can be used to check in C++ files, as opposed to CHECK_SYMBOL_EXISTS(), which works only for C. .sp If the header files define the symbol as a macro it is considered available and assumed to work. If the header files declare the symbol as a function or variable then the symbol must also be available for linking. If the symbol is a type or enum value it will not be recognized (consider using CheckTypeSize or CheckCSourceCompiles). .sp The following variables may be set before calling this macro to modify the way the check is run: .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C CMAKE_REQUIRED_FLAGS = string of compile command line flags CMAKE_REQUIRED_DEFINITIONS = list of macros to define (\-DFOO=bar) CMAKE_REQUIRED_INCLUDES = list of include directories CMAKE_REQUIRED_LIBRARIES = list of libraries to link CMAKE_REQUIRED_QUIET = execute quietly without messages .ft P .fi .UNINDENT .UNINDENT .SS CheckFortranCompilerFlag .sp Check whether the Fortran compiler supports a given flag. .sp CHECK_Fortran_COMPILER_FLAG( ) .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C \- the compiler flag \- variable to store the result Will be created as an internal cache variable. .ft P .fi .UNINDENT .UNINDENT .sp This internally calls the check_fortran_source_compiles macro and sets CMAKE_REQUIRED_DEFINITIONS to . See help for CheckFortranSourceCompiles for a listing of variables that can otherwise modify the build. The result only tells that the compiler does not give an error message when it encounters the flag. If the flag has any effect or even a specific one is beyond the scope of this module. .SS CheckFortranFunctionExists .sp macro which checks if the Fortran function exists .sp CHECK_FORTRAN_FUNCTION_EXISTS(FUNCTION VARIABLE) .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C FUNCTION \- the name of the Fortran function VARIABLE \- variable to store the result Will be created as an internal cache variable. .ft P .fi .UNINDENT .UNINDENT .sp The following variables may be set before calling this macro to modify the way the check is run: .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C CMAKE_REQUIRED_LIBRARIES = list of libraries to link .ft P .fi .UNINDENT .UNINDENT .SS CheckFortranSourceCompiles .sp Check if given Fortran source compiles and links into an executable: .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C CHECK_Fortran_SOURCE_COMPILES( [FAIL_REGEX ]) .ft P .fi .UNINDENT .UNINDENT .sp The arguments are: .INDENT 0.0 .TP .B \fB\fP Source code to try to compile. It must define a PROGRAM entry point. .TP .B \fB\fP Variable to store whether the source code compiled. Will be created as an internal cache variable. .TP .B \fB\fP Fail if test output matches this regex. .UNINDENT .sp The following variables may be set before calling this macro to modify the way the check is run: .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C CMAKE_REQUIRED_FLAGS = string of compile command line flags CMAKE_REQUIRED_DEFINITIONS = list of macros to define (\-DFOO=bar) CMAKE_REQUIRED_INCLUDES = list of include directories CMAKE_REQUIRED_LIBRARIES = list of libraries to link CMAKE_REQUIRED_QUIET = execute quietly without messages .ft P .fi .UNINDENT .UNINDENT .SS CheckFunctionExists .sp Check if a C function can be linked .sp CHECK_FUNCTION_EXISTS( ) .sp Check that the is provided by libraries on the system and store the result in a . This does not verify that any system header file declares the function, only that it can be found at link time (consider using CheckSymbolExists). will be created as an internal cache variable. .sp The following variables may be set before calling this macro to modify the way the check is run: .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C CMAKE_REQUIRED_FLAGS = string of compile command line flags CMAKE_REQUIRED_DEFINITIONS = list of macros to define (\-DFOO=bar) CMAKE_REQUIRED_INCLUDES = list of include directories CMAKE_REQUIRED_LIBRARIES = list of libraries to link CMAKE_REQUIRED_QUIET = execute quietly without messages .ft P .fi .UNINDENT .UNINDENT .SS CheckIncludeFileCXX .sp Provides a macro to check if a header file can be included in \fBCXX\fP\&. .INDENT 0.0 .TP .B CHECK_INCLUDE_FILE_CXX .INDENT 7.0 .INDENT 3.5 .sp .nf .ft C CHECK_INCLUDE_FILE_CXX( []) .ft P .fi .UNINDENT .UNINDENT .sp Check if the given \fB\fP file may be included in a \fBCXX\fP source file and store the result in an internal cache entry named \fB\fP\&. The optional third argument may be used to add compilation flags to the check (or use \fBCMAKE_REQUIRED_FLAGS\fP below). .UNINDENT .sp The following variables may be set before calling this macro to modify the way the check is run: .INDENT 0.0 .TP .B \fBCMAKE_REQUIRED_FLAGS\fP string of compile command line flags .TP .B \fBCMAKE_REQUIRED_DEFINITIONS\fP list of macros to define (\-DFOO=bar) .TP .B \fBCMAKE_REQUIRED_INCLUDES\fP list of include directories .TP .B \fBCMAKE_REQUIRED_QUIET\fP execute quietly without messages .UNINDENT .sp See modules \fBCheckIncludeFile\fP and \fBCheckIncludeFiles\fP to check for one or more \fBC\fP headers. .SS CheckIncludeFile .sp Provides a macro to check if a header file can be included in \fBC\fP\&. .INDENT 0.0 .TP .B CHECK_INCLUDE_FILE .INDENT 7.0 .INDENT 3.5 .sp .nf .ft C CHECK_INCLUDE_FILE( []) .ft P .fi .UNINDENT .UNINDENT .sp Check if the given \fB\fP file may be included in a \fBC\fP source file and store the result in an internal cache entry named \fB\fP\&. The optional third argument may be used to add compilation flags to the check (or use \fBCMAKE_REQUIRED_FLAGS\fP below). .UNINDENT .sp The following variables may be set before calling this macro to modify the way the check is run: .INDENT 0.0 .TP .B \fBCMAKE_REQUIRED_FLAGS\fP string of compile command line flags .TP .B \fBCMAKE_REQUIRED_DEFINITIONS\fP list of macros to define (\-DFOO=bar) .TP .B \fBCMAKE_REQUIRED_INCLUDES\fP list of include directories .TP .B \fBCMAKE_REQUIRED_QUIET\fP execute quietly without messages .UNINDENT .sp See the \fBCheckIncludeFiles\fP module to check for multiple headers at once. See the \fBCheckIncludeFileCXX\fP module to check for headers using the \fBCXX\fP language. .SS CheckIncludeFiles .sp Provides a macro to check if a list of one or more header files can be included together in \fBC\fP\&. .INDENT 0.0 .TP .B CHECK_INCLUDE_FILES .INDENT 7.0 .INDENT 3.5 .sp .nf .ft C CHECK_INCLUDE_FILES("" ) .ft P .fi .UNINDENT .UNINDENT .sp Check if the given \fB\fP list may be included together in a \fBC\fP source file and store the result in an internal cache entry named \fB\fP\&. Specify the \fB\fP argument as a \fI;\-list\fP of header file names. .UNINDENT .sp The following variables may be set before calling this macro to modify the way the check is run: .INDENT 0.0 .TP .B \fBCMAKE_REQUIRED_FLAGS\fP string of compile command line flags .TP .B \fBCMAKE_REQUIRED_DEFINITIONS\fP list of macros to define (\-DFOO=bar) .TP .B \fBCMAKE_REQUIRED_INCLUDES\fP list of include directories .TP .B \fBCMAKE_REQUIRED_QUIET\fP execute quietly without messages .UNINDENT .sp See modules \fBCheckIncludeFile\fP and \fBCheckIncludeFileCXX\fP to check for a single header file in \fBC\fP or \fBCXX\fP languages. .SS CheckLanguage .sp Check if a language can be enabled .sp Usage: .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C check_language() .ft P .fi .UNINDENT .UNINDENT .sp where is a language that may be passed to enable_language() such as "Fortran". If CMAKE__COMPILER is already defined the check does nothing. Otherwise it tries enabling the language in a test project. The result is cached in CMAKE__COMPILER as the compiler that was found, or NOTFOUND if the language cannot be enabled. .sp Example: .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C check_language(Fortran) if(CMAKE_Fortran_COMPILER) enable_language(Fortran) else() message(STATUS "No Fortran support") endif() .ft P .fi .UNINDENT .UNINDENT .SS CheckLibraryExists .sp Check if the function exists. .sp CHECK_LIBRARY_EXISTS (LIBRARY FUNCTION LOCATION VARIABLE) .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C LIBRARY \- the name of the library you are looking for FUNCTION \- the name of the function LOCATION \- location where the library should be found VARIABLE \- variable to store the result Will be created as an internal cache variable. .ft P .fi .UNINDENT .UNINDENT .sp The following variables may be set before calling this macro to modify the way the check is run: .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C CMAKE_REQUIRED_FLAGS = string of compile command line flags CMAKE_REQUIRED_DEFINITIONS = list of macros to define (\-DFOO=bar) CMAKE_REQUIRED_LIBRARIES = list of libraries to link CMAKE_REQUIRED_QUIET = execute quietly without messages .ft P .fi .UNINDENT .UNINDENT .SS CheckPrototypeDefinition .sp Check if the protoype we expect is correct. .sp check_prototype_definition(FUNCTION PROTOTYPE RETURN HEADER VARIABLE) .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C FUNCTION \- The name of the function (used to check if prototype exists) PROTOTYPE\- The prototype to check. RETURN \- The return value of the function. HEADER \- The header files required. VARIABLE \- The variable to store the result. Will be created as an internal cache variable. .ft P .fi .UNINDENT .UNINDENT .sp Example: .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C check_prototype_definition(getpwent_r "struct passwd *getpwent_r(struct passwd *src, char *buf, int buflen)" "NULL" "unistd.h;pwd.h" SOLARIS_GETPWENT_R) .ft P .fi .UNINDENT .UNINDENT .sp The following variables may be set before calling this macro to modify the way the check is run: .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C CMAKE_REQUIRED_FLAGS = string of compile command line flags CMAKE_REQUIRED_DEFINITIONS = list of macros to define (\-DFOO=bar) CMAKE_REQUIRED_INCLUDES = list of include directories CMAKE_REQUIRED_LIBRARIES = list of libraries to link CMAKE_REQUIRED_QUIET = execute quietly without messages .ft P .fi .UNINDENT .UNINDENT .SS CheckStructHasMember .sp Check if the given struct or class has the specified member variable .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C CHECK_STRUCT_HAS_MEMBER(
[LANGUAGE ]) .ft P .fi .UNINDENT .UNINDENT .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C \- the name of the struct or class you are interested in \- the member which existence you want to check
\- the header(s) where the prototype should be declared \- variable to store the result \- the compiler to use (C or CXX) .ft P .fi .UNINDENT .UNINDENT .sp The following variables may be set before calling this macro to modify the way the check is run: .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C CMAKE_REQUIRED_FLAGS = string of compile command line flags CMAKE_REQUIRED_DEFINITIONS = list of macros to define (\-DFOO=bar) CMAKE_REQUIRED_INCLUDES = list of include directories CMAKE_REQUIRED_LIBRARIES = list of libraries to link CMAKE_REQUIRED_QUIET = execute quietly without messages .ft P .fi .UNINDENT .UNINDENT .sp Example: CHECK_STRUCT_HAS_MEMBER("struct timeval" tv_sec sys/select.h HAVE_TIMEVAL_TV_SEC LANGUAGE C) .SS CheckSymbolExists .sp Check if a symbol exists as a function, variable, or macro .sp CHECK_SYMBOL_EXISTS( ) .sp Check that the is available after including given header and store the result in a . Specify the list of files in one argument as a semicolon\-separated list. will be created as an internal cache variable. .sp If the header files define the symbol as a macro it is considered available and assumed to work. If the header files declare the symbol as a function or variable then the symbol must also be available for linking. If the symbol is a type or enum value it will not be recognized (consider using CheckTypeSize or CheckCSourceCompiles). If the check needs to be done in C++, consider using CHECK_CXX_SYMBOL_EXISTS(), which does the same as CHECK_SYMBOL_EXISTS(), but in C++. .sp The following variables may be set before calling this macro to modify the way the check is run: .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C CMAKE_REQUIRED_FLAGS = string of compile command line flags CMAKE_REQUIRED_DEFINITIONS = list of macros to define (\-DFOO=bar) CMAKE_REQUIRED_INCLUDES = list of include directories CMAKE_REQUIRED_LIBRARIES = list of libraries to link CMAKE_REQUIRED_QUIET = execute quietly without messages .ft P .fi .UNINDENT .UNINDENT .SS CheckTypeSize .sp Check sizeof a type .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C CHECK_TYPE_SIZE(TYPE VARIABLE [BUILTIN_TYPES_ONLY] [LANGUAGE ]) .ft P .fi .UNINDENT .UNINDENT .sp Check if the type exists and determine its size. On return, "HAVE_${VARIABLE}" holds the existence of the type, and "${VARIABLE}" holds one of the following: .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C = type has non\-zero size "0" = type has arch\-dependent size (see below) "" = type does not exist .ft P .fi .UNINDENT .UNINDENT .sp Both \fBHAVE_${VARIABLE}\fP and \fB${VARIABLE}\fP will be created as internal cache variables. .sp Furthermore, the variable "${VARIABLE}_CODE" holds C preprocessor code to define the macro "${VARIABLE}" to the size of the type, or leave the macro undefined if the type does not exist. .sp The variable "${VARIABLE}" may be "0" when CMAKE_OSX_ARCHITECTURES has multiple architectures for building OS X universal binaries. This indicates that the type size varies across architectures. In this case "${VARIABLE}_CODE" contains C preprocessor tests mapping from each architecture macro to the corresponding type size. The list of architecture macros is stored in "${VARIABLE}_KEYS", and the value for each key is stored in "${VARIABLE}\-${KEY}". .sp If the BUILTIN_TYPES_ONLY option is not given, the macro checks for headers , , and , and saves results in HAVE_SYS_TYPES_H, HAVE_STDINT_H, and HAVE_STDDEF_H. The type size check automatically includes the available headers, thus supporting checks of types defined in the headers. .sp If LANGUAGE is set, the specified compiler will be used to perform the check. Acceptable values are C and CXX .sp Despite the name of the macro you may use it to check the size of more complex expressions, too. To check e.g. for the size of a struct member you can do something like this: .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C check_type_size("((struct something*)0)\->member" SIZEOF_MEMBER) .ft P .fi .UNINDENT .UNINDENT .sp The following variables may be set before calling this macro to modify the way the check is run: .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C CMAKE_REQUIRED_FLAGS = string of compile command line flags CMAKE_REQUIRED_DEFINITIONS = list of macros to define (\-DFOO=bar) CMAKE_REQUIRED_INCLUDES = list of include directories CMAKE_REQUIRED_LIBRARIES = list of libraries to link CMAKE_REQUIRED_QUIET = execute quietly without messages CMAKE_EXTRA_INCLUDE_FILES = list of extra headers to include .ft P .fi .UNINDENT .UNINDENT .SS CheckVariableExists .sp Check if the variable exists. .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C CHECK_VARIABLE_EXISTS(VAR VARIABLE) .ft P .fi .UNINDENT .UNINDENT .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C VAR \- the name of the variable VARIABLE \- variable to store the result Will be created as an internal cache variable. .ft P .fi .UNINDENT .UNINDENT .sp This macro is only for C variables. .sp The following variables may be set before calling this macro to modify the way the check is run: .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C CMAKE_REQUIRED_FLAGS = string of compile command line flags CMAKE_REQUIRED_DEFINITIONS = list of macros to define (\-DFOO=bar) CMAKE_REQUIRED_LIBRARIES = list of libraries to link CMAKE_REQUIRED_QUIET = execute quietly without messages .ft P .fi .UNINDENT .UNINDENT .SS CMakeAddFortranSubdirectory .sp Use MinGW gfortran from VS if a fortran compiler is not found. .sp The \(aqadd_fortran_subdirectory\(aq function adds a subdirectory to a project that contains a fortran only sub\-project. The module will check the current compiler and see if it can support fortran. If no fortran compiler is found and the compiler is MSVC, then this module will find the MinGW gfortran. It will then use an external project to build with the MinGW tools. It will also create imported targets for the libraries created. This will only work if the fortran code is built into a dll, so BUILD_SHARED_LIBS is turned on in the project. In addition the CMAKE_GNUtoMS option is set to on, so that the MS .lib files are created. Usage is as follows: .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C cmake_add_fortran_subdirectory( # name of subdirectory PROJECT # project name in subdir top CMakeLists.txt ARCHIVE_DIR # dir where project places .lib files RUNTIME_DIR # dir where project places .dll files LIBRARIES ... # names of library targets to import LINK_LIBRARIES # link interface libraries for LIBRARIES [LINK_LIBS ...]... CMAKE_COMMAND_LINE ... # extra command line flags to pass to cmake NO_EXTERNAL_INSTALL # skip installation of external project ) .ft P .fi .UNINDENT .UNINDENT .sp Relative paths in ARCHIVE_DIR and RUNTIME_DIR are interpreted with respect to the build directory corresponding to the source directory in which the function is invoked. .sp Limitations: .sp NO_EXTERNAL_INSTALL is required for forward compatibility with a future version that supports installation of the external project binaries during "make install". .SS CMakeBackwardCompatibilityCXX .sp define a bunch of backwards compatibility variables .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C CMAKE_ANSI_CXXFLAGS \- flag for ansi c++ CMAKE_HAS_ANSI_STRING_STREAM \- has include(TestForANSIStreamHeaders) include(CheckIncludeFileCXX) include(TestForSTDNamespace) include(TestForANSIForScope) .ft P .fi .UNINDENT .UNINDENT .SS CMakeDependentOption .sp Macro to provide an option dependent on other options. .sp This macro presents an option to the user only if a set of other conditions are true. When the option is not presented a default value is used, but any value set by the user is preserved for when the option is presented again. Example invocation: .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C CMAKE_DEPENDENT_OPTION(USE_FOO "Use Foo" ON "USE_BAR;NOT USE_ZOT" OFF) .ft P .fi .UNINDENT .UNINDENT .sp If USE_BAR is true and USE_ZOT is false, this provides an option called USE_FOO that defaults to ON. Otherwise, it sets USE_FOO to OFF. If the status of USE_BAR or USE_ZOT ever changes, any value for the USE_FOO option is saved so that when the option is re\-enabled it retains its old value. .SS CMakeDetermineVSServicePack .sp Deprecated. Do not use. .sp The functionality of this module has been superseded by the \fBCMAKE__COMPILER_VERSION\fP variable that contains the compiler version number. .sp Determine the Visual Studio service pack of the \(aqcl\(aq in use. .sp Usage: .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C if(MSVC) include(CMakeDetermineVSServicePack) DetermineVSServicePack( my_service_pack ) if( my_service_pack ) message(STATUS "Detected: ${my_service_pack}") endif() endif() .ft P .fi .UNINDENT .UNINDENT .sp Function DetermineVSServicePack sets the given variable to one of the following values or an empty string if unknown: .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C vc80, vc80sp1 vc90, vc90sp1 vc100, vc100sp1 vc110, vc110sp1, vc110sp2, vc110sp3, vc110sp4 .ft P .fi .UNINDENT .UNINDENT .SS CMakeExpandImportedTargets .sp Deprecated. Do not use. .sp This module was once needed to expand imported targets to the underlying libraries they reference on disk for use with the \fBtry_compile()\fP and \fBtry_run()\fP commands. These commands now support imported libraries in their \fBLINK_LIBRARIES\fP options (since CMake 2.8.11 for \fBtry_compile()\fP and since CMake 3.2 for \fBtry_run()\fP). .sp This module does not support the policy \fBCMP0022\fP \fBNEW\fP behavior or use of the \fBINTERFACE_LINK_LIBRARIES\fP property because \fBgenerator expressions\fP cannot be evaluated during configuration. .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C CMAKE_EXPAND_IMPORTED_TARGETS( LIBRARIES lib1 lib2...libN [CONFIGURATION ]) .ft P .fi .UNINDENT .UNINDENT .sp CMAKE_EXPAND_IMPORTED_TARGETS() takes a list of libraries and replaces all imported targets contained in this list with their actual file paths of the referenced libraries on disk, including the libraries from their link interfaces. If a CONFIGURATION is given, it uses the respective configuration of the imported targets if it exists. If no CONFIGURATION is given, it uses the first configuration from ${CMAKE_CONFIGURATION_TYPES} if set, otherwise ${CMAKE_BUILD_TYPE}. .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C cmake_expand_imported_targets(expandedLibs LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} CONFIGURATION "${CMAKE_TRY_COMPILE_CONFIGURATION}" ) .ft P .fi .UNINDENT .UNINDENT .SS CMakeFindDependencyMacro .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C find_dependency( [ [EXACT]]) .ft P .fi .UNINDENT .UNINDENT .sp \fBfind_dependency()\fP wraps a \fBfind_package()\fP call for a package dependency. It is designed to be used in a Config.cmake file, and it forwards the correct parameters for EXACT, QUIET and REQUIRED which were passed to the original \fBfind_package()\fP call. It also sets an informative diagnostic message if the dependency could not be found. .SS CMakeFindFrameworks .sp helper module to find OSX frameworks .SS CMakeFindPackageMode .sp This file is executed by cmake when invoked with \-\-find\-package. It expects that the following variables are set using \-D: .INDENT 0.0 .TP .B \fBNAME\fP name of the package .TP .B \fBCOMPILER_ID\fP the CMake compiler ID for which the result is, i.e. GNU/Intel/Clang/MSVC, etc. .TP .B \fBLANGUAGE\fP language for which the result will be used, i.e. C/CXX/Fortan/ASM .TP .B \fBMODE\fP .INDENT 7.0 .TP .B \fBEXIST\fP only check for existence of the given package .TP .B \fBCOMPILE\fP print the flags needed for compiling an object file which uses the given package .TP .B \fBLINK\fP print the flags needed for linking when using the given package .UNINDENT .TP .B \fBQUIET\fP if TRUE, don\(aqt print anything .UNINDENT .SS CMakeForceCompiler .sp Deprecated. Do not use. .sp The macros provided by this module were once intended for use by cross\-compiling toolchain files when CMake was not able to automatically detect the compiler identification. Since the introduction of this module, CMake\(aqs compiler identification capabilities have improved and can now be taught to recognize any compiler. Furthermore, the suite of information CMake detects from a compiler is now too extensive to be provided by toolchain files using these macros. .sp One common use case for this module was to skip CMake\(aqs checks for a working compiler when using a cross\-compiler that cannot link binaries without special flags or custom linker scripts. This case is now supported by setting the \fBCMAKE_TRY_COMPILE_TARGET_TYPE\fP variable in the toolchain file instead. .sp .ce ---- .ce 0 .sp .sp Macro CMAKE_FORCE_C_COMPILER has the following signature: .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C CMAKE_FORCE_C_COMPILER( ) .ft P .fi .UNINDENT .UNINDENT .sp It sets CMAKE_C_COMPILER to the given compiler and the cmake internal variable CMAKE_C_COMPILER_ID to the given compiler\-id. It also bypasses the check for working compiler and basic compiler information tests. .sp Macro CMAKE_FORCE_CXX_COMPILER has the following signature: .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C CMAKE_FORCE_CXX_COMPILER( ) .ft P .fi .UNINDENT .UNINDENT .sp It sets CMAKE_CXX_COMPILER to the given compiler and the cmake internal variable CMAKE_CXX_COMPILER_ID to the given compiler\-id. It also bypasses the check for working compiler and basic compiler information tests. .sp Macro CMAKE_FORCE_Fortran_COMPILER has the following signature: .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C CMAKE_FORCE_Fortran_COMPILER( ) .ft P .fi .UNINDENT .UNINDENT .sp It sets CMAKE_Fortran_COMPILER to the given compiler and the cmake internal variable CMAKE_Fortran_COMPILER_ID to the given compiler\-id. It also bypasses the check for working compiler and basic compiler information tests. .sp So a simple toolchain file could look like this: .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C include (CMakeForceCompiler) set(CMAKE_SYSTEM_NAME Generic) CMAKE_FORCE_C_COMPILER (chc12 MetrowerksHicross) CMAKE_FORCE_CXX_COMPILER (chc12 MetrowerksHicross) .ft P .fi .UNINDENT .UNINDENT .SS CMakeGraphVizOptions .sp The builtin graphviz support of CMake. .SS Variables specific to the graphviz support .sp CMake can generate graphviz files, showing the dependencies between the targets in a project and also external libraries which are linked against. When CMake is run with the \-\-graphviz=foo option, it will produce .INDENT 0.0 .IP \(bu 2 a foo.dot file showing all dependencies in the project .IP \(bu 2 a foo.dot. file for each target, file showing on which other targets the respective target depends .IP \(bu 2 a foo.dot..dependers file, showing which other targets depend on the respective target .UNINDENT .sp This can result in huge graphs. Using the file CMakeGraphVizOptions.cmake the look and content of the generated graphs can be influenced. This file is searched first in ${CMAKE_BINARY_DIR} and then in ${CMAKE_SOURCE_DIR}. If found, it is read and the variables set in it are used to adjust options for the generated graphviz files. .INDENT 0.0 .TP .B GRAPHVIZ_GRAPH_TYPE The graph type .INDENT 7.0 .IP \(bu 2 Mandatory : NO .IP \(bu 2 Default : "digraph" .UNINDENT .UNINDENT .INDENT 0.0 .TP .B GRAPHVIZ_GRAPH_NAME The graph name. .INDENT 7.0 .IP \(bu 2 Mandatory : NO .IP \(bu 2 Default : "GG" .UNINDENT .UNINDENT .INDENT 0.0 .TP .B GRAPHVIZ_GRAPH_HEADER The header written at the top of the graphviz file. .INDENT 7.0 .IP \(bu 2 Mandatory : NO .IP \(bu 2 Default : "node [n fontsize = "12"];" .UNINDENT .UNINDENT .INDENT 0.0 .TP .B GRAPHVIZ_NODE_PREFIX The prefix for each node in the graphviz file. .INDENT 7.0 .IP \(bu 2 Mandatory : NO .IP \(bu 2 Default : "node" .UNINDENT .UNINDENT .INDENT 0.0 .TP .B GRAPHVIZ_EXECUTABLES Set this to FALSE to exclude executables from the generated graphs. .INDENT 7.0 .IP \(bu 2 Mandatory : NO .IP \(bu 2 Default : TRUE .UNINDENT .UNINDENT .INDENT 0.0 .TP .B GRAPHVIZ_STATIC_LIBS Set this to FALSE to exclude static libraries from the generated graphs. .INDENT 7.0 .IP \(bu 2 Mandatory : NO .IP \(bu 2 Default : TRUE .UNINDENT .UNINDENT .INDENT 0.0 .TP .B GRAPHVIZ_SHARED_LIBS Set this to FALSE to exclude shared libraries from the generated graphs. .INDENT 7.0 .IP \(bu 2 Mandatory : NO .IP \(bu 2 Default : TRUE .UNINDENT .UNINDENT .INDENT 0.0 .TP .B GRAPHVIZ_MODULE_LIBS Set this to FALSE to exclude module libraries from the generated graphs. .INDENT 7.0 .IP \(bu 2 Mandatory : NO .IP \(bu 2 Default : TRUE .UNINDENT .UNINDENT .INDENT 0.0 .TP .B GRAPHVIZ_EXTERNAL_LIBS Set this to FALSE to exclude external libraries from the generated graphs. .INDENT 7.0 .IP \(bu 2 Mandatory : NO .IP \(bu 2 Default : TRUE .UNINDENT .UNINDENT .INDENT 0.0 .TP .B GRAPHVIZ_IGNORE_TARGETS A list of regular expressions for ignoring targets. .INDENT 7.0 .IP \(bu 2 Mandatory : NO .IP \(bu 2 Default : empty .UNINDENT .UNINDENT .INDENT 0.0 .TP .B GRAPHVIZ_GENERATE_PER_TARGET Set this to FALSE to exclude per target graphs \fBfoo.dot.\fP\&. .INDENT 7.0 .IP \(bu 2 Mandatory : NO .IP \(bu 2 Default : TRUE .UNINDENT .UNINDENT .INDENT 0.0 .TP .B GRAPHVIZ_GENERATE_DEPENDERS Set this to FALSE to exclude depender graphs \fBfoo.dot..dependers\fP\&. .INDENT 7.0 .IP \(bu 2 Mandatory : NO .IP \(bu 2 Default : TRUE .UNINDENT .UNINDENT .SS CMakePackageConfigHelpers .sp Helpers functions for creating config files that can be included by other projects to find and use a package. .sp Adds the \fBconfigure_package_config_file()\fP and \fBwrite_basic_package_version_file()\fP commands. .SS Generating a Package Configuration File .INDENT 0.0 .TP .B configure_package_config_file Create a config file for a project: .INDENT 7.0 .INDENT 3.5 .sp .nf .ft C configure_package_config_file( INSTALL_DESTINATION [PATH_VARS ... ] [NO_SET_AND_CHECK_MACRO] [NO_CHECK_REQUIRED_COMPONENTS_MACRO] [INSTALL_PREFIX ] ) .ft P .fi .UNINDENT .UNINDENT .UNINDENT .sp \fBconfigure_package_config_file()\fP should be used instead of the plain \fBconfigure_file()\fP command when creating the \fBConfig.cmake\fP or \fB\-config.cmake\fP file for installing a project or library. It helps making the resulting package relocatable by avoiding hardcoded paths in the installed \fBConfig.cmake\fP file. .sp In a \fBFooConfig.cmake\fP file there may be code like this to make the install destinations know to the using project: .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C set(FOO_INCLUDE_DIR "@CMAKE_INSTALL_FULL_INCLUDEDIR@" ) set(FOO_DATA_DIR "@CMAKE_INSTALL_PREFIX@/@RELATIVE_DATA_INSTALL_DIR@" ) set(FOO_ICONS_DIR "@CMAKE_INSTALL_PREFIX@/share/icons" ) \&...logic to determine installedPrefix from the own location... set(FOO_CONFIG_DIR "${installedPrefix}/@CONFIG_INSTALL_DIR@" ) .ft P .fi .UNINDENT .UNINDENT .sp All 4 options shown above are not sufficient, since the first 3 hardcode the absolute directory locations, and the 4th case works only if the logic to determine the \fBinstalledPrefix\fP is correct, and if \fBCONFIG_INSTALL_DIR\fP contains a relative path, which in general cannot be guaranteed. This has the effect that the resulting \fBFooConfig.cmake\fP file would work poorly under Windows and OSX, where users are used to choose the install location of a binary package at install time, independent from how \fBCMAKE_INSTALL_PREFIX\fP was set at build/cmake time. .sp Using \fBconfigure_package_config_file\fP helps. If used correctly, it makes the resulting \fBFooConfig.cmake\fP file relocatable. Usage: .INDENT 0.0 .IP 1. 3 write a \fBFooConfig.cmake.in\fP file as you are used to .IP 2. 3 insert a line containing only the string \fB@PACKAGE_INIT@\fP .IP 3. 3 instead of \fBset(FOO_DIR "@SOME_INSTALL_DIR@")\fP, use \fBset(FOO_DIR "@PACKAGE_SOME_INSTALL_DIR@")\fP (this must be after the \fB@PACKAGE_INIT@\fP line) .IP 4. 3 instead of using the normal \fBconfigure_file()\fP, use \fBconfigure_package_config_file()\fP .UNINDENT .sp The \fB\fP and \fB\fP arguments are the input and output file, the same way as in \fBconfigure_file()\fP\&. .sp The \fB\fP given to \fBINSTALL_DESTINATION\fP must be the destination where the \fBFooConfig.cmake\fP file will be installed to. This path can either be absolute, or relative to the \fBINSTALL_PREFIX\fP path. .sp The variables \fB\fP to \fB\fP given as \fBPATH_VARS\fP are the variables which contain install destinations. For each of them the macro will create a helper variable \fBPACKAGE_\fP\&. These helper variables must be used in the \fBFooConfig.cmake.in\fP file for setting the installed location. They are calculated by \fBconfigure_package_config_file\fP so that they are always relative to the installed location of the package. This works both for relative and also for absolute locations. For absolute locations it works only if the absolute location is a subdirectory of \fBINSTALL_PREFIX\fP\&. .sp If the \fBINSTALL_PREFIX\fP argument is passed, this is used as base path to calculate all the relative paths. The \fB\fP argument must be an absolute path. If this argument is not passed, the \fBCMAKE_INSTALL_PREFIX\fP variable will be used instead. The default value is good when generating a FooConfig.cmake file to use your package from the install tree. When generating a FooConfig.cmake file to use your package from the build tree this option should be used. .sp By default \fBconfigure_package_config_file\fP also generates two helper macros, \fBset_and_check()\fP and \fBcheck_required_components()\fP into the \fBFooConfig.cmake\fP file. .sp \fBset_and_check()\fP should be used instead of the normal \fBset()\fP command for setting directories and file locations. Additionally to setting the variable it also checks that the referenced file or directory actually exists and fails with a \fBFATAL_ERROR\fP otherwise. This makes sure that the created \fBFooConfig.cmake\fP file does not contain wrong references. When using the \fBNO_SET_AND_CHECK_MACRO\fP, this macro is not generated into the \fBFooConfig.cmake\fP file. .sp \fBcheck_required_components()\fP should be called at the end of the \fBFooConfig.cmake\fP file if the package supports components. This macro checks whether all requested, non\-optional components have been found, and if this is not the case, sets the \fBFoo_FOUND\fP variable to \fBFALSE\fP, so that the package is considered to be not found. It does that by testing the \fBFoo__FOUND\fP variables for all requested required components. When using the \fBNO_CHECK_REQUIRED_COMPONENTS_MACRO\fP option, this macro is not generated into the \fBFooConfig.cmake\fP file. .sp For an example see below the documentation for \fBwrite_basic_package_version_file()\fP\&. .SS Generating a Package Version File .INDENT 0.0 .TP .B write_basic_package_version_file Create a version file for a project: .INDENT 7.0 .INDENT 3.5 .sp .nf .ft C write_basic_package_version_file( [VERSION ] COMPATIBILITY ) .ft P .fi .UNINDENT .UNINDENT .UNINDENT .sp Writes a file for use as \fBConfigVersion.cmake\fP file to \fB\fP\&. See the documentation of \fBfind_package()\fP for details on this. .sp \fB\fP is the output filename, it should be in the build tree. \fB\fP is the version number of the project to be installed. .sp If no \fBVERSION\fP is given, the \fBPROJECT_VERSION\fP variable is used. If this hasn\(aqt been set, it errors out. .sp The \fBCOMPATIBILITY\fP mode \fBAnyNewerVersion\fP means that the installed package version will be considered compatible if it is newer or exactly the same as the requested version. This mode should be used for packages which are fully backward compatible, also across major versions. If \fBSameMajorVersion\fP is used instead, then the behaviour differs from \fBAnyNewerVersion\fP in that the major version number must be the same as requested, e.g. version 2.0 will not be considered compatible if 1.0 is requested. This mode should be used for packages which guarantee backward compatibility within the same major version. If \fBExactVersion\fP is used, then the package is only considered compatible if the requested version matches exactly its own version number (not considering the tweak version). For example, version 1.2.3 of a package is only considered compatible to requested version 1.2.3. This mode is for packages without compatibility guarantees. If your project has more elaborated version matching rules, you will need to write your own custom \fBConfigVersion.cmake\fP file instead of using this macro. .sp Internally, this macro executes \fBconfigure_file()\fP to create the resulting version file. Depending on the \fBCOMPATIBLITY\fP, either the file \fBBasicConfigVersion\-SameMajorVersion.cmake.in\fP or \fBBasicConfigVersion\-AnyNewerVersion.cmake.in\fP is used. Please note that these two files are internal to CMake and you should not call \fBconfigure_file()\fP on them yourself, but they can be used as starting point to create more sophisticted custom \fBConfigVersion.cmake\fP files. .SS Example Generating Package Files .sp Example using both \fBconfigure_package_config_file()\fP and \fBwrite_basic_package_version_file()\fP: .sp \fBCMakeLists.txt\fP: .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C set(INCLUDE_INSTALL_DIR include/ ... CACHE ) set(LIB_INSTALL_DIR lib/ ... CACHE ) set(SYSCONFIG_INSTALL_DIR etc/foo/ ... CACHE ) \&... include(CMakePackageConfigHelpers) configure_package_config_file(FooConfig.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/FooConfig.cmake INSTALL_DESTINATION ${LIB_INSTALL_DIR}/Foo/cmake PATH_VARS INCLUDE_INSTALL_DIR SYSCONFIG_INSTALL_DIR) write_basic_package_version_file( ${CMAKE_CURRENT_BINARY_DIR}/FooConfigVersion.cmake VERSION 1.2.3 COMPATIBILITY SameMajorVersion ) install(FILES ${CMAKE_CURRENT_BINARY_DIR}/FooConfig.cmake ${CMAKE_CURRENT_BINARY_DIR}/FooConfigVersion.cmake DESTINATION ${LIB_INSTALL_DIR}/Foo/cmake ) .ft P .fi .UNINDENT .UNINDENT .sp \fBFooConfig.cmake.in\fP: .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C set(FOO_VERSION x.y.z) \&... @PACKAGE_INIT@ \&... set_and_check(FOO_INCLUDE_DIR "@PACKAGE_INCLUDE_INSTALL_DIR@") set_and_check(FOO_SYSCONFIG_DIR "@PACKAGE_SYSCONFIG_INSTALL_DIR@") check_required_components(Foo) .ft P .fi .UNINDENT .UNINDENT .SS CMakeParseArguments .sp This module once implemented the \fBcmake_parse_arguments()\fP command that is now implemented natively by CMake. It is now an empty placeholder for compatibility with projects that include it to get the command from CMake 3.4 and lower. .SS CMakePrintHelpers .sp Convenience macros for printing properties and variables, useful e.g. for debugging. .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C CMAKE_PRINT_PROPERTIES([TARGETS target1 .. targetN] [SOURCES source1 .. sourceN] [DIRECTORIES dir1 .. dirN] [TESTS test1 .. testN] [CACHE_ENTRIES entry1 .. entryN] PROPERTIES prop1 .. propN ) .ft P .fi .UNINDENT .UNINDENT .sp This macro prints the values of the properties of the given targets, source files, directories, tests or cache entries. Exactly one of the scope keywords must be used. Example: .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C cmake_print_properties(TARGETS foo bar PROPERTIES LOCATION INTERFACE_INCLUDE_DIRS) .ft P .fi .UNINDENT .UNINDENT .sp This will print the LOCATION and INTERFACE_INCLUDE_DIRS properties for both targets foo and bar. .sp CMAKE_PRINT_VARIABLES(var1 var2 .. varN) .sp This macro will print the name of each variable followed by its value. Example: .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C cmake_print_variables(CMAKE_C_COMPILER CMAKE_MAJOR_VERSION DOES_NOT_EXIST) .ft P .fi .UNINDENT .UNINDENT .sp Gives: .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C \-\- CMAKE_C_COMPILER="/usr/bin/gcc" ; CMAKE_MAJOR_VERSION="2" ; DOES_NOT_EXIST="" .ft P .fi .UNINDENT .UNINDENT .SS CMakePrintSystemInformation .sp print system information .sp This file can be used for diagnostic purposes just include it in a project to see various internal CMake variables. .SS CMakePushCheckState .sp This module defines three macros: CMAKE_PUSH_CHECK_STATE() CMAKE_POP_CHECK_STATE() and CMAKE_RESET_CHECK_STATE() These macros can be used to save, restore and reset (i.e., clear contents) the state of the variables CMAKE_REQUIRED_FLAGS, CMAKE_REQUIRED_DEFINITIONS, CMAKE_REQUIRED_LIBRARIES, CMAKE_REQUIRED_INCLUDES and CMAKE_EXTRA_INCLUDE_FILES used by the various Check\-files coming with CMake, like e.g. check_function_exists() etc. The variable contents are pushed on a stack, pushing multiple times is supported. This is useful e.g. when executing such tests in a Find\-module, where they have to be set, but after the Find\-module has been executed they should have the same value as they had before. .sp CMAKE_PUSH_CHECK_STATE() macro receives optional argument RESET. Whether it\(aqs specified, CMAKE_PUSH_CHECK_STATE() will set all CMAKE_REQUIRED_* variables to empty values, same as CMAKE_RESET_CHECK_STATE() call will do. .sp Usage: .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C cmake_push_check_state(RESET) set(CMAKE_REQUIRED_DEFINITIONS \-DSOME_MORE_DEF) check_function_exists(...) cmake_reset_check_state() set(CMAKE_REQUIRED_DEFINITIONS \-DANOTHER_DEF) check_function_exists(...) cmake_pop_check_state() .ft P .fi .UNINDENT .UNINDENT .SS CMakeVerifyManifest .sp CMakeVerifyManifest.cmake .sp This script is used to verify that embedded manifests and side by side manifests for a project match. To run this script, cd to a directory and run the script with cmake \-P. On the command line you can pass in versions that are OK even if not found in the .manifest files. For example, cmake \-Dallow_versions=8.0.50608.0 \-PCmakeVerifyManifest.cmake could be used to allow an embedded manifest of 8.0.50608.0 to be used in a project even if that version was not found in the .manifest file. .SS CPackBundle .sp CPack Bundle generator (Mac OS X) specific options .SS Variables specific to CPack Bundle generator .sp Installers built on Mac OS X using the Bundle generator use the aforementioned DragNDrop (CPACK_DMG_xxx) variables, plus the following Bundle\-specific parameters (CPACK_BUNDLE_xxx). .INDENT 0.0 .TP .B CPACK_BUNDLE_NAME The name of the generated bundle. This appears in the OSX finder as the bundle name. Required. .UNINDENT .INDENT 0.0 .TP .B CPACK_BUNDLE_PLIST Path to an OSX plist file that will be used for the generated bundle. This assumes that the caller has generated or specified their own Info.plist file. Required. .UNINDENT .INDENT 0.0 .TP .B CPACK_BUNDLE_ICON Path to an OSX icon file that will be used as the icon for the generated bundle. This is the icon that appears in the OSX finder for the bundle, and in the OSX dock when the bundle is opened. Required. .UNINDENT .INDENT 0.0 .TP .B CPACK_BUNDLE_STARTUP_COMMAND Path to a startup script. This is a path to an executable or script that will be run whenever an end\-user double\-clicks the generated bundle in the OSX Finder. Optional. .UNINDENT .INDENT 0.0 .TP .B CPACK_BUNDLE_APPLE_CERT_APP The name of your Apple supplied code signing certificate for the application. The name usually takes the form "Developer ID Application: [Name]" or "3rd Party Mac Developer Application: [Name]". If this variable is not set the application will not be signed. .UNINDENT .INDENT 0.0 .TP .B CPACK_BUNDLE_APPLE_ENTITLEMENTS The name of the plist file that contains your apple entitlements for sandboxing your application. This file is required for submission to the Mac App Store. .UNINDENT .INDENT 0.0 .TP .B CPACK_BUNDLE_APPLE_CODESIGN_FILES A list of additional files that you wish to be signed. You do not need to list the main application folder, or the main executable. You should list any frameworks and plugins that are included in your app bundle. .UNINDENT .INDENT 0.0 .TP .B CPACK_BUNDLE_APPLE_CODESIGN_PARAMETER Additional parameter that will passed to codesign. Default value: "\-\-deep \-f" .UNINDENT .INDENT 0.0 .TP .B CPACK_COMMAND_CODESIGN Path to the codesign(1) command used to sign applications with an Apple cert. This variable can be used to override the automatically detected command (or specify its location if the auto\-detection fails to find it.) .UNINDENT .SS CPackComponent .sp Build binary and source package installers .SS Variables concerning CPack Components .sp The CPackComponent module is the module which handles the component part of CPack. See CPack module for general information about CPack. .sp For certain kinds of binary installers (including the graphical installers on Mac OS X and Windows), CPack generates installers that allow users to select individual application components to install. The contents of each of the components are identified by the COMPONENT argument of CMake\(aqs INSTALL command. These components can be annotated with user\-friendly names and descriptions, inter\-component dependencies, etc., and grouped in various ways to customize the resulting installer. See the cpack_add_* commands, described below, for more information about component\-specific installations. .sp Component\-specific installation allows users to select specific sets of components to install during the install process. Installation components are identified by the COMPONENT argument of CMake\(aqs INSTALL commands, and should be further described by the following CPack commands: .INDENT 0.0 .TP .B CPACK_COMPONENTS_ALL The list of component to install. .sp The default value of this variable is computed by CPack and contains all components defined by the project. The user may set it to only include the specified components. .UNINDENT .INDENT 0.0 .TP .B CPACK__COMPONENT_INSTALL Enable/Disable component install for CPack generator . .sp Each CPack Generator (RPM, DEB, ARCHIVE, NSIS, DMG, etc...) has a legacy default behavior. e.g. RPM builds monolithic whereas NSIS builds component. One can change the default behavior by setting this variable to 0/1 or OFF/ON. .UNINDENT .INDENT 0.0 .TP .B CPACK_COMPONENTS_GROUPING Specify how components are grouped for multi\-package component\-aware CPack generators. .sp Some generators like RPM or ARCHIVE family (TGZ, ZIP, ...) generates several packages files when asked for component packaging. They group the component differently depending on the value of this variable: .INDENT 7.0 .IP \(bu 2 ONE_PER_GROUP (default): creates one package file per component group .IP \(bu 2 ALL_COMPONENTS_IN_ONE : creates a single package with all (requested) component .IP \(bu 2 IGNORE : creates one package per component, i.e. IGNORE component group .UNINDENT .sp One can specify different grouping for different CPack generator by using a CPACK_PROJECT_CONFIG_FILE. .UNINDENT .INDENT 0.0 .TP .B CPACK_COMPONENT__DISPLAY_NAME The name to be displayed for a component. .UNINDENT .INDENT 0.0 .TP .B CPACK_COMPONENT__DESCRIPTION The description of a component. .UNINDENT .INDENT 0.0 .TP .B CPACK_COMPONENT__GROUP The group of a component. .UNINDENT .INDENT 0.0 .TP .B CPACK_COMPONENT__DEPENDS The dependencies (list of components) on which this component depends. .UNINDENT .INDENT 0.0 .TP .B CPACK_COMPONENT__REQUIRED True is this component is required. .UNINDENT .INDENT 0.0 .TP .B cpack_add_component .UNINDENT .sp Describes a CPack installation component named by the COMPONENT argument to a CMake INSTALL command. .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C cpack_add_component(compname [DISPLAY_NAME name] [DESCRIPTION description] [HIDDEN | REQUIRED | DISABLED ] [GROUP group] [DEPENDS comp1 comp2 ... ] [INSTALL_TYPES type1 type2 ... ] [DOWNLOADED] [ARCHIVE_FILE filename]) .ft P .fi .UNINDENT .UNINDENT .sp The cmake_add_component command describes an installation component, which the user can opt to install or remove as part of the graphical installation process. compname is the name of the component, as provided to the COMPONENT argument of one or more CMake INSTALL commands. .sp DISPLAY_NAME is the displayed name of the component, used in graphical installers to display the component name. This value can be any string. .sp DESCRIPTION is an extended description of the component, used in graphical installers to give the user additional information about the component. Descriptions can span multiple lines using \fB\en\fP as the line separator. Typically, these descriptions should be no more than a few lines long. .sp HIDDEN indicates that this component will be hidden in the graphical installer, so that the user cannot directly change whether it is installed or not. .sp REQUIRED indicates that this component is required, and therefore will always be installed. It will be visible in the graphical installer, but it cannot be unselected. (Typically, required components are shown greyed out). .sp DISABLED indicates that this component should be disabled (unselected) by default. The user is free to select this component for installation, unless it is also HIDDEN. .sp DEPENDS lists the components on which this component depends. If this component is selected, then each of the components listed must also be selected. The dependency information is encoded within the installer itself, so that users cannot install inconsistent sets of components. .sp GROUP names the component group of which this component is a part. If not provided, the component will be a standalone component, not part of any component group. Component groups are described with the cpack_add_component_group command, detailed below. .sp INSTALL_TYPES lists the installation types of which this component is a part. When one of these installations types is selected, this component will automatically be selected. Installation types are described with the cpack_add_install_type command, detailed below. .sp DOWNLOADED indicates that this component should be downloaded on\-the\-fly by the installer, rather than packaged in with the installer itself. For more information, see the cpack_configure_downloads command. .sp ARCHIVE_FILE provides a name for the archive file created by CPack to be used for downloaded components. If not supplied, CPack will create a file with some name based on CPACK_PACKAGE_FILE_NAME and the name of the component. See cpack_configure_downloads for more information. .INDENT 0.0 .TP .B cpack_add_component_group .UNINDENT .sp Describes a group of related CPack installation components. .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C cpack_add_component_group(groupname [DISPLAY_NAME name] [DESCRIPTION description] [PARENT_GROUP parent] [EXPANDED] [BOLD_TITLE]) .ft P .fi .UNINDENT .UNINDENT .sp The cpack_add_component_group describes a group of installation components, which will be placed together within the listing of options. Typically, component groups allow the user to select/deselect all of the components within a single group via a single group\-level option. Use component groups to reduce the complexity of installers with many options. groupname is an arbitrary name used to identify the group in the GROUP argument of the cpack_add_component command, which is used to place a component in a group. The name of the group must not conflict with the name of any component. .sp DISPLAY_NAME is the displayed name of the component group, used in graphical installers to display the component group name. This value can be any string. .sp DESCRIPTION is an extended description of the component group, used in graphical installers to give the user additional information about the components within that group. Descriptions can span multiple lines using \fB\en\fP as the line separator. Typically, these descriptions should be no more than a few lines long. .sp PARENT_GROUP, if supplied, names the parent group of this group. Parent groups are used to establish a hierarchy of groups, providing an arbitrary hierarchy of groups. .sp EXPANDED indicates that, by default, the group should show up as "expanded", so that the user immediately sees all of the components within the group. Otherwise, the group will initially show up as a single entry. .sp BOLD_TITLE indicates that the group title should appear in bold, to call the user\(aqs attention to the group. .INDENT 0.0 .TP .B cpack_add_install_type .UNINDENT .sp Add a new installation type containing a set of predefined component selections to the graphical installer. .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C cpack_add_install_type(typename [DISPLAY_NAME name]) .ft P .fi .UNINDENT .UNINDENT .sp The cpack_add_install_type command identifies a set of preselected components that represents a common use case for an application. For example, a "Developer" install type might include an application along with its header and library files, while an "End user" install type might just include the application\(aqs executable. Each component identifies itself with one or more install types via the INSTALL_TYPES argument to cpack_add_component. .sp DISPLAY_NAME is the displayed name of the install type, which will typically show up in a drop\-down box within a graphical installer. This value can be any string. .INDENT 0.0 .TP .B cpack_configure_downloads .UNINDENT .sp Configure CPack to download selected components on\-the\-fly as part of the installation process. .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C cpack_configure_downloads(site [UPLOAD_DIRECTORY dirname] [ALL] [ADD_REMOVE|NO_ADD_REMOVE]) .ft P .fi .UNINDENT .UNINDENT .sp The cpack_configure_downloads command configures installation\-time downloads of selected components. For each downloadable component, CPack will create an archive containing the contents of that component, which should be uploaded to the given site. When the user selects that component for installation, the installer will download and extract the component in place. This feature is useful for creating small installers that only download the requested components, saving bandwidth. Additionally, the installers are small enough that they will be installed as part of the normal installation process, and the "Change" button in Windows Add/Remove Programs control panel will allow one to add or remove parts of the application after the original installation. On Windows, the downloaded\-components functionality requires the ZipDLL plug\-in for NSIS, available at: .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C http://nsis.sourceforge.net/ZipDLL_plug\-in .ft P .fi .UNINDENT .UNINDENT .sp On Mac OS X, installers that download components on\-the\-fly can only be built and installed on system using Mac OS X 10.5 or later. .sp The site argument is a URL where the archives for downloadable components will reside, e.g., \fI\%https://cmake.org/files/2.6.1/installer/\fP All of the archives produced by CPack should be uploaded to that location. .sp UPLOAD_DIRECTORY is the local directory where CPack will create the various archives for each of the components. The contents of this directory should be uploaded to a location accessible by the URL given in the site argument. If omitted, CPack will use the directory CPackUploads inside the CMake binary directory to store the generated archives. .sp The ALL flag indicates that all components be downloaded. Otherwise, only those components explicitly marked as DOWNLOADED or that have a specified ARCHIVE_FILE will be downloaded. Additionally, the ALL option implies ADD_REMOVE (unless NO_ADD_REMOVE is specified). .sp ADD_REMOVE indicates that CPack should install a copy of the installer that can be called from Windows\(aq Add/Remove Programs dialog (via the "Modify" button) to change the set of installed components. NO_ADD_REMOVE turns off this behavior. This option is ignored on Mac OS X. .SS CPackCygwin .sp Cygwin CPack generator (Cygwin). .SS Variables specific to CPack Cygwin generator .sp The following variable is specific to installers build on and/or for Cygwin: .INDENT 0.0 .TP .B CPACK_CYGWIN_PATCH_NUMBER The Cygwin patch number. FIXME: This documentation is incomplete. .UNINDENT .INDENT 0.0 .TP .B CPACK_CYGWIN_PATCH_FILE The Cygwin patch file. FIXME: This documentation is incomplete. .UNINDENT .INDENT 0.0 .TP .B CPACK_CYGWIN_BUILD_SCRIPT The Cygwin build script. FIXME: This documentation is incomplete. .UNINDENT .SS CPackDeb .sp The built in (binary) CPack Deb generator (Unix only) .SS Variables specific to CPack Debian (DEB) generator .sp CPackDeb may be used to create Deb package using \fBCPack\fP\&. CPackDeb is a \fBCPack\fP generator thus it uses the \fBCPACK_XXX\fP variables used by \fBCPack\fP\&. .sp CPackDeb generator should work on any Linux host but it will produce better deb package when Debian specific tools \fBdpkg\-xxx\fP are usable on the build system. .sp CPackDeb has specific features which are controlled by the specifics \fBCPACK_DEBIAN_XXX\fP variables. .sp \fBCPACK_DEBIAN__XXXX\fP variables may be used in order to have \fBcomponent\fP specific values. Note however that \fB\fP refers to the \fBgrouping name\fP written in upper case. It may be either a component name or a component GROUP name. .sp Here are some CPackDeb wiki resources that are here for historic reasons and are no longer maintained but may still prove useful: .INDENT 0.0 .INDENT 3.5 .INDENT 0.0 .IP \(bu 2 \fI\%https://cmake.org/Wiki/CMake:CPackConfiguration\fP .IP \(bu 2 \fI\%https://cmake.org/Wiki/CMake:CPackPackageGenerators#DEB_.28UNIX_only.29\fP .UNINDENT .UNINDENT .UNINDENT .sp List of CPackRPM specific variables: .INDENT 0.0 .TP .B CPACK_DEB_PACKAGE_COMPONENT Enable component packaging for CPackRPM .INDENT 7.0 .IP \(bu 2 Mandatory : NO .IP \(bu 2 Default : OFF .UNINDENT .sp If enabled (ON) multiple packages are generated. By default a single package containing files of all components is generated. .UNINDENT .INDENT 0.0 .TP .B CPACK_DEBIAN_PACKAGE_NAME .TP .B CPACK_DEBIAN__PACKAGE_NAME Set Package control field (variable is automatically transformed to lower case). .INDENT 7.0 .IP \(bu 2 Mandatory : YES .IP \(bu 2 Default : .INDENT 2.0 .IP \(bu 2 \fBCPACK_PACKAGE_NAME\fP for non\-component based installations .IP \(bu 2 \fBCPACK_DEBIAN_PACKAGE_NAME\fP suffixed with \- for component\-based installations. .UNINDENT .UNINDENT .sp See \fI\%https://www.debian.org/doc/debian\-policy/ch\-controlfields.html#s\-f\-Source\fP .UNINDENT .INDENT 0.0 .TP .B CPACK_DEBIAN_FILE_NAME .TP .B CPACK_DEBIAN__FILE_NAME Package file name. .INDENT 7.0 .IP \(bu 2 Mandatory : YES .IP \(bu 2 Default : \fB[\-].deb\fP .UNINDENT .sp This may be set to \fBDEB\-DEFAULT\fP to allow CPackDeb to generate package file name by itself in deb format: .INDENT 7.0 .INDENT 3.5 .sp .nf .ft C _\-_.deb .ft P .fi .UNINDENT .UNINDENT .sp Alternatively provided package file name must end with \fB\&.deb\fP suffix. .sp \fBNOTE:\fP .INDENT 7.0 .INDENT 3.5 Preferred setting of this variable is \fBDEB\-DEFAULT\fP but for backward compatibility with CPackDeb in CMake prior to version 3.6 this feature is disabled by default. .UNINDENT .UNINDENT .sp \fBNOTE:\fP .INDENT 7.0 .INDENT 3.5 By using non default filenames duplicate names may occur. Duplicate files get overwritten and it is up to the packager to set the variables in a manner that will prevent such errors. .UNINDENT .UNINDENT .UNINDENT .INDENT 0.0 .TP .B CPACK_DEBIAN_PACKAGE_VERSION The Debian package version .INDENT 7.0 .IP \(bu 2 Mandatory : YES .IP \(bu 2 Default : \fBCPACK_PACKAGE_VERSION\fP .UNINDENT .UNINDENT .INDENT 0.0 .TP .B CPACK_DEBIAN_PACKAGE_RELEASE The Debian package release \- Debian revision number. .INDENT 7.0 .IP \(bu 2 Mandatory : YES .IP \(bu 2 Default : 1 .UNINDENT .sp This is the numbering of the DEB package itself, i.e. the version of the packaging and not the version of the content (see \fBCPACK_DEBIAN_PACKAGE_VERSION\fP). One may change the default value if the previous packaging was buggy and/or you want to put here a fancy Linux distro specific numbering. .UNINDENT .INDENT 0.0 .TP .B CPACK_DEBIAN_PACKAGE_ARCHITECTURE .TP .B CPACK_DEBIAN__PACKAGE_ARCHITECTURE The Debian package architecture .INDENT 7.0 .IP \(bu 2 Mandatory : YES .IP \(bu 2 Default : Output of \fBdpkg \-\-print\-architecture\fP (or \fBi386\fP if \fBdpkg\fP is not found) .UNINDENT .UNINDENT .INDENT 0.0 .TP .B CPACK_DEBIAN_PACKAGE_DEPENDS .TP .B CPACK_DEBIAN__PACKAGE_DEPENDS Sets the Debian dependencies of this package. .INDENT 7.0 .IP \(bu 2 Mandatory : NO .IP \(bu 2 Default : .INDENT 2.0 .IP \(bu 2 An empty string for non\-component based installations .IP \(bu 2 \fBCPACK_DEBIAN_PACKAGE_DEPENDS\fP for component\-based installations. .UNINDENT .UNINDENT .sp \fBNOTE:\fP .INDENT 7.0 .INDENT 3.5 If \fBCPACK_DEBIAN_PACKAGE_SHLIBDEPS\fP or more specifically \fBCPACK_DEBIAN__PACKAGE_SHLIBDEPS\fP is set for this component, the discovered dependencies will be appended to \fBCPACK_DEBIAN__PACKAGE_DEPENDS\fP instead of \fBCPACK_DEBIAN_PACKAGE_DEPENDS\fP\&. If \fBCPACK_DEBIAN__PACKAGE_DEPENDS\fP is an empty string, only the automatically discovered dependencies will be set for this component. .UNINDENT .UNINDENT .sp Example: .INDENT 7.0 .INDENT 3.5 .sp .nf .ft C set(CPACK_DEBIAN_PACKAGE_DEPENDS "libc6 (>= 2.3.1\-6), libc6 (< 2.4)") .ft P .fi .UNINDENT .UNINDENT .UNINDENT .INDENT 0.0 .TP .B CPACK_DEBIAN_ENABLE_COMPONENT_DEPENDS Sets inter component dependencies if listed with \fBCPACK_COMPONENT__DEPENDS\fP variables. .INDENT 7.0 .IP \(bu 2 Mandatory : NO .IP \(bu 2 Default : \- .UNINDENT .UNINDENT .INDENT 0.0 .TP .B CPACK_DEBIAN_PACKAGE_MAINTAINER The Debian package maintainer .INDENT 7.0 .IP \(bu 2 Mandatory : YES .IP \(bu 2 Default : \fBCPACK_PACKAGE_CONTACT\fP .UNINDENT .UNINDENT .INDENT 0.0 .TP .B CPACK_DEBIAN_PACKAGE_DESCRIPTION .TP .B CPACK_COMPONENT__DESCRIPTION The Debian package description .INDENT 7.0 .IP \(bu 2 Mandatory : YES .IP \(bu 2 Default : .INDENT 2.0 .IP \(bu 2 \fBCPACK_DEBIAN_PACKAGE_DESCRIPTION\fP if set or .IP \(bu 2 \fBCPACK_PACKAGE_DESCRIPTION_SUMMARY\fP .UNINDENT .UNINDENT .UNINDENT .INDENT 0.0 .TP .B CPACK_DEBIAN_PACKAGE_SECTION .TP .B CPACK_DEBIAN__PACKAGE_SECTION Set Section control field e.g. admin, devel, doc, ... .INDENT 7.0 .IP \(bu 2 Mandatory : YES .IP \(bu 2 Default : "devel" .UNINDENT .sp See \fI\%https://www.debian.org/doc/debian\-policy/ch\-archive.html#s\-subsections\fP .UNINDENT .INDENT 0.0 .TP .B CPACK_DEBIAN_COMPRESSION_TYPE The compression used for creating the Debian package. .INDENT 7.0 .IP \(bu 2 Mandatory : YES .IP \(bu 2 Default : "gzip" .UNINDENT .sp Possible values are: .INDENT 7.0 .IP \(bu 2 lzma .IP \(bu 2 xz .IP \(bu 2 bzip2 .IP \(bu 2 gzip .UNINDENT .UNINDENT .INDENT 0.0 .TP .B CPACK_DEBIAN_PACKAGE_PRIORITY .TP .B CPACK_DEBIAN__PACKAGE_PRIORITY Set Priority control field e.g. required, important, standard, optional, extra .INDENT 7.0 .IP \(bu 2 Mandatory : YES .IP \(bu 2 Default : "optional" .UNINDENT .sp See \fI\%https://www.debian.org/doc/debian\-policy/ch\-archive.html#s\-priorities\fP .UNINDENT .INDENT 0.0 .TP .B CPACK_DEBIAN_PACKAGE_HOMEPAGE The URL of the web site for this package, preferably (when applicable) the site from which the original source can be obtained and any additional upstream documentation or information may be found. .INDENT 7.0 .IP \(bu 2 Mandatory : NO .IP \(bu 2 Default : \- .UNINDENT .sp \fBNOTE:\fP .INDENT 7.0 .INDENT 3.5 The content of this field is a simple URL without any surrounding characters such as <>. .UNINDENT .UNINDENT .UNINDENT .INDENT 0.0 .TP .B CPACK_DEBIAN_PACKAGE_SHLIBDEPS .TP .B CPACK_DEBIAN__PACKAGE_SHLIBDEPS May be set to ON in order to use \fBdpkg\-shlibdeps\fP to generate better package dependency list. .INDENT 7.0 .IP \(bu 2 Mandatory : NO .IP \(bu 2 Default : .INDENT 2.0 .IP \(bu 2 \fBCPACK_DEBIAN_PACKAGE_SHLIBDEPS\fP if set or .IP \(bu 2 OFF .UNINDENT .UNINDENT .sp \fBNOTE:\fP .INDENT 7.0 .INDENT 3.5 You may need set \fBCMAKE_INSTALL_RPATH\fP to an appropriate value if you use this feature, because if you don\(aqt \fBdpkg\-shlibdeps\fP may fail to find your own shared libs. See \fI\%https://cmake.org/Wiki/CMake_RPATH_handling\fP\&. .UNINDENT .UNINDENT .UNINDENT .INDENT 0.0 .TP .B CPACK_DEBIAN_PACKAGE_DEBUG May be set when invoking cpack in order to trace debug information during CPackDeb run. .INDENT 7.0 .IP \(bu 2 Mandatory : NO .IP \(bu 2 Default : \- .UNINDENT .UNINDENT .INDENT 0.0 .TP .B CPACK_DEBIAN_PACKAGE_PREDEPENDS .TP .B CPACK_DEBIAN__PACKAGE_PREDEPENDS Sets the \fIPre\-Depends\fP field of the Debian package. Like \fBDepends\fP, except that it also forces \fBdpkg\fP to complete installation of the packages named before even starting the installation of the package which declares the pre\-dependency. .INDENT 7.0 .IP \(bu 2 Mandatory : NO .IP \(bu 2 Default : .INDENT 2.0 .IP \(bu 2 An empty string for non\-component based installations .IP \(bu 2 \fBCPACK_DEBIAN_PACKAGE_PREDEPENDS\fP for component\-based installations. .UNINDENT .UNINDENT .sp See \fI\%http://www.debian.org/doc/debian\-policy/ch\-relationships.html#s\-binarydeps\fP .UNINDENT .INDENT 0.0 .TP .B CPACK_DEBIAN_PACKAGE_ENHANCES .TP .B CPACK_DEBIAN__PACKAGE_ENHANCES Sets the \fIEnhances\fP field of the Debian package. Similar to \fBSuggests\fP but works in the opposite direction: declares that a package can enhance the functionality of another package. .INDENT 7.0 .IP \(bu 2 Mandatory : NO .IP \(bu 2 Default : .INDENT 2.0 .IP \(bu 2 An empty string for non\-component based installations .IP \(bu 2 \fBCPACK_DEBIAN_PACKAGE_ENHANCES\fP for component\-based installations. .UNINDENT .UNINDENT .sp See \fI\%http://www.debian.org/doc/debian\-policy/ch\-relationships.html#s\-binarydeps\fP .UNINDENT .INDENT 0.0 .TP .B CPACK_DEBIAN_PACKAGE_BREAKS .TP .B CPACK_DEBIAN__PACKAGE_BREAKS Sets the \fIBreaks\fP field of the Debian package. When a binary package (P) declares that it breaks other packages (B), \fBdpkg\fP will not allow the package (P) which declares \fIBreaks\fP be \fBunpacked\fP unless the packages that will be broken (B) are deconfigured first. As long as the package (P) is configured, the previously deconfigured packages (B) cannot be reconfigured again. .INDENT 7.0 .IP \(bu 2 Mandatory : NO .IP \(bu 2 Default : .INDENT 2.0 .IP \(bu 2 An empty string for non\-component based installations .IP \(bu 2 \fBCPACK_DEBIAN_PACKAGE_BREAKS\fP for component\-based installations. .UNINDENT .UNINDENT .sp See \fI\%https://www.debian.org/doc/debian\-policy/ch\-relationships.html#s\-breaks\fP .UNINDENT .INDENT 0.0 .TP .B CPACK_DEBIAN_PACKAGE_CONFLICTS .TP .B CPACK_DEBIAN__PACKAGE_CONFLICTS Sets the \fIConflicts\fP field of the Debian package. When one binary package declares a conflict with another using a \fIConflicts\fP field, \fBdpkg\fP will not allow them to be unpacked on the system at the same time. .INDENT 7.0 .IP \(bu 2 Mandatory : NO .IP \(bu 2 Default : .INDENT 2.0 .IP \(bu 2 An empty string for non\-component based installations .IP \(bu 2 \fBCPACK_DEBIAN_PACKAGE_CONFLICTS\fP for component\-based installations. .UNINDENT .UNINDENT .sp See \fI\%https://www.debian.org/doc/debian\-policy/ch\-relationships.html#s\-conflicts\fP .sp \fBNOTE:\fP .INDENT 7.0 .INDENT 3.5 This is a stronger restriction than \fBBreaks\fP, which prevents the broken package from being configured while the breaking package is in the "Unpacked" state but allows both packages to be unpacked at the same time. .UNINDENT .UNINDENT .UNINDENT .INDENT 0.0 .TP .B CPACK_DEBIAN_PACKAGE_PROVIDES .TP .B CPACK_DEBIAN__PACKAGE_PROVIDES Sets the \fIProvides\fP field of the Debian package. A virtual package is one which appears in the \fIProvides\fP control field of another package. .INDENT 7.0 .IP \(bu 2 Mandatory : NO .IP \(bu 2 Default : .INDENT 2.0 .IP \(bu 2 An empty string for non\-component based installations .IP \(bu 2 \fBCPACK_DEBIAN_PACKAGE_PROVIDES\fP for component\-based installations. .UNINDENT .UNINDENT .sp See \fI\%https://www.debian.org/doc/debian\-policy/ch\-relationships.html#s\-virtual\fP .UNINDENT .INDENT 0.0 .TP .B CPACK_DEBIAN_PACKAGE_REPLACES .TP .B CPACK_DEBIAN__PACKAGE_REPLACES Sets the \fIReplaces\fP field of the Debian package. Packages can declare in their control file that they should overwrite files in certain other packages, or completely replace other packages. .INDENT 7.0 .IP \(bu 2 Mandatory : NO .IP \(bu 2 Default : .INDENT 2.0 .IP \(bu 2 An empty string for non\-component based installations .IP \(bu 2 \fBCPACK_DEBIAN_PACKAGE_REPLACES\fP for component\-based installations. .UNINDENT .UNINDENT .sp See \fI\%http://www.debian.org/doc/debian\-policy/ch\-relationships.html#s\-binarydeps\fP .UNINDENT .INDENT 0.0 .TP .B CPACK_DEBIAN_PACKAGE_RECOMMENDS .TP .B CPACK_DEBIAN__PACKAGE_RECOMMENDS Sets the \fIRecommends\fP field of the Debian package. Allows packages to declare a strong, but not absolute, dependency on other packages. .INDENT 7.0 .IP \(bu 2 Mandatory : NO .IP \(bu 2 Default : .INDENT 2.0 .IP \(bu 2 An empty string for non\-component based installations .IP \(bu 2 \fBCPACK_DEBIAN_PACKAGE_RECOMMENDS\fP for component\-based installations. .UNINDENT .UNINDENT .sp See \fI\%http://www.debian.org/doc/debian\-policy/ch\-relationships.html#s\-binarydeps\fP .UNINDENT .INDENT 0.0 .TP .B CPACK_DEBIAN_PACKAGE_SUGGESTS .TP .B CPACK_DEBIAN__PACKAGE_SUGGESTS Sets the \fISuggests\fP field of the Debian package. Allows packages to declare a suggested package install grouping. .INDENT 7.0 .IP \(bu 2 Mandatory : NO .IP \(bu 2 Default : .INDENT 2.0 .IP \(bu 2 An empty string for non\-component based installations .IP \(bu 2 \fBCPACK_DEBIAN_PACKAGE_SUGGESTS\fP for component\-based installations. .UNINDENT .UNINDENT .sp See \fI\%http://www.debian.org/doc/debian\-policy/ch\-relationships.html#s\-binarydeps\fP .UNINDENT .INDENT 0.0 .TP .B CPACK_DEBIAN_PACKAGE_GENERATE_SHLIBS .INDENT 7.0 .IP \(bu 2 Mandatory : NO .IP \(bu 2 Default : OFF .UNINDENT .sp Allows to generate shlibs control file automatically. Compatibility is defined by \fBCPACK_DEBIAN_PACKAGE_GENERATE_SHLIBS_POLICY\fP variable value. .sp \fBNOTE:\fP .INDENT 7.0 .INDENT 3.5 Libraries are only considered if they have both library name and version set. This can be done by setting SOVERSION property with \fBset_target_properties()\fP command. .UNINDENT .UNINDENT .UNINDENT .INDENT 0.0 .TP .B CPACK_DEBIAN_PACKAGE_GENERATE_SHLIBS_POLICY Compatibility policy for auto\-generated shlibs control file. .INDENT 7.0 .IP \(bu 2 Mandatory : NO .IP \(bu 2 Default : "=" .UNINDENT .sp Defines compatibility policy for auto\-generated shlibs control file. Possible values: "=", ">=" .sp See \fI\%https://www.debian.org/doc/debian\-policy/ch\-sharedlibs.html#s\-sharedlibs\-shlibdeps\fP .UNINDENT .INDENT 0.0 .TP .B CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA .TP .B CPACK_DEBIAN__PACKAGE_CONTROL_EXTRA This variable allow advanced user to add custom script to the control.tar.gz. Typical usage is for conffiles, postinst, postrm, prerm. .INDENT 7.0 .IP \(bu 2 Mandatory : NO .IP \(bu 2 Default : \- .UNINDENT .sp Usage: .INDENT 7.0 .INDENT 3.5 .sp .nf .ft C set(CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA "${CMAKE_CURRENT_SOURCE_DIR/prerm;${CMAKE_CURRENT_SOURCE_DIR}/postrm") .ft P .fi .UNINDENT .UNINDENT .sp \fBNOTE:\fP .INDENT 7.0 .INDENT 3.5 The original permissions of the files will be used in the final package unless the variable \fBCPACK_DEBIAN_PACKAGE_CONTROL_STRICT_PERMISSION\fP is set. In particular, the scripts should have the proper executable flag prior to the generation of the package. .UNINDENT .UNINDENT .UNINDENT .INDENT 0.0 .TP .B CPACK_DEBIAN_PACKAGE_CONTROL_STRICT_PERMISSION .TP .B CPACK_DEBIAN__PACKAGE_CONTROL_STRICT_PERMISSION This variable indicates if the Debian policy on control files should be strictly followed. .INDENT 7.0 .IP \(bu 2 Mandatory : NO .IP \(bu 2 Default : FALSE .UNINDENT .sp Usage: .INDENT 7.0 .INDENT 3.5 .sp .nf .ft C set(CPACK_DEBIAN_PACKAGE_CONTROL_STRICT_PERMISSION TRUE) .ft P .fi .UNINDENT .UNINDENT .sp \fBNOTE:\fP .INDENT 7.0 .INDENT 3.5 This overrides the permissions on the original files, following the rules set by Debian policy \fI\%https://www.debian.org/doc/debian\-policy/ch\-files.html#s\-permissions\-owners\fP .UNINDENT .UNINDENT .UNINDENT .INDENT 0.0 .TP .B CPACK_DEBIAN_PACKAGE_SOURCE .TP .B CPACK_DEBIAN__PACKAGE_SOURCE Sets the \fBSource\fP field of the binary Debian package. When the binary package name is not the same as the source package name (in particular when several components/binaries are generated from one source) the source from which the binary has been generated should be indicated with the field \fBSource\fP\&. .INDENT 7.0 .IP \(bu 2 Mandatory : NO .IP \(bu 2 Default : .INDENT 2.0 .IP \(bu 2 An empty string for non\-component based installations .IP \(bu 2 \fBCPACK_DEBIAN_PACKAGE_SOURCE\fP for component\-based installations. .UNINDENT .UNINDENT .sp See \fI\%https://www.debian.org/doc/debian\-policy/ch\-controlfields.html#s\-f\-Source\fP .sp \fBNOTE:\fP .INDENT 7.0 .INDENT 3.5 This value is not interpreted. It is possible to pass an optional revision number of the referenced source package as well. .UNINDENT .UNINDENT .UNINDENT .SS CPackDMG .sp DragNDrop CPack generator (Mac OS X). .SS Variables specific to CPack DragNDrop generator .sp The following variables are specific to the DragNDrop installers built on Mac OS X: .INDENT 0.0 .TP .B CPACK_DMG_VOLUME_NAME The volume name of the generated disk image. Defaults to CPACK_PACKAGE_FILE_NAME. .UNINDENT .INDENT 0.0 .TP .B CPACK_DMG_FORMAT The disk image format. Common values are UDRO (UDIF read\-only), UDZO (UDIF zlib\-compressed) or UDBZ (UDIF bzip2\-compressed). Refer to hdiutil(1) for more information on other available formats. Defaults to UDZO. .UNINDENT .INDENT 0.0 .TP .B CPACK_DMG_DS_STORE Path to a custom DS_Store file. This .DS_Store file e.g. can be used to specify the Finder window position/geometry and layout (such as hidden toolbars, placement of the icons etc.). This file has to be generated by the Finder (either manually or through AppleScript) using a normal folder from which the .DS_Store file can then be extracted. .UNINDENT .INDENT 0.0 .TP .B CPACK_DMG_DS_STORE_SETUP_SCRIPT Path to a custom AppleScript file. This AppleScript is used to generate a .DS_Store file which specifies the Finder window position/geometry and layout (such as hidden toolbars, placement of the icons etc.). By specifying a custom AppleScript there is no need to use CPACK_DMG_DS_STORE, as the .DS_Store that is generated by the AppleScript will be packaged. .UNINDENT .INDENT 0.0 .TP .B CPACK_DMG_BACKGROUND_IMAGE Path to an image file to be used as the background. This file will be copied to .background/background., where ext is the original image file extension. The background image is installed into the image before CPACK_DMG_DS_STORE_SETUP_SCRIPT is executed or CPACK_DMG_DS_STORE is installed. By default no background image is set. .UNINDENT .INDENT 0.0 .TP .B CPACK_DMG_DISABLE_APPLICATIONS_SYMLINK Default behaviour is to include a symlink to \fB/Applications\fP in the DMG. Set this option to \fBON\fP to avoid adding the symlink. .UNINDENT .INDENT 0.0 .TP .B CPACK_DMG_SLA_DIR Directory where license and menu files for different languages are stored. Setting this causes CPack to look for a \fB.menu.txt\fP and \fB.license.txt\fP file for every language defined in \fBCPACK_DMG_SLA_LANGUAGES\fP\&. If both this variable and \fBCPACK_RESOURCE_FILE_LICENSE\fP are set, CPack will only look for the menu files and use the same license file for all languages. .UNINDENT .INDENT 0.0 .TP .B CPACK_DMG_SLA_LANGUAGES Languages for which a license agreement is provided when mounting the generated DMG. A menu file consists of 9 lines of text. The first line is is the name of the language itself, uppercase, in English (e.g. German). The other lines are translations of the following strings: .INDENT 7.0 .IP \(bu 2 Agree .IP \(bu 2 Disagree .IP \(bu 2 Print .IP \(bu 2 Save... .IP \(bu 2 You agree to the terms of the License Agreement when you click the "Agree" button. .IP \(bu 2 Software License Agreement .IP \(bu 2 This text cannot be saved. The disk may be full or locked, or the file may be locked. .IP \(bu 2 Unable to print. Make sure you have selected a printer. .UNINDENT .sp For every language in this list, CPack will try to find files \fB.menu.txt\fP and \fB.license.txt\fP in the directory specified by the \fBCPACK_DMG_SLA_DIR\fP variable. .UNINDENT .INDENT 0.0 .TP .B CPACK_COMMAND_HDIUTIL Path to the hdiutil(1) command used to operate on disk image files on Mac OS X. This variable can be used to override the automatically detected command (or specify its location if the auto\-detection fails to find it.) .UNINDENT .INDENT 0.0 .TP .B CPACK_COMMAND_SETFILE Path to the SetFile(1) command used to set extended attributes on files and directories on Mac OS X. This variable can be used to override the automatically detected command (or specify its location if the auto\-detection fails to find it.) .UNINDENT .INDENT 0.0 .TP .B CPACK_COMMAND_REZ Path to the Rez(1) command used to compile resources on Mac OS X. This variable can be used to override the automatically detected command (or specify its location if the auto\-detection fails to find it.) .UNINDENT .SS CPackIFW .sp This module looks for the location of the command line utilities supplied with the Qt Installer Framework (\fI\%QtIFW\fP). .sp The module also defines several commands to control the behavior of the CPack \fBIFW\fP generator. .SS Overview .sp CPack \fBIFW\fP generator helps you to create online and offline binary cross\-platform installers with a graphical user interface. .sp CPack IFW generator prepares project installation and generates configuration and meta information for \fI\%QtIFW\fP tools. .sp The \fI\%QtIFW\fP provides a set of tools and utilities to create installers for the supported desktop Qt platforms: Linux, Microsoft Windows, and Mac OS X. .sp You should also install \fI\%QtIFW\fP to use CPack \fBIFW\fP generator. If you don\(aqt use a default path for the installation, please set the used path in the variable \fBQTIFWDIR\fP\&. .SS Variables .sp You can use the following variables to change behavior of CPack \fBIFW\fP generator. .SS Debug .INDENT 0.0 .TP .B CPACK_IFW_VERBOSE Set to \fBON\fP to enable addition debug output. By default is \fBOFF\fP\&. .UNINDENT .SS Package .INDENT 0.0 .TP .B CPACK_IFW_PACKAGE_TITLE Name of the installer as displayed on the title bar. By default used \fBCPACK_PACKAGE_DESCRIPTION_SUMMARY\fP\&. .UNINDENT .INDENT 0.0 .TP .B CPACK_IFW_PACKAGE_PUBLISHER Publisher of the software (as shown in the Windows Control Panel). By default used \fBCPACK_PACKAGE_VENDOR\fP\&. .UNINDENT .INDENT 0.0 .TP .B CPACK_IFW_PRODUCT_URL URL to a page that contains product information on your web site. .UNINDENT .INDENT 0.0 .TP .B CPACK_IFW_PACKAGE_ICON Filename for a custom installer icon. The actual file is \(aq.icns\(aq (Mac OS X), \(aq.ico\(aq (Windows). No functionality on Unix. .UNINDENT .INDENT 0.0 .TP .B CPACK_IFW_PACKAGE_WINDOW_ICON Filename for a custom window icon in PNG format for the Installer application. .UNINDENT .INDENT 0.0 .TP .B CPACK_IFW_PACKAGE_LOGO Filename for a logo is used as QWizard::LogoPixmap. .UNINDENT .INDENT 0.0 .TP .B CPACK_IFW_PACKAGE_START_MENU_DIRECTORY Name of the default program group for the product in the Windows Start menu. .sp By default used \fBCPACK_IFW_PACKAGE_NAME\fP\&. .UNINDENT .INDENT 0.0 .TP .B CPACK_IFW_TARGET_DIRECTORY Default target directory for installation. By default used "@ApplicationsDir@/\fBCPACK_PACKAGE_INSTALL_DIRECTORY\fP" .sp You can use predefined variables. .UNINDENT .INDENT 0.0 .TP .B CPACK_IFW_ADMIN_TARGET_DIRECTORY Default target directory for installation with administrator rights. .sp You can use predefined variables. .UNINDENT .INDENT 0.0 .TP .B CPACK_IFW_PACKAGE_GROUP The group, which will be used to configure the root package .UNINDENT .INDENT 0.0 .TP .B CPACK_IFW_PACKAGE_NAME The root package name, which will be used if configuration group is not specified .UNINDENT .INDENT 0.0 .TP .B CPACK_IFW_PACKAGE_MAINTENANCE_TOOL_NAME Filename of the generated maintenance tool. The platform\-specific executable file extension is appended. .sp By default used \fI\%QtIFW\fP defaults (\fBmaintenancetool\fP). .UNINDENT .INDENT 0.0 .TP .B CPACK_IFW_PACKAGE_MAINTENANCE_TOOL_INI_FILE Filename for the configuration of the generated maintenance tool. .sp By default used \fI\%QtIFW\fP defaults (\fBmaintenancetool.ini\fP). .UNINDENT .INDENT 0.0 .TP .B CPACK_IFW_PACKAGE_ALLOW_NON_ASCII_CHARACTERS Set to \fBON\fP if the installation path can contain non\-ASCII characters. .sp Is \fBON\fP for \fI\%QtIFW\fP less 2.0 tools. .UNINDENT .INDENT 0.0 .TP .B CPACK_IFW_PACKAGE_ALLOW_SPACE_IN_PATH Set to \fBOFF\fP if the installation path cannot contain space characters. .sp Is \fBON\fP for \fI\%QtIFW\fP less 2.0 tools. .UNINDENT .INDENT 0.0 .TP .B CPACK_IFW_PACKAGE_CONTROL_SCRIPT Filename for a custom installer control script. .UNINDENT .INDENT 0.0 .TP .B CPACK_IFW_REPOSITORIES_ALL The list of remote repositories. .sp The default value of this variable is computed by CPack and contains all repositories added with command \fBcpack_ifw_add_repository()\fP or updated with command \fBcpack_ifw_update_repository()\fP\&. .UNINDENT .INDENT 0.0 .TP .B CPACK_IFW_DOWNLOAD_ALL If this is \fBON\fP all components will be downloaded. By default is \fBOFF\fP or used value from \fBCPACK_DOWNLOAD_ALL\fP if set .UNINDENT .SS Components .INDENT 0.0 .TP .B CPACK_IFW_RESOLVE_DUPLICATE_NAMES Resolve duplicate names when installing components with groups. .UNINDENT .INDENT 0.0 .TP .B CPACK_IFW_PACKAGES_DIRECTORIES Additional prepared packages dirs that will be used to resolve dependent components. .UNINDENT .SS Tools .INDENT 0.0 .TP .B CPACK_IFW_FRAMEWORK_VERSION The version of used \fI\%QtIFW\fP tools. .UNINDENT .INDENT 0.0 .TP .B CPACK_IFW_BINARYCREATOR_EXECUTABLE The path to "binarycreator" command line client. .sp This variable is cached and can be configured user if need. .UNINDENT .INDENT 0.0 .TP .B CPACK_IFW_REPOGEN_EXECUTABLE The path to "repogen" command line client. .sp This variable is cached and can be configured user if need. .UNINDENT .SS Commands .sp The module defines the following commands: .sp .ce ---- .ce 0 .sp .INDENT 0.0 .TP .B cpack_ifw_configure_component .UNINDENT .sp Sets the arguments specific to the CPack IFW generator. .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C cpack_ifw_configure_component( [COMMON] [ESSENTIAL] [NAME ] [VERSION ] [SCRIPT