FLTK logo

[fltk/fltk] Generating 'fltk.pdf' on Windows (Issue #731)

FLTK matrix user chat room
(using Element browser app)   FLTK gitter user chat room   GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 All Forums  |  Back to fltk.issues  ]
 
Previous Message ]New Message | Reply ]Next Message ]

[fltk/fltk] Generating 'fltk.pdf' on Windows (Issue #731) Gisle Vanem 06:12 Jun 02  
 

With these CMake options -DOPTION_BUILD_PDF_DOCUMENTATION=1,
the documentation/CMakeLists.txt snippet:

  add_custom_command (
    OUTPUT  ${CMAKE_CURRENT_BINARY_DIR}/fltk.pdf
    COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/make_header  << ! this
            ${CMAKE_CURRENT_BINARY_DIR}/fltk-title.tex
            ${CMAKE_CURRENT_BINARY_DIR}/fltk-book.tex
    COMMAND ${DOXYGEN_EXECUTABLE} Doxybook
    COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/make_pdf   << ! and this

caused a failure in the MSbuild process: make_header is not recognized as an internal or external command

But w/o knowing much about CMake, I patched it like this:

--- a/documentation/CMakeLists.txt 2023-01-26 10:54:43
+++ b/documentation/CMakeLists.txt 2023-06-02 13:54:41
@@ -187,11 +187,11 @@

   add_custom_command (
     OUTPUT  ${CMAKE_CURRENT_BINARY_DIR}/fltk.pdf
-    COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/make_header
+    COMMAND sh ${CMAKE_CURRENT_SOURCE_DIR}/make_header
             ${CMAKE_CURRENT_BINARY_DIR}/fltk-title.tex
             ${CMAKE_CURRENT_BINARY_DIR}/fltk-book.tex
     COMMAND ${DOXYGEN_EXECUTABLE} Doxybook
-    COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/make_pdf
+    COMMAND sh ${CMAKE_CURRENT_SOURCE_DIR}/make_pdf
     COMMAND cp -f latex/refman.pdf fltk.pdf
     DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/Doxybook
             ${CMAKE_CURRENT_BINARY_DIR}/fltk-title.tex

and the fltk.pdf file (26 MByte!) produced was amazing!

Not sure how this sh (a Cygwin 64-bit version in my case)
should get in there properly. I would assume CMake would detect
it is a shell script and prefix the command with with sh itself.
But no.

FLTK Version

  • Downloaded and self-built from: git master today.

FLTK Configure / Build Options:

 cmake -G"Visual Studio 17 2022" -DOPTION_USE_SYSTEM_LIBJPEG=0 ^
         -DOPTION_USE_SYSTEM_LIBPNG=0  ^
         -DOPTION_USE_SYSTEM_ZLIB=0  ^
         -DOPTION_BUILD_PDF_DOCUMENTATION=1 ^
         -DOPTION_INSTALL_PDF_DOCUMENTATION=1 ^
         -DCMAKE_BUILD_TYPE=RelWithDebInfo ^
         -DCMAKE_INSTALL_PREFIX=%~dp0\gv-install ^
         -DCMAKE_CXX_FLAGS_RELEASE="-MD -O2 -Ob2" ^
         -DCMAKE_C_FLAGS_RELEASE="-MD -O2 -Ob2" ..

(the above inserted in a build.bat file and ran from an empty build directory).

Operating System / Platform: OS: Windows-10


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <fltk/fltk/issues/731@github.com>

Direct Link to Message ]
 
     
Previous Message ]New Message | Reply ]Next Message ]
 
 

Comments are owned by the poster. All other content is copyright 1998-2024 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.