Building without Qt
Running cmake for GLE 4.3.4 fails with this message:
CMake Error at gui/CMakeLists.txt:10 (find_package):
By not providing "FindQt5.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "Qt5", but
CMake did not find one.
Could not find a package configuration file provided by "Qt5" with any of
the following names:
Qt5Config.cmake
qt5-config.cmake
Add the installation prefix of "Qt5" to CMAKE_PREFIX_PATH or set "Qt5_DIR"
to a directory containing one of the above files. If "Qt5" provides a
separate development package or SDK, be sure it has been installed.
-- Configuring incomplete, errors occurred!
I was able to build only the non-Qt parts of GLE 4.2.5 using the configure argument --with-qt=no. Now that the build system has been converted to CMake in GLE 4.3.x, what is the equivalent CMake option to build only the non-Qt parts?
This patch allowed me to get through cmake and make without having Qt (or ghostscript which as far as I know is only used by the Qt GUI):
--- src/CMakeLists.txt.orig 2023-04-10 19:46:19.000000000 -0500
+++ src/CMakeLists.txt 2024-07-26 06:22:10.000000000 -0500
@@ -228,14 +228,6 @@
#
#find_package(poppler)
#
-# -- GHOSTscript or GHOSTPDL include directory only since gle links to installed version at runtime
-#
-find_path(GDIR1 iapi.h PATHS ${GHOSTPDL_ROOT} PATH_SUFFIXES psi base devices ghostscript )
-list(APPEND GHOSTPDL_INCLUDE_DIRS ${GDIR1} )
-find_path(GDIR2 gdevdsp.h PATHS ${GHOSTPDL_ROOT} PATH_SUFFIXES psi base devices ghostscript )
-list(APPEND GHOSTPDL_INCLUDE_DIRS ${GDIR2} )
-find_path(GDIR3 gserrors.h PATHS ${GHOSTPDL_ROOT} PATH_SUFFIXES psi base devices ghostscript )
-list(APPEND GHOSTPDL_INCLUDE_DIRS ${GDIR3} )
include_directories(
${ZLIB_INCLUDE_DIRS}
@@ -245,7 +237,6 @@
${PNG_INCLUDE_DIRS}
${CAIRO_INCLUDE_DIRS}
${PIXMAN_INCLUDE_DIRS}
- ${GHOSTPDL_INCLUDE_DIRS}
)
#
# -- compile time definitions
@@ -450,12 +441,10 @@
endif()
add_subdirectory(fbuild)
add_subdirectory(makefmt)
-add_subdirectory(gui)
add_subdirectory(fonts)
add_subdirectory(TeX)
add_dependencies(fbuild gle)
add_dependencies(makefmt gle)
-add_dependencies(qgle gle)
add_dependencies(fonts fbuild makefmt)
# documentation file installation in doc folder
However make install didn't actually install anything.
What I expected it to install—what GLE 4.2.5 installed—is:
$PREFIX/bin/gle
$PREFIX/bin/glebtool
$PREFIX/bin/glegs
$PREFIX/bin/manip
$PREFIX/lib/libgle-graphics-$VERSION.dylib
$PREFIX/lib/pkgconfig/gle-graphics.pc
$PREFIX/share/gle-graphics/$VERSION/*
$PREFIX/share/man/man1/gle.1
However
make installdidn't actually install anything.
I see this is because files only get installed when CMAKE_BUILD_TYPE is Release or Debug:
https://github.com/vlabella/GLE/blob/97cf2ca024ef9a12abf6fe6024439faf0c82a0e8/src/gle/CMakeLists.txt#L192-L194
(I was using a different build type.) This was also noted in #10.
added cmake option BUILD_GUI which is on by default. Can be turned off by setting -DBUILD_GUI=FALSE when running cmake to eliminate the building of the GUI. Note that ghostscript is utilized by the CLI gle to make bitmap files like PNG.