diff --git a/cmake/Translation.cmake b/cmake/Translation.cmake index 370beee7fd..9ed661af97 100644 --- a/cmake/Translation.cmake +++ b/cmake/Translation.cmake @@ -32,21 +32,12 @@ # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -MACRO(GETTEXT_CREATE_TRANSLATIONS_PCSX2 _potFile _firstPoFileArg) - # make it a real variable, so we can modify it here - SET(_firstPoFile "${_firstPoFileArg}") - +MACRO(GETTEXT_CREATE_TRANSLATIONS_PCSX2 _potFile) SET(_moFiles) GET_FILENAME_COMPONENT(_potBasename ${_potFile} NAME_WE) GET_FILENAME_COMPONENT(_absPotFile ${_potFile} ABSOLUTE) - SET(_addToAll) - IF(${_firstPoFile} STREQUAL "ALL") - SET(_addToAll "ALL") - SET(_firstPoFile) - ENDIF(${_firstPoFile} STREQUAL "ALL") - - FOREACH (_currentPoFile ${_firstPoFile} ${ARGN}) + FOREACH (_currentPoFile ${ARGN}) GET_FILENAME_COMPONENT(_absFile ${_currentPoFile} ABSOLUTE) GET_FILENAME_COMPONENT(_abs_PATH ${_absFile} DIRECTORY) GET_FILENAME_COMPONENT(_lang ${_abs_PATH} NAME_WE) @@ -102,7 +93,7 @@ MACRO(GETTEXT_CREATE_TRANSLATIONS_PCSX2 _potFile _firstPoFileArg) ENDFOREACH (_currentPoFile) IF(NOT LINUX_PACKAGE AND NOT APPLE) - ADD_CUSTOM_TARGET(translations_${_potBasename} ${_addToAll} DEPENDS ${_moFiles}) + ADD_CUSTOM_TARGET(translations_${_potBasename} ALL DEPENDS ${_moFiles}) ENDIF(NOT LINUX_PACKAGE AND NOT APPLE) ENDMACRO(GETTEXT_CREATE_TRANSLATIONS_PCSX2) diff --git a/pcsx2/CMakeLists.txt b/pcsx2/CMakeLists.txt index 9aa04a67c9..19f079afd6 100644 --- a/pcsx2/CMakeLists.txt +++ b/pcsx2/CMakeLists.txt @@ -1668,8 +1668,8 @@ if(GETTEXT_FOUND AND NOT NO_TRANSLATION AND NOT PCSX2_CORE) file(GLOB_RECURSE PO_MAIN_FILES ${CMAKE_SOURCE_DIR}/locales/*/pcsx2_Main.po) # Macro to compile po file and install them - GETTEXT_CREATE_TRANSLATIONS_PCSX2(${CMAKE_SOURCE_DIR}/locales/templates/pcsx2_Iconized.pot ALL ${PO_ICO_FILES}) - GETTEXT_CREATE_TRANSLATIONS_PCSX2(${CMAKE_SOURCE_DIR}/locales/templates/pcsx2_Main.pot ALL ${PO_MAIN_FILES}) + GETTEXT_CREATE_TRANSLATIONS_PCSX2(${CMAKE_SOURCE_DIR}/locales/templates/pcsx2_Iconized.pot ${PO_ICO_FILES}) + GETTEXT_CREATE_TRANSLATIONS_PCSX2(${CMAKE_SOURCE_DIR}/locales/templates/pcsx2_Main.pot ${PO_MAIN_FILES}) endif() if (APPLE)