Skip to content

Commit

Permalink
Try to get rid of explicit Gettext dependency
Browse files Browse the repository at this point in the history
We are using Gettext via glib, no need to depend on it from CMake. Let's
see if this breaks for some systems.
  • Loading branch information
houz committed Feb 10, 2015
1 parent 4df7572 commit 8d26343
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 69 deletions.
31 changes: 14 additions & 17 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -204,24 +204,21 @@ endif(NOT EXTERNAL_PROGRAMS_FOUND)

#need to put here do setting LOCALE_DIR variable
if(USE_NLS)
find_package(Gettext)
if(Gettext_FOUND)
if(NOT LOCALE_DIR)
if(NOT LOCALE_DIR)
SET(LOCALE_DIR "${CMAKE_INSTALL_PREFIX}/share/locale")
endif(NOT LOCALE_DIR)

if(NOT LOCALE_DIR)
message(QUIET "Set LOCALE_DIR to path to get Gettext working")
else()
find_package(Msgfmt)
if(Msgfmt_FOUND)
message(STATUS "Found msgfmt to convert language file. Translation enabled")
add_subdirectory(po)
else()
message(STATUS "Cannot find msgfmt to convert language file. Translation won't be enabled")
endif()
endif(NOT LOCALE_DIR)
endif(Gettext_FOUND)
endif(NOT LOCALE_DIR)

if(NOT LOCALE_DIR)
message(QUIET "Set LOCALE_DIR to path to get Gettext working")
else()
find_package(Msgfmt)
if(Msgfmt_FOUND)
message(STATUS "Found msgfmt to convert language file. Translation enabled")
add_subdirectory(po)
else()
message(STATUS "Cannot find msgfmt to convert language file. Translation won't be enabled")
endif()
endif(NOT LOCALE_DIR)
endif(USE_NLS)

if(NOT DEFINED RUNTIME_LOCALE_DIR)
Expand Down
42 changes: 0 additions & 42 deletions cmake/modules/FindGettext.cmake

This file was deleted.

11 changes: 2 additions & 9 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -186,15 +186,8 @@ foreach(lib ${OUR_LIBS} LensFun GIO GThread GModule PangoCairo PThread Rsvg2 Lib
endforeach(lib)

if(USE_NLS)
find_package(Gettext)
if(Gettext_FOUND)
include_directories(SYSTEM ${Gettext_INCLUDE_DIRS})
list(APPEND LIBS ${Gettext_LIBRARIES})
add_definitions("-DUSE_GETTEXT")
message(STATUS "Internationalization: Enabled")
else()
message(STATUS "Internationalization: Disabled (libintl not found)")
endif()
add_definitions("-DUSE_GETTEXT")
message(STATUS "Internationalization: Enabled")
endif(USE_NLS)

if(USE_FLICKR)
Expand Down
1 change: 0 additions & 1 deletion src/cli/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@
#include <sys/time.h>
#include <unistd.h>
#include <inttypes.h>
#include <libintl.h>

static void generate_thumbnail_cache()
{
Expand Down

0 comments on commit 8d26343

Please sign in to comment.