Mercurial > trustbridge
view cmake/FindHg.cmake @ 1119:5349e2354c48
(issue54) Merge branch runafterinstall
There is now an NSIS Plugin that executes the Software after
installation using COM in the shell of the current user.
With the way over the shell there is no inheritance /
token management required. As it is impossible to
drop all privileges of a token granted by UAC and
still be able to reelevate the Token again with another
RunAs call later this round trip over the Shell was
necessary.
author | Andre Heinecke <andre.heinecke@intevation.de> |
---|---|
date | Tue, 16 Sep 2014 19:48:22 +0200 |
parents | a2998ae79436 |
children |
line wrap: on
line source
# The module defines the following variables: # HG_EXECUTABLE - path to mercurial command line client (hg) # HG_FOUND - true if the command line client was found # HG_VERSION_STRING - the version of mercurial found # Example usage: # find_package(Hg) # if(HG_FOUND) # message("hg found: ${HG_EXECUTABLE}") # endif() #============================================================================= # Copyright 2010-2012 Kitware, Inc. # Copyright 2012 Rolf Eike Beer <eike@sf-mail.de> # # Distributed under the OSI-approved BSD License (the "License"); # see accompanying file Copyright.txt for details. # # This software is distributed WITHOUT ANY WARRANTY; without even the # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # See the License for more information. #============================================================================= # (To distribute this file outside of CMake, substitute the full # License text for the above reference.) find_program(HG_EXECUTABLE NAMES hg PATH_SUFFIXES Mercurial DOC "hg command line client" ) mark_as_advanced(HG_EXECUTABLE) if(HG_EXECUTABLE) execute_process(COMMAND ${HG_EXECUTABLE} --version OUTPUT_VARIABLE hg_version ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE) if(hg_version MATCHES "^Mercurial Distributed SCM \\(version ([0-9][^)]*)\\)") set(HG_VERSION_STRING "${CMAKE_MATCH_1}") endif() unset(hg_version) endif() # Handle the QUIETLY and REQUIRED arguments and set HG_FOUND to TRUE if # all listed variables are TRUE include(FindPackageHandleStandardArgs) find_package_handle_standard_args(Hg REQUIRED_VARS HG_EXECUTABLE VERSION_VAR HG_VERSION_STRING)