+
+ 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/)