Merge pull request #26 in ECCODES/eccodes from feature/relocatable-defs-samples to develop

* commit '1a2dcf517cfa66c72ccd4269f2d1ab373109e23e':
  Make the definitions and samples paths relocatable
This commit is contained in:
Shahram Najm 2019-04-30 13:40:48 +00:00
commit 87d658302a
1 changed files with 6 additions and 3 deletions

View File

@ -3,7 +3,10 @@ if( @PNAME@_IS_BUILD_DIR_EXPORT )
set( ECCODES_SAMPLES_PATH @CMAKE_BINARY_DIR@/@ECCODES_SAMPLES_SUFF@ )
set( ECCODES_IFS_SAMPLES_PATH @CMAKE_BINARY_DIR@/@ECCODES_IFS_SAMPLES_SUFF@ )
else()
set( ECCODES_DEFINITION_PATH @CMAKE_INSTALL_PREFIX@/@ECCODES_DEFINITION_SUFF@ )
set( ECCODES_SAMPLES_PATH @CMAKE_INSTALL_PREFIX@/@ECCODES_SAMPLES_SUFF@ )
set( ECCODES_IFS_SAMPLES_PATH @CMAKE_INSTALL_PREFIX@/@ECCODES_IFS_SAMPLES_SUFF@ )
if( NOT DEFINED eccodes_BASE_DIR ) # ecbuild 2.x
get_filename_component( eccodes_BASE_DIR "${CMAKE_CURRENT_LIST_DIR}/../../../" ABSOLUTE )
endif()
set( ECCODES_DEFINITION_PATH ${eccodes_BASE_DIR}/@ECCODES_DEFINITION_SUFF@ )
set( ECCODES_SAMPLES_PATH ${eccodes_BASE_DIR}/@ECCODES_SAMPLES_SUFF@ )
set( ECCODES_IFS_SAMPLES_PATH ${eccodes_BASE_DIR}/@ECCODES_IFS_SAMPLES_SUFF@ )
endif()