MantisBT - CMake
View Issue Details
0012036CMakeCMakepublic2011-03-31 23:332015-06-01 08:38
Mark Abraham 
Miguel Figueroa 
lowminoralways
closedfixed 
Win32Cygwin1.7
CMake-2-8 
 
0012036: Under Cygwin, FindLATEX does not find installed tools
Modules/FindLATEX.cmake searches for ps2pdf differently according to whether the machine is WIN32 or not. However, ps2pdf can be present as a Cygwin package, and the FIND_PROGRAM tests as written will not find it.
1. Install cygwin with cygwin ghostscript package
2. Do not install Windows native Ghostscript
3. Use cmake FIND_PACKAGE(LATEX)
4. Observe failure to find ps2pdf from ghostscript installation
I recommend the code at the end of Modules/FindLATEX.cmake change to:

IF (WIN32)
  IF (CYGWIN)
    FIND_PROGRAM(PS2PDF_CONVERTER
      NAMES ps2pdf14 ps2pdf ps2pdf14.bat
      PATHS ${GHOSTSCRIPT_LIBRARY_PATH}
    )
  ELSE (CYGWIN)
    FIND_PROGRAM(PS2PDF_CONVERTER
      NAMES ps2pdf14.bat
      PATHS ${GHOSTSCRIPT_LIBRARY_PATH}
    )
  ENDIF (CYGWIN)
ELSE (WIN32)
  FIND_PROGRAM(PS2PDF_CONVERTER
    NAMES ps2pdf14 ps2pdf
  )
ENDIF (WIN32)

I've tested this, and it will find Cygwin-native tools in preference to native Windows ones.
No tags attached.
related to 0015198closed Brad King ps2pdf not detected when cross-compiling 
has duplicate 0012478closed Brad King Under Cygwin, FindLATEX does not find installed tools 
Issue History
2011-03-31 23:33Mark AbrahamNew Issue
2011-09-30 03:25Mark AbrahamNote Added: 0027495
2011-09-30 16:14Brad KingRelationship addedhas duplicate 0012478
2011-09-30 16:14Brad KingAssigned To => Miguel Figueroa
2011-09-30 16:14Brad KingStatusnew => assigned
2011-09-30 16:15Brad KingNote Added: 0027498
2014-12-28 07:07gruenichNote Added: 0037536
2015-01-04 19:41Mark AbrahamNote Added: 0037553
2015-01-08 10:53Brad KingRelationship addedrelated to 0015198
2015-01-08 10:54Brad KingNote Added: 0037628
2015-01-08 10:54Brad KingStatusassigned => resolved
2015-01-08 10:54Brad KingResolutionopen => fixed
2015-06-01 08:38Robert MaynardNote Added: 0038830
2015-06-01 08:38Robert MaynardStatusresolved => closed

Notes
(0027495)
Mark Abraham   
2011-09-30 03:25   
Maybe this should be in category "Modules"
(0027498)
Brad King   
2011-09-30 16:15   
Assigned to Miguel, the current FindLATEX module maintainer:

  http://www.cmake.org/Wiki/CMake:Module_Maintainers [^]
(0037536)
gruenich   
2014-12-28 07:07   
This issue was fixed (not tested, just be reading the code) in commit 63262434bf0d71340230d6a7a4d93f583b549a10 while fixing 0015198.
(0037553)
Mark Abraham   
2015-01-04 19:41   
Yes, it does look like this has been fixed
(0037628)
Brad King   
2015-01-08 10:54   
The fix linked in 0015198:0036998 resolves this issue.
(0038830)
Robert Maynard   
2015-06-01 08:38   
Closing resolved issues that have not been updated in more than 4 months.