Skip to content

Commit

Permalink
refine install of qt plugins
Browse files Browse the repository at this point in the history
  • Loading branch information
cgcostume committed Aug 28, 2014
1 parent 8df22ee commit f1834d1
Show file tree
Hide file tree
Showing 5 changed files with 49 additions and 3 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ set(META_PROJECT_NAME "glraw")
set(META_PROJECT_DESCRIPTION "Converts images to OpenGL compatible raw files")
set(META_VERSION_MAJOR "1")
set(META_VERSION_MINOR "0")
set(META_VERSION_PATCH "1")
set(META_VERSION_PATCH "3")
set(META_VERSION "${META_VERSION_MAJOR}.${META_VERSION_MINOR}.${META_VERSION_PATCH}")
set(META_AUTHOR_ORGANIZATION "hpicgs group")
set(META_AUTHOR_DOMAIN "https://github.com/hpicgs/glraw")
Expand Down
45 changes: 44 additions & 1 deletion cmake/Custom.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,49 @@ macro(install_qt DEST)
foreach(target ${args})
get_target_property(qtrelease Qt5::${target} LOCATION_RELEASE)
install(FILES ${qtrelease} DESTINATION ${DEST})
endforeach()
endforeach()

get_target_property(qtrelease Qt5::Core LOCATION_RELEASE)
get_filename_component(qtdir ${qtrelease} DIRECTORY)

install(FILES
${qtdir}/icudt52.dll
${qtdir}/icuin52.dll
${qtdir}/icuuc52.dll
DESTINATION ${DEST})

endmacro()


macro(install_qt_platforms DEST)

set(args ${ARGV})
list(REMOVE_AT args 0)

get_target_property(qtrelease Qt5::Core LOCATION_RELEASE)
get_filename_component(qtdir ${qtrelease} DIRECTORY)

foreach(target ${args})
install(FILES "${qtdir}/../plugins/platforms/${target}.dll" DESTINATION ${DEST}/plugins/platforms)
endforeach()

install(FILES ${CMAKE_SOURCE_DIR}/packages/qt.conf DESTINATION ${DEST})

endmacro()


macro(install_qt_imageformats DEST)

set(args ${ARGV})
list(REMOVE_AT args 0)

get_target_property(qtrelease Qt5::Core LOCATION_RELEASE)
get_filename_component(qtdir ${qtrelease} DIRECTORY)

foreach(target ${args})
install(FILES "${qtdir}/../plugins/imageformats/${target}.dll" DESTINATION ${DEST}/plugins/imageformats)
endforeach()

install(FILES ${CMAKE_SOURCE_DIR}/packages/qt.conf DESTINATION ${DEST})

endmacro()
2 changes: 2 additions & 0 deletions packages/qt.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[Paths]
Plugins=plugins
1 change: 0 additions & 1 deletion source/glraw-viewer/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ include_directories(

set(libs
# e.g., ${TRDP_LIBRARIES}
${OPENGL_LIBRARIES}
glraw
)

Expand Down
2 changes: 2 additions & 0 deletions source/glraw/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,8 @@ install(TARGETS ${target}
# deploy qt binaries (glraw debug target should not be deployed)
if(WIN32)
install_qt(${INSTALL_BIN} Core Gui Widgets OpenGL)
install_qt_platforms(${INSTALL_BIN} qwindows)
install_qt_imageformats(${INSTALL_BIN} qdds qgif qicns qico qjp2 qjpeg qmng qsvg qtga qtiff qwbmp qwebp)
endif()

# Header files
Expand Down

0 comments on commit f1834d1

Please sign in to comment.