Commit 02ed5338 authored by Ghislain MARY's avatar Ghislain MARY

Handle translations when building with CMake.

parent 7ce476ff
......@@ -95,6 +95,7 @@ if(ENABLE_NOTIFY)
set(ENABLE_NOTIFY OFF CACHE BOOL "Enable libnotify support." FORCE)
endif()
endif()
find_package(Gettext)
include_directories(
......@@ -114,7 +115,7 @@ if(MSVC)
include_directories(${CMAKE_PREFIX_PATH}/include/MSVC)
endif()
add_definitions(-DIN_LINPHONE)
add_definitions("-DIN_LINPHONE")
if(MSVC)
......@@ -163,6 +164,7 @@ add_subdirectory(share)
if(ENABLE_GTK_UI)
add_subdirectory(gtk)
add_subdirectory(pixmaps)
add_subdirectory(po)
endif()
if(ENABLE_TOOLS)
add_subdirectory(tools)
......
......@@ -65,6 +65,10 @@ set(SOURCE_FILES
videowindow.c
)
if(GETTEXT_FOUND)
add_definitions("-DENABLE_NLS")
endif()
add_executable(linphone-gtk ${SOURCE_FILES})
set_target_properties(linphone-gtk PROPERTIES OUTPUT_NAME linphone)
target_include_directories(linphone-gtk PUBLIC ${GTK2_INCLUDE_DIRS})
......
############################################################################
# CMakeLists.txt
# Copyright (C) 2014 Belledonne Communications, Grenoble France
#
############################################################################
#
# This program 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 2
# of the License, or (at your option) any later version.
#
# This program 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, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
############################################################################
if(GETTEXT_FOUND)
string(REPLACE " " ";" LANGUAGES ${LINPHONE_ALL_LANGS})
foreach(language ${LANGUAGES})
GETTEXT_PROCESS_PO_FILES(${language} ALL PO_FILES ${language}.po)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${language}.gmo
DESTINATION ${PACKAGE_LOCALE_DIR}/${language}/LC_MESSAGES
RENAME linphone.mo
PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
)
endforeach()
endif()
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment