Skip to content

Commit

Permalink
cmake: ignore PDBs warnings on Win/Debug/Static buils
Browse files Browse the repository at this point in the history
  • Loading branch information
piponazo committed May 3, 2021
1 parent a3d2c23 commit 582edd3
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
2 changes: 1 addition & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,4 +66,4 @@ build_script:

cache:
- deps # Ninja installation
- c:\Users\appveyor\conanCache # Conan cache
#- c:\Users\appveyor\conanCache # Conan cache
5 changes: 4 additions & 1 deletion samples/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,10 @@ list(APPEND APPLICATIONS remotetest)
foreach(application ${APPLICATIONS})
target_link_libraries(${application} PRIVATE exiv2lib)
if( EXIV2_ENABLE_PNG )
target_link_libraries( ${application} PRIVATE ${ZLIB_LIBRARIES} )
target_link_libraries(${application} PRIVATE ${ZLIB_LIBRARIES} )
if (MSVC)
set_target_properties(${application} PROPERTIES LINK_FLAGS "/ignore:4099") # Ignore missing PDBs
endif()
endif()
endforeach()

Expand Down
8 changes: 5 additions & 3 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -133,10 +133,9 @@ set_target_properties( exiv2lib_int PROPERTIES
COMPILE_DEFINITIONS exiv2lib_EXPORTS
)

target_include_directories(exiv2lib_int PRIVATE ${ZLIB_INCLUDE_DIR})
target_link_libraries(exiv2lib_int PRIVATE ZLIB::ZLIB)
target_include_directories(exiv2lib SYSTEM PRIVATE
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/xmpsdk/include>
${ZLIB_INCLUDE_DIR}
)

if (EXIV2_ENABLE_XMP)
Expand Down Expand Up @@ -188,7 +187,7 @@ else()
endif()

if( EXIV2_ENABLE_PNG )
target_link_libraries( exiv2lib PRIVATE $<BUILD_INTERFACE:${ZLIB_LIBRARIES}>)
target_link_libraries( exiv2lib PRIVATE ZLIB::ZLIB)
endif()

if( EXIV2_ENABLE_NLS )
Expand Down Expand Up @@ -237,6 +236,9 @@ if(EXIV2_BUILD_EXIV2_COMMAND)
COMPILE_FLAGS ${EXTRA_COMPILE_FLAGS}
XCODE_ATTRIBUTE_GCC_GENERATE_DEBUGGING_SYMBOLS[variant=Debug] "YES"
)
if (MSVC)
set_target_properties(exiv2 PROPERTIES LINK_FLAGS "/ignore:4099") # Ignore missing PDBs
endif()

target_link_libraries( exiv2 PRIVATE exiv2lib )

Expand Down

0 comments on commit 582edd3

Please sign in to comment.