Blame SOURCES/0035-cmake-ignore-warnings-about-missing-PDB-files-in-3rd.patch

bab77a
From e57f311e629762fbf2b08d9a5b1e0cad1035b42f Mon Sep 17 00:00:00 2001
bab77a
From: =?UTF-8?q?Luis=20D=C3=ADaz=20M=C3=A1s?= <piponazo@gmail.com>
bab77a
Date: Tue, 18 Dec 2018 10:33:11 +0100
bab77a
Subject: [PATCH 35/70] cmake: ignore warnings about missing PDB files in 3rd
bab77a
 party libs
bab77a
bab77a
---
bab77a
 samples/CMakeLists.txt | 11 +++++++++++
bab77a
 src/CMakeLists.txt     |  4 ++++
bab77a
 2 files changed, 15 insertions(+)
bab77a
bab77a
diff --git a/samples/CMakeLists.txt b/samples/CMakeLists.txt
bab77a
index a3e491e0..4e8c14c6 100644
bab77a
--- a/samples/CMakeLists.txt
bab77a
+++ b/samples/CMakeLists.txt
bab77a
@@ -43,6 +43,9 @@ foreach(entry ${SAMPLES})
bab77a
     add_test( ${target}_test ${target} )
bab77a
     target_include_directories(${target} PRIVATE ${CMAKE_SOURCE_DIR}/src) # To find unused.h
bab77a
     install( TARGETS ${target} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
bab77a
+    if (MSVC)
bab77a
+        set_target_properties(${target} PROPERTIES LINK_FLAGS "/ignore:4099")
bab77a
+    endif()
bab77a
 endforeach()
bab77a
 
bab77a
 ###################################
bab77a
@@ -69,6 +72,11 @@ list(APPEND APPLICATIONS exiv2json)
bab77a
 
bab77a
 install( TARGETS metacopy pathtest exiv2json RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
bab77a
 
bab77a
+if (MSVC)
bab77a
+    set_target_properties(exiv2json PROPERTIES LINK_FLAGS "/ignore:4099")
bab77a
+    set_target_properties(metacopy PROPERTIES LINK_FLAGS "/ignore:4099")
bab77a
+endif()
bab77a
+
bab77a
 if( EXPAT_FOUND )
bab77a
     add_executable(        geotag    geotag.cpp)
bab77a
     list(APPEND APPLICATIONS geotag)
bab77a
@@ -103,6 +111,9 @@ foreach(application ${APPLICATIONS})
bab77a
     if( EXIV2_ENABLE_PNG )
bab77a
         target_link_libraries( ${application} PRIVATE ${ZLIB_LIBRARIES} )
bab77a
     endif()
bab77a
+    if (MSVC)
bab77a
+        set_target_properties(${application} PROPERTIES LINK_FLAGS "/ignore:4099")
bab77a
+    endif()
bab77a
 endforeach()
bab77a
 
bab77a
 # ******************************************************************************
bab77a
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
bab77a
index 0d093924..adb285b1 100644
bab77a
--- a/src/CMakeLists.txt
bab77a
+++ b/src/CMakeLists.txt
bab77a
@@ -274,5 +274,9 @@ if(EXIV2_BUILD_EXIV2_COMMAND)
bab77a
 
bab77a
     install(TARGETS exiv2 RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
bab77a
     install( FILES exiv2.1 DESTINATION ${CMAKE_INSTALL_MANDIR}/man1 )
bab77a
+
bab77a
+    if (MSVC)
bab77a
+        set_target_properties(exiv2 PROPERTIES LINK_FLAGS "/ignore:4099")
bab77a
+    endif()
bab77a
 endif()
bab77a
 
bab77a
-- 
bab77a
2.17.2
bab77a