### VERSION ###
DKSET(GHOSTSCRIPT_MAJOR 9)
DKSET(GHOSTSCRIPT_MINOR 22)
DKSET(GHOSTSCRIPT_VERSION ${GHOSTSCRIPT_MAJOR}${GHOSTSCRIPT_MINOR})
DKSET(GHOSTSCRIPT_NAME gs${GHOSTSCRIPT_VERSION}w64)
DKSET(GHOSTSCRIPT_DL https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/download/gs${GHOSTSCRIPT_VERSION}/${GHOSTSCRIPT_NAME}.exe)
DKSET(GHOSTSCRIPT "C:/Program Files/gs/gs${GHOSTSCRIPT_MAJOR}.${GHOSTSCRIPT_MINOR}/bin")

### INSTALL ###
IF(NOT EXISTS ${GHOSTSCRIPT})
	DKSETPATH(${DKDOWNLOAD})
	DOWNLOAD(${GHOSTSCRIPT_DL} ${DKDOWNLOAD}/${GHOSTSCRIPT_NAME}.exe)
	DKCOMMAND(${DKDOWNLOAD}/${GHOSTSCRIPT_NAME}.exe)
ENDIF()