From f77734e01c85aded92cf5fdc1e7038658e6aaf29 Mon Sep 17 00:00:00 2001 From: Piotr Dziwinski Date: Thu, 20 Dec 2012 00:23:12 +0100 Subject: Installation path fixes and CMakeLists refactoring make && make install should now give a working installation. --- src/po/CMakeLists.txt | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) (limited to 'src/po/CMakeLists.txt') diff --git a/src/po/CMakeLists.txt b/src/po/CMakeLists.txt index 02a4d37..3b26571 100644 --- a/src/po/CMakeLists.txt +++ b/src/po/CMakeLists.txt @@ -1,13 +1,10 @@ cmake_minimum_required(VERSION 2.8) -SET(_potFile colobot.pot) +set(_potFile colobot.pot) -# TODO: Use a finder -SET(XGETTEXT_CMD /usr/bin/xgettext) +find_program(XGETTEXT_CMD xgettext) -find_package(Gettext REQUIRED) - -ADD_CUSTOM_COMMAND(OUTPUT ${_potFile} +add_custom_command(OUTPUT ${_potFile} COMMAND ${XGETTEXT_CMD} ../app/app.cpp --output=${_potFile} COMMAND ${XGETTEXT_CMD} ../common/restext_strings.c --output=${_potFile} --join-existing --extract-all --no-location @@ -15,10 +12,8 @@ ADD_CUSTOM_COMMAND(OUTPUT ${_potFile} COMMENT "Extract translatable messages to ${_potFile}" ) -ADD_CUSTOM_TARGET(_${potFile} ${_all} -DEPENDS ${_potFile} -) +add_custom_target(_${potFile} ${_all} DEPENDS ${_potFile}) -FILE(GLOB _poFiles *.po) +file(GLOB _poFiles *.po) -GETTEXT_CREATE_TRANSLATIONS(${_potFile} ALL ${_poFiles}) +gettext_create_translations(${_potFile} ALL ${_poFiles}) -- cgit v1.2.3-1-g7c22