diff --git a/CMakeLists.txt b/CMakeLists.txt index 7db41ebbee..d27d487676 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -415,8 +415,8 @@ if(LYX_BUNDLE) set(OSX_BUNDLE_DIRS "Resources;Resources;Resources") # 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/lyxrc.dist.in" "${CMAKE_CURRENT_BINARY_DIR}/lyxrc.dist") set(LYX_BUILD_BUNDLE MACOSX_BUNDLE) set(LYX_DATA_SUBDIR ${LYX_BUNDLE_NAME}.app/Contents/Resources/ CACHE STRING "Bundle Contents dir" FORCE) @@ -694,7 +694,8 @@ endif() find_package(Magic) if(Magic_FOUND) - set(HAVE_MAGIC_H 1) + set(HAVE_MAGIC_H 1) + include_directories(${Magic_INCLUDE_DIR}) endif() include_directories(${TOP_BINARY_DIR} ${TOP_SRC_DIR}/src) diff --git a/development/cmake/Install.cmake b/development/cmake/Install.cmake index 0cd0dcfdb0..a345d3b864 100755 --- a/development/cmake/Install.cmake +++ b/development/cmake/Install.cmake @@ -137,11 +137,15 @@ if(APPLE) 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") diff --git a/development/unix/lyxrc.dist.in b/development/unix/lyxrc.dist.in new file mode 100644 index 0000000000..396f0963d5 --- /dev/null +++ b/development/unix/lyxrc.dist.in @@ -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" +