Commit c3031b43 authored by Pino Toscano's avatar Pino Toscano

cmake: simplify the linking to libpng

parent 96688dd7
......@@ -262,6 +262,9 @@ if(WIN32)
# gdi32 is needed under win32
set(poppler_LIBS ${poppler_LIBS} gdi32)
endif(WIN32)
if(PNG_FOUND)
set(poppler_LIBS ${poppler_LIBS} ${PNG_LIBRARIES})
endif(PNG_FOUND)
if(MSVC)
add_definitions(-D_CRT_SECURE_NO_WARNINGS)
......@@ -271,11 +274,7 @@ else(MSVC)
add_library(poppler SHARED ${poppler_SRCS})
endif(MSVC)
set_target_properties(poppler PROPERTIES VERSION 5.0.0 SOVERSION 5)
if (ENABLE_LIBPNG)
target_link_libraries(poppler ${poppler_LIBS} ${PNG_LIBRARIES})
else (ENABLE_LIBPNG)
target_link_libraries(poppler ${poppler_LIBS})
endif (ENABLE_LIBPNG)
install(TARGETS poppler RUNTIME DESTINATION bin LIBRARY DESTINATION lib ARCHIVE DESTINATION lib)
if(ENABLE_XPDF_HEADERS)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment