diff --git a/CMakeLists.txt b/CMakeLists.txt index ee5e729ee..87781e0d7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -642,14 +642,10 @@ include(CMakeDependentOption) cmake_dependent_option(NETCDF_ENABLE_PLUGINS "Enable dynamically loaded plugins (default on)." ON "BUILD_SHARED_LIBS" OFF) MESSAGE(STATUS "NETCDF_ENABLE_PLUGINS: ${NETCDF_ENABLE_PLUGINS}") -if(MINGW) - message(STATUS "MINGW Detected, disabling plugins.") - set(NETCDF_ENABLE_PLUGINS OFF CACHE BOOL "Disable plugins" FORCE) -else() - if(NOT WIN32) - if(HAVE_DLFCN_H) - include_directories("dlfcn.h") - endif() + +if(NOT WIN32) + if(HAVE_DLFCN_H) + include_directories("dlfcn.h") endif() endif() diff --git a/libncpoco/CMakeLists.txt b/libncpoco/CMakeLists.txt index fb879fb5e..3669a711b 100644 --- a/libncpoco/CMakeLists.txt +++ b/libncpoco/CMakeLists.txt @@ -1,6 +1,6 @@ set(libncpoco_SOURCES ncpoco.c ncpoco.h) -if(MSVC) +if(WIN32) set(libncpoco_SOURCES ${libncpoco_SOURCES} cp_win32.c) else() set(libncpoco_SOURCES ${libncpoco_SOURCES} cp_unix.c) diff --git a/plugins/CMakeLists.txt b/plugins/CMakeLists.txt index fb6ce198e..6d0b20a41 100644 --- a/plugins/CMakeLists.txt +++ b/plugins/CMakeLists.txt @@ -6,7 +6,7 @@ # See netcdf-c/COPYRIGHT file for more info. set(CMAKE_BUILD_TYPE "") -if(MSVC) +if(WIN32) set(PLUGINEXT "dll") set(PLUGINPRE "__nc") else() @@ -124,7 +124,7 @@ macro(installplugin PLUG) endmacro() install(DIRECTORY DESTINATION ${PLUGIN_INSTALL_DIR}) -if(Bzip2_FOUND) +if(Bzip2_FOUND OR Bz2_FOUND) installplugin(h5bzip2) endif() if(Zstd_FOUND)