<?xml version="1.0" encoding="UTF-8" ?>

<bugzilla version="5.2"
          urlbase="https://bugzilla.altlinux.org/"
          
          maintainer="jenya@basealt.ru"
>

    <bug>
          <bug_id>28137</bug_id>
          
          <creation_ts>2012-11-28 00:22:29 +0400</creation_ts>
          <short_desc>find_package(Gettext) does not set GETTEXT_FOUND nor Gettext_FOUND</short_desc>
          <delta_ts>2013-11-07 14:34:32 +0400</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>4</classification_id>
          <classification>Development</classification>
          <product>Sisyphus</product>
          <component>cmake-modules</component>
          <version>unstable</version>
          <rep_platform>all</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P3</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Ivan A. Melnikov">iv</reporter>
          <assigned_to name="Vitaly Lipatov">lav</assigned_to>
          <cc>lav</cc>
    
    <cc>zerg</cc>
          
          <qa_contact>qa-sisyphus</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>135508</commentid>
    <comment_count>0</comment_count>
    <who name="Ivan A. Melnikov">iv</who>
    <bug_when>2012-11-28 00:22:29 +0400</bug_when>
    <thetext>Комментарий в /usr/share/CMake/Modules/FindGettext.cmake говорит, что в случае, если gettext найден, выставляется переменная GETTEXT_FOUND, и многие проекты на это рассчитывают. Однако ни эта переменная, ни ожидаемая Gettext_FOUND, не выставляются. Тестировал, например, так:

$ cat ../CMakeLists.txt

cmake_minimum_required(VERSION 2.6.0)
find_package(Gettext REQUIRED)

if (GETTEXT_FOUND)
message(&quot;found&quot;)
else (GETTEXT_FOUND)
message(&quot;not found&quot;)
endif (GETTEXT_FOUND)

$ cmake ..
-- The C compiler identification is GNU 4.7.2
-- The CXX compiler identification is GNU 4.7.2
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Found Gettext: /usr/bin/msgmerge (found version &quot;0.18.1&quot;) 
not found
-- Configuring done
-- Generating done


Проблему можно решить, например, закомментировав строку

set(GETTEXT_FOUND ${Gettext_FOUND})

в конце /usr/share/CMake/Modules/FindGettext.cmake</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>143675</commentid>
    <comment_count>1</comment_count>
    <who name="Slava Dubrovskiy">dubrsl</who>
    <bug_when>2013-11-07 14:34:32 +0400</bug_when>
    <thetext>Вроде в cmake-2.8.11-alt1 работает

[slava@dubrwork BUILD]$ cmake ..
-- The C compiler identification is GNU 4.7.2
-- The CXX compiler identification is GNU 4.7.2
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Found Gettext: /usr/bin/msgmerge (found version &quot;0.18.3&quot;) 
found
-- Configuring done
-- Generating done
-- Build files have been written to: /home/slava/work/cmake4/BUILD</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>