Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
mitkInstallRules.cmake
Go to the documentation of this file.
1 MITK_INSTALL(FILES "${MITK_SOURCE_DIR}/mitk.ico")
2 MITK_INSTALL(FILES "${MITK_SOURCE_DIR}/mitk.bmp")
3 
4 # Install CTK Qt (designer) plugins
5 if(MITK_USE_CTK)
6  if(EXISTS ${CTK_QTDESIGNERPLUGINS_DIR})
7  set(_qtplugin_install_destinations)
8  if(MACOSX_BUNDLE_NAMES)
9  foreach(bundle_name ${MACOSX_BUNDLE_NAMES})
10  list(APPEND _qtplugin_install_destinations
11  ${bundle_name}.app/Contents/MacOS/${_install_DESTINATION}/plugins/designer)
12  endforeach()
13  else()
14  list(APPEND _qtplugin_install_destinations bin/plugins/designer)
15  endif()
16 
17  set(_ctk_qt_plugin_folder_release)
18  set(_ctk_qt_plugin_folder_debug)
19  if(NOT CMAKE_CFG_INTDIR STREQUAL ".")
20  set(_ctk_qt_plugin_folder_release "Release/")
21  set(_ctk_qt_plugin_folder_debug "Debug/")
22  endif()
23 
24  foreach(_qtplugin_install_dir ${_qtplugin_install_destinations})
25  install(DIRECTORY "${CTK_QTDESIGNERPLUGINS_DIR}/designer/${_ctk_qt_plugin_folder_release}"
26  DESTINATION ${_qtplugin_install_dir}
27  CONFIGURATIONS Release
28  )
29  install(DIRECTORY "${CTK_QTDESIGNERPLUGINS_DIR}/designer/${_ctk_qt_plugin_folder_debug}"
30  DESTINATION ${_qtplugin_install_dir}
31  CONFIGURATIONS Debug
32  )
33  endforeach()
34  endif()
35 endif()
36 
37 # related to MITK:T19679
38 if(MACOSX_BUNDLE_NAMES)
39  foreach(bundle_name ${MACOSX_BUNDLE_NAMES})
40  get_property(_qmake_location TARGET ${Qt5Core_QMAKE_EXECUTABLE}
41  PROPERTY IMPORT_LOCATION)
42  get_filename_component(_qmake_path "${_qmake_location}" DIRECTORY)
43  install(FILES "${_qmake_path}/../plugins/platforms/libqcocoa.dylib"
44  DESTINATION "${bundle_name}.app/Contents/MacOS/platforms"
45  CONFIGURATIONS Release)
46  install(FILES "${_qmake_path}/../plugins/sqldrivers/libqsqlite.dylib"
47  DESTINATION "${bundle_name}.app/Contents/MacOS/sqldrivers"
48  CONFIGURATIONS Release)
49  install(FILES "${_qmake_path}/../plugins/iconengines/libqsvgicon.dylib"
50  DESTINATION "${bundle_name}.app/Contents/MacOS/iconengines"
51  CONFIGURATIONS Release)
52  # related to MITK:T19679-InstallQtWebEnginProcess
53  if(MITK_USE_Qt5_WebEngine)
54  get_filename_component(ABS_DIR_HELPERS "${_qmake_path}/../lib/QtWebEngineCore.framework/Helpers" REALPATH)
55  install(DIRECTORY ${ABS_DIR_HELPERS}
56  DESTINATION "${bundle_name}.app/Contents/Frameworks/QtWebEngineCore.framework/"
57  CONFIGURATIONS Release)
58  endif()
59  endforeach()
60 endif()
61 
62 if(WIN32)
63  if(MITK_USE_Qt5)
64  get_property(_qmake_location TARGET ${Qt5Core_QMAKE_EXECUTABLE}
65  PROPERTY IMPORT_LOCATION)
66  get_filename_component(_qmake_path "${_qmake_location}" DIRECTORY)
67  install(FILES "${_qmake_path}/../plugins/platforms/qwindows.dll"
68  DESTINATION "bin/plugins/platforms"
69  CONFIGURATIONS Release)
70  install(FILES "${_qmake_path}/../plugins/sqldrivers/qsqlite.dll"
71  DESTINATION "bin/plugins/sqldrivers"
72  CONFIGURATIONS Release)
73  install(FILES "${_qmake_path}/../plugins/imageformats/qsvg.dll"
74  DESTINATION "bin/plugins/imageformats"
75  CONFIGURATIONS Release)
76  install(FILES "${_qmake_path}/../plugins/iconengines/qsvgicon.dll"
77  DESTINATION "bin/plugins/iconengines"
78  CONFIGURATIONS Release)
79  if(MITK_USE_Qt5_WebEngine)
80  MITK_INSTALL( FILES "${_qmake_path}/QtWebEngineProcess.exe")
81  endif()
82  install(DIRECTORY "${_qmake_path}/../resources/"
83  DESTINATION "bin/resources/"
84  CONFIGURATIONS Release)
85  install(DIRECTORY "${_qmake_path}/../translations/qtwebengine_locales/"
86  DESTINATION "bin/translations/qtwebengine_locales/"
87  CONFIGURATIONS Release)
88  install(FILES "${_qmake_path}/../plugins/platforms/qwindowsd.dll"
89  DESTINATION "bin/plugins/platforms"
90  CONFIGURATIONS Debug)
91  install(FILES "${_qmake_path}/../plugins/sqldrivers/qsqlited.dll"
92  DESTINATION "bin/plugins/sqldrivers"
93  CONFIGURATIONS Debug)
94  install(FILES "${_qmake_path}/../plugins/imageformats/qsvgd.dll"
95  DESTINATION "bin/plugins/imageformats"
96  CONFIGURATIONS Debug)
97  install(FILES "${_qmake_path}/../plugins/iconengines/qsvgicond.dll"
98  DESTINATION "bin/plugins/iconengines"
99  CONFIGURATIONS Debug)
100  install(DIRECTORY "${_qmake_path}/../resources/"
101  DESTINATION "bin/resources/"
102  CONFIGURATIONS Debug)
103  install(DIRECTORY "${_qmake_path}/../translations/qtwebengine_locales/"
104  DESTINATION "bin/translations/qtwebengine_locales/"
105  CONFIGURATIONS Debug)
106  endif()
107 
108  #DCMTK Dlls install target (shared libs on gcc only)
109  if(MINGW AND DCMTK_ofstd_LIBRARY)
110  set(_dcmtk_libs
111  ${DCMTK_dcmdata_LIBRARY}
112  ${DCMTK_dcmimgle_LIBRARY}
113  ${DCMTK_dcmnet_LIBRARY}
114  ${DCMTK_ofstd_LIBRARY}
115  )
116 
117  foreach(_dcmtk_lib ${_dcmtk_libs})
118  MITK_INSTALL(FILES ${_dcmtk_lib} )
119  endforeach()
120  endif()
121 
122  #MinGW dll
123  if(MINGW)
124  find_library(MINGW_RUNTIME_DLL "mingwm10.dll" HINTS ${CMAKE_FIND_ROOT_PATH}/sys-root/mingw/bin)
125  if(MINGW_RUNTIME_DLL)
126  MITK_INSTALL(FILES ${MINGW_RUNTIME_DLL} )
127  else()
128  message(SEND_ERROR "Could not find mingwm10.dll which is needed for a proper install")
129  endif()
130 
131  find_library(MINGW_GCC_RUNTIME_DLL "libgcc_s_dw2-1.dll" HINTS ${CMAKE_FIND_ROOT_PATH}/sys-root/mingw/bin)
132  if(MINGW_GCC_RUNTIME_DLL)
133  MITK_INSTALL(FILES ${MINGW_GCC_RUNTIME_DLL} )
134  else()
135  message(SEND_ERROR "Could not find libgcc_s_dw2-1.dll which is needed for a proper install")
136  endif()
137  endif()
138 
139 else()
140 
141  #DCMTK Dlls install target (shared libs on gcc only)
142  if(DCMTK_ofstd_LIBRARY)
143  set(_dcmtk_libs
144  ${DCMTK_dcmdata_LIBRARY}
145  ${DCMTK_dcmimgle_LIBRARY}
146  ${DCMTK_dcmnet_LIBRARY}
147  ${DCMTK_ofstd_LIBRARY}
148  )
149  foreach(_dcmtk_lib ${_dcmtk_libs})
150  #MITK_INSTALL(FILES ${_dcmtk_lib} DESTINATION lib)
151  endforeach()
152  endif()
153 
154 # We need to install Webengineprocess and related files on unix as well
155  if(UNIX)
156  if(MITK_USE_Qt5_WebEngine)
157  get_property(_qmake_location TARGET ${Qt5Core_QMAKE_EXECUTABLE}
158  PROPERTY IMPORT_LOCATION)
159  get_filename_component(_qmake_path "${_qmake_location}" DIRECTORY)
160  MITK_INSTALL_HELPER_APP( EXECUTABLES "${_qmake_path}/../libexec/QtWebEngineProcess")
161  install(DIRECTORY "${_qmake_path}/../resources/"
162  DESTINATION "bin/resources/")
163  install(DIRECTORY "${_qmake_path}/../translations/qtwebengine_locales/"
164  DESTINATION "bin/translations/qtwebengine_locales/")
165  endif()
166  endif()
167 
168 endif()
169 
170 #install Matchpoint libs that are currently not auto detected
171 if(MITK_USE_MatchPoint)
172  install(DIRECTORY "${MITK_EXTERNAL_PROJECT_PREFIX}/bin/"
173  DESTINATION "bin"
174  FILES_MATCHING PATTERN "MAPUtilities*")
175  install(DIRECTORY "${MITK_EXTERNAL_PROJECT_PREFIX}/bin/"
176  DESTINATION "bin"
177  FILES_MATCHING PATTERN "MAPAlgorithms*")
178 endif()
DataCollection - Class to facilitate loading/accessing structured data.
MITK_INSTALL()