X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=development%2Fcmake%2FInstall.cmake;h=a345d3b864985d850c3add92f77969df52ca51dc;hb=3419fa6a9e0ff3542c8118a34eab67593bd8d895;hp=e96e1c25b5fa95740064be3f2b14a7a40876b6b3;hpb=ad175314c538acbe45ab59ca63c6f9ff6e80f64d;p=lyx.git diff --git a/development/cmake/Install.cmake b/development/cmake/Install.cmake index e96e1c25b5..a345d3b864 100755 --- a/development/cmake/Install.cmake +++ b/development/cmake/Install.cmake @@ -1,340 +1,161 @@ -# TODO: set correct path -#set(CMAKE_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX}) -message(STATUS "installing to ${CMAKE_INSTALL_PREFIX}, defined by CMAKE_INSTALL_PREFIX") +# TODO: set correct path in call to cmake +# e.g. cmake /usr/src/lyx/lyx-devel/development/cmake -DCMAKE_INSTALL_PREFIX=/usr/local -Dnls=1 -# the macro scans the directories "_parent_src_dir/_dir/_current_dir" for *._file_type files +if(NOT(LYX_BUNDLE) AND APPLE) + message(STATUS "Installing to ${CMAKE_INSTALL_PREFIX}, defined by CMAKE_INSTALL_PREFIX") +endif() + +# the macro scans the directories "_parent_src_dir/_dir/_current_dir" for *._file_type files # and installs the files in CMAKE_INSTALL_PREFIX/_current_dir # dir_item is on item of the remaining arguments -macro(lyx_install _parent_src_dir _dir _file_type) - foreach(_current_dir ${ARGN}) - file(GLOB files_list ${_parent_src_dir}/${_dir}/${_current_dir}/*.${_file_type}) - list(REMOVE_ITEM files_list "${_parent_src_dir}/${_dir}/${_current_dir}/.svn") - install(FILES ${files_list} DESTINATION ${_dir}/${_current_dir}) - #message(STATUS "install ${_dir}/${_current_dir}: ${files_list} ") - #message(STATUS "install at ${CMAKE_INSTALL_PREFIX}/${_dir}/${_current_dir}") - endforeach(_current_dir) +# +# Special handling for ${_file_type} == "*" +# Here we try to exclude files which we do not want to install +# Depending on _what, installation on UNIX goes to +# data -> ${LYX_DATA_SUBDIR} +# font -> share/${_lyx}/fonts/ +# bin -> bin +# tex -> share/texmf/tex/latex/${_lyx}/ +macro(lyx_install _what _parent_src_dir _gl_dir _file_type) + #message("checking parents ${_parent_src_dir}") + file(GLOB _dirs RELATIVE "${_parent_src_dir}" ${_parent_src_dir}/${_gl_dir}) + #cmake bug on Windows: if _gl_dir==. _dirs is empty but on linux _dirs==. + if(NOT _dirs) + set(_dirs .) + endif() + # Select installation dir + if ("${_what}" STREQUAL "data") + get_data_destination(_dest_subdir) + elseif ("${_what}" STREQUAL "font") + get_font_destination(_dest_subdir) + elseif ("${_what}" STREQUAL "tex") + get_tex_destination(_dest_subdir) + else() + message(FATAL_ERROR "Undefined parameter _what = ${_what} in call to lyx_install") + endif() + foreach(_dir ${_dirs}) + foreach(_glob_dir ${ARGN}) + file(GLOB _dir_list ${_parent_src_dir}/${_dir}/${_glob_dir}) + if(NOT _dir_list) + if(_glob_dir STREQUAL ".") + set(_dir_list ${_parent_src_dir}/${_dir}/.) + endif() + endif() + #message(STATUS "${_dir}/${_glob_dir} -> ${_dir_list} ") + foreach(_current_dir ${_dir_list}) + file(GLOB _item_list ${_current_dir}/${_file_type}) + #cmake bug: globbing with * also returns directories on Windows + set(files_list ${_item_list}) + set(program_list) + foreach(_current_item ${_item_list}) + if(files_list) + if(IS_DIRECTORY ${_current_item}) + #message(STATUS "removing dir ${_current_item}") + list(REMOVE_ITEM files_list "${_current_item}") + else() + if ("${_file_type}" STREQUAL "*") + foreach(_mask "/\\.[^/]+$" "\\.in$" "\\.py$" "\\.patch$" "CMakeLists\\.txt$" "\\.lyx~$") + if(_current_item MATCHES ${_mask}) + #message(STATUS "removing item ${_current_item}") + list(REMOVE_ITEM files_list "${_current_item}") + endif() + endforeach() + endif() + endif() + endif() + endforeach(_current_item) + if(files_list) + list(REMOVE_ITEM files_list "${_current_dir}/lyx.svg") + list(REMOVE_ITEM files_list "${_current_dir}/Makefile.am") + list(REMOVE_ITEM files_list "${_current_dir}/layouttranslations") + if (NOT WIN32) + # subscript.sty is installed only for MikTeX since it is part of texlive + list(REMOVE_ITEM files_list "${_current_dir}/subscript.sty") + endif() + GET_FILENAME_COMPONENT(_base_dir ${_current_dir} NAME) + if(_glob_dir STREQUAL ".") + set(_base_dir .) + endif() + + install(FILES ${files_list} DESTINATION "${_dest_subdir}${_dir}/${_base_dir}") + #message(STATUS "Installing ${files_list} to ${_dest_subdir}${_dir}/${_base_dir}") + endif() + if(program_list) + if(_glob_dir STREQUAL ".") + set(_base_dir .) + endif() + install(FILES ${program_list} DESTINATION "${_dest_subdir}${_dir}/${_base_dir}") + endif() + endforeach(_current_dir) + endforeach(_glob_dir) + endforeach(_dir) endmacro(lyx_install) -lyx_install(${TOP_SRC_DIR}/lib bind bind . de fi pt sv) -lyx_install(${TOP_SRC_DIR}/lib commands def .) -lyx_install(${TOP_SRC_DIR}/lib doc lyx . cs da de es eu fr he hu it nl nb pl pt ro ru sk sl sv) -lyx_install(${TOP_SRC_DIR}/lib doc * clipart) -lyx_install(${TOP_SRC_DIR}/lib doc/es * clipart) -lyx_install(${TOP_SRC_DIR}/lib examples * . ca cs da de es eu fr he hu it nl pl pt ro ru sl) -lyx_install(${TOP_SRC_DIR}/lib fonts * .) -lyx_install(${TOP_SRC_DIR}/lib images * . math commands) -lyx_install(${TOP_SRC_DIR}/lib kbd * .) -lyx_install(${TOP_SRC_DIR}/lib layouts * .) -lyx_install(${TOP_SRC_DIR}/lib lyx2lyx * .) -lyx_install(${TOP_SRC_DIR}/lib scripts * .) -lyx_install(${TOP_SRC_DIR}/lib templates * .) -lyx_install(${TOP_SRC_DIR}/lib tex * .) -lyx_install(${TOP_SRC_DIR}/lib ui * .) -lyx_install(${TOP_SRC_DIR}/lib . * .) +# language-specific-directories (like ca, de, es ...) are now globbed as "[a-z][a-z]" +set(_all_languages "[a-z][a-z]") -# TODO also get dot-less filenames in lyx_install -foreach(_file unicodesymbols encodings languages lyx2lyx/lyx2lyx) - install(FILES ${TOP_SRC_DIR}/lib/${_file} DESTINATION .) -endforeach(_file) +lyx_install("data" ${TOP_SRC_DIR}/lib bind *.bind . ${_all_languages}) +lyx_install("data" ${TOP_SRC_DIR}/lib commands *.def .) - +# this is handled in doc/CMakeLists.txt +#lyx_install("data" ${TOP_SRC_DIR}/lib doc *.lyx . ${_all_languages}) +#lyx_install("data" ${TOP_SRC_DIR}/lib doc *.txt . ${_all_languages}) +lyx_install("data" ${TOP_SRC_DIR}/lib doc * biblio clipart) +lyx_install("data" ${TOP_SRC_DIR}/lib doc/${_all_languages} * clipart) -# -# cmake doku and scon code -# -# remove later. -# -# INSTALL: Specify rules to run at install time. -# This command generates installation rules for a project. Rules specified by calls to this -# command within a source directory are executed in order during installation. The order across -# directories is not defined. -# There are multiple signatures for this command. Some of them define installation properties -# for files and targets. Properties common to multiple signatures are covered here but they are -# valid only for signatures that specify them. DESTINATION arguments specify the directory -# on disk to which a file will be installed. If a full path (with a leading slash or drive letter) is -# given it is used directly. If a relative path is given it is interpreted relative to the value of -# CMAKE_INSTALL_PREFIX. PERMISSIONS arguments specify permissions for installed -# files. Valid permissions are OWNER_READ, OWNER_WRITE, OWNER_EXECUTE, -# GROUP_READ, GROUP_WRITE, GROUP_EXECUTE, WORLD_READ, -# WORLD_WRITE, WORLD_EXECUTE, SETUID, and SETGID. Permissions that do not -# make sense on certain platforms are ignored on those platforms. The CONFIGURATIONS -# argument specifies a list of build configurations for which the install rule applies (Debug, -# Release, etc.). The COMPONENT argument specifies an installation component name with -# which the install rule is associated, such as "runtime" or "development". During component- -# specific installation only install rules associated with the given component name will be -# executed. During a full installation all components are installed. The RENAME argument -# specifies a name for an installed file that may be different from the original file. Renaming is -# allowed only when a single file is installed by the command. -# The TARGETS signature: -# INSTALL(TARGETS targets... [[ARCHIVE|LIBRARY|RUNTIME] -# [DESTINATION
]] [...])
-# The SCRIPT form will invoke the given CMake script files during installation. If the script
-# file name is a relative path it will be interpreted with respect to the current source directory.
-# The CODE form will invoke the given CMake code during installation. Code is specified as a
-# single argument inside a double-quoted string. For example, the code
-# INSTALL(CODE "MESSAGE(\"Sample install message.\")")
-# will print a message during installation.
-# NOTE: This command supercedes the INSTALL_TARGETS command and the target
-# properties PRE_INSTALL_SCRIPT and POST_INSTALL_SCRIPT. It also replaces the
-# FILES forms of the INSTALL_FILES and INSTALL_PROGRAMS commands. The
-# processing order of these install rules relative to those generated by INSTALL_TARGETS,
-# INSTALL_FILES, and INSTALL_PROGRAMS commands is not defined.
-#
-#
-#
-#
-#
-#
-#
-#
-# if build_install:
-# #
-# # this part is a bit messy right now. Since scons will provide
-# # --DESTDIR option soon, at least the dest_dir handling can be
-# # removed later.
-# #
-# # how to join dest_dir and prefix
-# def joinPaths(path1, path2):
-# ''' join path1 and path2, do not use os.path.join because
-# under window, c:\destdir\d:\program is invalid '''
-# if path1 == '':
-# return os.path.normpath(path2)
-# # separate drive letter
-# (drive, path) = os.path.splitdrive(os.path.normpath(path2))
-# # ignore drive letter, so c:\destdir + c:\program = c:\destdir\program
-# return os.path.join(os.path.normpath(path1), path[1:])
-# #
-# # install to dest_dir/prefix
-# dest_dir = env.get('DESTDIR', '')
-# dest_prefix_dir = joinPaths(dest_dir, env.Dir(prefix).abspath)
-# # create the directory if needed
-# if not os.path.isdir(dest_prefix_dir):
-# try:
-# os.makedirs(dest_prefix_dir)
-# except:
-# pass
-# if not os.path.isdir(dest_prefix_dir):
-# print 'Can not create directory', dest_prefix_dir
-# Exit(3)
-# #
-# if env.has_key('exec_prefix'):
-# bin_dest_dir = joinPaths(dest_dir, Dir(env['exec_prefix']).abspath)
-# else:
-# bin_dest_dir = os.path.join(dest_prefix_dir, 'bin')
-# if add_suffix:
-# share_dest_dir = os.path.join(dest_prefix_dir, share_dir + program_suffix)
-# else:
-# share_dest_dir = os.path.join(dest_prefix_dir, share_dir)
-# man_dest_dir = os.path.join(dest_prefix_dir, man_dir)
-# locale_dest_dir = os.path.join(dest_prefix_dir, locale_dir)
-# env['LYX2LYX_DEST'] = os.path.join(share_dest_dir, 'lyx2lyx')
-# #
-# import glob
-# #
-# # install executables (lyxclient may be None)
-# #
-# if add_suffix:
-# version_suffix = program_suffix
-# else:
-# version_suffix = ''
-# #
-# # install lyx, if in release mode, try to strip the binary
-# if env.has_key('STRIP') and env['STRIP'] is not None and mode != 'debug':
-# # create a builder to strip and install
-# env['BUILDERS']['StripInstallAs'] = Builder(action='$STRIP $SOURCE -o $TARGET')
-#
-# # install executables
-# for (name, obj) in (('lyx', lyx), ('tex2lyx', tex2lyx), ('client', client)):
-# if obj is None:
-# continue
-# target_name = os.path.split(str(obj[0]))[1].replace(name, '%s%s' % (name, version_suffix))
-# target = os.path.join(bin_dest_dir, target_name)
-# if env['BUILDERS'].has_key('StripInstallAs'):
-# env.StripInstallAs(target, obj)
-# else:
-# env.InstallAs(target, obj)
-# Alias('install', target)
-#
-# # share/lyx
-# dirs = []
-# for (dir,files) in [
-# ('.', lib_files),
-# ('bind', lib_bind_files),
-# ('bind/de', lib_bind_de_files),
-# ('bind/fi', lib_bind_fi_files),
-# ('bind/pt', lib_bind_pt_files),
-# ('bind/sv', lib_bind_sv_files),
-# ('doc', lib_doc_files),
-# ('doc/clipart', lib_doc_clipart_files),
-# ('doc/cs', lib_doc_cs_files),
-# ('doc/da', lib_doc_da_files),
-# ('doc/de', lib_doc_de_files),
-# ('doc/es', lib_doc_es_files),
-# ('doc/es/clipart', lib_doc_es_clipart_files),
-# ('doc/eu', lib_doc_eu_files),
-# ('doc/fr', lib_doc_fr_files),
-# ('doc/he', lib_doc_he_files),
-# ('doc/hu', lib_doc_hu_files),
-# ('doc/it', lib_doc_it_files),
-# ('doc/nl', lib_doc_nl_files),
-# ('doc/nb', lib_doc_nb_files),
-# ('doc/pl', lib_doc_pl_files),
-# ('doc/pt', lib_doc_pt_files),
-# ('doc/ro', lib_doc_ro_files),
-# ('doc/ru', lib_doc_ru_files),
-# ('doc/sk', lib_doc_sk_files),
-# ('doc/sl', lib_doc_sl_files),
-# ('doc/sv', lib_doc_sv_files),
-# ('examples', lib_examples_files),
-# ('examples/ca', lib_examples_ca_files),
-# ('examples/cs', lib_examples_cs_files),
-# ('examples/da', lib_examples_da_files),
-# ('examples/de', lib_examples_de_files),
-# ('examples/es', lib_examples_es_files),
-# ('examples/eu', lib_examples_eu_files),
-# ('examples/fr', lib_examples_fr_files),
-# ('examples/he', lib_examples_he_files),
-# ('examples/hu', lib_examples_hu_files),
-# ('examples/it', lib_examples_it_files),
-# ('examples/nl', lib_examples_nl_files),
-# ('examples/pl', lib_examples_pl_files),
-# ('examples/pt', lib_examples_pt_files),
-# ('examples/ru', lib_examples_ru_files),
-# ('examples/sl', lib_examples_sl_files),
-# ('examples/ro', lib_examples_ro_files),
-# ('fonts', lib_fonts_files),
-# ('images', lib_images_files),
-# ('images/math', lib_images_math_files),
-# ('kbd', lib_kbd_files),
-# ('layouts', lib_layouts_files),
-# ('lyx2lyx', lib_lyx2lyx_files),
-# ('scripts', lib_scripts_files),
-# ('templates', lib_templates_files),
-# ('tex', lib_tex_files),
-# ('ui', lib_ui_files)]:
-# dirs.append(env.Install(os.path.join(share_dest_dir, dir),
-# [env.subst('$TOP_SRCDIR/lib/%s/%s' % (dir, file)) for file in files]))
-# Alias('install', dirs)
-#
-# # subst and install lyx2lyx_version.py which is not in scons_manifest.py
-# env.Depends(share_dest_dir + '/lyx2lyx/lyx2lyx_version.py', '$BUILDDIR/common/config.h')
-# env.substFile(share_dest_dir + '/lyx2lyx/lyx2lyx_version.py',
-# '$TOP_SRCDIR/lib/lyx2lyx/lyx2lyx_version.py.in')
-# Alias('install', share_dest_dir + '/lyx2lyx/lyx2lyx_version.py')
-# sys.path.append(share_dest_dir + '/lyx2lyx')
-#
-# # generate TOC files for each doc
-# languages = depend.all_documents(env.Dir('$TOP_SRCDIR/lib/doc').abspath)
-# tocs = []
-# for lang in languages.keys():
-# if os.path.isdir(os.path.join(env.Dir('$TOP_SRCDIR/lib/doc').abspath, lang)):
-# toc = env.installTOC(os.path.join(share_dest_dir, 'doc', lang, 'TOC.lyx'),
-# languages[lang])
-# tocs.append(toc)
-# # doc_toc.build_toc needs a installed version of lyx2lyx to execute
-# env.Depends(toc, share_dest_dir + '/lyx2lyx/lyx2lyx_version.py')
-# else:
-# # this is for English
-# toc = env.installTOC(os.path.join(share_dest_dir, 'doc', 'TOC.lyx'),
-# languages[lang])
-# tocs.append(toc)
-# env.Depends(toc, share_dest_dir + '/lyx2lyx/lyx2lyx_version.py')
-# Alias('install', tocs)
-#
-# if platform_name == 'cygwin':
-# # cygwin packaging requires a file /usr/share/doc/Cygwin/foot-vendor-suffix.README
-# Cygwin_README = os.path.join(dest_prefix_dir, 'share', 'doc', 'Cygwin',
-# '%s-%s.README' % (package, package_cygwin_version))
-# env.InstallAs(Cygwin_README,
-# os.path.join(env.subst('$TOP_SRCDIR'), 'README.cygwin'))
-# Alias('install', Cygwin_README)
-# # also a directory /usr/share/doc/lyx for README etc
-# Cygwin_Doc = os.path.join(dest_prefix_dir, 'share', 'doc', package)
-# env.Install(Cygwin_Doc, [os.path.join(env.subst('$TOP_SRCDIR'), x) for x in \
-# ['INSTALL', 'README', 'README.Cygwin', 'RELEASE-NOTES', 'COPYING', 'ANNOUNCE']])
-# Alias('install', Cygwin_Doc)
-# # cygwin fonts also need to be installed
-# Cygwin_fonts = os.path.join(share_dest_dir, 'fonts')
-# env.Install(Cygwin_fonts,
-# [env.subst('$TOP_SRCDIR/development/Win32/packaging/bakoma/%s' % file) \
-# for file in win32_bakoma_fonts])
-# Alias('install', Cygwin_fonts)
-# # we also need a post installation script
-# tmp_script = utils.installCygwinPostinstallScript('/tmp')
-# postinstall_path = os.path.join(dest_dir, 'etc', 'postinstall')
-# env.Install(postinstall_path, tmp_script)
-# Alias('install', postinstall_path)
-#
-#
-# # man
-# env.InstallAs(os.path.join(man_dest_dir, 'lyx' + version_suffix + '.1'),
-# env.subst('$TOP_SRCDIR/lyx.man'))
-# env.InstallAs(os.path.join(man_dest_dir, 'tex2lyx' + version_suffix + '.1'),
-# env.subst('$TOP_SRCDIR/src/tex2lyx/tex2lyx.man'))
-# env.InstallAs(os.path.join(man_dest_dir, 'lyxclient' + version_suffix + '.1'),
-# env.subst('$TOP_SRCDIR/src/client/lyxclient.man'))
-# Alias('install', [os.path.join(man_dest_dir, x + version_suffix + '.1') for
-# x in ['lyx', 'tex2lyx', 'lyxclient']])
-# # locale files?
-# # ru.gmo ==> ru/LC_MESSAGES/lyxSUFFIX.mo
-# for gmo in gmo_files:
-# lan = os.path.split(str(gmo))[1].split('.')[0]
-# dest_file = os.path.join(locale_dest_dir, lan, 'LC_MESSAGES', 'lyx' + program_suffix + '.mo')
-# env.InstallAs(dest_file, gmo)
-# Alias('install', dest_file)
-#
+lyx_install("data" ${TOP_SRC_DIR}/lib examples * . ${_all_languages} springer thesis)
+lyx_install("font" ${TOP_SRC_DIR}/lib/fonts . * .)
+foreach(_imgext "png" "svgz" "gif" "xpm")
+ lyx_install("data" ${TOP_SRC_DIR}/lib images "*.${_imgext}" . ipa commands attic classic oxygen)
+ lyx_install("data" ${TOP_SRC_DIR}/lib images/math "*.${_imgext}" . oxygen)
+endforeach()
+lyx_install("data" ${TOP_SRC_DIR}/lib kbd * .)
+lyx_install("data" ${TOP_SRC_DIR}/lib layouts * .)
+lyx_install("data" ${TOP_SRC_DIR}/lib lyx2lyx *.py .)
+lyx_install("data" ${TOP_SRC_DIR}/lib scripts *.py .)
+lyx_install("data" ${TOP_SRC_DIR}/lib citeengines *.citeengine .)
+lyx_install("data" ${TOP_SRC_DIR}/lib . *.py .)
+lyx_install("data" ${TOP_SRC_DIR}/lib scripts *.R .)
+lyx_install("data" ${TOP_SRC_DIR}/lib templates * . springer)
+lyx_install("data" ${TOP_SRC_DIR}/lib xtemplates *.xtemplate .)
+lyx_install("tex" ${TOP_SRC_DIR}/lib/tex . * .)
+lyx_install("data" ${TOP_SRC_DIR}/lib ui * .)
+lyx_install("data" ${TOP_SRC_DIR}/lib . * .)
+
+# Install
+if(APPLE)
+ if(LYX_BUNDLE)
+ install(FILES ${TOP_SRC_DIR}/development/MacOSX/spotlight/Info.plist DESTINATION "${MACOSX_BUNDLE_STARTUP_COMMAND}/Contents/Library/Spotlight/LyX-Metadata.mdimporter/Contents")
+ install(FILES "${TOP_SRC_DIR}/development/MacOSX/PkgInfo" DESTINATION "${MACOSX_BUNDLE_STARTUP_COMMAND}/Contents")
+ endif()
+ foreach(_i lyxeditor maxima inkscape)
+ install(FILES "${TOP_SRC_DIR}/development/MacOSX/${_i}" DESTINATION "${LYX_UTILITIES_INSTALL_PATH}")
+ endforeach()
+ install(FILES "${TOP_SRC_DIR}/development/MacOSX/LyX.icns" DESTINATION "${LYX_DATA_SUBDIR}")
+ set(program_suffix ${PROGRAM_SUFFIX})
+ configure_file("${TOP_SRC_DIR}/development/MacOSX/lyxrc.dist.in" lyxrc.dist)
+ lyx_install("data" ${CMAKE_CURRENT_BINARY_DIR} . lyxrc.dist .)
+elseif(UNIX)
+ set(program_suffix ${PROGRAM_SUFFIX})
+ configure_file(${TOP_SRC_DIR}/lib/lyx.desktop.in lyx${PROGRAM_SUFFIX}.desktop)
+ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/lyx${PROGRAM_SUFFIX}.desktop DESTINATION ${SYSTEM_DATADIR}/applications)
+ install(FILES ${TOP_SRC_DIR}/lib/images/lyx.svg RENAME lyx${PROGRAM_SUFFIX}.svg DESTINATION ${SYSTEM_DATADIR}/icons/hicolor/scalable/apps/)
+ configure_file(${TOP_SRC_DIR}/development/unix/lyxrc.dist.in lyxrc.dist)
+ lyx_install("data" ${CMAKE_CURRENT_BINARY_DIR} . lyxrc.dist .)
+endif()
+if(USE_POSIX_PACKAGING AND EXISTS "${TOP_SRC_DIR}/lib/usr.bin.lyxwrap.in")
+ # handle lyxwrap
+ #get_filename_component(prefix "${CMAKE_INSTALL_PREFIX}" REALPATH)
+ set(prefix "${CMAKE_INSTALL_PREFIX}")
+ set(version_suffix ${PROGRAM_SUFFIX})
+ string(REGEX REPLACE "^/" "" lyxwrapprefix1 "${prefix}")
+ string(REPLACE "/" "." lyxwrapprefix ${lyxwrapprefix1})
+ #message(STATUS "lyxwrapprefix = ${lyxwrapprefix}")
+ configure_file(${TOP_SRC_DIR}/lib/usr.bin.lyxwrap.in "${lyxwrapprefix}.${LYX_UTILITIES_INSTALL_PATH}.lyx${PROGRAM_SUFFIX}")
+ install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${lyxwrapprefix}.${LYX_UTILITIES_INSTALL_PATH}.lyx${PROGRAM_SUFFIX}" DESTINATION /etc/apparmor.d/)
+endif()