diff --git a/CMakeLists.txt b/CMakeLists.txt index e758b5d..beda887 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -187,7 +187,8 @@ target_compile_features(geos_cxx_flags INTERFACE cxx_std_11) target_compile_options(geos_cxx_flags INTERFACE "$<$,$>:-ffp-contract=off>" "$<$:-ffp-contract=off>" - "$<$:/fp:precise>" + "$<$:/fp:precise>" + "$<$:/wd4996>" ) # Use -ffloat-store for 32-bit builds (needed to make some tests pass) @@ -227,10 +228,10 @@ target_compile_definitions(geos_cxx_flags target_compile_definitions(geos_developer_cxx_flags INTERFACE - $<$:_CRT_NONSTDC_NO_DEPRECATE> - $<$:_SCL_SECURE_NO_DEPRECATE> - $<$:_CRT_SECURE_NO_WARNINGS> - $<$:NOMINMAX>) + "$<$:_CRT_NONSTDC_NO_DEPRECATE>" + "$<$:_SCL_SECURE_NO_DEPRECATE>" + "$<$:_CRT_SECURE_NO_WARNINGS>" + "$<$:NOMINMAX>") target_compile_options(geos_developer_cxx_flags INTERFACE @@ -269,7 +270,7 @@ option(VERSION_MINGW_SHARED_LIBS "Add version suffix to MinGW shared libraries" if(BUILD_SHARED_LIBS) target_compile_definitions(geos - PRIVATE $,GEOS_DLL_EXPORT,DLL_EXPORT>) + PRIVATE $<$:GEOS_DLL_EXPORT>) set_target_properties(geos PROPERTIES VERSION ${GEOS_VERSION_NOPATCH}) set_target_properties(geos PROPERTIES SOVERSION ${GEOS_VERSION_NOPATCH}) @@ -287,7 +288,7 @@ target_link_libraries(geos_c PRIVATE geos) if(BUILD_SHARED_LIBS) target_compile_definitions(geos_c - PRIVATE $,GEOS_DLL_EXPORT,DLL_EXPORT>) + PRIVATE $<$:GEOS_DLL_EXPORT>) set_target_properties(geos_c PROPERTIES VERSION ${CAPI_VERSION}) if(NOT WIN32 OR MINGW) diff --git a/include/geos/algorithm/locate/IndexedPointInAreaLocator.h b/include/geos/algorithm/locate/IndexedPointInAreaLocator.h index 7a647e4..52a29c9 100644 --- a/include/geos/algorithm/locate/IndexedPointInAreaLocator.h +++ b/include/geos/algorithm/locate/IndexedPointInAreaLocator.h @@ -51,7 +51,7 @@ namespace locate { // geos::algorithm::locate * The index is lazy-loaded, which allows creating instances even if they are not used. * */ -class IndexedPointInAreaLocator : public PointOnGeometryLocator { +class GEOS_DLL IndexedPointInAreaLocator : public PointOnGeometryLocator { private: struct SegmentView { SegmentView(const geom::Coordinate* p_p0, const geom::Coordinate* p_p1) : m_p0(p_p0) { diff --git a/include/geos/export.h b/include/geos/export.h index 1a26f8c..997fb4c 100644 --- a/include/geos/export.h +++ b/include/geos/export.h @@ -19,7 +19,7 @@ # if defined(GEOS_DLL_EXPORT) # define GEOS_DLL __declspec(dllexport) # elif defined(GEOS_DLL_IMPORT) -# define GEOS_DLL __declspec(dllimport) +# define GEOS_DLL extern __declspec(dllimport) # else # define GEOS_DLL # endif