# http://caca.zoy.org/wiki/libcaca
#
# http://caca.zoy.org/files/libcaca/libcaca-0.99.beta19.tar.gz

### VERSION ###
DKSET(CACA_VERSION 0.99.beta19)
DKSET(CACA_NAME libcaca-${CACA_VERSION})
DKSET(CACA_DL http://caca.zoy.org/files/libcaca/${CACA_NAME}.tar.gz)
DKSET(CACA ${3RDPARTY}/${CACA_NAME})


### INSTALL ###
DKINSTALL(${CACA_DL} libcaca ${CACA})


### LINK ###
DKINCLUDE(${CACA}/include)
DKINCLUDE(${CACA}/${OS})
WIN_DEBUG_LIB(${CACA}/${OS}/${DEBUG_DIR}/libcacad.lib)
WIN_RELEASE_LIB(${CACA}/${OS}/${RELEASE_DIR}/libcaca.lib)
APPLE_DEBUG_LIB(${CACA}/${OS}/${DEBUG_DIR}/libcacad.a)
APPLE_RELEASE_LIB(${CACA}/${OS}/${RELEASE_DIR}/libcaca.a)
LINUX_DEBUG_LIB(${CACA}/${OS}/${DEBUG_DIR}/libcacad.a)
LINUX_RELEASE_LIB(${CACA}/${OS}/${RELEASE_DIR}/libcaca.a)
RASPBERRY_DEBUG_LIB(${CACA}/${OS}/${DEBUG_DIR}/libcacad.a)
RASPBERRY_RELEASE_LIB(${CACA}/${OS}/${RELEASE_DIR}/libcaca.a)
ANDROID_DEBUG_LIB(${CACA}/${OS}/${DEBUG_DIR}/libcacad.a)
ANDROID_RELEASE_LIB(${CACA}/${OS}/${RELEASE_DIR}/libcaca.a)


### COMPILE ###
WIN_PATH(${CACA}/${OS})
WIN32_COMMAND(${DKCMAKE_WIN32} ${CACA})
WIN64_COMMAND(${DKCMAKE_WIN64} ${CACA})
WIN_VS(${CACA_NAME} libcaca.sln libcaca)


MAC_PATH(${CACA}/${OS})
MAC32_COMMAND(${DKCMAKE_MAC32} ${CACA})
MAC64_COMMAND(${DKCMAKE_MAC64} ${CACA})
MAC_XCODE(${CACA_NAME} libcaca)


IOS_PATH(${CACA}/${OS})
IOS32_COMMAND(${DKCMAKE_IOS32} ${CACA})
IOS64_COMMAND(${DKCMAKE_IOS64} ${CACA})
IOS_XCODE(${CACA_NAME} libcaca)


IOSSIM_PATH(${CACA}/${OS})
IOSSIM32_COMMAND(${DKCMAKE_IOSSIM32} ${CACA})
IOSSIM64_COMMAND(${DKCMAKE_IOSSIM64} ${CACA})
IOSSIM_XCODE(${CACA_NAME} libcaca)


LINUX_DEBUG_PATH(${CACA}/${OS}/${DEBUG_DIR})
LINUX_DEBUG_COMMAND(${DKCMAKE_LINUX_DEBUG} ${CACA})
LINUX_DEBUG_COMMAND(make libcaca)

LINUX_RELEASE_PATH(${CACA}/${OS}/${RELEASE_DIR})
LINUX_RELEASE_COMMAND(${DKCMAKE_LINUX_RELEASE} ${CACA})
LINUX_RELEASE_COMMAND(make libcaca)


RASPBERRY_DEBUG_PATH(${CACA}/${OS}/${DEBUG_DIR})
RASPBERRY_DEBUG_COMMAND(${DKCMAKE_RASPBERRY_DEBUG} ${CACA})
RASPBERRY_DEBUG_COMMAND(make libcaca)

RASPBERRY_RELEASE_PATH(${CACA}/${OS}/${RELEASE_DIR})
RASPBERRY_RELEASE_COMMAND(${DKCMAKE_RASPBERRY_RELEASE} ${CACA})
RASPBERRY_RELEASE_COMMAND(make libcaca)


##ANDROID_NDK(${CACA_NAME})
ANDROID_PATH(${CACA}/${OS})
ANDROID32_COMMAND(${DKCMAKE_ANDROID32} ${CACA})
ANDROID64_COMMAND(${DKCMAKE_ANDROID64} ${CACA})
ANDROID_VS(${CACA_NAME} libcaca.sln libcaca)
