CMake: install COMPONENT cmcldeps

Added in Tools group with IFW installer
This commit is contained in:
Konstantin Podsvirov 2016-07-13 00:10:28 +03:00 committed by Brad King
parent 53df6d5995
commit 8ae035a569
3 changed files with 23 additions and 8 deletions

View File

@ -70,6 +70,9 @@ if(EXISTS "${CMAKE_ROOT}/Modules/CPack.cmake")
# Components
if(CMake_INSTALL_COMPONENTS)
set(_CPACK_IFW_COMPONENTS_ALL cmake ctest cpack)
if(WIN32 AND NOT CYGWIN)
list(APPEND _CPACK_IFW_COMPONENTS_ALL cmcldeps)
endif()
if(APPLE)
list(APPEND _CPACK_IFW_COMPONENTS_ALL cmakexbuild)
endif()

View File

@ -102,13 +102,21 @@ if(CPACK_GENERATOR MATCHES "IFW")
set(CPACK_IFW_COMPONENT_CPACK_PRIORITY 87)
set(CPACK_IFW_COMPONENT_CPACK_VERSION "@_CPACK_IFW_PACKAGE_VERSION@")
set(CPACK_COMPONENT_CMCLDEPS_DISPLAY_NAME "cmcldeps")
set(CPACK_COMPONENT_CMCLDEPS_DESCRIPTION
"The \"cmcldeps\" executable is wrapper around \"cl\" program")
set(CPACK_COMPONENT_CMCLDEPS_GROUP Tools)
set(CPACK_IFW_COMPONENT_CMCLDEPS_NAME "CMClDeps")
set(CPACK_IFW_COMPONENT_CMCLDEPS_PRIORITY 86)
set(CPACK_IFW_COMPONENT_CMCLDEPS_VERSION "@_CPACK_IFW_PACKAGE_VERSION@")
set(CPACK_COMPONENT_CMAKEXBUILD_DISPLAY_NAME "cmakexbuild")
set(CPACK_COMPONENT_CMAKEXBUILD_DESCRIPTION
"The \"cmakexbuild\" executable is a wrapper program for \"xcodebuild\"")
set(CPACK_COMPONENT_CMAKEXBUILD_REQUIRED TRUE)
set(CPACK_COMPONENT_CMAKEXBUILD_GROUP Tools)
set(CPACK_IFW_COMPONENT_CMAKEXBUILD_NAME "CMakeXBuild")
set(CPACK_IFW_COMPONENT_CMAKEXBUILD_PRIORITY 86)
set(CPACK_IFW_COMPONENT_CMAKEXBUILD_PRIORITY 85)
set(CPACK_IFW_COMPONENT_CMAKEXBUILD_VERSION "@_CPACK_IFW_PACKAGE_VERSION@")
# Dialogs

View File

@ -530,11 +530,14 @@ set(SRCS ${SRCS}
cmNinjaUtilityTargetGenerator.h
)
# Temporary variable for tools targets
set(_tools)
if(WIN32 AND NOT CYGWIN)
set_source_files_properties(cmcldeps.cxx PROPERTIES COMPILE_DEFINITIONS _WIN32_WINNT=0x0501)
add_executable(cmcldeps cmcldeps.cxx ${MANIFEST_FILE})
list(APPEND _tools cmcldeps)
target_link_libraries(cmcldeps CMakeLib)
install(TARGETS cmcldeps DESTINATION bin)
endif()
foreach(v CURL_CA_BUNDLE CURL_CA_PATH)
@ -746,6 +749,7 @@ endif()
if(APPLE)
add_executable(cmakexbuild cmakexbuild.cxx)
list(APPEND _tools cmakexbuild)
target_link_libraries(cmakexbuild CMakeLib)
add_executable(OSXScriptLauncher
CPack/OSXScriptLauncher.cxx)
@ -755,14 +759,17 @@ endif()
# Build CMake executable
add_executable(cmake cmakemain.cxx cmcmd.cxx cmcmd.h ${MANIFEST_FILE})
list(APPEND _tools cmake)
target_link_libraries(cmake CMakeLib)
# Build CTest executable
add_executable(ctest ctest.cxx ${MANIFEST_FILE})
list(APPEND _tools ctest)
target_link_libraries(ctest CTestLib)
# Build CPack executable
add_executable(cpack CPack/cpack.cxx ${MANIFEST_FILE})
list(APPEND _tools cpack)
target_link_libraries(cpack CPackLib)
# Curses GUI
@ -781,15 +788,12 @@ include (${CMake_SOURCE_DIR}/Source/LocalUserOptions.cmake OPTIONAL)
# Install tools
set(_tools cmake ctest cpack)
if(APPLE)
list(APPEND _tools cmakexbuild)
endif()
foreach(_tool ${_tools})
CMake_OPTIONAL_COMPONENT(${_tool})
install(TARGETS ${_tool} DESTINATION ${CMAKE_BIN_DIR} ${COMPONENT})
endforeach()
install(FILES cmCPluginAPI.h DESTINATION ${CMAKE_DATA_DIR}/include)
# Unset temporary variables
unset(_tools)