aboutsummaryrefslogtreecommitdiff
path: root/games/minimal/mods/default/textures/default_torch.png
blob: 21d98bdbb059a806a574318ac46c7af6d4d65343 (plain)
ofshex dumpascii
0000 89 50 4e 47 0d 0a 1a 0a 00 00 00 0d 49 48 44 52 00 00 00 10 00 00 00 10 04 03 00 00 00 ed dd e2 .PNG........IHDR................
0020 52 00 00 00 12 50 4c 54 45 00 00 00 49 24 00 6d 24 00 92 49 00 db 00 00 ff ff 24 b3 25 61 1c 00 R....PLTE...I$.m$..I......$.%a..
0040 00 00 01 74 52 4e 53 00 40 e6 d8 66 00 00 00 2e 49 44 41 54 08 5b 63 60 c0 01 02 30 58 a1 50 06 ...tRNS.@..f....IDAT.[c`...0X.P.
0060 2b 2b 4c 26 d4 15 ca 08 71 80 32 98 04 a0 0c 66 03 98 22 61 18 c3 18 c6 60 c4 60 20 00 00 02 e8 ++L&....q.2....f.."a....`.`.....
0080 03 0b 08 f1 db fc 00 00 00 00 49 45 4e 44 ae 42 60 82 ..........IEND.B`.
1'>61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78

set(CUSTOM_GETTEXT_PATH "${PROJECT_SOURCE_DIR}/../../gettext"
	CACHE FILEPATH "path to custom gettext")

find_path(GETTEXT_INCLUDE_DIR
	NAMES libintl.h
	PATHS "${CUSTOM_GETTEXT_PATH}/include"
	DOC "GetText include directory")

find_program(GETTEXT_MSGFMT
	NAMES msgfmt
	PATHS "${CUSTOM_GETTEXT_PATH}/bin"
	DOC "Path to msgfmt")

set(GETTEXT_REQUIRED_VARS GETTEXT_INCLUDE_DIR GETTEXT_MSGFMT)

if(APPLE)
	find_library(GETTEXT_LIBRARY
		NAMES libintl.a
		PATHS "${CUSTOM_GETTEXT_PATH}/lib"
		DOC "GetText library")

	find_library(ICONV_LIBRARY
		NAMES libiconv.dylib
		PATHS "/usr/lib"
		DOC "IConv library")
	set(GETTEXT_REQUIRED_VARS ${GETTEXT_REQUIRED_VARS} GETTEXT_LIBRARY ICONV_LIBRARY)
endif(APPLE)

# Modern Linux, as well as OSX, does not require special linking because
# GetText is part of glibc.
# TODO: check the requirements on other BSDs and older Linux
if(WIN32)
	if(MSVC)
		set(GETTEXT_LIB_NAMES
			libintl.lib intl.lib libintl3.lib intl3.lib)
	else()
		set(GETTEXT_LIB_NAMES
			libintl.dll.a intl.dll.a libintl3.dll.a intl3.dll.a)
	endif()
	find_library(GETTEXT_LIBRARY
		NAMES ${GETTEXT_LIB_NAMES}
		PATHS "${CUSTOM_GETTEXT_PATH}/lib"
		DOC "GetText library")
	find_file(GETTEXT_DLL
		NAMES libintl.dll intl.dll libintl3.dll intl3.dll
		PATHS "${CUSTOM_GETTEXT_PATH}/bin" "${CUSTOM_GETTEXT_PATH}/lib" 
		DOC "gettext *intl*.dll")
	find_file(GETTEXT_ICONV_DLL
		NAMES libiconv2.dll
		PATHS "${CUSTOM_GETTEXT_PATH}/bin" "${CUSTOM_GETTEXT_PATH}/lib"
		DOC "gettext *iconv*.lib")
	set(GETTEXT_REQUIRED_VARS ${GETTEXT_REQUIRED_VARS} GETTEXT_DLL GETTEXT_ICONV_DLL)
endif(WIN32)


include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(GetText DEFAULT_MSG ${GETTEXT_REQUIRED_VARS})


if(GETTEXT_FOUND)
	# BSD variants require special linkage as they don't use glibc
	if(${CMAKE_SYSTEM_NAME} MATCHES "BSD|DragonFly")
		set(GETTEXT_LIBRARY "intl")
	endif()

	set(GETTEXT_PO_PATH ${CMAKE_SOURCE_DIR}/po)
	set(GETTEXT_MO_BUILD_PATH ${CMAKE_BINARY_DIR}/locale/<locale>/LC_MESSAGES)
	set(GETTEXT_MO_DEST_PATH ${LOCALEDIR}/<locale>/LC_MESSAGES)
	file(GLOB GETTEXT_AVAILABLE_LOCALES RELATIVE ${GETTEXT_PO_PATH} "${GETTEXT_PO_PATH}/*")
	list(REMOVE_ITEM GETTEXT_AVAILABLE_LOCALES minetest.pot)
	list(REMOVE_ITEM GETTEXT_AVAILABLE_LOCALES timestamp)
	macro(SET_MO_PATHS _buildvar _destvar _locale)
		string(REPLACE "<locale>" ${_locale} ${_buildvar} ${GETTEXT_MO_BUILD_PATH})
		string(REPLACE "<locale>" ${_locale} ${_destvar} ${GETTEXT_MO_DEST_PATH})
	endmacro()
endif()