Medical Imaging Interaction Toolkit  2018.4.99-389bf124
Medical Imaging Interaction Toolkit
mitkInstallRules.cmake
Go to the documentation of this file.
1 # Install MITK icon and logo
2 
3 MITK_INSTALL(FILES
4  "${MITK_SOURCE_DIR}/mitk.ico"
5  "${MITK_SOURCE_DIR}/mitk.bmp")
6 
7 # Helper vars
8 
9 if(WIN32)
10  set(_prefix "")
11  set(_ext ".dll")
12 elseif(UNIX)
13  set(_prefix "lib")
14  if(APPLE)
15  set(_ext ".dylib")
16  else()
17  set(_ext ".so")
18  endif()
19 endif()
20 
21 # Install MITK executables including auto-load modules
22 
23 get_property(_mitk_executable_targets GLOBAL PROPERTY MITK_EXECUTABLE_TARGETS)
24 if(_mitk_executable_targets)
25  get_property(_mitk_module_targets GLOBAL PROPERTY MITK_MODULE_TARGETS)
26  foreach(_mitk_module_target ${_mitk_module_targets})
27  if(TARGET ${_mitk_module_target})
28  get_target_property(_mitk_autoload_targets ${_mitk_module_target} MITK_AUTOLOAD_TARGETS)
29  if (_mitk_autoload_targets)
30  foreach(_mitk_autoload_target ${_mitk_autoload_targets})
31  get_target_property(_mitk_autoload_directory ${_mitk_autoload_target} MITK_AUTOLOAD_DIRECTORY)
32  if (_mitk_autoload_directory)
33  if(WIN32)
34  get_target_property(_target_location ${_mitk_autoload_target} RUNTIME_OUTPUT_DIRECTORY)
35  else()
36  get_target_property(_target_location ${_mitk_autoload_target} LIBRARY_OUTPUT_DIRECTORY)
37  endif()
38  if(NOT CMAKE_CFG_INTDIR STREQUAL ".")
39  set(_target_location "${_target_location}/Release")
40  endif()
41  set(_mitk_autoload_target_filename "${_prefix}${_mitk_autoload_target}${_ext}")
42  set(_mitk_autoload_target_filepath "${_target_location}/${_mitk_autoload_target_filename}")
43  set(_install_DESTINATION "${_mitk_autoload_directory}")
44  MITK_INSTALL(FILES ${_mitk_autoload_target_filepath})
45  if(UNIX AND NOT APPLE)
46  install(CODE "file(RPATH_REMOVE FILE \"\${CMAKE_INSTALL_PREFIX}/bin/${_mitk_autoload_directory}/${_mitk_autoload_target_filename}\")")
47  endif()
48  endif()
49  endforeach()
50  endif()
51  endif()
52  endforeach()
53 
54  set(_install_DESTINATION "")
55 
56  foreach(_mitk_executable_target ${_mitk_executable_targets})
57  MITK_INSTALL_TARGETS(EXECUTABLES ${_mitk_executable_target} GLOB_PLUGINS)
58  if(UNIX AND NOT APPLE)
59  install(PROGRAMS "${MITK_SOURCE_DIR}/CMake/RunInstalledApp.sh" DESTINATION "." RENAME ${_mitk_executable_target}.sh)
60  endif()
61  endforeach()
62 endif()
63 
64 # Install PythonQt
65 
66 if(MITK_USE_Python3 AND PythonQt_DIR)
67  set(_python_qt_lib "${PythonQt_DIR}/")
68  if(WIN32)
69  set(_python_qt_lib "${_python_qt_lib}bin")
70  else()
71  set(_python_qt_lib "${_python_qt_lib}lib")
72  endif()
73  set(_python_qt_lib "${_python_qt_lib}/${_prefix}PythonQt${_ext}")
74  MITK_INSTALL(FILES ${_python_qt_lib})
75 endif()
76 
77 # Install Qt plugins
78 
79 if(MITK_USE_Qt5)
80  get_property(_qmake_location TARGET ${Qt5Core_QMAKE_EXECUTABLE} PROPERTY IMPORT_LOCATION)
81  get_filename_component(_qmake_path ${_qmake_location} DIRECTORY)
82 
83  set(_install_DESTINATION "plugins/sqldrivers")
84  MITK_INSTALL(FILES "${_qmake_path}/../plugins/sqldrivers/${_prefix}qsqlite${_ext}")
85 
86  set(_install_DESTINATION "plugins/imageformats")
87  MITK_INSTALL(FILES "${_qmake_path}/../plugins/imageformats/${_prefix}qsvg${_ext}")
88 
89  set(_install_DESTINATION "plugins/iconengines")
90  MITK_INSTALL(FILES "${_qmake_path}/../plugins/iconengines/${_prefix}qsvgicon${_ext}")
91 
92  # Install platform-specific Qt plugins
93 
94  set(_install_DESTINATION "plugins/platforms")
95 
96  if(WIN32)
97  MITK_INSTALL(FILES "${_qmake_path}/../plugins/platforms/qwindows.dll")
98  elseif(APPLE)
99  MITK_INSTALL(FILES "${_qmake_path}/../plugins/platforms/libqcocoa.dylib")
100  elseif(UNIX)
101  MITK_INSTALL(FILES "${_qmake_path}/../plugins/platforms/libqxcb.so")
102 
103  set(_install_DESTINATION "plugins/xcbglintegrations")
104  MITK_INSTALL(FILES "${_qmake_path}/../plugins/xcbglintegrations/libqxcb-glx-integration.so")
105  endif()
106 
107  # Install platform-specific Qt styles
108 
109  set(_install_DESTINATION "plugins/styles")
110 
111  if(WIN32)
112  MITK_INSTALL(FILES "${_qmake_path}/../plugins/styles/qwindowsvistastyle.dll")
113  elseif(APPLE)
114  MITK_INSTALL(FILES "${_qmake_path}/../plugins/styles/libqmacstyle.dylib")
115  endif()
116 
117  # Install Qt WebEngine
118 
119  if(APPLE)
120  set(_install_DESTINATION "../Frameworks/QtWebEngineCore.framework")
121 
122  get_filename_component(_real_path "${_qmake_path}/../lib/QtWebEngineCore.framework/Helpers" REALPATH)
123  MITK_INSTALL(DIRECTORY ${_real_path} USE_SOURCE_PERMISSIONS)
124 
125  # Translations are included in the Resources directory of
126  # QtWebEngineCore.framework and are installed by default.
127  else()
128  set(_install_DESTINATION "")
129 
130  if(WIN32)
131  MITK_INSTALL(PROGRAMS "${_qmake_path}/QtWebEngineProcess.exe")
132  elseif(UNIX)
133  MITK_INSTALL(PROGRAMS "${_qmake_path}/../libexec/QtWebEngineProcess")
134  endif()
135 
136  MITK_INSTALL(DIRECTORY "${_qmake_path}/../resources")
137 
138  set(_install_DESTINATION "translations")
139  MITK_INSTALL(DIRECTORY "${_qmake_path}/../translations/qtwebengine_locales")
140  endif()
141 endif()
142 
143 set(_install_DESTINATION "")
144 
145 # Install MatchPoint binaries that are not auto-detected
146 if(MITK_USE_MatchPoint)
147  MITK_INSTALL(DIRECTORY "${MITK_EXTERNAL_PROJECT_PREFIX}/bin/" FILES_MATCHING PATTERN "MapUtilities*")
148  MITK_INSTALL(DIRECTORY "${MITK_EXTERNAL_PROJECT_PREFIX}/bin/" FILES_MATCHING PATTERN "MapAlgorithms*")
149 endif()
150 
151 # IMPORTANT: Restore default install destination! Do not edit this file beyond this line!
152 set(_install_DESTINATION "")
MITK_INSTALL_TARGETS()
MITK_INSTALL()
static bool in(Reader::Char c, Reader::Char c1, Reader::Char c2, Reader::Char c3, Reader::Char c4)
Definition: jsoncpp.cpp:244
const std::string TARGET