From 76588314ab45694a03ce43bb2727105e432b434a Mon Sep 17 00:00:00 2001 From: Benjamin Renard Date: Mon, 28 Sep 2015 11:51:22 +0200 Subject: [PATCH] Fix bug with cdf dir definition in cmake --- cmake/modules/FindCDF.cmake | 4 +++- scripts/StartServer.in | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/cmake/modules/FindCDF.cmake b/cmake/modules/FindCDF.cmake index 73a0b60..405d72d 100644 --- a/cmake/modules/FindCDF.cmake +++ b/cmake/modules/FindCDF.cmake @@ -19,4 +19,6 @@ ELSE(libcdf_INCLUDE_DIR AND libcdf_LIBRARIES) message(STATUS "NOT Found libcdf, disabling it") ENDIF(libcdf_INCLUDE_DIR AND libcdf_LIBRARIES) -MARK_AS_ADVANCED(libcdf_INCLUDE_DIR libcdf_LIBRARIES) +get_filename_component(libcdf_LIBRARY_DIR ${libcdf_LIBRARIES} DIRECTORY) + +MARK_AS_ADVANCED(libcdf_INCLUDE_DIR libcdf_LIBRARY_DIR libcdf_LIBRARIES) diff --git a/scripts/StartServer.in b/scripts/StartServer.in index 2856437..0ed9fce 100755 --- a/scripts/StartServer.in +++ b/scripts/StartServer.in @@ -6,7 +6,7 @@ DDBASE=/home/budnik/AMDA-NG.core/DDBASE/DATA DDPATH=/home/budnik/AMDA-NG.core/DDBASE DDLIB=@CMAKE_INSTALL_PREFIX@/lib DDBASEBIN=@CMAKE_INSTALL_PREFIX@/bin -LD_LIBRARY_PATH=$DDLIB/:@NETCDFLIB_DIR@:@libcdf_LIBRARIES@:@USRLIB_DIR@ +LD_LIBRARY_PATH=$DDLIB/:@NETCDFLIB_DIR@:@libcdf_LIBRARY_DIR@:@USRLIB_DIR@ export DDBASE DDPATH DDBASEBIN DDLIB LD_LIBRARY_PATH #$DDBASEBIN/DD_Server 1>/dev/null 2>/dev/null& -- libgit2 0.21.2