mirror of
https://github.com/cmclark00/retro-imager.git
synced 2025-05-18 07:55:21 +01:00
deps: xz: Disable install directives
This commit is contained in:
parent
3e9e03b91f
commit
0f56dea4bf
1 changed files with 48 additions and 32 deletions
|
@ -167,6 +167,8 @@ if(NOT MSVC)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
OPTION(XZ_INSTALL OFF "Enable xz Install directives")
|
||||||
|
|
||||||
# On Apple OSes, don't build executables as bundles:
|
# On Apple OSes, don't build executables as bundles:
|
||||||
set(CMAKE_MACOSX_BUNDLE OFF)
|
set(CMAKE_MACOSX_BUNDLE OFF)
|
||||||
|
|
||||||
|
@ -1378,6 +1380,7 @@ configure_file(src/liblzma/liblzma.pc.in liblzma.pc
|
||||||
|
|
||||||
# Install the library binary. The INCLUDES specifies the include path that
|
# Install the library binary. The INCLUDES specifies the include path that
|
||||||
# is exported for other projects to use but it doesn't install any files.
|
# is exported for other projects to use but it doesn't install any files.
|
||||||
|
if (XZ_INSTALL)
|
||||||
install(TARGETS liblzma EXPORT liblzmaTargets
|
install(TARGETS liblzma EXPORT liblzmaTargets
|
||||||
RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}"
|
RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}"
|
||||||
COMPONENT liblzma_Runtime
|
COMPONENT liblzma_Runtime
|
||||||
|
@ -1416,7 +1419,7 @@ if(NOT MSVC)
|
||||||
DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig"
|
DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig"
|
||||||
COMPONENT liblzma_Development)
|
COMPONENT liblzma_Development)
|
||||||
endif()
|
endif()
|
||||||
|
endif(XZ_INSTALL)
|
||||||
|
|
||||||
#############################################################################
|
#############################################################################
|
||||||
# Helper functions for installing files
|
# Helper functions for installing files
|
||||||
|
@ -1427,13 +1430,15 @@ endif()
|
||||||
# The target file should exist because on Cygwin and MSYS2 symlink creation
|
# The target file should exist because on Cygwin and MSYS2 symlink creation
|
||||||
# can fail under certain conditions if the target doesn't exist.
|
# can fail under certain conditions if the target doesn't exist.
|
||||||
function(my_install_symlinks COMPONENT DIR TARGET_NAME LINK_SUFFIX LINK_NAMES)
|
function(my_install_symlinks COMPONENT DIR TARGET_NAME LINK_SUFFIX LINK_NAMES)
|
||||||
install(CODE "set(D \"\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/${DIR}\")
|
if (XZ_INSTALL)
|
||||||
foreach(L ${LINK_NAMES})
|
install(CODE "set(D \"\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/${DIR}\")
|
||||||
file(CREATE_LINK \"${TARGET_NAME}\"
|
foreach(L ${LINK_NAMES})
|
||||||
\"\${D}/\${L}${LINK_SUFFIX}\"
|
file(CREATE_LINK \"${TARGET_NAME}\"
|
||||||
SYMBOLIC)
|
\"\${D}/\${L}${LINK_SUFFIX}\"
|
||||||
endforeach()"
|
SYMBOLIC)
|
||||||
COMPONENT "${COMPONENT}")
|
endforeach()"
|
||||||
|
COMPONENT "${COMPONENT}")
|
||||||
|
endif(XZ_INSTALL)
|
||||||
endfunction()
|
endfunction()
|
||||||
|
|
||||||
# Installs a man page file of a given language ("" for the untranslated file)
|
# Installs a man page file of a given language ("" for the untranslated file)
|
||||||
|
@ -1451,10 +1456,11 @@ function(my_install_man_lang COMPONENT SRC_FILE MAN_LANG LINK_NAMES)
|
||||||
|
|
||||||
# Installing the file must be done before creating the symlinks
|
# Installing the file must be done before creating the symlinks
|
||||||
# due to Cygwin and MSYS2.
|
# due to Cygwin and MSYS2.
|
||||||
install(FILES "${SRC_FILE}"
|
if(XZ_INSTALL)
|
||||||
DESTINATION "${CMAKE_INSTALL_MANDIR}/${MAN_LANG}/man${MAN_SECTION}"
|
install(FILES "${SRC_FILE}"
|
||||||
COMPONENT "${COMPONENT}")
|
DESTINATION "${CMAKE_INSTALL_MANDIR}/${MAN_LANG}/man${MAN_SECTION}"
|
||||||
|
COMPONENT "${COMPONENT}")
|
||||||
|
endif(XZ_INSTALL)
|
||||||
# Get the basename of the file to be used as the symlink target.
|
# Get the basename of the file to be used as the symlink target.
|
||||||
get_filename_component(BASENAME "${SRC_FILE}" NAME)
|
get_filename_component(BASENAME "${SRC_FILE}" NAME)
|
||||||
|
|
||||||
|
@ -1593,10 +1599,11 @@ if(XZ_HAVE_DECODERS AND (NOT MSVC OR MSVC_VERSION GREATER_EQUAL 1900))
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
tuklib_progname("${XZDEC}")
|
tuklib_progname("${XZDEC}")
|
||||||
|
if (XZ_INSTALL)
|
||||||
install(TARGETS "${XZDEC}"
|
install(TARGETS "${XZDEC}"
|
||||||
RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}"
|
RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}"
|
||||||
COMPONENT "${XZDEC}_Runtime")
|
COMPONENT "${XZDEC}_Runtime")
|
||||||
|
endif(XZ_INSTALL)
|
||||||
endforeach()
|
endforeach()
|
||||||
|
|
||||||
# This is the only build-time difference with lzmadec.
|
# This is the only build-time difference with lzmadec.
|
||||||
|
@ -1657,10 +1664,11 @@ if(XZ_HAVE_DECODERS AND (NOT MSVC OR MSVC_VERSION GREATER_EQUAL 1900))
|
||||||
# )
|
# )
|
||||||
# endif()
|
# endif()
|
||||||
|
|
||||||
install(TARGETS lzmainfo
|
if (XZ_INSTALL)
|
||||||
RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}"
|
install(TARGETS lzmainfo
|
||||||
COMPONENT lzmainfo_Runtime)
|
RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}"
|
||||||
|
COMPONENT lzmainfo_Runtime)
|
||||||
|
endif(XZ_INSTALL)
|
||||||
if(UNIX)
|
if(UNIX)
|
||||||
my_install_man(lzmainfo_Documentation src/lzmainfo/lzmainfo.1 "")
|
my_install_man(lzmainfo_Documentation src/lzmainfo/lzmainfo.1 "")
|
||||||
endif()
|
endif()
|
||||||
|
@ -1866,9 +1874,11 @@ if(NOT MSVC OR MSVC_VERSION GREATER_EQUAL 1900)
|
||||||
# Our installation order must be such that when a symbolic link is created
|
# Our installation order must be such that when a symbolic link is created
|
||||||
# its target must already exists. There is no race condition for parallel
|
# its target must already exists. There is no race condition for parallel
|
||||||
# builds because the generated cmake_install.cmake executes serially.
|
# builds because the generated cmake_install.cmake executes serially.
|
||||||
install(TARGETS xz
|
if (XZ_INSTALL)
|
||||||
RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}"
|
install(TARGETS xz
|
||||||
COMPONENT xz_Runtime)
|
RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}"
|
||||||
|
COMPONENT xz_Runtime)
|
||||||
|
endif(XZ_INSTALL)
|
||||||
|
|
||||||
if(UNIX)
|
if(UNIX)
|
||||||
option(CREATE_XZ_SYMLINKS "Create unxz and xzcat symlinks" ON)
|
option(CREATE_XZ_SYMLINKS "Create unxz and xzcat symlinks" ON)
|
||||||
|
@ -1949,9 +1959,11 @@ if(UNIX)
|
||||||
@ONLY
|
@ONLY
|
||||||
NEWLINE_STYLE LF)
|
NEWLINE_STYLE LF)
|
||||||
|
|
||||||
install(PROGRAMS "${CMAKE_CURRENT_BINARY_DIR}/${S}"
|
if (XZ_INSTALL)
|
||||||
DESTINATION "${CMAKE_INSTALL_BINDIR}"
|
install(PROGRAMS "${CMAKE_CURRENT_BINARY_DIR}/${S}"
|
||||||
COMPONENT scripts_Runtime)
|
DESTINATION "${CMAKE_INSTALL_BINDIR}"
|
||||||
|
COMPONENT scripts_Runtime)
|
||||||
|
endif(XZ_INSTALL)
|
||||||
endforeach()
|
endforeach()
|
||||||
|
|
||||||
# file(CHMOD ...) would need CMake 3.19 so use execute_process instead.
|
# file(CHMOD ...) would need CMake 3.19 so use execute_process instead.
|
||||||
|
@ -2010,15 +2022,19 @@ if(UNIX)
|
||||||
DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/doc/api/index.html"
|
DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/doc/api/index.html"
|
||||||
)
|
)
|
||||||
|
|
||||||
install(DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/doc/api"
|
if (XZ_INSTALL)
|
||||||
DESTINATION "${CMAKE_INSTALL_DOCDIR}"
|
install(DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/doc/api"
|
||||||
COMPONENT liblzma_Documentation)
|
DESTINATION "${CMAKE_INSTALL_DOCDIR}"
|
||||||
|
COMPONENT liblzma_Documentation)
|
||||||
|
endif(XZ_INSTALL)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
install(DIRECTORY doc/examples
|
if (XZ_INSTALL)
|
||||||
DESTINATION "${CMAKE_INSTALL_DOCDIR}"
|
install(DIRECTORY doc/examples
|
||||||
COMPONENT liblzma_Documentation)
|
DESTINATION "${CMAKE_INSTALL_DOCDIR}"
|
||||||
|
COMPONENT liblzma_Documentation)
|
||||||
|
endif(XZ_INSTALL)
|
||||||
|
|
||||||
# GPLv2 applies to the scripts. If GNU getopt_long is used then
|
# GPLv2 applies to the scripts. If GNU getopt_long is used then
|
||||||
# LGPLv2.1 applies to the command line tools but, using the
|
# LGPLv2.1 applies to the command line tools but, using the
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue