#DKSET(VNCSERVER_DL https://github.com/LibVNC/libvncserver/archive/refs/heads/master-win.zip)

### DEPENDS ###
DKDEPEND(zlib)
DKDEPEND(libpng)
IF(ANDROID)
	DKDEPEND(jpeg)
ELSE()
	DKDEPEND(libjpeg-turbo)
ENDIF()
DKDEPEND(openssl)


DKSET(VNCSERVER_VERSION master-win)
DKSET(VNCSERVER_NAME libvncserver-${VNCSERVER_VERSION})
DKSET(VNCSERVER_DL https://github.com/LibVNC/libvncserver/archive/refs/heads/${VNCSERVER_VERSION}.zip)
DKSET(VNCSERVER ${3RDPARTY}/${VNCSERVER_NAME})


### INSTALL ###
DKINSTALL(${VNCSERVER_DL} libvncserver-master-win ${VNCSERVER})



### LINK ###
DKINCLUDE(${VNCSERVER})
DKINCLUDE(${VNCSERVER}/examples)
DKINCLUDE(${VNCSERVER}/${OS})
DKINCLUDE(${VNCSERVER}/${OS}/${RELEASE_DIR})
WIN_DEBUG_LIB(${VNCSERVER}/${OS}/${DEBUG_DIR}/vncserver.lib)
WIN_RELEASE_LIB(${VNCSERVER}/${OS}/${RELEASE_DIR}/vncserver.lib)
WIN_DEBUG_LIB(${VNCSERVER}/${OS}/${DEBUG_DIR}/vncclient.lib)
WIN_RELEASE_LIB(${VNCSERVER}/${OS}/${RELEASE_DIR}/vncclient.lib)


### COMPILE ###
WIN_PATH(${VNCSERVER}/${OS})
WIN32_COMMAND(${DKCMAKE_WIN32} -DWITH_JPEG=ON ${OPENSSL_WIN} ${PNG_WIN} ${JPEG_WIN} ${ZLIB_WIN} ${VNCSERVER})
WIN64_COMMAND(${DKCMAKE_WIN64} -DWITH_JPEG=ON ${OPENSSL_WIN} ${PNG_WIN} ${JPEG_WIN} ${ZLIB_WIN} ${VNCSERVER})
WIN_VS(${VNCSERVER_NAME} LibVNCServer.sln vncserver)
WIN_VS(${VNCSERVER_NAME} LibVNCServer.sln vncclient)
