diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 0d7d769..48bc4fa 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -27,7 +27,7 @@ set_target_properties(netcdfcxx_legacy_static PROPERTIES CLEAN_DIRECT_OUTPUT 1) # 设置动态库的版本号 set_target_properties(netcdfcxx_legacy PROPERTIES VERSION 1.0 SOVERSION 1.0) -find_library(NETCDF_LIBRARY ${netCDF_LIBRARIES} ${netCDF_LIB_DIR}) +find_library(NETCDF_LIBRARY netcdf ${netCDF_LIB_DIR}) target_link_libraries(netcdfcxx_legacy PUBLIC ${NETCDF_LIBRARY}) target_link_libraries(netcdfcxx_legacy_static ${NETCDF_LIBRARY})