## https://www.libsdl.org/projects/smpeg/release/smpeg2-2.0.0.tar.gz

### DEPENDS ###
DKDEPEND(sdl2)


### VERSION ###
DKSET(SMPEG2_VERSION 2.0.0)
DKSET(SMPEG2_NAME smpeg2-${SMPEG2_VERSION})

### INSTALL ###
## https://www.libsdl.org/projects/smpeg/release/smpeg2-2.0.0.tar.gz
DKINSTALL(https://www.libsdl.org/projects/smpeg/release/${SMPEG2_NAME}.tar.gz smpeg2 ${SMPEG2})
DKSET(SMPEG2 ${3RDPARTY}/${SMPEG2_NAME})


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


### 3RDPARTY LINK ###
DKSET(SMPEG2_WIN -DSMPEG_INCLUDE_DIR=${SMPEG2})
DKSET(SMPEG2_MAC -DSMPEG_INCLUDE_DIR=${SMPEG2})
DKSET(SMPEG2_LINUX -DSMPEG_INCLUDE_DIR=${SMPEG2})
DKSET(SMPEG2_RASPBERRY -DSMPEG_INCLUDE_DIR=${SMPEG2})
DKSET(SMPEG2_ANDROID -DSMPEG_INCLUDE_DIR=${SMPEG2})
	
	
### COMPILE ###
WIN_PATH(${SMPEG2}/${OS})
WIN32_COMMAND(${DKCMAKE_WIN32} ${SDL2_WIN} ${SMPEG2})
WIN64_COMMAND(${DKCMAKE_WIN64} ${SDL2_WIN} ${SMPEG2})
WIN_VS(${SMPEG2_NAME} SMPEG.sln SMPEG)


MAC_PATH(${SMPEG2}/${OS})
MAC64_COMMAND(${DKCMAKE_MAC64} ${SDL2_APPLE} ${SMPEG2})
MAC_XCODE(${SMPEG2_NAME} SMPEG)


IOS_PATH(${SMPEG2}/${OS})
IOS64_COMMAND(${DKCMAKE_IOS64} ${SDL2_APPLE} ${SMPEG2})
IOS_XCODE(${SMPEG2_NAME} SMPEG)


IOSSIM_PATH(${SMPEG2}/${OS})
IOSSIM64_COMMAND(${DKCMAKE_IOSSIM64} ${SDL2_APPLE} ${SMPEG2})
IOSSIM_XCODE(${SMPEG2_NAME} SMPEG)


LINUX_DEBUG_PATH(${SMPEG2}/${OS}/${DEBUG_DIR})
LINUX_DEBUG_COMMAND(${DKCMAKE_LINUX_DEBUG} -DCMAKE_CXX_FLAGS=-Wno-narrowing ${SDL2_LINUX} ${SMPEG2})
LINUX_DEBUG_COMMAND(make SMPEG)

LINUX_RELEASE_PATH(${SMPEG2}/${OS}/${RELEASE_DIR})
LINUX_RELEASE_COMMAND(${DKCMAKE_LINUX_RELEASE} -DCMAKE_CXX_FLAGS=-Wno-narrowing ${SDL2_LINUX} ${SMPEG2})
LINUX_RELEASE_COMMAND(make SMPEG)


RASPBERRY_DEBUG_PATH(${SMPEG2}/${OS}/${DEBUG_DIR})
RASPBERRY_DEBUG_COMMAND(${DKCMAKE_RASPBERRY_DEBUG} -DCMAKE_CXX_FLAGS=-Wno-narrowing ${SDL2_RASPBERRY} ${SMPEG2})
RASPBERRY_DEBUG_COMMAND(make SMPEG)

RASPBERRY_RELEASE_PATH(${SMPEG2}/${OS}/${RELEASE_DIR})
RASPBERRY_RELEASE_COMMAND(${DKCMAKE_RASPBERRY_RELEASE} -DCMAKE_CXX_FLAGS=-Wno-narrowing ${SDL2_RASPBERRY} ${SMPEG2})
RASPBERRY_RELEASE_COMMAND(make SMPEG)


##ANDROID_NDK(${SMPEG2_NAME})
ANDROID_PATH(${SMPEG2}/${OS})
ANDROID32_COMMAND(${DKCMAKE_ANDROID32} ${SDL2_ANDROID} ${SMPEG2})
ANDROID64_COMMAND(${DKCMAKE_ANDROID64} ${SDL2_ANDROID} ${SMPEG2})
ANDROID_VS(${SMPEG2_NAME} SMPEG.sln SMPEG)
