File tree Expand file tree Collapse file tree 2 files changed +19
-36
lines changed Expand file tree Collapse file tree 2 files changed +19
-36
lines changed Original file line number Diff line number Diff line change @@ -19,22 +19,11 @@ else()
19
19
message (FATAL_ERROR "fig2dev was requested but not found." )
20
20
endif ()
21
21
22
- # check for octave
23
- find_program (OCTAVE octave)
24
- if (OCTAVE)
25
- message (STATUS "Using ${OCTAVE} to generate figures." )
22
+ find_program (PYTHON python3)
23
+ if (PYTHON)
24
+ message (STATUS "Using ${PYTHON} to generate figures." )
26
25
else ()
27
- message (FATAL_ERROR "octave was requested but not found." )
28
- endif ()
29
-
30
- # check for epstk
31
- execute_process (
32
- COMMAND ${OCTAVE} --eval eglobpar
33
- OUTPUT_VARIABLE EPSTK )
34
- if (NOT EPSTK)
35
- message (STATUS "Using epstk (octave) to generate figures." )
36
- else ()
37
- message (FATAL_ERROR "epstk (octave) was requested but not found." )
26
+ message (FATAL_ERROR "python3 was requested but not found." )
38
27
endif ()
39
28
40
29
add_subdirectory (report)
Original file line number Diff line number Diff line change 1
1
2
- set (MFILES
3
- coplanarzl.m
4
- mscomparezl.m
5
- mszl.m
6
- radius.m
7
- stabbashford.m
8
- stabgear.m
9
- stabgearex.m
10
- stabmoulton.m
11
- )
12
2
13
3
set (FIGS
14
4
acstrafo.fig
@@ -184,17 +174,21 @@ foreach(file ${FIGS})
184
174
endforeach ()
185
175
186
176
187
- # generate .m --> eps
188
- set (m_gen)
189
- foreach (file ${MFILES} )
190
- get_filename_component (_name ${file} NAME_WE )
191
- add_custom_command (
192
- OUTPUT ${_name} .eps
193
- COMMAND octave -- path ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR} / ${file}
194
- DEPENDS ${file} )
195
- list ( APPEND m_gen ${_name} .eps)
196
- endforeach ( )
177
+ # generate figures from python script
178
+ set (pyFigs
179
+ coplanarzl.pdf
180
+ mscomparezl.pdf
181
+ mszl.pdf
182
+ radius.pdf
183
+ stabbashford.pdf
184
+ stabgear.pdf
185
+ stabgearex.pdf
186
+ stabmoulton.pdf )
197
187
188
+ add_custom_command (
189
+ OUTPUT ${pyFigs}
190
+ COMMAND python3 ${CMAKE_CURRENT_SOURCE_DIR} /figures.py
191
+ DEPENDS ${CMAKE_CURRENT_SOURCE_DIR} /figures.py)
198
192
199
193
# Compile LaTeX document
200
194
# If fig2eps and m2eps were known formatds they could be on IMAGE.
@@ -204,7 +198,7 @@ add_latex_document(
204
198
INPUTS ${CHAPTERS}
205
199
IMAGES ${PSFILES}
206
200
BIBFILES literature.bib
207
- DEPENDS ${fig_gen} ${m_gen }
201
+ DEPENDS ${fig_gen} ${pyFigs }
208
202
)
209
203
210
204
# Handle install
You can’t perform that action at this time.
0 commit comments