CMake: Make translation macro a function

Macros can set variables in the parent scope but we don't need that here
This commit is contained in:
TellowKrinkle 2021-12-12 16:42:04 -06:00 committed by tellowkrinkle
parent aad8b09d81
commit e2e8fdafb1
1 changed files with 2 additions and 2 deletions

View File

@ -32,7 +32,7 @@
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # 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. # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
MACRO(GETTEXT_CREATE_TRANSLATIONS_PCSX2 _potFile) FUNCTION(GETTEXT_CREATE_TRANSLATIONS_PCSX2 _potFile)
SET(_moFiles) SET(_moFiles)
GET_FILENAME_COMPONENT(_potBasename ${_potFile} NAME_WE) GET_FILENAME_COMPONENT(_potBasename ${_potFile} NAME_WE)
GET_FILENAME_COMPONENT(_absPotFile ${_potFile} ABSOLUTE) GET_FILENAME_COMPONENT(_absPotFile ${_potFile} ABSOLUTE)
@ -96,4 +96,4 @@ MACRO(GETTEXT_CREATE_TRANSLATIONS_PCSX2 _potFile)
ADD_CUSTOM_TARGET(translations_${_potBasename} ALL DEPENDS ${_moFiles}) ADD_CUSTOM_TARGET(translations_${_potBasename} ALL DEPENDS ${_moFiles})
ENDIF(NOT LINUX_PACKAGE AND NOT APPLE) ENDIF(NOT LINUX_PACKAGE AND NOT APPLE)
ENDMACRO(GETTEXT_CREATE_TRANSLATIONS_PCSX2) ENDFUNCTION(GETTEXT_CREATE_TRANSLATIONS_PCSX2)