diff --git a/CMakeLists.txt b/CMakeLists.txt index f13356af5..a3f2fd503 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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") diff --git a/coreapi/CMakeLists.txt b/coreapi/CMakeLists.txt index cdb0b84ae..d8bb261b1 100644 --- a/coreapi/CMakeLists.txt +++ b/coreapi/CMakeLists.txt @@ -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() diff --git a/gtk/CMakeLists.txt b/gtk/CMakeLists.txt index 46436d636..c51815bde 100644 --- a/gtk/CMakeLists.txt +++ b/gtk/CMakeLists.txt @@ -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()