From 4a097bb807f7a467f1cdbcc207ffd0ff6999ccab Mon Sep 17 00:00:00 2001 From: Shahram Najm Date: Mon, 26 Jan 2015 22:28:46 +0000 Subject: [PATCH] Renamed some cmake variables --- CMakeLists.txt | 23 ++++++++----------- ifs_samples/grib1/CMakeLists.txt | 2 +- ifs_samples/grib1_mlgrib2/CMakeLists.txt | 2 +- .../grib1_mlgrib2_ieee32/CMakeLists.txt | 2 +- .../grib1_mlgrib2_ieee64/CMakeLists.txt | 2 +- 5 files changed, 14 insertions(+), 17 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 100ac0fe1..dadf5c882 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -6,9 +6,6 @@ # # -DCMAKE_MODULE_PATH=/path/to/ecbuild/cmake -# TODO: -# * build python bindings - cmake_minimum_required( VERSION 2.8.4 FATAL_ERROR ) project( grib_api C ) @@ -178,11 +175,11 @@ endif() if( NOT DEFINED ECCODES_DEFINITION_PATH ) set( ECCODES_DEFINITION_PATH ${grib_api_default_data_prefix}/share/grib_api/definitions ) endif() -if( NOT DEFINED GRIB_API_SAMPLES_PATH ) - set( GRIB_API_SAMPLES_PATH ${grib_api_default_data_prefix}/share/grib_api/samples ) +if( NOT DEFINED ECCODES_SAMPLES_PATH ) + set( ECCODES_SAMPLES_PATH ${grib_api_default_data_prefix}/share/grib_api/samples ) endif() -if( NOT DEFINED GRIB_API_IFS_SAMPLES_PATH ) - set( GRIB_API_IFS_SAMPLES_PATH ${grib_api_default_data_prefix}/share/grib_api/ifs_samples ) +if( NOT DEFINED ECCODES_IFS_SAMPLES_PATH ) + set( ECCODES_IFS_SAMPLES_PATH ${grib_api_default_data_prefix}/share/grib_api/ifs_samples ) endif() ### config header @@ -208,7 +205,7 @@ set( GRIB_API_TPLS AEC PNG NetCDF Jasper OpenJPEG CMath ) set( GRIB_API_INCLUDE_DIRS ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/src ${CMAKE_CURRENT_BINARY_DIR}/src ) set( GRIB_API_LIBRARIES grib_api ) -get_directory_property( COMPILE_DEFINITIONS GRIB_API_DEFINITIONS ) +get_directory_property( COMPILE_DEFINITIONS ECCODES_DEFINITIONS ) foreach( _tpl ${GRIB_API_TPLS} ) string( TOUPPER ${_tpl} TPL ) @@ -259,14 +256,14 @@ if( EC_HAVE_FORTRAN ) endif() if( NOT ${PROJECT_NAME} STREQUAL ${CMAKE_PROJECT_NAME} ) - set( GRIB_API_DEFINITIONS ${GRIB_API_DEFINITIONS} PARENT_SCOPE )# includes already TPL definitions + set( ECCODES_DEFINITIONS ${ECCODES_DEFINITIONS} PARENT_SCOPE )# includes already TPL definitions set( GRIB_API_INCLUDE_DIRS ${GRIB_API_INCLUDE_DIRS} ${GRIB_API_EXTRA_INCLUDE_DIRS} PARENT_SCOPE ) set( GRIB_API_LIBRARIES ${GRIB_API_LIBRARIES} ${GRIB_API_EXTRA_LIBRARIES} ${CMATH_LIBRARIES} PARENT_SCOPE ) - set( GRIB_API_FOUND TRUE PARENT_SCOPE ) - set( GRIB_API_SAMPLES_PATH ${GRIB_API_SAMPLES_PATH} PARENT_SCOPE ) - set( GRIB_API_IFS_SAMPLES_PATH ${GRIB_API_IFS_SAMPLES_PATH} PARENT_SCOPE ) + set( ECCODES_FOUND TRUE PARENT_SCOPE ) + set( ECCODES_SAMPLES_PATH ${ECCODES_SAMPLES_PATH} PARENT_SCOPE ) + set( ECCODES_IFS_SAMPLES_PATH ${ECCODES_IFS_SAMPLES_PATH} PARENT_SCOPE ) set( ECCODES_DEFINITION_PATH ${ECCODES_DEFINITION_PATH} PARENT_SCOPE ) - set( ECCODES_INSTALL_ECMWF_TOOLS ${ECCODES_INSTALL_ECMWF_TOOLS} PARENT_SCOPE ) + set( ECCODES_INSTALL_ECMWF_TOOLS ${ECCODES_INSTALL_ECMWF_TOOLS} PARENT_SCOPE ) endif() ############################################################################################ diff --git a/ifs_samples/grib1/CMakeLists.txt b/ifs_samples/grib1/CMakeLists.txt index 4c3fcfad1..c879c1bb5 100644 --- a/ifs_samples/grib1/CMakeLists.txt +++ b/ifs_samples/grib1/CMakeLists.txt @@ -8,7 +8,7 @@ list( APPEND ifs_samples_${_basedir} ) install( FILES ${GRIB_API_SAMPLES_FILES} ${ifs_samples_${_basedir}} - DESTINATION ${GRIB_API_IFS_SAMPLES_PATH}/${_basedir} + DESTINATION ${ECCODES_IFS_SAMPLES_PATH}/${_basedir} PERMISSIONS OWNER_WRITE OWNER_READ GROUP_READ WORLD_READ ) file( COPY ${ifs_samples_${_basedir}} diff --git a/ifs_samples/grib1_mlgrib2/CMakeLists.txt b/ifs_samples/grib1_mlgrib2/CMakeLists.txt index 253c7be1b..b8cfac5fb 100644 --- a/ifs_samples/grib1_mlgrib2/CMakeLists.txt +++ b/ifs_samples/grib1_mlgrib2/CMakeLists.txt @@ -8,7 +8,7 @@ list( APPEND ifs_samples_${_basedir} ) install( FILES ${GRIB_API_SAMPLES_FILES} ${ifs_samples_${_basedir}} - DESTINATION ${GRIB_API_IFS_SAMPLES_PATH}/${_basedir} + DESTINATION ${ECCODES_IFS_SAMPLES_PATH}/${_basedir} PERMISSIONS OWNER_WRITE OWNER_READ GROUP_READ WORLD_READ ) file( COPY ${ifs_samples_${_basedir}} diff --git a/ifs_samples/grib1_mlgrib2_ieee32/CMakeLists.txt b/ifs_samples/grib1_mlgrib2_ieee32/CMakeLists.txt index 210eeda3e..7769ad2e8 100644 --- a/ifs_samples/grib1_mlgrib2_ieee32/CMakeLists.txt +++ b/ifs_samples/grib1_mlgrib2_ieee32/CMakeLists.txt @@ -8,7 +8,7 @@ list( APPEND ifs_samples_${_basedir} ) install( FILES ${GRIB_API_SAMPLES_FILES} ${ifs_samples_${_basedir}} - DESTINATION ${GRIB_API_IFS_SAMPLES_PATH}/${_basedir} + DESTINATION ${ECCODES_IFS_SAMPLES_PATH}/${_basedir} PERMISSIONS OWNER_WRITE OWNER_READ GROUP_READ WORLD_READ ) file( COPY ${ifs_samples_${_basedir}} diff --git a/ifs_samples/grib1_mlgrib2_ieee64/CMakeLists.txt b/ifs_samples/grib1_mlgrib2_ieee64/CMakeLists.txt index a8b752fea..8c737c4f9 100644 --- a/ifs_samples/grib1_mlgrib2_ieee64/CMakeLists.txt +++ b/ifs_samples/grib1_mlgrib2_ieee64/CMakeLists.txt @@ -8,7 +8,7 @@ list( APPEND ifs_samples_${_basedir} ) install( FILES ${GRIB_API_SAMPLES_FILES} ${ifs_samples_${_basedir}} - DESTINATION ${GRIB_API_IFS_SAMPLES_PATH}/${_basedir} + DESTINATION ${ECCODES_IFS_SAMPLES_PATH}/${_basedir} PERMISSIONS OWNER_WRITE OWNER_READ GROUP_READ WORLD_READ ) file( COPY ${ifs_samples_${_basedir}}