diff --git a/cmake/Modules/FindNETCDF.cmake b/cmake/Modules/FindNETCDF.cmake index af721f909..61eb4ceba 100644 --- a/cmake/Modules/FindNETCDF.cmake +++ b/cmake/Modules/FindNETCDF.cmake @@ -130,6 +130,10 @@ ELSE () ELSE () MESSAGE(FATAL_ERROR "Cannot find nc-config") ENDIF () + IF (DEFINED ENV{LIBS}) + SEPARATE_ARGUMENTS(LIBS NATIVE_COMMAND "$ENV{LIBS}") + LIST(APPEND EXTRA_FLAGS ${LIBS}) + ENDIF() # Note for posterity: When building static libraries, NETCDF_FORTRAN_LIBRARY must come *before* NETCDF_LIBRARY. Otherwise you get a bunch of "undefined reference to" errors SET(NETCDF_LIBRARIES ${NETCDF_FORTRAN_LIBRARY} ${NETCDF_LIBRARY} ${EXTRA_FLAGS} CACHE STRING "NetCDF Fortran and dependant static libraries") diff --git a/pyproject.toml b/pyproject.toml index 9ab8a6efb..34c44049a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -11,6 +11,8 @@ build-backend = "setuptools.build_meta" [tool.cibuildwheel.linux] environment = {SKBUILD_CONFIGURE_OPTIONS="-DBUILD_SHARED_LIBS=OFF"} before-all = [ - "yum install netcdf-fortran-static netcdf-static hdf5-static -y" + "yum install m4 doxygen -y", + "buildscripts/fetch_dependencies.sh -d build", + "buildscripts/build_dependencies.sh -c GNU-Linux -p /usr/local" ] \ No newline at end of file