# List of extra files to include in the installer
# This file is prepared to use JL's installation paths.

# Copy GDAL's 'data' directory to ${GMT_DATADIR}/GDAL_DATA [FALSE]:
#set (GDAL_DATA_PATH C:/programs/compa_libs/gdal_GIT/compileds/VC14_64/data)

# Copy PROJ's 'share' directory to ${GMT_DATADIR}/GDAL_DATA [FALSE]:
#set (PROJ_DATA_PATH C:/programs/compa_libs/proj5_GIT/compileds/VC14_64/share/proj)

# Set path to location of Ghostscript binaries (optional install)
#set (GHOST_DATA_PATH C:/programs/compa_libs/ghostscript/bin)

# Set path to location where the gmtmex is located.
#set (GMTMEX_PATH "C:/progs_cygw/GMTdev/gmtmex/${GMTver}")

SET (PATO_GDAL_BIN  "C:/programs/compa_libs/gdal_GIT/compileds/${VC}_${BITAGE}/bin")
SET (PATO_PROJ_BIN  "C:/programs/compa_libs/proj5_GIT/compileds/${VC}_${BITAGE}/bin")
SET (PATO_FFMPEG_BIN  "C:/programs/ImageMagick")

install (PROGRAMS
	${PATO_GDAL_BIN}/gdaladdo.exe
	${PATO_GDAL_BIN}/gdalbuildvrt.exe
	${PATO_GDAL_BIN}/gdaldem.exe
	${PATO_GDAL_BIN}/gdalenhance.exe
	${PATO_GDAL_BIN}/gdalinfo.exe
	${PATO_GDAL_BIN}/gdallocationinfo.exe
	${PATO_GDAL_BIN}/gdalmanage.exe
	${PATO_GDAL_BIN}/gdalsrsinfo.exe
	${PATO_GDAL_BIN}/gdaltindex.exe
	${PATO_GDAL_BIN}/gdaltransform.exe
	${PATO_GDAL_BIN}/gdalwarp.exe
	${PATO_GDAL_BIN}/gdal_contour.exe
	${PATO_GDAL_BIN}/gdal_grid.exe
	${PATO_GDAL_BIN}/gdal_rasterize.exe
	${PATO_GDAL_BIN}/gdal_translate.exe
	${PATO_GDAL_BIN}/gnmanalyse.exe
	${PATO_GDAL_BIN}/gnmmanage.exe
	${PATO_GDAL_BIN}/nearblack.exe
	${PATO_GDAL_BIN}/ogr2ogr.exe
	${PATO_GDAL_BIN}/ogrinfo.exe
	${PATO_GDAL_BIN}/ogrlineref.exe
	${PATO_GDAL_BIN}/ogrtindex.exe
	DESTINATION ${GMT_BINDIR}
	COMPONENT Runtime)

install (PROGRAMS
	${PATO_PROJ_BIN}/cct.exe
	${PATO_PROJ_BIN}/cs2cs.exe
	${PATO_PROJ_BIN}/geod.exe
	${PATO_PROJ_BIN}/gie.exe
	${PATO_PROJ_BIN}/nad2bin.exe
	${PATO_PROJ_BIN}/proj.exe
	${PATO_PROJ_BIN}/projinfo.exe
	DESTINATION ${GMT_BINDIR}
	COMPONENT Runtime)

install (PROGRAMS
	${PATO_FFMPEG_BIN}/ffmpeg.exe
	DESTINATION ${GMT_BINDIR}
	COMPONENT Runtime)

if (GDAL_DATA_PATH)
	install (DIRECTORY ${GDAL_DATA_PATH}/
		DESTINATION ${GMT_DATADIR}/GDAL_DATA
		COMPONENT GDALDATA)
endif (GDAL_DATA_PATH)
if (PROJ_DATA_PATH)
	install (DIRECTORY ${PROJ_DATA_PATH}/
		DESTINATION ${GMT_DATADIR}/proj
		COMPONENT GDALDATA)
endif (PROJ_DATA_PATH)
if (GHOST_DATA_PATH)
	install (PROGRAMS
		${GHOST_DATA_PATH}/gswin${BITAGE}c.exe
		${GHOST_DATA_PATH}/gsdll${BITAGE}.dll
		DESTINATION ${GMT_BINDIR}
		COMPONENT GHOSTSCRIPT)
endif (GHOST_DATA_PATH)

# Install the gmtmex on Windows
if (GMTMEX_PATH)
	install (PROGRAMS
		"${GMTMEX_PATH}/gmtmex.mexw${BITAGE}"
		"${GMTMEX_PATH}/gmt.m"
		DESTINATION ${GMT_BINDIR}
		COMPONENT Runtime)
endif (GMTMEX_PATH)

install (PROGRAMS
	${VCRUNTIME_PATH}/vcruntime140.dll
	${VCRUNTIME_PATH}/vcruntime140_1.dll
	${VCRUNTIME_PATH}/msvcp140.dll
	${VCRUNTIME_PATH}/msvcp140_1.dll
	${VCRUNTIME_PATH}/msvcp140_2.dll
	${VCRUNTIME_PATH}/msvcp140_codecvt_ids.dll
	DESTINATION ${GMT_BINDIR}
	COMPONENT Runtime)
