1 # This file is part of lyx.
3 # Helper function to get path to destination directories
5 # Copyright (c) 2016 Kornel Benko <kornel@lyx.org>
7 # Redistribution and use in source and binary forms, with or without
8 # modification, are permitted provided that the following conditions
11 # 1. Redistributions of source code must retain the copyright
12 # notice, this list of conditions and the following disclaimer.
13 # 2. Redistributions in binary form must reproduce the copyright
14 # notice, this list of conditions and the following disclaimer in the
15 # documentation and/or other materials provided with the distribution.
16 # 3. The name of the author may not be used to endorse or promote products
17 # derived from this software without specific prior written permission.
19 # This file is distributed in the hope that it will be useful,
20 # but WITHOUT ANY WARRANTY; without even the implied warranty of
21 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 # GNU General Public License for more details.
24 # You should have received a copy of the GNU General Public License
25 # along with lyx; if not, write to the Free Software
26 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
28 # LYX_DATA_SUBDIR is defined in ${TOP_SRC_DIR}/CMakeLists.txt
31 function(get_locale_destination _result)
35 set(_dir "${LYX_DATA_SUBDIR}locale")
37 # "Contents/Resources/locale"
38 set(_dir "${LYX_DATA_SUBDIR}locale")
40 set(_dir "share/locale")
42 message(FATAL_ERROR "Unhandled platform")
44 set(${_result} ${_dir} PARENT_SCOPE)
47 function(get_data_destination _result)
50 set(_dir "${LYX_DATA_SUBDIR}")
52 # "Contents/Resources/"
53 set(_dir "${LYX_DATA_SUBDIR}")
55 set(_dir "${LYX_DATA_SUBDIR}")
57 message(FATAL_ERROR "Unhandled platform")
59 set(${_result} ${_dir} PARENT_SCOPE)
62 function(get_font_destination _result)
65 set(_dir "${LYX_DATA_SUBDIR}fonts/")
67 # "Contents/Resources/fonts/"
68 set(_dir "${LYX_DATA_SUBDIR}fonts/")
71 # ${LYX_DATA_SUBDIR}: Satisfy lyx because GuiFontLoader.cpp searches there
72 # share/fonts: because math-editor uses system font
73 set(_dir "${LYX_DATA_SUBDIR}fonts/")
75 message(FATAL_ERROR "Unhandled platform")
77 set(${_result} ${_dir} PARENT_SCOPE)
80 function(get_tex_destination _result)
83 set(_dir "${LYX_DATA_SUBDIR}tex/")
85 # "Contents/Resources/tex/"
86 set(_dir "${LYX_DATA_SUBDIR}tex/")
88 set(_dir "${LYX_DATA_SUBDIR}tex/")
90 message(FATAL_ERROR "Unhandled platform")
92 set(${_result} ${_dir} PARENT_SCOPE)