Mercurial > archived > louis > epitech > mq > rathaxes
annotate maintainers_update_use_latex.cmake @ 0:973e7bc6d13c
Add some patches to use and test rathaxes with CMake
author | Louis Opter <louis@lse.epitech.net> |
---|---|
date | Sun, 01 Jan 2012 15:31:17 +0100 |
parents | |
children |
rev | line source |
---|---|
0
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
1 # HG changeset patch |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
2 # Parent 13253d542625d2f6a8b7d73878f55e2bca521f34 |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
3 maintainers: update the UseLatex.cmake script to 1.8.2 |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
4 |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
5 diff --git a/maintainers/CMakeScripts/UseLATEX.cmake b/maintainers/CMakeScripts/UseLATEX.cmake |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
6 --- a/maintainers/CMakeScripts/UseLATEX.cmake |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
7 +++ b/maintainers/CMakeScripts/UseLATEX.cmake |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
8 @@ -1,7 +1,7 @@ |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
9 # File: UseLATEX.cmake |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
10 # CMAKE commands to actually use the LaTeX compiler |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
11 -# Version: 1.7.4 |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
12 -# Author: Kenneth Moreland (kmorel at sandia dot gov) |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
13 +# Version: 1.8.2 |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
14 +# Author: Kenneth Moreland <kmorel@sandia.gov> |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
15 # |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
16 # Copyright 2004 Sandia Corporation. |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
17 # Under the terms of Contract DE-AC04-94AL85000, there is a non-exclusive |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
18 @@ -19,7 +19,7 @@ |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
19 # [IMAGES] <image_files> |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
20 # [CONFIGURE] <tex_files> |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
21 # [DEPENDS] <tex_files> |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
22 -# [USE_INDEX] [USE_GLOSSARY] |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
23 +# [USE_INDEX] [USE_GLOSSARY] [USE_NOMENCL] |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
24 # [DEFAULT_PDF] [DEFAULT_SAFEPDF] |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
25 # [MANGLE_TARGET_NAMES]) |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
26 # Adds targets that compile <tex_file>. The latex output is placed |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
27 @@ -47,8 +47,11 @@ |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
28 # on images. |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
29 # ps: Makes <name>.ps |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
30 # html: Makes <name>.html |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
31 -# auxclean: Deletes <name>.aux. This is sometimes necessary |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
32 -# if a LaTeX error occurs and writes a bad aux file. |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
33 +# auxclean: Deletes <name>.aux and other auxiliary files. |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
34 +# This is sometimes necessary if a LaTeX error occurs |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
35 +# and writes a bad aux file. Unlike the regular clean |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
36 +# target, it does not delete other input files, such as |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
37 +# converted images, to save time on the rebuild. |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
38 # |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
39 # The dvi target is added to the ALL. That is, it will be the target |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
40 # built by default. If the DEFAULT_PDF argument is given, then the |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
41 @@ -63,6 +66,24 @@ |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
42 # |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
43 # History: |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
44 # |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
45 +# 1.8.2 Fix corner case when an argument name was also a variable containing |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
46 +# the text of an argument. In this case, the CMake IF was matching |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
47 +# the argument text with the contents of the variable with the same |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
48 +# argument name. |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
49 +# |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
50 +# 1.8.1 Fix problem where ps2pdf was not getting the appropriate arguments. |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
51 +# |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
52 +# 1.8.0 Add support for synctex. |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
53 +# |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
54 +# 1.7.7 Support calling xindy when making glossaries. |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
55 +# |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
56 +# Improved make clean support. |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
57 +# |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
58 +# 1.7.6 Add support for the nomencl package (thanks to Myles English). |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
59 +# |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
60 +# 1.7.5 Fix issue with bibfiles being copied two different ways, which causes |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
61 +# Problems with dependencies (thanks to Edwin van Leeuwen). |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
62 +# |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
63 # 1.7.4 Added the DEFAULT_SAFEPDF option (thanks to Raymond Wan). |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
64 # |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
65 # Added warnings when image directories are not found (and were |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
66 @@ -164,9 +185,9 @@ |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
67 MACRO(LATEX_LIST_CONTAINS var value) |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
68 SET(${var}) |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
69 FOREACH (value2 ${ARGN}) |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
70 - IF (${value} STREQUAL ${value2}) |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
71 + IF ("not_a_var_${value}" STREQUAL "not_a_var_${value2}") |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
72 SET(${var} TRUE) |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
73 - ENDIF (${value} STREQUAL ${value2}) |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
74 + ENDIF ("not_a_var_${value}" STREQUAL "not_a_var_${value2}") |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
75 ENDFOREACH (value2) |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
76 ENDMACRO(LATEX_LIST_CONTAINS) |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
77 |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
78 @@ -217,15 +238,13 @@ |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
79 # Macros that perform processing during a LaTeX build. |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
80 ############################################################################# |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
81 MACRO(LATEX_MAKEGLOSSARIES) |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
82 + # This is really a bare bones port of the makeglossaries perl script into |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
83 + # CMake scripting. |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
84 MESSAGE("**************************** In makeglossaries") |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
85 IF (NOT LATEX_TARGET) |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
86 MESSAGE(SEND_ERROR "Need to define LATEX_TARGET") |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
87 ENDIF (NOT LATEX_TARGET) |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
88 |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
89 - IF (NOT MAKEINDEX_COMPILER) |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
90 - MESSAGE(SEND_ERROR "Need to define MAKEINDEX_COMPILER") |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
91 - ENDIF (NOT MAKEINDEX_COMPILER) |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
92 - |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
93 SET(aux_file ${LATEX_TARGET}.aux) |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
94 |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
95 IF (NOT EXISTS ${aux_file}) |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
96 @@ -245,6 +264,19 @@ |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
97 istfile ${istfile_line} |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
98 ) |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
99 |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
100 + STRING(REGEX MATCH ".*\\.xdy" use_xindy "${istfile}") |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
101 + IF (use_xindy) |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
102 + MESSAGE("*************** Using xindy") |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
103 + IF (NOT XINDY_COMPILER) |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
104 + MESSAGE(SEND_ERROR "Need to define XINDY_COMPILER") |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
105 + ENDIF (NOT XINDY_COMPILER) |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
106 + ELSE (use_xindy) |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
107 + MESSAGE("*************** Using makeindex") |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
108 + IF (NOT MAKEINDEX_COMPILER) |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
109 + MESSAGE(SEND_ERROR "Need to define MAKEINDEX_COMPILER") |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
110 + ENDIF (NOT MAKEINDEX_COMPILER) |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
111 + ENDIF (use_xindy) |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
112 + |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
113 FOREACH(newglossary ${newglossary_lines}) |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
114 STRING(REGEX REPLACE |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
115 "@newglossary[ \t]*{([^}]*)}{([^}]*)}{([^}]*)}{([^}]*)}" |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
116 @@ -262,13 +294,186 @@ |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
117 "@newglossary[ \t]*{([^}]*)}{([^}]*)}{([^}]*)}{([^}]*)}" |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
118 "${LATEX_TARGET}.\\4" glossary_in ${newglossary} |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
119 ) |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
120 - MESSAGE("${MAKEINDEX_COMPILER} ${MAKEGLOSSARIES_COMPILER_FLAGS} -s ${istfile} -t ${glossary_log} -o ${glossary_out} ${glossary_in}") |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
121 - EXEC_PROGRAM(${MAKEINDEX_COMPILER} ARGS ${MAKEGLOSSARIES_COMPILER_FLAGS} |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
122 - -s ${istfile} -t ${glossary_log} -o ${glossary_out} ${glossary_in} |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
123 - ) |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
124 + |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
125 + IF (use_xindy) |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
126 + LATEX_FILE_MATCH(xdylanguage_line ${aux_file} |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
127 + "@xdylanguage[ \t]*{${glossary_name}}{([^}]*)}" |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
128 + "@xdylanguage{${glossary_name}}{english}" |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
129 + ) |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
130 + STRING(REGEX REPLACE |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
131 + "@xdylanguage[ \t]*{${glossary_name}}{([^}]*)}" |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
132 + "\\1" |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
133 + language |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
134 + ${xdylanguage_line} |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
135 + ) |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
136 + # What crazy person makes a LaTeX index generater that uses different |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
137 + # identifiers for language than babel (or at least does not support |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
138 + # the old ones)? |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
139 + IF (${language} STREQUAL "frenchb") |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
140 + SET(language "french") |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
141 + ELSEIF (${language} MATCHES "^n?germanb?$") |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
142 + SET(language "german") |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
143 + ELSEIF (${language} STREQUAL "magyar") |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
144 + SET(language "hungarian") |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
145 + ELSEIF (${language} STREQUAL "lsorbian") |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
146 + SET(language "lower-sorbian") |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
147 + ELSEIF (${language} STREQUAL "norsk") |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
148 + SET(language "norwegian") |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
149 + ELSEIF (${language} STREQUAL "portuges") |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
150 + SET(language "portuguese") |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
151 + ELSEIF (${language} STREQUAL "russianb") |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
152 + SET(language "russian") |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
153 + ELSEIF (${language} STREQUAL "slovene") |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
154 + SET(language "slovenian") |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
155 + ELSEIF (${language} STREQUAL "ukraineb") |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
156 + SET(language "ukrainian") |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
157 + ELSEIF (${language} STREQUAL "usorbian") |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
158 + SET(language "upper-sorbian") |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
159 + ENDIF (${language} STREQUAL "frenchb") |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
160 + IF (language) |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
161 + SET(language_flags "-L ${language}") |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
162 + ELSE (language) |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
163 + SET(language_flags "") |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
164 + ENDIF (language) |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
165 + |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
166 + LATEX_FILE_MATCH(codepage_line ${aux_file} |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
167 + "@gls@codepage[ \t]*{${glossary_name}}{([^}]*)}" |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
168 + "@gls@codepage{${glossary_name}}{utf}" |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
169 + ) |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
170 + STRING(REGEX REPLACE |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
171 + "@gls@codepage[ \t]*{${glossary_name}}{([^}]*)}" |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
172 + "\\1" |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
173 + codepage |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
174 + ${codepage_line} |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
175 + ) |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
176 + IF (codepage) |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
177 + SET(codepage_flags "-C ${codepage}") |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
178 + ELSE (codepage) |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
179 + # Ideally, we would check that the language is compatible with the |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
180 + # default codepage, but I'm hoping that distributions will be smart |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
181 + # enough to specify their own codepage. I know, it's asking a lot. |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
182 + SET(codepage_flags "") |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
183 + ENDIF (codepage) |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
184 + |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
185 + MESSAGE("${XINDY_COMPILER} ${MAKEGLOSSARIES_COMPILER_FLAGS} ${language_flags} ${codepage_flags} -I xindy -M ${glossary_name} -t ${glossary_log} -o ${glossary_out} ${glossary_in}" |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
186 + ) |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
187 + EXEC_PROGRAM(${XINDY_COMPILER} |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
188 + ARGS ${MAKEGLOSSARIES_COMPILER_FLAGS} |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
189 + ${language_flags} |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
190 + ${codepage_flags} |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
191 + -I xindy |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
192 + -M ${glossary_name} |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
193 + -t ${glossary_log} |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
194 + -o ${glossary_out} |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
195 + ${glossary_in} |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
196 + OUTPUT_VARIABLE xindy_output |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
197 + ) |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
198 + MESSAGE("${xindy_output}") |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
199 + |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
200 + # So, it is possible (perhaps common?) for aux files to specify a |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
201 + # language and codepage that are incompatible with each other. Check |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
202 + # for that condition, and if it happens run again with the default |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
203 + # codepage. |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
204 + IF ("${xindy_output}" MATCHES "^Cannot locate xindy module for language (.+) in codepage (.+)\\.$") |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
205 + MESSAGE("*************** Retrying xindy with default codepage.") |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
206 + EXEC_PROGRAM(${XINDY_COMPILER} |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
207 + ARGS ${MAKEGLOSSARIES_COMPILER_FLAGS} |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
208 + ${language_flags} |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
209 + -I xindy |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
210 + -M ${glossary_name} |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
211 + -t ${glossary_log} |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
212 + -o ${glossary_out} |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
213 + ${glossary_in} |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
214 + ) |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
215 + ENDIF ("${xindy_output}" MATCHES "^Cannot locate xindy module for language (.+) in codepage (.+)\\.$") |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
216 + #ENDIF ("${xindy_output}" MATCHES "Cannot locate xindy module for language (.+) in codepage (.+)\\.") |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
217 + |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
218 + ELSE (use_xindy) |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
219 + MESSAGE("${MAKEINDEX_COMPILER} ${MAKEGLOSSARIES_COMPILER_FLAGS} -s ${istfile} -t ${glossary_log} -o ${glossary_out} ${glossary_in}") |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
220 + EXEC_PROGRAM(${MAKEINDEX_COMPILER} ARGS ${MAKEGLOSSARIES_COMPILER_FLAGS} |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
221 + -s ${istfile} -t ${glossary_log} -o ${glossary_out} ${glossary_in} |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
222 + ) |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
223 + ENDIF (use_xindy) |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
224 + |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
225 ENDFOREACH(newglossary) |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
226 ENDMACRO(LATEX_MAKEGLOSSARIES) |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
227 |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
228 +MACRO(LATEX_MAKENOMENCLATURE) |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
229 + MESSAGE("**************************** In makenomenclature") |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
230 + IF (NOT LATEX_TARGET) |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
231 + MESSAGE(SEND_ERROR "Need to define LATEX_TARGET") |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
232 + ENDIF (NOT LATEX_TARGET) |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
233 + |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
234 + IF (NOT MAKEINDEX_COMPILER) |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
235 + MESSAGE(SEND_ERROR "Need to define MAKEINDEX_COMPILER") |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
236 + ENDIF (NOT MAKEINDEX_COMPILER) |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
237 + |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
238 + SET(nomencl_out ${LATEX_TARGET}.nls) |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
239 + SET(nomencl_in ${LATEX_TARGET}.nlo) |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
240 + |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
241 + EXEC_PROGRAM(${MAKEINDEX_COMPILER} ARGS ${MAKENOMENCLATURE_COMPILER_FLAGS} |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
242 + ${nomencl_in} -s "nomencl.ist" -o ${nomencl_out} |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
243 + ) |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
244 +ENDMACRO(LATEX_MAKENOMENCLATURE) |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
245 + |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
246 +MACRO(LATEX_CORRECT_SYNCTEX) |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
247 + MESSAGE("**************************** In correct SyncTeX") |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
248 + IF (NOT LATEX_TARGET) |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
249 + MESSAGE(SEND_ERROR "Need to define LATEX_TARGET") |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
250 + ENDIF (NOT LATEX_TARGET) |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
251 + |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
252 + IF (NOT GZIP) |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
253 + MESSAGE(SEND_ERROR "Need to define GZIP") |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
254 + ENDIF (NOT GZIP) |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
255 + |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
256 + IF (NOT LATEX_SOURCE_DIRECTORY) |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
257 + MESSAGE(SEND_ERROR "Need to define LATEX_SOURCE_DIRECTORY") |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
258 + ENDIF (NOT LATEX_SOURCE_DIRECTORY) |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
259 + |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
260 + IF (NOT LATEX_BINARY_DIRECTORY) |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
261 + MESSAGE(SEND_ERROR "Need to define LATEX_BINARY_DIRECTORY") |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
262 + ENDIF (NOT LATEX_BINARY_DIRECTORY) |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
263 + |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
264 + SET(synctex_file ${LATEX_BINARY_DIRECTORY}/${LATEX_TARGET}.synctex) |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
265 + SET(synctex_file_gz ${synctex_file}.gz) |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
266 + |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
267 + IF (EXISTS ${synctex_file_gz}) |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
268 + |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
269 + MESSAGE("Making backup of synctex file.") |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
270 + CONFIGURE_FILE(${synctex_file_gz} ${synctex_file}.bak.gz COPYONLY) |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
271 + |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
272 + MESSAGE("Uncompressing synctex file.") |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
273 + EXEC_PROGRAM(${GZIP} |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
274 + ARGS --decompress ${synctex_file_gz} |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
275 + ) |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
276 + |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
277 + MESSAGE("Reading synctex file.") |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
278 + FILE(READ ${synctex_file} synctex_data) |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
279 + |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
280 + MESSAGE("Replacing relative with absolute paths.") |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
281 + STRING(REGEX REPLACE |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
282 + "(Input:[0-9]+:)([^/\n][^\n]*)" |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
283 + "\\1${LATEX_SOURCE_DIRECTORY}/\\2" |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
284 + synctex_data |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
285 + "${synctex_data}" |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
286 + ) |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
287 + |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
288 + MESSAGE("Writing synctex file.") |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
289 + FILE(WRITE ${synctex_file} "${synctex_data}") |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
290 + |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
291 + MESSAGE("Compressing synctex file.") |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
292 + EXEC_PROGRAM(${GZIP} |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
293 + ARGS ${synctex_file} |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
294 + ) |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
295 + |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
296 + ELSE (EXISTS ${synctex_file_gz}) |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
297 + |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
298 + MESSAGE(SEND_ERROR "File ${synctex_file_gz} not found. Perhaps synctex is not supported by your LaTeX compiler.") |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
299 + |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
300 + ENDIF (EXISTS ${synctex_file_gz}) |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
301 + |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
302 +ENDMACRO(LATEX_CORRECT_SYNCTEX) |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
303 + |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
304 ############################################################################# |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
305 # Helper macros for establishing LaTeX build. |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
306 ############################################################################# |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
307 @@ -292,11 +497,19 @@ |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
308 |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
309 FIND_PACKAGE(LATEX) |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
310 |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
311 + FIND_PROGRAM(XINDY_COMPILER |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
312 + NAME xindy |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
313 + PATHS ${MIKTEX_BINARY_PATH} /usr/bin |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
314 + ) |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
315 + |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
316 + FIND_PACKAGE(UnixCommands) |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
317 + |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
318 MARK_AS_ADVANCED(CLEAR |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
319 LATEX_COMPILER |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
320 PDFLATEX_COMPILER |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
321 BIBTEX_COMPILER |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
322 MAKEINDEX_COMPILER |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
323 + XINDY_COMPILER |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
324 DVIPS_CONVERTER |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
325 PS2PDF_CONVERTER |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
326 LATEX2HTML_CONVERTER |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
327 @@ -314,12 +527,16 @@ |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
328 CACHE STRING "Flags passed to latex.") |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
329 SET(PDFLATEX_COMPILER_FLAGS ${LATEX_COMPILER_FLAGS} |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
330 CACHE STRING "Flags passed to pdflatex.") |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
331 + SET(LATEX_SYNCTEX_FLAGS "-synctex=1" |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
332 + CACHE STRING "latex/pdflatex flags used to create synctex file.") |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
333 SET(BIBTEX_COMPILER_FLAGS "" |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
334 CACHE STRING "Flags passed to bibtex.") |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
335 SET(MAKEINDEX_COMPILER_FLAGS "" |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
336 CACHE STRING "Flags passed to makeindex.") |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
337 SET(MAKEGLOSSARIES_COMPILER_FLAGS "" |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
338 CACHE STRING "Flags passed to makeglossaries.") |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
339 + SET(MAKENOMENCLATURE_COMPILER_FLAGS "" |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
340 + CACHE STRING "Flags passed to makenomenclature.") |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
341 SET(DVIPS_CONVERTER_FLAGS "-Ppdf -G0 -t letter" |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
342 CACHE STRING "Flags passed to dvips.") |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
343 SET(PS2PDF_CONVERTER_FLAGS "-dMaxSubsetPct=100 -dCompatibilityLevel=1.3 -dSubsetFonts=true -dEmbedAllFonts=true -dAutoFilterColorImages=false -dAutoFilterGrayImages=false -dColorImageFilter=/FlateEncode -dGrayImageFilter=/FlateEncode -dMonoImageFilter=/FlateEncode" |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
344 @@ -329,18 +546,22 @@ |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
345 MARK_AS_ADVANCED( |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
346 LATEX_COMPILER_FLAGS |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
347 PDFLATEX_COMPILER_FLAGS |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
348 + LATEX_SYNCTEX_FLAGS |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
349 BIBTEX_COMPILER_FLAGS |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
350 MAKEINDEX_COMPILER_FLAGS |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
351 MAKEGLOSSARIES_COMPILER_FLAGS |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
352 + MAKENOMENCLATURE_COMPILER_FLAGS |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
353 DVIPS_CONVERTER_FLAGS |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
354 PS2PDF_CONVERTER_FLAGS |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
355 LATEX2HTML_CONVERTER_FLAGS |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
356 ) |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
357 SEPARATE_ARGUMENTS(LATEX_COMPILER_FLAGS) |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
358 SEPARATE_ARGUMENTS(PDFLATEX_COMPILER_FLAGS) |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
359 + SEPARATE_ARGUMENTS(LATEX_SYNCTEX_FLAGS) |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
360 SEPARATE_ARGUMENTS(BIBTEX_COMPILER_FLAGS) |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
361 SEPARATE_ARGUMENTS(MAKEINDEX_COMPILER_FLAGS) |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
362 SEPARATE_ARGUMENTS(MAKEGLOSSARIES_COMPILER_FLAGS) |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
363 + SEPARATE_ARGUMENTS(MAKENOMENCLATURE_COMPILER_FLAGS) |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
364 SEPARATE_ARGUMENTS(DVIPS_CONVERTER_FLAGS) |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
365 SEPARATE_ARGUMENTS(PS2PDF_CONVERTER_FLAGS) |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
366 SEPARATE_ARGUMENTS(LATEX2HTML_CONVERTER_FLAGS) |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
367 @@ -352,6 +573,11 @@ |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
368 MESSAGE(SEND_ERROR "Could not find convert program. Please download ImageMagick from http://www.imagemagick.org and install.") |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
369 ENDIF (NOT IMAGEMAGICK_CONVERT) |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
370 |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
371 + OPTION(LATEX_USE_SYNCTEX |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
372 + "If on, have LaTeX generate a synctex file, which WYSIWYG editors can use to correlate output files like dvi and pdf with the lines of LaTeX source that generates them. In addition to adding the LATEX_SYNCTEX_FLAGS to the command line, this option also adds build commands that \"corrects\" the resulting synctex file to point to the original LaTeX files rather than those generated by UseLATEX.cmake." |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
373 + OFF |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
374 + ) |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
375 + |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
376 OPTION(LATEX_SMALL_IMAGES |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
377 "If on, the raster images will be converted to 1/6 the original size. This is because papers usually require 600 dpi images whereas most monitors only require at most 96 dpi. Thus, smaller images make smaller files for web distributation and can make it faster to read dvi files." |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
378 OFF) |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
379 @@ -402,7 +628,7 @@ |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
380 IF (${input_extension} STREQUAL ".eps" AND ${output_extension} STREQUAL ".pdf") |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
381 IF (PS2PDF_CONVERTER) |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
382 SET (converter ${PS2PDF_CONVERTER}) |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
383 - SET (convert_flags "-dEPSCrop ${flags}") |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
384 + SET (convert_flags -dEPSCrop ${PS2PDF_CONVERTER_FLAGS}) |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
385 ELSE (PS2PDF_CONVERTER) |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
386 MESSAGE(SEND_ERROR "Using postscript files with pdflatex requires ps2pdf for conversion.") |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
387 ENDIF (PS2PDF_CONVERTER) |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
388 @@ -560,7 +786,7 @@ |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
389 |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
390 MACRO(LATEX_USAGE command message) |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
391 MESSAGE(SEND_ERROR |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
392 - "${message}\nUsage: ${command}(<tex_file>\n [BIBFILES <bib_file> <bib_file> ...]\n [INPUTS <tex_file> <tex_file> ...]\n [IMAGE_DIRS <directory1> <directory2> ...]\n [IMAGES <image_file1> <image_file2>\n [CONFIGURE <tex_file> <tex_file> ...]\n [DEPENDS <tex_file> <tex_file> ...]\n [USE_INDEX] [USE_GLOSSARY]\n [DEFAULT_PDF] [DEFAULT_SAFEPDF]\n [MANGLE_TARGET_NAMES])" |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
393 + "${message}\nUsage: ${command}(<tex_file>\n [BIBFILES <bib_file> <bib_file> ...]\n [INPUTS <tex_file> <tex_file> ...]\n [IMAGE_DIRS <directory1> <directory2> ...]\n [IMAGES <image_file1> <image_file2>\n [CONFIGURE <tex_file> <tex_file> ...]\n [DEPENDS <tex_file> <tex_file> ...]\n [USE_INDEX] [USE_GLOSSARY] [USE_NOMENCL]\n [DEFAULT_PDF] [DEFAULT_SAFEPDF]\n [MANGLE_TARGET_NAMES])" |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
394 ) |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
395 ENDMACRO(LATEX_USAGE command message) |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
396 |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
397 @@ -571,7 +797,7 @@ |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
398 LATEX_PARSE_ARGUMENTS( |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
399 LATEX |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
400 "BIBFILES;INPUTS;IMAGE_DIRS;IMAGES;CONFIGURE;DEPENDS" |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
401 - "USE_INDEX;USE_GLOSSARY;USE_GLOSSARIES;DEFAULT_PDF;DEFAULT_SAFEPDF;MANGLE_TARGET_NAMES" |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
402 + "USE_INDEX;USE_GLOSSARY;USE_GLOSSARIES;USE_NOMENCL;DEFAULT_PDF;DEFAULT_SAFEPDF;MANGLE_TARGET_NAMES" |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
403 ${ARGN} |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
404 ) |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
405 |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
406 @@ -598,6 +824,20 @@ |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
407 LATEX_GET_OUTPUT_PATH(output_dir) |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
408 PARSE_ADD_LATEX_ARGUMENTS(ADD_LATEX_TARGETS ${ARGV}) |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
409 |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
410 + IF (LATEX_USE_SYNCTEX) |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
411 + SET(synctex_flags ${LATEX_SYNCTEX_FLAGS}) |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
412 + ELSE (LATEX_USE_SYNCTEX) |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
413 + SET(synctex_flags) |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
414 + ENDIF (LATEX_USE_SYNCTEX) |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
415 + |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
416 + # The commands to run LaTeX. They are repeated multiple times. |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
417 + SET(latex_build_command |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
418 + ${LATEX_COMPILER} ${LATEX_COMPILER_FLAGS} ${synctex_flags} ${LATEX_MAIN_INPUT} |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
419 + ) |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
420 + SET(pdflatex_build_command |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
421 + ${PDFLATEX_COMPILER} ${PDFLATEX_COMPILER_FLAGS} ${synctex_flags} ${LATEX_MAIN_INPUT} |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
422 + ) |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
423 + |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
424 # Set up target names. |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
425 IF (LATEX_MANGLE_TARGET_NAMES) |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
426 SET(dvi_target ${LATEX_TARGET}_dvi) |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
427 @@ -615,6 +855,31 @@ |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
428 SET(auxclean_target auxclean) |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
429 ENDIF (LATEX_MANGLE_TARGET_NAMES) |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
430 |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
431 + # Probably not all of these will be generated, but they could be. |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
432 + # Note that the aux file is added later. |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
433 + SET(auxiliary_clean_files |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
434 + ${output_dir}/${LATEX_TARGET}.bbl |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
435 + ${output_dir}/${LATEX_TARGET}.blg |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
436 + ${output_dir}/${LATEX_TARGET}-blx.bib |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
437 + ${output_dir}/${LATEX_TARGET}.glg |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
438 + ${output_dir}/${LATEX_TARGET}.glo |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
439 + ${output_dir}/${LATEX_TARGET}.gls |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
440 + ${output_dir}/${LATEX_TARGET}.idx |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
441 + ${output_dir}/${LATEX_TARGET}.ilg |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
442 + ${output_dir}/${LATEX_TARGET}.ind |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
443 + ${output_dir}/${LATEX_TARGET}.ist |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
444 + ${output_dir}/${LATEX_TARGET}.log |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
445 + ${output_dir}/${LATEX_TARGET}.out |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
446 + ${output_dir}/${LATEX_TARGET}.toc |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
447 + ${output_dir}/${LATEX_TARGET}.lof |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
448 + ${output_dir}/${LATEX_TARGET}.xdy |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
449 + ${output_dir}/${LATEX_TARGET}.synctex.gz |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
450 + ${output_dir}/${LATEX_TARGET}.synctex.bak.gz |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
451 + ${output_dir}/${LATEX_TARGET}.dvi |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
452 + ${output_dir}/${LATEX_TARGET}.ps |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
453 + ${output_dir}/${LATEX_TARGET}.pdf |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
454 + ) |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
455 + |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
456 # For each directory in LATEX_IMAGE_DIRS, glob all the image files and |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
457 # place them in LATEX_IMAGES. |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
458 FOREACH(dir ${LATEX_IMAGE_DIRS}) |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
459 @@ -636,16 +901,24 @@ |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
460 |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
461 SET(make_dvi_command |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
462 ${CMAKE_COMMAND} -E chdir ${output_dir} |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
463 - ${LATEX_COMPILER} ${LATEX_COMPILER_FLAGS} ${LATEX_MAIN_INPUT}) |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
464 + ${latex_build_command}) |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
465 SET(make_pdf_command |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
466 ${CMAKE_COMMAND} -E chdir ${output_dir} |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
467 - ${PDFLATEX_COMPILER} ${PDFLATEX_COMPILER_FLAGS} ${LATEX_MAIN_INPUT}) |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
468 + ${pdflatex_build_command} |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
469 + ) |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
470 |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
471 SET(make_dvi_depends ${LATEX_DEPENDS} ${dvi_images}) |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
472 SET(make_pdf_depends ${LATEX_DEPENDS} ${pdf_images}) |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
473 FOREACH(input ${LATEX_MAIN_INPUT} ${LATEX_INPUTS}) |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
474 SET(make_dvi_depends ${make_dvi_depends} ${output_dir}/${input}) |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
475 SET(make_pdf_depends ${make_pdf_depends} ${output_dir}/${input}) |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
476 + IF (${input} MATCHES "\\.tex$") |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
477 + STRING(REGEX REPLACE "\\.tex$" "" input_we ${input}) |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
478 + SET(auxiliary_clean_files ${auxiliary_clean_files} |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
479 + ${output_dir}/${input_we}.aux |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
480 + ${output_dir}/${input}.aux |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
481 + ) |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
482 + ENDIF (${input} MATCHES "\\.tex$") |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
483 ENDFOREACH(input) |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
484 |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
485 IF (LATEX_USE_GLOSSARY) |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
486 @@ -656,10 +929,11 @@ |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
487 -D LATEX_BUILD_COMMAND=makeglossaries |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
488 -D LATEX_TARGET=${LATEX_TARGET} |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
489 -D MAKEINDEX_COMPILER=${MAKEINDEX_COMPILER} |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
490 + -D XINDY_COMPILER=${XINDY_COMPILER} |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
491 -D MAKEGLOSSARIES_COMPILER_FLAGS=${MAKEGLOSSARIES_COMPILER_FLAGS} |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
492 -P ${LATEX_USE_LATEX_LOCATION} |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
493 COMMAND ${CMAKE_COMMAND} -E chdir ${output_dir} |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
494 - ${LATEX_COMPILER} ${LATEX_COMPILER_FLAGS} ${LATEX_MAIN_INPUT} |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
495 + ${latex_build_command} |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
496 ) |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
497 SET(make_pdf_command ${make_pdf_command} |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
498 COMMAND ${CMAKE_COMMAND} -E chdir ${output_dir} |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
499 @@ -667,14 +941,42 @@ |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
500 -D LATEX_BUILD_COMMAND=makeglossaries |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
501 -D LATEX_TARGET=${LATEX_TARGET} |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
502 -D MAKEINDEX_COMPILER=${MAKEINDEX_COMPILER} |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
503 + -D XINDY_COMPILER=${XINDY_COMPILER} |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
504 -D MAKEGLOSSARIES_COMPILER_FLAGS=${MAKEGLOSSARIES_COMPILER_FLAGS} |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
505 -P ${LATEX_USE_LATEX_LOCATION} |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
506 COMMAND ${CMAKE_COMMAND} -E chdir ${output_dir} |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
507 - ${PDFLATEX_COMPILER} ${PDFLATEX_COMPILER_FLAGS} ${LATEX_MAIN_INPUT} |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
508 + ${pdflatex_build_command} |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
509 ) |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
510 ENDFOREACH(dummy) |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
511 ENDIF (LATEX_USE_GLOSSARY) |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
512 |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
513 + IF (LATEX_USE_NOMENCL) |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
514 + FOREACH(dummy 0 1) # Repeat these commands twice. |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
515 + SET(make_dvi_command ${make_dvi_command} |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
516 + COMMAND ${CMAKE_COMMAND} -E chdir ${output_dir} |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
517 + ${CMAKE_COMMAND} |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
518 + -D LATEX_BUILD_COMMAND=makenomenclature |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
519 + -D LATEX_TARGET=${LATEX_TARGET} |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
520 + -D MAKEINDEX_COMPILER=${MAKEINDEX_COMPILER} |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
521 + -D MAKENOMENCLATURE_COMPILER_FLAGS=${MAKENOMENCLATURE_COMPILER_FLAGS} |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
522 + -P ${LATEX_USE_LATEX_LOCATION} |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
523 + COMMAND ${CMAKE_COMMAND} -E chdir ${output_dir} |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
524 + ${latex_build_command} |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
525 + ) |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
526 + SET(make_pdf_command ${make_pdf_command} |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
527 + COMMAND ${CMAKE_COMMAND} -E chdir ${output_dir} |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
528 + ${CMAKE_COMMAND} |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
529 + -D LATEX_BUILD_COMMAND=makenomenclature |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
530 + -D LATEX_TARGET=${LATEX_TARGET} |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
531 + -D MAKEINDEX_COMPILER=${MAKEINDEX_COMPILER} |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
532 + -D MAKENOMENCLATURE_COMPILER_FLAGS=${MAKENOMENCLATURE_COMPILER_FLAGS} |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
533 + -P ${LATEX_USE_LATEX_LOCATION} |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
534 + COMMAND ${CMAKE_COMMAND} -E chdir ${output_dir} |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
535 + ${pdflatex_build_command} |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
536 + ) |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
537 + ENDFOREACH(dummy) |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
538 + ENDIF (LATEX_USE_NOMENCL) |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
539 + |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
540 IF (LATEX_BIBFILES) |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
541 SET(make_dvi_command ${make_dvi_command} |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
542 COMMAND ${CMAKE_COMMAND} -E chdir ${output_dir} |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
543 @@ -691,26 +993,50 @@ |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
544 IF (LATEX_USE_INDEX) |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
545 SET(make_dvi_command ${make_dvi_command} |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
546 COMMAND ${CMAKE_COMMAND} -E chdir ${output_dir} |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
547 - ${LATEX_COMPILER} ${LATEX_COMPILER_FLAGS} ${LATEX_MAIN_INPUT} |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
548 + ${latex_build_command} |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
549 COMMAND ${CMAKE_COMMAND} -E chdir ${output_dir} |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
550 ${MAKEINDEX_COMPILER} ${MAKEINDEX_COMPILER_FLAGS} ${LATEX_TARGET}.idx) |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
551 SET(make_pdf_command ${make_pdf_command} |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
552 COMMAND ${CMAKE_COMMAND} -E chdir ${output_dir} |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
553 - ${PDFLATEX_COMPILER} ${PDFLATEX_COMPILER_FLAGS} ${LATEX_MAIN_INPUT} |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
554 + ${pdflatex_build_command} |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
555 COMMAND ${CMAKE_COMMAND} -E chdir ${output_dir} |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
556 ${MAKEINDEX_COMPILER} ${MAKEINDEX_COMPILER_FLAGS} ${LATEX_TARGET}.idx) |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
557 ENDIF (LATEX_USE_INDEX) |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
558 |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
559 SET(make_dvi_command ${make_dvi_command} |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
560 COMMAND ${CMAKE_COMMAND} -E chdir ${output_dir} |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
561 - ${LATEX_COMPILER} ${LATEX_COMPILER_FLAGS} ${LATEX_MAIN_INPUT} |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
562 + ${latex_build_command} |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
563 COMMAND ${CMAKE_COMMAND} -E chdir ${output_dir} |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
564 - ${LATEX_COMPILER} ${LATEX_COMPILER_FLAGS} ${LATEX_MAIN_INPUT}) |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
565 + ${latex_build_command}) |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
566 SET(make_pdf_command ${make_pdf_command} |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
567 COMMAND ${CMAKE_COMMAND} -E chdir ${output_dir} |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
568 - ${PDFLATEX_COMPILER} ${PDFLATEX_COMPILER_FLAGS} ${LATEX_MAIN_INPUT} |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
569 + ${pdflatex_build_command} |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
570 COMMAND ${CMAKE_COMMAND} -E chdir ${output_dir} |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
571 - ${PDFLATEX_COMPILER} ${PDFLATEX_COMPILER_FLAGS} ${LATEX_MAIN_INPUT}) |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
572 + ${pdflatex_build_command}) |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
573 + |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
574 + IF (LATEX_USE_SYNCTEX) |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
575 + IF (NOT GZIP) |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
576 + MESSAGE(SEND_ERROR "UseLATEX.cmake: USE_SYNTEX option requires gzip program. Set GZIP variable.") |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
577 + ENDIF (NOT GZIP) |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
578 + SET(make_dvi_command ${make_dvi_command} |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
579 + COMMAND ${CMAKE_COMMAND} |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
580 + -D LATEX_BUILD_COMMAND=correct_synctex |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
581 + -D LATEX_TARGET=${LATEX_TARGET} |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
582 + -D GZIP=${GZIP} |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
583 + -D "LATEX_SOURCE_DIRECTORY=${CMAKE_CURRENT_SOURCE_DIR}" |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
584 + -D "LATEX_BINARY_DIRECTORY=${output_dir}" |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
585 + -P ${LATEX_USE_LATEX_LOCATION} |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
586 + ) |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
587 + SET(make_pdf_command ${make_pdf_command} |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
588 + COMMAND ${CMAKE_COMMAND} |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
589 + -D LATEX_BUILD_COMMAND=correct_synctex |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
590 + -D LATEX_TARGET=${LATEX_TARGET} |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
591 + -D GZIP=${GZIP} |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
592 + -D "LATEX_SOURCE_DIRECTORY=${CMAKE_CURRENT_SOURCE_DIR}" |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
593 + -D "LATEX_BINARY_DIRECTORY=${output_dir}" |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
594 + -P ${LATEX_USE_LATEX_LOCATION} |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
595 + ) |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
596 + ENDIF (LATEX_USE_SYNCTEX) |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
597 |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
598 # Add commands and targets for building dvi outputs. |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
599 ADD_CUSTOM_COMMAND(OUTPUT ${output_dir}/${LATEX_TARGET}.dvi |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
600 @@ -774,8 +1100,13 @@ |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
601 ADD_DEPENDENCIES(${html_target} ${LATEX_MAIN_INPUT} ${LATEX_INPUTS}) |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
602 ENDIF (LATEX2HTML_CONVERTER) |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
603 |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
604 + SET_DIRECTORY_PROPERTIES(. |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
605 + ADDITIONAL_MAKE_CLEAN_FILES "${auxiliary_clean_files}" |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
606 + ) |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
607 + |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
608 ADD_CUSTOM_TARGET(${auxclean_target} |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
609 - ${CMAKE_COMMAND} -E remove ${output_dir}/${LATEX_TARGET}.aux ${output_dir}/${LATEX_TARGET}.idx ${output_dir}/${LATEX_TARGET}.ind |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
610 + COMMENT "Cleaning auxiliary LaTeX files." |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
611 + COMMAND ${CMAKE_COMMAND} -E remove ${auxiliary_clean_files} |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
612 ) |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
613 ENDMACRO(ADD_LATEX_TARGETS) |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
614 |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
615 @@ -787,14 +1118,7 @@ |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
616 LATEX_COPY_INPUT_FILE(${LATEX_MAIN_INPUT}) |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
617 |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
618 FOREACH (bib_file ${LATEX_BIBFILES}) |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
619 - CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/${bib_file} |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
620 - ${output_dir}/${bib_file} |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
621 - COPYONLY) |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
622 - ADD_CUSTOM_COMMAND(OUTPUT ${output_dir}/${bib_file} |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
623 - COMMAND ${CMAKE_COMMAND} |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
624 - ARGS -E copy ${CMAKE_CURRENT_SOURCE_DIR}/${bib_file} ${output_dir}/${bib_file} |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
625 - DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${bib_file} |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
626 - ) |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
627 + LATEX_COPY_INPUT_FILE(${bib_file}) |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
628 ENDFOREACH (bib_file) |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
629 |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
630 FOREACH (input ${LATEX_INPUTS}) |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
631 @@ -805,6 +1129,7 @@ |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
632 LATEX_COPY_GLOBBED_FILES(${CMAKE_CURRENT_SOURCE_DIR}/*.bst ${output_dir}) |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
633 LATEX_COPY_GLOBBED_FILES(${CMAKE_CURRENT_SOURCE_DIR}/*.clo ${output_dir}) |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
634 LATEX_COPY_GLOBBED_FILES(${CMAKE_CURRENT_SOURCE_DIR}/*.sty ${output_dir}) |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
635 + LATEX_COPY_GLOBBED_FILES(${CMAKE_CURRENT_SOURCE_DIR}/*.ist ${output_dir}) |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
636 |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
637 ADD_LATEX_TARGETS(${ARGV}) |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
638 ENDIF (output_dir) |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
639 @@ -822,6 +1147,16 @@ |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
640 SET(command_handled TRUE) |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
641 ENDIF ("${LATEX_BUILD_COMMAND}" STREQUAL makeglossaries) |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
642 |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
643 + IF ("${LATEX_BUILD_COMMAND}" STREQUAL makenomenclature) |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
644 + LATEX_MAKENOMENCLATURE() |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
645 + SET(command_handled TRUE) |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
646 + ENDIF ("${LATEX_BUILD_COMMAND}" STREQUAL makenomenclature) |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
647 + |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
648 + IF ("${LATEX_BUILD_COMMAND}" STREQUAL correct_synctex) |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
649 + LATEX_CORRECT_SYNCTEX() |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
650 + SET(command_handled TRUE) |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
651 + ENDIF ("${LATEX_BUILD_COMMAND}" STREQUAL correct_synctex) |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
652 + |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
653 IF (NOT command_handled) |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
654 MESSAGE(SEND_ERROR "Unknown command: ${LATEX_BUILD_COMMAND}") |
973e7bc6d13c
Add some patches to use and test rathaxes with CMake
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
655 ENDIF (NOT command_handled) |