mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-20 20:48:07 +00:00
Handle translations when building with CMake.
This commit is contained in:
parent
7ce476ffb0
commit
02ed5338ed
3 changed files with 40 additions and 1 deletions
|
|
@ -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})
|
||||
|
|
|
|||
33
po/CMakeLists.txt
Normal file
33
po/CMakeLists.txt
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
############################################################################
|
||||
# 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()
|
||||
Loading…
Add table
Reference in a new issue