diff options
| author | Alex Merry <alex.merry@kde.org> | 2014-04-16 14:40:22 +0100 | 
|---|---|---|
| committer | Alex Merry <alex.merry@kde.org> | 2014-04-16 16:54:12 +0100 | 
| commit | f017671e5543667a695146a4df0e1cb694812ca3 (patch) | |
| tree | 93b2178c435305f7123b96778d86db9575e75219 | |
| parent | 071581a3f899c881c9938efd082fd32589822b45 (diff) | |
| download | extra-cmake-modules-f017671e5543667a695146a4df0e1cb694812ca3.tar.gz extra-cmake-modules-f017671e5543667a695146a4df0e1cb694812ca3.tar.bz2 | |
ECMCreateQmFromPoFiles: Also check CMAKE_INSTALL_LOCALEDIR
This is the variable set by GNUInstallDirs.
REVIEW: 117596
| -rw-r--r-- | modules/ECMCreateQmFromPoFiles.cmake | 11 | 
1 files changed, 8 insertions, 3 deletions
| diff --git a/modules/ECMCreateQmFromPoFiles.cmake b/modules/ECMCreateQmFromPoFiles.cmake index b8f3c651..e7a401a1 100644 --- a/modules/ECMCreateQmFromPoFiles.cmake +++ b/modules/ECMCreateQmFromPoFiles.cmake @@ -18,7 +18,8 @@  # extracted from the "Language" field inside the .po file.  #  # INSTALL_DESTINATION defaults to ``${LOCALE_INSTALL_DIR}`` if defined, -# otherwise it uses "share/locale". +# otherwise it uses ``${CMAKE_INSTALL_LOCALEDIR}`` if that is defined, otherwise +# it uses ``share/locale``.  #  # CATALOG_NAME defines the name of the installed .qm files. If set, .qm files  # will be installed as ``<catalog_name>.qm``. If not set .qm files will be named @@ -189,7 +190,9 @@ function(ECM_CREATE_QM_FROM_PO_FILES)      if(NOT ARGS_INSTALL_DESTINATION)          if (LOCALE_INSTALL_DIR) -            set(ARGS_INSTALL_DESTINATION ${LOCALE_INSTALL_DIR}) +            set(ARGS_INSTALL_DESTINATION "${LOCALE_INSTALL_DIR}") +        elseif (CMAKE_INSTALL_LOCALEDIR) +            set(ARGS_INSTALL_DESTINATION "${CMAKE_INSTALL_LOCALEDIR}")          else()              set(ARGS_INSTALL_DESTINATION share/locale)          endif() @@ -220,7 +223,9 @@ macro(_ECM_CREATE_QM_FROM_PO_FILES_LEGACY)      get_filename_component(catalog_name ${ARGS_POT_NAME} NAME_WE)      if (LOCALE_INSTALL_DIR) -        set(install_destination ${LOCALE_INSTALL_DIR}) +        set(install_destination "${LOCALE_INSTALL_DIR}") +    elseif (CMAKE_INSTALL_LOCALEDIR) +        set(install_destination "${CMAKE_INSTALL_LOCALEDIR}")      else()          set(install_destination share/locale)      endif() | 
