vcpkg/ports/libgeotiff/fix-staticbuild.patch

17 lines
558 B
Diff
Raw Normal View History

diff --git a/libgeotiff/CMakeLists.txt b/libgeotiff/CMakeLists.txt
index b4a3cee..fd9f0a5 100644
--- a/libgeotiff/CMakeLists.txt
+++ b/libgeotiff/CMakeLists.txt
@@ -80,7 +80,11 @@ SET(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/lib)
IF(WIN32)
IF(MSVC)
+ IF(BUILD_SHARED_LIBS)
ADD_DEFINITIONS(-DBUILD_AS_DLL=1)
+ ELSE()
+ ADD_DEFINITIONS(-DBUILD_AS_DLL=0)
+ ENDIF()
ADD_DEFINITIONS(/DW4)
if (NOT (MSVC_VERSION VERSION_LESS 1400))
ADD_DEFINITIONS(-D_CRT_SECURE_NO_DEPRECATE)