Skip to content

Commit

Permalink
cmake: Use the builtin FindLATEX module to search for latex (#8510)
Browse files Browse the repository at this point in the history
  • Loading branch information
seisman committed Jun 2, 2024
1 parent b9c1536 commit 9b1914a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
3 changes: 1 addition & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,7 @@ if (DO_EXAMPLES OR DO_TESTS AND NOT GRAPHICSMAGICK)
endif (DO_EXAMPLES OR DO_TESTS AND NOT GRAPHICSMAGICK)

# Find latex and dvips for LaTeX integration
find_program (LATEX latex)
find_program (DVIPS dvips)
find_package (LATEX COMPONENTS DVIPS)

# Add subdirectories
add_subdirectory (src)
Expand Down
4 changes: 2 additions & 2 deletions doc/scripts/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,9 @@ foreach (skip_test GMT_-U.sh GMT_encoding.sh gen_data_App_O.sh gen_data_dummy.sh
endforeach()

# Remove GMT_latex.sh if latex or dvips not found
if (NOT LATEX OR NOT DVIPS)
if (NOT LATEX_FOUND)
list (REMOVE_ITEM _scripts_tests doc/scripts/GMT_latex.sh doc/scripts/GMT_slope2intensity.sh doc/scripts/GMT_seamount_density.sh)
endif (NOT LATEX OR NOT DVIPS)
endif (NOT LATEX_FOUND)

if (DO_TESTS AND BASH)
foreach (_job ${_scripts_tests})
Expand Down
4 changes: 2 additions & 2 deletions test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ if (DO_TESTS)
endif (NOT DO_SUPPLEMENT_TESTS)

# Remove latex-specific tests if latex or dvips not found
if (NOT LATEX OR NOT DVIPS)
if (NOT LATEX_FOUND)
list (REMOVE_ITEM GMT_TEST_DIRS latex)
endif (NOT LATEX OR NOT DVIPS)
endif (NOT LATEX_FOUND)

# export HAVE_GMT_DEBUG_SYMBOLS
get_directory_property (_dir_defs COMPILE_DEFINITIONS)
Expand Down

0 comments on commit 9b1914a

Please sign in to comment.