# https://www.libsdl.org/projects/SDL_ttf/
#
# https://www.libsdl.org/projects/SDL_ttf/release/SDL2_ttf-2.0.15.zip

### DEPENDS ###
DKDEPEND(sdl2)
DKDEPEND(freetype)


### VERSION ###
DKSET(SDLTTF_VERSION 2.0.15)
DKSET(SDLTTF_NAME SDL2_ttf-${SDLTTF_VERSION})
DKSET(SDLTTF_DL https://www.libsdl.org/projects/SDL_ttf/release/${SDLTTF_NAME}.zip)
DKSET(SDLTTF ${3RDPARTY}/${SDLTTF_NAME})



### INSTALL ###
DKINSTALL(${SDLTTF_DL} sdl2_ttf ${SDLTTF})



### LINK ###
DKINCLUDE(${SDLTTF})
WIN_DEBUG_LIB(${SDLTTF}/${OS}/lib/${DEBUG_DIR}/SDL_ttf.lib)
WIN_RELEASE_LIB(${SDLTTF}/${OS}/lib/${RELEASE_DIR}/SDL_ttf.lib)
APPLE_DEBUG_LIB(${SDLTTF}/${OS}/lib/${DEBUG_DIR}/SDL_ttf.a)
APPLE_RELEASE_LIB(${SDLTTF}/${OS}/lib/${RELEASE_DIR}/SDL_ttf.a)
LINUX_DEBUG_LIB(${SDLTTF}/${OS}/${DEBUG_DIR}/lib/SDL_ttf.a)
LINUX_RELEASE_LIB(${SDLTTF}/${OS}/${RELEASE_DIR}/lib/SDL_ttf.a)
RASPBERRY_DEBUG_LIB(${SDLTTF}/${OS}/${DEBUG_DIR}/lib/SDL_ttf.a)
RASPBERRY_RELEASE_LIB(${SDLTTF}/${OS}/${RELEASE_DIR}/lib/SDL_ttf.a)
##ANDROID_DEBUG_LIB(${SDLTTF}/${OS}/${DEBUG_DIR}/obj/local/armeabi-v7a/libSDL2_ttf.a)
##ANDROID_RELEASE_LIB(${SDLTTF}/${OS}/${RELEASE_DIR}/obj/local/armeabi-v7a/libSDL2_ttf.a)
ANDROID_DEBUG_LIB(${SDLTTF}/${OS}/lib/${DEBUG_DIR}/SDL_ttf.a)
ANDROID_RELEASE_LIB(${SDLTTF}/${OS}/lib/${RELEASE_DIR}/SDL_ttf.a)




### COMPILE ###
WIN_PATH(${SDLTTF}/${OS})
WIN32_COMMAND(${DKCMAKE_WIN32} -DSDLTTF_SUPPORT_WEBP=OFF ${SDL2_WIN} ${FREETYPE_WIN} ${SDLTTF})
WIN64_COMMAND(${DKCMAKE_WIN64} -DSDLTTF_SUPPORT_WEBP=OFF ${SDL2_WIN} ${FREETYPE_WIN} ${SDLTTF})
WIN_VS(${SDLTTF_NAME} SDLTTF.sln SDLTTF)

MAC_PATH(${SDLTTF}/${OS})
MAC64_COMMAND(${DKCMAKE_MAC64} -DSDLTTF_SUPPORT_WEBP=OFF ${SDL2_APPLE} ${FREETYPE_APPLE} ${SDLTTF})
MAC_XCODE(${SDLTTF_NAME} SDLTTF)

IOS_PATH(${SDLTTF}/${OS})
IOS64_COMMAND(${DKCMAKE_IOS64} -DSDLTTF_SUPPORT_WEBP=OFF ${SDL2_APPLE} ${FREETYPE_APPLE} ${SDLTTF})
IOS_XCODE(${SDLTTF_NAME} SDLTTF)

IOSSIM_PATH(${SDLTTF}/${OS})
IOSSIM64_COMMAND(${DKCMAKE_IOSSIM64} -DSDLTTF_SUPPORT_WEBP=OFF ${SDL2_APPLE} ${FREETYPE_APPLE} ${SDLTTF})
IOSSIM_XCODE(${SDLTTF_NAME} SDLTTF)

LINUX_DEBUG_PATH(${SDLTTF}/${OS}/${DEBUG_DIR})
LINUX_DEBUG_COMMAND(${DKCMAKE_LINUX_DEBUG} -DSDLTTF_SUPPORT_WEBP=OFF ${SDL2_LINUX} ${FREETYPE_LINUX} ${SDLTTF})
LINUX_DEBUG_COMMAND(make SDLTTF)

LINUX_RELEASE_PATH(${SDLTTF}/${OS}/${RELEASE_DIR})
LINUX_RELEASE_COMMAND(${DKCMAKE_LINUX_RELEASE} -DSDLTTF_SUPPORT_WEBP=OFF ${SDL2_LINUX} ${FREETYPE_LINUX} ${SDLTTF})
LINUX_RELEASE_COMMAND(make SDLTTF)


RASPBERRY_DEBUG_PATH(${SDLTTF}/${OS}/${DEBUG_DIR})
RASPBERRY_DEBUG_COMMAND(${DKCMAKE_RASPBERRY_DEBUG} -DSDLTTF_SUPPORT_WEBP=OFF ${SDL2_RASPBERRY} ${FREETYPE_RASPBERRY} ${SDLTTF})
RASPBERRY_DEBUG_COMMAND(make SDLTTF)

RASPBERRY_RELEASE_PATH(${SDLTTF}/${OS}/${RELEASE_DIR})
RASPBERRY_RELEASE_COMMAND(${DKCMAKE_RASPBERRY_RELEASE} -DSDLTTF_SUPPORT_WEBP=OFF ${SDL2_RASPBERRY} ${FREETYPE_RASPBERRY} ${SDLTTF})
RASPBERRY_RELEASE_COMMAND(make SDLTTF)


##ANDROID_NDK(${SDLTTF_NAME})
ANDROID_PATH(${SDLTTF}/${OS})
ANDROID32_COMMAND(${DKCMAKE_ANDROID32} -DSDLTTF_SUPPORT_WEBP=OFF ${SDL2_ANDROID} ${FREETYPE_ANDROID} ${SDLTTF})
ANDROID64_COMMAND(${DKCMAKE_ANDROID64} -DSDLTTF_SUPPORT_WEBP=OFF ${SDL2_ANDROID} ${FREETYPE_ANDROID} ${SDLTTF})
ANDROID_VS(${SDLTTF_NAME} SDLTTF.sln SDLTTF)