From 65573cdbc5791a4d223094be57db6112e782f1f2 Mon Sep 17 00:00:00 2001 From: Shahram Najm Date: Tue, 25 Nov 2014 13:21:39 +0000 Subject: [PATCH] GRIB-649: in developer mode take the samples and definitions from build directory --- CMakeLists.txt | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 88539d92a..80a26c34b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -170,11 +170,17 @@ endif() ############################################################################### # contents +if( NOT ${DEVELOPER_MODE} ) + set( grib_api_default_data_prefix ${CMAKE_INSTALL_PREFIX} ) +else() + set( grib_api_default_data_prefix ${CMAKE_BINARY_DIR} ) +endif() + if( NOT DEFINED GRIB_API_DEFINITION_PATH ) - set( GRIB_API_DEFINITION_PATH ${CMAKE_INSTALL_PREFIX}/share/grib_api/definitions ) + set( GRIB_API_DEFINITION_PATH ${grib_api_default_data_prefix}/share/grib_api/definitions ) endif() if( NOT DEFINED GRIB_API_SAMPLES_PATH ) - set( GRIB_API_SAMPLES_PATH ${CMAKE_INSTALL_PREFIX}/share/grib_api/samples ) + set( GRIB_API_SAMPLES_PATH ${grib_api_default_data_prefix}/share/grib_api/samples ) endif() ### config header