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