mirror of
https://github.com/Unidata/netcdf-c.git
synced 2024-11-21 03:13:42 +08:00
Merge pull request #2914 from MehdiChinoune/mingw-plugins
CMake: Enable plugins on MinGW
This commit is contained in:
commit
f5c9183dd5
@ -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()
|
||||
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user