CMake Lists
CMake Lists
CMake Lists
# Add subdirectories
add_subdirectory (src)
add_subdirectory (share) # share must be processed *after* src (GSHHG_PATH)
add_subdirectory (doc) # doc must be processed *after* src
if (EXISTS ${GMT_SOURCE_DIR}/test/)
add_subdirectory (test)
endif (EXISTS ${GMT_SOURCE_DIR}/test/)
add_subdirectory (cmake/dist) # make distribution bundles (always last)
if (BUILD_DEVELOPER)
set (DEVEL "yes")
else (BUILD_DEVELOPER)
set (DEVEL "no")
endif (BUILD_DEVELOPER)
if (SUPPL_EXTRA_DIRS)
set (PROTO ${SUPPL_EXTRA_DIRS})
else (SUPPL_EXTRA_DIRS)
set (PROTO "none")
endif (SUPPL_EXTRA_DIRS)
if (GMT_INSTALL_MODULE_LINKS)
set (LINKS "yes")
else (GMT_INSTALL_MODULE_LINKS)
set (LINKS "no")
endif (GMT_INSTALL_MODULE_LINKS)
# Configure header file to pass some of the CMake settings to the source code
configure_file (src/config.h.in src/config.h)
if (DCW_PATH)
set (GMT_CONFIG_DCW_MESSAGE "${DCW_PATH} (${DCW_VERSION})")
else (DCW_PATH)
set (GMT_CONFIG_DCW_MESSAGE "${DCW_PATH} (GMT will download on demand)")
endif (DCW_PATH)
if (GSHHG_PATH)
set (GMT_CONFIG_GSHHG_MESSAGE "${GSHHG_PATH} (${GSHHG_VERSION})")
else (GSHHG_PATH)
set (GMT_CONFIG_GSHHG_MESSAGE "${GSHHG_PATH} (GMT will download on demand)")
endif (GSHHG_PATH)
# Configuration done
message(
"*\n"
"* GMT Version: : ${GMT_PACKAGE_VERSION_WITH_GIT_REVISION}\n"
"*\n"
"* Options:\n"
"* Found GSHHG database : ${GMT_CONFIG_GSHHG_MESSAGE}\n"
"* Found DCW-GMT database : ${GMT_CONFIG_DCW_MESSAGE}\n"
"* Found GMT data server : ${GMT_DATA_SERVER}\n"
"* NetCDF library : ${NETCDF_LIBRARY}\n"
"* NetCDF include dir : ${NETCDF_INCLUDE_DIR}\n"
"* Curl library : ${CURL_LIBRARY}\n"
"* Curl include dir : ${CURL_INCLUDE_DIR}\n"
"* GDAL library : ${GDAL_LIBRARY}\n"
"* GDAL include dir : ${GDAL_INCLUDE_DIR}\n"
"* GEOS library : ${GEOS_LIBRARY}\n"
"* GEOS include dir : ${GEOS_INCLUDE_DIR}\n"
"* FFTW library : ${FFTW3F_LIBRARY}\n"
"* FFTW threads library : ${FFTW3F_THREADS_LIBRARY}\n"
"* FFTW include dir : ${FFTW3_INCLUDE_DIR}\n"
"* Accelerate Framework : ${ACCELERATE_FRAMEWORK}\n"
"* Regex support : ${GMT_CONFIG_REGEX_MESSAGE}\n"
"* ZLIB library : ${ZLIB_LIBRARY}\n"
"* ZLIB include dir : ${ZLIB_INCLUDE_DIR}\n"
"* LAPACK library : ${GMT_CONFIG_LAPACK_MESSAGE}\n"
"* BLAS library : ${GMT_CONFIG_BLAS_MESSAGE}\n"
"* License restriction : ${LICENSE_RESTRICTED}\n"
"* Triangulation method : ${GMT_TRIANGULATE}\n"
"* OpenMP support : ${GMT_CONFIG_OPENMP_MESSAGE}\n"
"* GLIB GTHREAD support : ${GMT_CONFIG_GTHREAD_MESSAGE}\n"
"* Build generator : ${CMAKE_GENERATOR}\n"
"* Build GMT core : always [${GMT_CORE_LIB_NAME}]\n"
"* Build PSL library : always [${PSL_LIB_NAME}]\n"
"* Build GMT supplements : ${SUPPL}\n"
"* Build GMT for developers : ${DEVEL}\n"
"* Build proto supplements : ${PROTO}\n"
"* Build module links : ${LINKS}\n"
"* Found Ghostscript (gs) : ${GMT_CONFIG_GS_MESSAGE}\n"
"* Found GraphicsMagick (gm) : ${GMT_CONFIG_GM_MESSAGE}\n"
"* Found ffmpeg : ${GMT_CONFIG_FFMPEG_MESSAGE}\n"
"* Found open : ${GMT_CONFIG_OPEN_MESSAGE}\n"
"* Found ogr2ogr : ${GMT_CONFIG_OGR2OGR_MESSAGE}\n"
"* Found gdal_translate : ${GMT_CONFIG_GDAL_TRANSLATE_MESSAGE}\n"
"*\n"
"* Locations:\n"
"* Installing GMT in : ${CMAKE_INSTALL_PREFIX}\n"
"* GMT_DATADIR : ${CMAKE_INSTALL_PREFIX}/${GMT_DATADIR}\n"
"* GMT_DOCDIR : ${CMAKE_INSTALL_PREFIX}/${GMT_DOCDIR}\n"
"* GMT_MANDIR : ${CMAKE_INSTALL_PREFIX}/${GMT_MANDIR}")