Corrected cmake syntax, working with a list not a string.

This commit is contained in:
Ward Fisher 2019-04-26 16:28:53 -06:00
parent dda48ced44
commit c86593aca3

View File

@ -1871,9 +1871,7 @@ FOREACH(_LIB ${ALL_TLL_LIBS})
ENDFOREACH()
#SET(NC_LIBS "-lnetcdf ${NC_LIBS}")
IF(NOT ${NC_LIBS} STREQUAL "")
IF(NC_LIBS)
STRING(REPLACE ";" " " NC_LIBS "${NC_LIBS}")
STRING(REPLACE "-lhdf5::hdf5-shared" "-lhdf5" NC_LIBS ${NC_LIBS})
STRING(REPLACE "-lhdf5::hdf5_hl-shared" "-lhdf5_hl" NC_LIBS ${NC_LIBS})