1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50
|
#
# cmake/Intltool.cmake
# Copyright (C) 2013, Valama development team
#
# Valama is free software: you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the
# Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Valama is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program. If not, see <http://www.gnu.org/licenses/>.
#
##
find_program(INTLTOOL_EXTRACT_EXECUTABLE intltool-extract)
find_program(INTLTOOL_MERGE_EXECUTABLE intltool-merge)
mark_as_advanced(INTLTOOL_EXTRACT_EXECUTABLE)
mark_as_advanced(INTLTOOL_MERGE_EXECUTABLE)
if(INTLTOOL_EXTRACT_EXECUTABLE)
execute_process(
COMMAND
${INTLTOOL_EXTRACT_EXECUTABLE} "--version"
OUTPUT_VARIABLE
intltool_version
ERROR_QUIET
OUTPUT_STRIP_TRAILING_WHITESPACE
)
if(intltool_version MATCHES "^intltool-extract \\(.*\\) [0-9]")
string(REGEX REPLACE "^intltool-extract \\([^\\)]*\\) ([0-9\\.]+[^ \n]*).*" "\\1" INTLTOOL_VERSION_STRING "${intltool_version}")
endif()
unset(intltool_version)
endif()
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(Intltool
REQUIRED_VARS
INTLTOOL_EXTRACT_EXECUTABLE
INTLTOOL_MERGE_EXECUTABLE
VERSION_VAR
INTLTOOL_VERSION_STRING
)
set(INTLTOOL_OPTIONS_DEFAULT
"--quiet"
)
|