removing need for global compile definition

This commit is contained in:
Kyle Shores 2024-03-07 10:57:25 -06:00
parent 64cb40424c
commit 76f5a08f23

View File

@ -468,8 +468,8 @@ if(WIN32)
option(ENABLE_DLL "Build a Windows DLL." ${BUILD_SHARED_LIBS})
if(ENABLE_DLL)
set(BUILD_DLL ON CACHE BOOL "")
ADD_DEFINITIONS(-DDLL_NETCDF -DDLL_EXPORT)
target_compile_definitions(netcdf PRIVATE DLL_NETCDF DLL_EXPORT)
target_compile_definitions(netcdf PRIVATE DLL_EXPORT)
target_compile_definitions(netcdf PUBLIC DLL_NETCDF)
endif()
endif()
# Did the user specify a default minimum blocksize for posixio?
@ -1478,22 +1478,10 @@ endif()
add_subdirectory(liblib)
# For tests and utilities, we are no longer
# exporting symbols but rather importing them.
if(BUILD_DLL)
REMOVE_DEFINITIONS(-DDLL_EXPORT)
endif()
if(ENABLE_PLUGINS)
add_subdirectory(plugins)
endif()
# For tests and utilities, we are no longer
# exporting symbols but rather importing them.
if(BUILD_DLL)
REMOVE_DEFINITIONS(-DDLL_EXPORT)
endif()
# Enable Utilities.
if(BUILD_UTILITIES)
include_directories(ncdump)