Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/root-ci-config/buildconfig/global.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ builtin_gsl=OFF
builtin_llvm=ON
builtin_lz4=OFF
builtin_lzma=OFF
builtin_mathtext=ON
builtin_nlohmannjson=OFF
builtin_openssl=OFF
builtin_mathjax=ON
Expand Down
1 change: 0 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,6 @@ add_subdirectory (hist)
add_subdirectory (tree)
add_subdirectory (io)
add_subdirectory (net)
add_subdirectory (builtins/libmathtext) # hard coded builtin for graf2d
if (x11)
add_subdirectory (builtins/xvertext) # hard coded builtin for graf2d/x11
endif()
Expand Down
10 changes: 6 additions & 4 deletions builtins/libmathtext/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# For the licensing terms see $ROOTSYS/LICENSE.
# For the list of contributors see $ROOTSYS/README/CREDITS.

add_library(mathtext STATIC
add_library(BUILTIN_MATHTEXT STATIC
fontembed.cc
fontembedpdf.cc
fontembedps.cc
Expand All @@ -17,15 +17,17 @@ add_library(mathtext STATIC
mathtextparse.cc
mathtextview.cc
)
target_include_directories(mathtext PUBLIC ./) # for mathtext/fontembed.h mathtext/mathrender.h mathtext/mathtext.h mathtext/geometry.h
target_include_directories(BUILTIN_MATHTEXT PUBLIC ./) # for mathtext/fontembed.h mathtext/mathrender.h mathtext/mathtext.h mathtext/geometry.h

check_cxx_compiler_flag(-Wbidi-chars=none GCC_HAS_BIDI_CHARS_FLAG)
if(GCC_HAS_BIDI_CHARS_FLAG)
set_source_files_properties(fontembed.cc COMPILE_FLAGS "-Wbidi-chars=none")
endif()
if (WIN32)
if (CMAKE_C_BYTE_ORDER STREQUAL "LITTLE_ENDIAN" OR CMAKE_CXX_BYTE_ORDER STREQUAL "LITTLE_ENDIAN")
target_compile_definitions(mathtext PRIVATE LITTLE_ENDIAN=1)
target_compile_definitions(BUILTIN_MATHTEXT PRIVATE LITTLE_ENDIAN=1)
endif()
endif()
set_property(TARGET mathtext PROPERTY POSITION_INDEPENDENT_CODE ON)
set_property(TARGET BUILTIN_MATHTEXT PROPERTY POSITION_INDEPENDENT_CODE ON)

add_library(mathtext::mathtext ALIAS BUILTIN_MATHTEXT)
4 changes: 3 additions & 1 deletion cmake/modules/RootBuildOptions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ ROOT_BUILD_OPTION(builtin_llvm ON "Build bundled copy of LLVM (advanced option)"
MARK_AS_ADVANCED(builtin_llvm)
ROOT_BUILD_OPTION(builtin_lz4 OFF "Build lz4 from an automatically downloaded source tarball (requires network)")
ROOT_BUILD_OPTION(builtin_lzma OFF "Build lzma from an automatically downloaded source tarball (requires network)")
ROOT_BUILD_OPTION(builtin_mathtext ON "Build mathtext from an in-built source tarball (does not require network)")
ROOT_BUILD_OPTION(builtin_nlohmannjson OFF "Build nlohmann/json from an automatically downloaded source tarball (requires network)")
ROOT_BUILD_OPTION(builtin_openssl OFF "Build OpenSSL from an automatically downloaded source tarball (requires network)")
ROOT_BUILD_OPTION(builtin_mathjax OFF "Install mathjax package for mathtext rendering in JSROOT (requires network)")
Expand Down Expand Up @@ -267,6 +268,7 @@ if(builtin_all)
set(builtin_llvm_defvalue ON)
set(builtin_lz4_defvalue ON)
set(builtin_lzma_defvalue ON)
set(builtin_mathtext_defvalue ON)
set(builtin_nlohmannjson_defvalue ON)
if(APPLE)
set(builtin_openssl_defvalue ON)
Expand Down Expand Up @@ -316,7 +318,7 @@ endif()

#---Apply minimal or gminimal------------------------------------------------------------------
foreach(opt ${root_build_options})
if(NOT opt MATCHES "builtin_llvm|builtin_clang|builtin_cling|shared|runtime_cxxmodules|thisroot_scripts")
if(NOT opt MATCHES "builtin_llvm|builtin_clang|builtin_cling|builtin_mathtext|shared|runtime_cxxmodules|thisroot_scripts")
if(minimal)
set(${opt}_defvalue OFF)
elseif(gminimal AND NOT opt MATCHES "x11|cocoa")
Expand Down
6 changes: 5 additions & 1 deletion cmake/modules/SearchInstalledSoftware.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ if(mathmore OR (tmva-cpu AND use_gsl_cblas))
endif()
endif()
endif()

ROOT_FIND_REQUIRED_DEP(mathtext builtin_mathtext)

if(NOT "${MISSING_PACKAGES}" STREQUAL "")
list(REMOVE_DUPLICATES MISSING_PACKAGES)
Expand Down Expand Up @@ -756,6 +756,10 @@ if(opengl AND builtin_ftgl)
add_subdirectory(builtins/ftgl)
endif()

if (builtin_mathtext)
add_subdirectory (builtins/libmathtext) # hard coded builtin for graf2d
endif()

#---Check for Davix library-----------------------------------------------------------
foreach(suffix FOUND INCLUDE_DIR INCLUDE_DIRS LIBRARY LIBRARIES)
unset(DAVIX_${suffix} CACHE)
Expand Down
2 changes: 1 addition & 1 deletion graf2d/graf/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ ROOT_STANDARD_LIBRARY_PACKAGE(Graf
LIBRARIES
Freetype::Freetype
ZLIB::ZLIB
mathtext
mathtext::mathtext
DEPENDENCIES
Hist
Matrix
Expand Down
2 changes: 1 addition & 1 deletion graf2d/postscript/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ ROOT_STANDARD_LIBRARY_PACKAGE(Postscript
-writeEmptyRootPCM
LIBRARIES
ZLIB::ZLIB
mathtext
mathtext::mathtext
DEPENDENCIES
Graf
)
Expand Down
Loading