mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-02-01 18:59:25 +00:00
Fix internationalisation with CMake #2
This commit is contained in:
parent
aa55fe06c5
commit
547822cd9f
3 changed files with 9 additions and 4 deletions
|
|
@ -51,6 +51,7 @@ option(ENABLE_TUTORIALS "Enable compilation of tutorials." YES)
|
|||
option(ENABLE_UNIT_TESTS "Enable compilation of unit tests." YES)
|
||||
option(ENABLE_UPNP "Build with uPnP support." YES)
|
||||
option(ENABLE_VIDEO "Build with video support." YES)
|
||||
option(ENABLE_NLS "Build with internationalisation support" YES)
|
||||
|
||||
|
||||
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
|
||||
|
|
@ -119,7 +120,10 @@ if(ENABLE_NOTIFY)
|
|||
set(ENABLE_NOTIFY OFF CACHE BOOL "Enable libnotify support." FORCE)
|
||||
endif()
|
||||
endif()
|
||||
find_package(Gettext)
|
||||
if(ENABLE_NLS)
|
||||
find_package(Gettext REQUIRED)
|
||||
find_package(Intl REQUIRED)
|
||||
endif()
|
||||
|
||||
|
||||
include_directories(
|
||||
|
|
@ -145,9 +149,10 @@ endif()
|
|||
if(MSVC)
|
||||
include_directories(${MSVC_INCLUDE_DIR})
|
||||
endif()
|
||||
if(GETTEXT_FOUND)
|
||||
if(INTL_FOUND)
|
||||
set(HAVE_GETTEXT 1)
|
||||
add_definitions("-DENABLE_NLS")
|
||||
include_directories(${INTL_INCLUDE_DIRECTORIES})
|
||||
endif()
|
||||
|
||||
add_definitions("-DIN_LINPHONE")
|
||||
|
|
|
|||
|
|
@ -144,7 +144,7 @@ endif()
|
|||
if(WIN32 AND NOT "${CMAKE_SYSTEM_NAME}" STREQUAL "WindowsPhone")
|
||||
list(APPEND LIBS shlwapi)
|
||||
endif()
|
||||
if(GETTEXT_FOUND)
|
||||
if(INTL_FOUND)
|
||||
list(APPEND LIBS ${INTL_LIBRARIES})
|
||||
endif()
|
||||
|
||||
|
|
|
|||
|
|
@ -84,7 +84,7 @@ endif()
|
|||
set_target_properties(linphone-gtk PROPERTIES OUTPUT_NAME linphone LINKER_LANGUAGE CXX)
|
||||
target_include_directories(linphone-gtk PUBLIC ${GTK2_INCLUDE_DIRS} ${INTL_INCLUDE_DIRS})
|
||||
target_link_libraries(linphone-gtk linphone ${GTK2_LIBRARIES})
|
||||
if(GETTEXT_FOUND)
|
||||
if(INTL_FOUND)
|
||||
target_link_libraries(linphone-gtk ${INTL_LIBRARIES})
|
||||
endif()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue