diff --git a/eccodes-import.cmake.in b/eccodes-import.cmake.in index f7882b01b..8bf42f779 100644 --- a/eccodes-import.cmake.in +++ b/eccodes-import.cmake.in @@ -1,14 +1,5 @@ -if( @PNAME@_IS_BUILD_DIR_EXPORT ) - set( ECCODES_DEFINITION_PATH @CMAKE_BINARY_DIR@/@ECCODES_DEFINITION_SUFF@ ) - set( ECCODES_SAMPLES_PATH @CMAKE_BINARY_DIR@/@ECCODES_SAMPLES_SUFF@ ) - set( ECCODES_IFS_SAMPLES_PATH @CMAKE_BINARY_DIR@/@ECCODES_IFS_SAMPLES_SUFF@ ) -else() - 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() +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@ ) -set( ECCODES_INSTALL_EXTRA_TOOLS ${ECCODES_INSTALL_EXTRA_TOOLS} PARENT_SCOPE ) +set( ECCODES_INSTALL_EXTRA_TOOLS @ECCODES_INSTALL_EXTRA_TOOLS@ )