Warning, /graphics/glaxnimate/external/Qt-Color-Widgets/cmake/modules/ProjectVersioning.cmake is written in an unsupported language. File is not indexed.

0001 define_property (TARGET
0002   PROPERTY GIT_DESCRIBE
0003   BRIEF_DOCS "Advanced version info for developers"
0004   FULL_DOCS "String with information that is important for developers during
0005   development process. This information includes git commit hash, durty status
0006   of repo, distance from the last tag.")
0007 
0008 define_property (TARGET
0009   PROPERTY GIT_UNTRACKED_FILES
0010   BRIEF_DOCS "Information about presence of untracked files"
0011   FULL_DOCS "Used in helper functions generation to add .with-untracked suffix
0012   to version string. Suffix is only added if there are some untracked not
0013   ignored files in repository.")
0014 
0015 set(HERE_DIR ${CMAKE_CURRENT_LIST_DIR})
0016 
0017 
0018 function (target_version_information
0019         TARGET_NAME i_target_name
0020     EXPORT_HEADER i_export_header
0021     EXPORT_MACRO i_export_macro
0022     VERSIONED_ENTITY i_versioned_entity)
0023 
0024   find_file (
0025         headerFileTemplate
0026         "ProjectVersioning/version.h.in"
0027         PATHS ${CMAKE_MODULE_PATH})
0028 
0029     if ( NOT ${headerFileTemplate} )
0030         set(headerFileTemplate "${HERE_DIR}/ProjectVersioning/version.h.in")
0031     endif()
0032 
0033   find_file (
0034         sourceFileTemplate
0035         "ProjectVersioning/version.c.in"
0036         PATHS ${CMAKE_MODULE_PATH})
0037 
0038     if ( NOT ${sourceFileTemplate} )
0039         set(sourceFileTemplate "${HERE_DIR}/ProjectVersioning/version.c.in")
0040     endif()
0041 
0042   exec_program (
0043         "git"
0044         ${CMAKE_SOURCE_DIR}
0045         ARGS "describe --always --dirty --long --tags"
0046         OUTPUT_VARIABLE gitDescribe)
0047 
0048   exec_program (
0049         "git"
0050         ${CMAKE_SOURCE_DIR}
0051         ARGS "ls-files --others --exclude-standard"
0052         OUTPUT_VARIABLE gitUntracked)
0053 
0054   if (gitUntracked)
0055         set (gitUntracked ".with-untracked")
0056   endif (gitUntracked)
0057 
0058   configure_file (
0059         "${headerFileTemplate}"
0060         "${CMAKE_CURRENT_BINARY_DIR}/${i_versioned_entity}_version.h")
0061 
0062   configure_file(
0063         "${sourceFileTemplate}"
0064         "${CMAKE_BINARY_DIR}/${i_versioned_entity}_version.c")
0065 
0066   target_sources ("${i_target_name}"
0067     PRIVATE
0068     $<BUILD_INTERFACE:${PROJECT_BINARY_DIR}/${i_versioned_entity}_version.h>
0069     $<INSTALL_INTERFACE:include/${i_include_prefix}/${i_versioned_entity}_version.h>
0070         PRIVATE
0071         "${CMAKE_BINARY_DIR}/${i_versioned_entity}_version.c")
0072 
0073   set_target_properties (${i_target_name}
0074         PROPERTIES
0075         GIT_DESCRIBE "${gitDescribe}"
0076         GIT_UNTRACKED_FILES "${gitUntracked}")
0077 
0078   unset (headerFileTemplate PARENT_SCOPE)
0079   unset (sourceFileTemplate PARENT_SCOPE)
0080 endfunction (target_version_information)