CMake: Install COMPONENTs (QtDialog)

Added "COMPONENT cmake-gui" for all install commands in lists file
This commit is contained in:
Konstantin Podsvirov 2014-12-08 00:30:15 +03:00
parent 938bbc4352
commit 2531b90954
1 changed files with 19 additions and 9 deletions

View File

@ -47,7 +47,8 @@ if (Qt5Widgets_FOUND)
get_filename_component(_qt_plugin_type "${_qt_plugin_type}" NAME)
set(_qt_plugin_dest "PlugIns/${_qt_plugin_type}")
install(FILES "${_qt_plugin_path}"
DESTINATION "${_qt_plugin_dest}")
DESTINATION "${_qt_plugin_dest}"
COMPONENT cmake-gui)
set(${_qt_plugins_var}
"${${_qt_plugins_var}};\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/${_qt_plugin_dest}/${_qt_plugin_file}")
else()
@ -58,7 +59,8 @@ if (Qt5Widgets_FOUND)
file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/qt.conf"
"[Paths]\nPlugins = PlugIns\n")
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/qt.conf"
DESTINATION "${CMAKE_INSTALL_PREFIX}/Resources")
DESTINATION "${CMAKE_INSTALL_PREFIX}/Resources"
COMPONENT cmake-gui)
endif()
if(WIN32 AND TARGET Qt5::Core)
@ -130,7 +132,8 @@ endif()
if(CMake_GUI_DISTRIBUTE_WITH_Qt_LGPL)
install(FILES ${CMake_SOURCE_DIR}/Licenses/LGPLv2.1.txt
DESTINATION ${CMAKE_DATA_DIR}/Licenses)
DESTINATION ${CMAKE_DATA_DIR}/Licenses
COMPONENT cmake-gui)
set_property(SOURCE CMakeSetupDialog.cxx
PROPERTY COMPILE_DEFINITIONS CMake_GUI_DISTRIBUTE_WITH_Qt_LGPL)
endif()
@ -163,7 +166,7 @@ if(APPLE)
)
endif()
set(CMAKE_INSTALL_DESTINATION_ARGS
BUNDLE DESTINATION "${CMAKE_BUNDLE_LOCATION}")
BUNDLE DESTINATION "${CMAKE_BUNDLE_LOCATION}" COMPONENT cmake-gui)
install(TARGETS cmake-gui
RUNTIME DESTINATION bin COMPONENT cmake-gui
@ -174,18 +177,25 @@ if(UNIX AND NOT APPLE)
install(
FILES "${CMAKE_CURRENT_SOURCE_DIR}/CMakeSetup${size}.png"
DESTINATION "share/icons/hicolor/${size}x${size}/apps"
COMPONENT cmake-gui
RENAME "CMakeSetup.png")
endforeach ()
# install a desktop file so CMake appears in the application start menu
# with an icon
install(FILES CMake.desktop DESTINATION share/applications )
install(FILES cmakecache.xml DESTINATION share/mime/packages )
install(FILES CMake.desktop
DESTINATION share/applications
COMPONENT cmake-gui)
install(FILES cmakecache.xml
DESTINATION share/mime/packages
COMPONENT cmake-gui)
endif()
if(APPLE)
install(CODE "execute_process(COMMAND ln -s \"../MacOS/CMake\" cmake-gui
WORKING_DIRECTORY \$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/bin)")
install(CODE "
execute_process(COMMAND ln -s \"../MacOS/CMake\" cmake-gui
WORKING_DIRECTORY \$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/bin)
" COMPONENT cmake-gui)
endif()
if(APPLE OR WIN32)
@ -199,7 +209,7 @@ if(APPLE OR WIN32)
include(\"${CMake_SOURCE_DIR}/Modules/BundleUtilities.cmake\")
set(BU_CHMOD_BUNDLE_ITEMS ON)
fixup_bundle(\"${fixup_exe}\" \"${QT_PLUGINS}\" \"${QT_LIBRARY_DIR};${QT_BINARY_DIR}\")
")
" COMPONENT cmake-gui)
endif()
set(CMAKE_PACKAGE_QTGUI TRUE)