Commit b8b6a7c9 authored by Sandro Mani's avatar Sandro Mani Committed by Albert Astals Cid

mingw: change library names to include the soversion

Bug #103157
parent f6ad6487
......@@ -545,6 +545,10 @@ else()
add_library(poppler ${poppler_SRCS})
endif()
set_target_properties(poppler PROPERTIES VERSION 71.0.0 SOVERSION 71)
if(MINGW)
get_target_property(POPPLER_SOVERSION poppler SOVERSION)
set_target_properties(poppler PROPERTIES SUFFIX "-${POPPLER_SOVERSION}${CMAKE_SHARED_LIBRARY_SUFFIX}")
endif()
target_link_libraries(poppler LINK_PRIVATE ${poppler_LIBS})
if(CMAKE_USE_PTHREADS_INIT)
target_link_libraries(poppler LINK_PRIVATE Threads::Threads)
......
......@@ -24,6 +24,10 @@ set(poppler_cpp_SRCS
add_library(poppler-cpp SHARED ${poppler_cpp_SRCS})
set_target_properties(poppler-cpp PROPERTIES VERSION 0.3.0 SOVERSION 0)
if(MINGW)
get_target_property(POPPLER_CPP_SOVERSION poppler-cpp SOVERSION)
set_target_properties(poppler-cpp PROPERTIES SUFFIX "-${POPPLER_CPP_SOVERSION}${CMAKE_SHARED_LIBRARY_SUFFIX}")
endif()
target_link_libraries(poppler-cpp poppler ${ICONV_LIBRARIES})
install(TARGETS poppler-cpp RUNTIME DESTINATION bin LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
......
......@@ -82,6 +82,10 @@ set(poppler_glib_generated_SRCS
)
add_library(poppler-glib SHARED ${poppler_glib_SRCS} ${poppler_glib_generated_SRCS})
set_target_properties(poppler-glib PROPERTIES VERSION 8.9.0 SOVERSION 8)
if(MINGW)
get_target_property(POPPLER_GLIB_SOVERSION poppler-glib SOVERSION)
set_target_properties(poppler-glib PROPERTIES SUFFIX "-${POPPLER_GLIB_SOVERSION}${CMAKE_SHARED_LIBRARY_SUFFIX}")
endif()
target_link_libraries(poppler-glib poppler ${GLIB2_LIBRARIES} ${CAIRO_LIBRARIES} ${FREETYPE_LIBRARIES})
if(CMAKE_USE_PTHREADS_INIT)
target_link_libraries(poppler-glib Threads::Threads)
......
......@@ -31,6 +31,10 @@ set(poppler_qt4_SRCS
qt4_automoc(${poppler_qt4_SRCS})
add_library(poppler-qt4 SHARED ${poppler_qt4_SRCS})
set_target_properties(poppler-qt4 PROPERTIES VERSION 4.11.0 SOVERSION 4)
if(MINGW)
get_target_property(POPPLER_QT4_SOVERSION poppler-qt4 SOVERSION)
set_target_properties(poppler-qt4 PROPERTIES SUFFIX "-${POPPLER_QT4_SOVERSION}${CMAKE_SHARED_LIBRARY_SUFFIX}")
endif()
target_link_libraries(poppler-qt4 poppler ${QT4_QTCORE_LIBRARY} ${QT4_QTGUI_LIBRARY} ${QT4_QTXML_LIBRARY})
if(MSVC)
target_link_libraries(poppler-qt4 poppler ${poppler_LIBS})
......
......@@ -31,6 +31,10 @@ set(poppler_qt5_SRCS
)
add_library(poppler-qt5 SHARED ${poppler_qt5_SRCS})
set_target_properties(poppler-qt5 PROPERTIES VERSION 1.11.0 SOVERSION 1)
if(MINGW)
get_target_property(POPPLER_QT5_SOVERSION poppler-qt5 SOVERSION)
set_target_properties(poppler-qt5 PROPERTIES SUFFIX "-${POPPLER_QT5_SOVERSION}${CMAKE_SHARED_LIBRARY_SUFFIX}")
endif()
target_link_libraries(poppler-qt5 poppler ${Qt5Core_LIBRARIES} ${Qt5Gui_LIBRARIES} ${Qt5Xml_LIBRARIES})
if(MSVC)
target_link_libraries(poppler-qt5 poppler ${poppler_LIBS})
......
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