# https://github.com/theMealena/SDL2_giflib_sa/archive/master.zip

### DEPENDS ###
DKDEPEND(giflib)
DKDEPEND(DKSDLWindow)


### VERSION ###
DKSET(SDLGIF_VERSION master)
DKSET(SDLGIF_NAME SDL2_giflib_sa-${SDLGIF_VERSION})
DKSET(SDLGIF_DL https://github.com/theMealena/SDL2_giflib_sa/archive/${SDLGIF_VERSION}.zip)
DKSET(SDLGIF ${3RDPARTY}/${SDLGIF_NAME})


### INSTALL ###
DKINSTALL(${SDLGIF_DL} SDL2_giflib_sa ${SDLGIF})


### LINK ###
DKDEFINE(USE_SDL2_gif)
DKINCLUDE(${SDLGIF})
WIN_DEBUG_LIB(${SDLGIF}/${OS}/${DEBUG_DIR}/SDL2_gif.lib)
WIN_RELEASE_LIB(${SDLGIF}/${OS}/${RELEASE_DIR}/SDL2_gif.lib)
MAC_DEBUG_LIB(${SDLGIF}/${OS}/${DEBUG_DIR}/libSDL2_gif.a)
MAC_RELEASE_LIB(${SDLGIF}/${OS}/${RELEASE_DIR}/libSDL2_gif.a)
IOSSIM_DEBUG_LIB(${SDLGIF}/${OS}/${DEBUG_DIR}-iphonesimulator/libSDL2_gif.a)
IOSSIM_RELEASE_LIB(${SDLGIF}/${OS}/${RELEASE_DIR}-iphonesimulator/libSDL2_gif.a)
LINUX_DEBUG_LIB(${SDLGIF}/${OS}/${DEBUG_DIR}/libSDL2_gif.a)
LINUX_RELEASE_LIB(${SDLGIF}/${OS}/${RELEASE_DIR}/libSDL2_gif.a)
ANDROID_DEBUG_LIB(${SDLGIF}/${OS}/${DEBUG_DIR}/obj/local/armeabi-v7a/libSDL2_gif.a)
ANDROID_RELEASE_LIB(${SDLGIF}/${OS}/${RELEASE_DIR}/obj/local/armeabi-v7a/libSDL2_gif.a)


### COMPILE ###
WIN_PATH(${SDLGIF}/${OS})
WIN32_COMMAND(${DKCMAKE_WIN32} ${SDL2_WIN} ${SDLGIF})
WIN64_COMMAND(${DKCMAKE_WIN64} ${SDL2_WIN} ${SDLGIF})
WIN_VS(${SDLGIF_NAME} SDL2_gif.sln SDL2_gif)


MAC_PATH(${SDLGIF}/${OS})
MAC64_COMMAND(${DKCMAKE_MAC64} ${SDL2_MAC} ${SDLGIF})
MAC_XCODE(${SDLGIF_NAME} SDL2_gif)


IOS_PATH(${SDLGIF}/${OS})
IOS64_COMMAND(${DKCMAKE_IOSSIM64} ${SDL2_APPLE} ${SDLGIF})
IOS_XCODE(${SDLGIF_NAME} SDL2_gif)


IOSSIM_PATH(${SDLGIF}/${OS})
IOSSIM64_COMMAND(${DKCMAKE_IOSSIM64} ${SDL2_APPLE} ${SDLGIF})
IOSSIM_XCODE(${SDLGIF_NAME} SDL2_gif)


LINUX_DEBUG_PATH(${SDLGIF}/${OS}/${DEBUG_DIR})
LINUX_DEBUG_COMMAND(${DKCMAKE_LINUX_DEBUG} ${SDL2_LINUX} ${SDLGIF})
LINUX_DEBUG_COMMAND(make)

LINUX_RELEASE_PATH(${SDLGIF}/${OS}/${RELEASE_DIR})
LINUX_RELEASE_COMMAND(${DKCMAKE_LINUX_RELEASE} ${SDL2_LINUX} ${SDLGIF})
LINUX_RELEASE_COMMAND(make)


ANDROID_NDK(${SDLGIF_NAME})
