set(CPACK_GENERATOR ZIP)
set(CPACK_BINARY_ZIP 1)
if(MINGW)
- get_filename_component(MINGW_BIN_PATH ${CMAKE_CXX_COMPILER} PATH)
+ set(runtime)
if(LYX_XMINGW)
- get_filename_component(mingw_name ${LYX_XMINGW} NAME)
- set(MINGW_BIN_PATH ${MINGW_BIN_PATH}/../${mingw_name}/lib)
- endif()
- if(EXISTS ${MINGW_BIN_PATH}/libgcc_s_sjlj-1.dll)
- list(APPEND runtime ${MINGW_BIN_PATH}/libgcc_s_sjlj-1.dll)
- elseif(EXISTS ${MINGW_BIN_PATH}/libgcc_s_seh-1.dll)
- list(APPEND runtime ${MINGW_BIN_PATH}/libgcc_s_seh-1.dll)
- elseif(EXISTS ${MINGW_BIN_PATH}/libgcc_s_dw2-1.dll)
- list(APPEND runtime ${MINGW_BIN_PATH}/libgcc_s_dw2-1.dll)
- endif()
- if(EXISTS ${MINGW_BIN_PATH}/libstdc++-6.dll)
- list(APPEND runtime ${MINGW_BIN_PATH}/libstdc++-6.dll)
- endif()
- if(EXISTS ${MINGW_BIN_PATH}/libwinpthread-1.dll)
- list(APPEND runtime ${MINGW_BIN_PATH}/libwinpthread-1.dll)
+ execute_process(COMMAND ${CMAKE_CXX_COMPILER} -print-libgcc-file-name OUTPUT_VARIABLE GCC_LIBGCC OUTPUT_STRIP_TRAILING_WHITESPACE)
+ list(APPEND runtime /usr/${LYX_XMINGW}/lib/libwinpthread-1.dll)
+ else()
+ set(GCC_LIBGCC ${CMAKE_CXX_COMPILER})
endif()
+ get_filename_component(MINGW_RUNTIME_PATH ${GCC_LIBGCC} PATH)
+ macro(add_runtime_dll _DLL)
+ file(GLOB GCC_RUNTIME ${MINGW_RUNTIME_PATH}/${_DLL})
+ list(APPEND runtime ${GCC_RUNTIME})
+ endmacro()
+ add_runtime_dll(libgcc*.dll)
+ add_runtime_dll(libstd*.dll)
+ add_runtime_dll(libwin*.dll)
if(NOT runtime)
- message(FATAL_ERROR "No mingw runtime found in ${MINGW_BIN_PATH}")
+ message(FATAL_ERROR "No mingw runtime found in ${MINGW_RUNTIME_PATH}")
endif()
- install(FILES
- ${runtime}
- ${QT_BINARY_DIR}/QtCore4.dll
- ${QT_BINARY_DIR}/QtGui4.dll
- ${QT_BINARY_DIR}/QtNetwork4.dll
- ${QT_PLUGINS_DIR}/imageformats/qgif4.dll
- ${QT_PLUGINS_DIR}/imageformats/qico4.dll
- ${QT_PLUGINS_DIR}/imageformats/qmng4.dll
- ${QT_PLUGINS_DIR}/imageformats/qsvg4.dll
- ${QT_PLUGINS_DIR}/imageformats/qtga4.dll
- ${QT_PLUGINS_DIR}/imageformats/qtiff4.dll
+ if(LYX_USE_QT MATCHES "QT5")
+ get_target_property(qmakebin Qt5::qmake IMPORTED_LOCATION)
+ get_filename_component(QT_BINARY_DIR ${qmakebin} PATH)
+ install(FILES
+ ${runtime}
+ ${QT_BINARY_DIR}/Qt5Core.dll
+ ${QT_BINARY_DIR}/Qt5Network.dll
+ ${QT_BINARY_DIR}/Qt5Gui.dll
+ ${QT_BINARY_DIR}/Qt5Widgets.dll
+ ${QT_BINARY_DIR}/Qt5Concurrent.dll
+ ${QT_BINARY_DIR}/Qt5OpenGL.dll
+ ${QT_BINARY_DIR}/Qt5PrintSupport.dll
+ ${QT_BINARY_DIR}/Qt5Svg.dll
+ ${QT_BINARY_DIR}/Qt5WinExtras.dll
+ DESTINATION bin
+ CONFIGURATIONS Release)
+ install(FILES
+ ${QT_BINARY_DIR}/../plugins/platforms/qminimal.dll
+ ${QT_BINARY_DIR}/../plugins/platforms/qwindows.dll
+ DESTINATION bin/platforms
+ CONFIGURATIONS Release)
+ install(FILES
+ ${QT_BINARY_DIR}/../plugins/printsupport/windowsprintersupport.dll
+ DESTINATION bin/printsupport
+ CONFIGURATIONS Release)
+ install(FILES
+ ${QT_BINARY_DIR}/../plugins/imageformats/qgif.dll
+ ${QT_BINARY_DIR}/../plugins/imageformats/qjpeg.dll
+ ${QT_BINARY_DIR}/../plugins/imageformats/qsvg.dll
+ ${QT_BINARY_DIR}/../plugins/imageformats/qico.dll
+ DESTINATION bin/imageformats
+ CONFIGURATIONS Release)
+ install(FILES
+ ${QT_BINARY_DIR}/../plugins/iconengines/qsvgicon.dll
+ DESTINATION bin/iconengines
+ CONFIGURATIONS Release)
+ else()
+ install(FILES
+ ${runtime}
+ ${QT_BINARY_DIR}/QtCore4.dll
+ ${QT_BINARY_DIR}/QtGui4.dll
+ ${QT_BINARY_DIR}/QtNetwork4.dll
+ ${QT_PLUGINS_DIR}/imageformats/qgif4.dll
+ ${QT_PLUGINS_DIR}/imageformats/qico4.dll
+ ${QT_PLUGINS_DIR}/imageformats/qmng4.dll
+ ${QT_PLUGINS_DIR}/imageformats/qsvg4.dll
+ ${QT_PLUGINS_DIR}/imageformats/qtga4.dll
+ ${QT_PLUGINS_DIR}/imageformats/qtiff4.dll
DESTINATION bin CONFIGURATIONS Release)
+ endif()
endif()
else()
# needed by rpm
set(CPACK_DEBIAN_PACKAGE_DEPENDS "python (>= 2.6)")
# use dpkg-shlibdeps to generate additional info for package dependency list.
+set(CPACK_DEBIAN_PACKAGE_RELEASE ${LYX_PACKAGE_RELEASE})
set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON)
+set(CPACK_DEBIAN_PACKAGE_DEBUG ON)
#
# for the next ones, cpack insists on data with values in some file
"/\\\\.project$"
"/\\\\.cproject$"
"/\\\\.history$"
+"/\\\\.gitignore$"
+"/\\\\.gitattributes$"
"\\\\.#"
"\\\\.swp$"
+"\\\\.my$"
+"\\\\.pyc$"
+"\\\\.patch$"
"~$"
"/#"
"/_CPack_Packages/"
"/autom4te\\\\.cache/"
"/\\\\.deps/"
"/build/"
+"/attic/"
+"/HTML/"
"/lyx-2\\\\."
+"/expectedTestFailures$"
+"/MergedManuals.lyx$"
)
if(LYX_CPACK)