Cmake build: Added handling for lyxrc.dist for Apple and Unix

Also added include path for magic.h, as found out by Joel Kulesza
This commit is contained in:
Kornel Benko 2018-01-03 14:58:58 +01:00
parent 9a1eeb8cbb
commit 03b6ee9f06
3 changed files with 14 additions and 2 deletions

View File

@ -415,8 +415,8 @@ if(LYX_BUNDLE)
set(OSX_BUNDLE_DIRS "Resources;Resources;Resources") set(OSX_BUNDLE_DIRS "Resources;Resources;Resources")
# Process Info.plist and lyxrc.dist # Process Info.plist and lyxrc.dist
# See development/cmake/Install.cmake
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/development/MacOSX/Info.plist.in" "${CMAKE_CURRENT_BINARY_DIR}/Info.plist") configure_file("${CMAKE_CURRENT_SOURCE_DIR}/development/MacOSX/Info.plist.in" "${CMAKE_CURRENT_BINARY_DIR}/Info.plist")
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/development/MacOSX/lyxrc.dist.in" "${CMAKE_CURRENT_BINARY_DIR}/lyxrc.dist")
set(LYX_BUILD_BUNDLE MACOSX_BUNDLE) set(LYX_BUILD_BUNDLE MACOSX_BUNDLE)
set(LYX_DATA_SUBDIR ${LYX_BUNDLE_NAME}.app/Contents/Resources/ CACHE STRING "Bundle Contents dir" FORCE) set(LYX_DATA_SUBDIR ${LYX_BUNDLE_NAME}.app/Contents/Resources/ CACHE STRING "Bundle Contents dir" FORCE)
@ -695,6 +695,7 @@ endif()
find_package(Magic) find_package(Magic)
if(Magic_FOUND) if(Magic_FOUND)
set(HAVE_MAGIC_H 1) set(HAVE_MAGIC_H 1)
include_directories(${Magic_INCLUDE_DIR})
endif() endif()
include_directories(${TOP_BINARY_DIR} ${TOP_SRC_DIR}/src) include_directories(${TOP_BINARY_DIR} ${TOP_SRC_DIR}/src)

View File

@ -137,11 +137,15 @@ if(APPLE)
endforeach() endforeach()
install(FILES "${TOP_SRC_DIR}/development/MacOSX/LyX.icns" DESTINATION "${LYX_DATA_SUBDIR}") install(FILES "${TOP_SRC_DIR}/development/MacOSX/LyX.icns" DESTINATION "${LYX_DATA_SUBDIR}")
set(program_suffix ${PROGRAM_SUFFIX}) 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) elseif(UNIX)
set(program_suffix ${PROGRAM_SUFFIX}) set(program_suffix ${PROGRAM_SUFFIX})
configure_file(${TOP_SRC_DIR}/lib/lyx.desktop.in lyx${PROGRAM_SUFFIX}.desktop) 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 ${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/) 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() endif()
if(USE_POSIX_PACKAGING AND EXISTS "${TOP_SRC_DIR}/lib/usr.bin.lyxwrap.in") if(USE_POSIX_PACKAGING AND EXISTS "${TOP_SRC_DIR}/lib/usr.bin.lyxwrap.in")

View File

@ -0,0 +1,7 @@
# This file is written by LyX, if you want to make your own
# modifications you should do them from inside LyX and save
Format 22
\texinputs_prefix ".:@LYX_ABS_INSTALLED_DATADIR@/@LYX_DATA_SUBDIR@tex"