(Windows) Disabled Poppler DLL interface warnings when using MSVC

This commit is contained in:
Leon Styhre 2023-08-10 22:09:33 +02:00
parent 3c9c031b1c
commit 07637a0885

View file

@ -12,6 +12,8 @@ if(WIN32)
set(POPPLER_CPP_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../external/poppler/Library/include/poppler/cpp) set(POPPLER_CPP_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../external/poppler/Library/include/poppler/cpp)
if(CMAKE_CXX_COMPILER_ID MATCHES MSVC) if(CMAKE_CXX_COMPILER_ID MATCHES MSVC)
set(POPPLER_CPP_LIBRARY ${CMAKE_CURRENT_SOURCE_DIR}/poppler-cpp.lib) set(POPPLER_CPP_LIBRARY ${CMAKE_CURRENT_SOURCE_DIR}/poppler-cpp.lib)
# Disable DLL interface warnings.
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4251")
else() else()
set(POPPLER_CPP_LIBRARY ${CMAKE_CURRENT_SOURCE_DIR}/libpoppler-cpp-0.dll) set(POPPLER_CPP_LIBRARY ${CMAKE_CURRENT_SOURCE_DIR}/libpoppler-cpp-0.dll)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -municode") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -municode")