Skip to content

Commit 9b1914a

Browse files
authored
cmake: Use the builtin FindLATEX module to search for latex (#8510)
1 parent b9c1536 commit 9b1914a

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

CMakeLists.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,7 @@ if (DO_EXAMPLES OR DO_TESTS AND NOT GRAPHICSMAGICK)
9090
endif (DO_EXAMPLES OR DO_TESTS AND NOT GRAPHICSMAGICK)
9191

9292
# Find latex and dvips for LaTeX integration
93-
find_program (LATEX latex)
94-
find_program (DVIPS dvips)
93+
find_package (LATEX COMPONENTS DVIPS)
9594

9695
# Add subdirectories
9796
add_subdirectory (src)

doc/scripts/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,9 +94,9 @@ foreach (skip_test GMT_-U.sh GMT_encoding.sh gen_data_App_O.sh gen_data_dummy.sh
9494
endforeach()
9595

9696
# Remove GMT_latex.sh if latex or dvips not found
97-
if (NOT LATEX OR NOT DVIPS)
97+
if (NOT LATEX_FOUND)
9898
list (REMOVE_ITEM _scripts_tests doc/scripts/GMT_latex.sh doc/scripts/GMT_slope2intensity.sh doc/scripts/GMT_seamount_density.sh)
99-
endif (NOT LATEX OR NOT DVIPS)
99+
endif (NOT LATEX_FOUND)
100100

101101
if (DO_TESTS AND BASH)
102102
foreach (_job ${_scripts_tests})

test/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,9 @@ if (DO_TESTS)
4040
endif (NOT DO_SUPPLEMENT_TESTS)
4141

4242
# Remove latex-specific tests if latex or dvips not found
43-
if (NOT LATEX OR NOT DVIPS)
43+
if (NOT LATEX_FOUND)
4444
list (REMOVE_ITEM GMT_TEST_DIRS latex)
45-
endif (NOT LATEX OR NOT DVIPS)
45+
endif (NOT LATEX_FOUND)
4646

4747
# export HAVE_GMT_DEBUG_SYMBOLS
4848
get_directory_property (_dir_defs COMPILE_DEFINITIONS)

0 commit comments

Comments
 (0)