From 5023f91d7af5fa71cae2e1c2f817e511aa79138d Mon Sep 17 00:00:00 2001 From: Florian Rathgeber Date: Fri, 3 Feb 2017 13:51:39 +0000 Subject: [PATCH] ECC-106 Use ECCODES_SAMPLES_SUFF when installing samples --- samples/CMakeLists.txt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/samples/CMakeLists.txt b/samples/CMakeLists.txt index 7262adc3f..1a84b3109 100644 --- a/samples/CMakeLists.txt +++ b/samples/CMakeLists.txt @@ -1,7 +1,7 @@ file( GLOB samples_files RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "*.tmpl" ) install( FILES ${samples_files} - DESTINATION share/${PROJECT_NAME}/samples + DESTINATION ${ECCODES_SAMPLES_SUFF} PERMISSIONS OWNER_WRITE OWNER_READ GROUP_READ WORLD_READ ) foreach( tmpl ${samples_files} ) @@ -12,9 +12,9 @@ set( ECCODES_SAMPLES_DIR ${CMAKE_CURRENT_SOURCE_DIR} PARENT_SCOPE ) set( ECCODES_SAMPLES_FILES ${ECCODES_SAMPLES_FILES} PARENT_SCOPE ) # link to the samples in the build directory. See GRIB-786 -file( MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/share/${PROJECT_NAME} ) -if( NOT EXISTS "${CMAKE_BINARY_DIR}/share/${PROJECT_NAME}/samples" ) +file( MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/${INSTALL_DATA_DIR} ) +if( NOT EXISTS "${CMAKE_BINARY_DIR}/${ECCODES_SAMPLES_SUFF}" ) execute_process( COMMAND "${CMAKE_COMMAND}" "-E" "create_symlink" "${CMAKE_CURRENT_SOURCE_DIR}" - "${CMAKE_BINARY_DIR}/share/${PROJECT_NAME}/samples" ) -endif() \ No newline at end of file + "${CMAKE_BINARY_DIR}/${ECCODES_SAMPLES_SUFF}" ) +endif()