View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0007809CMakeModulespublic2008-10-13 20:062009-02-23 22:42
ReporterRodolfo Schulz de Lima 
Assigned ToPhilip Lowman 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product VersionCMake-2-6 
Target VersionFixed in VersionCMake-2-6 
Summary0007809: [patch] FLTK isn't detected on Gentoo
DescriptionGentoo installs FLTK's header files in /usr/include/fltk-1.1 and its libraries in /usr/lib/fltk-1.1. The current FindFLTK fails to detected it.
Additional InformationI've modified FindFLTK.cmake to use fltk-config whenever the current algorithm fails to detect the required files. It works for me on Gentoo.
TagsNo tags attached.
Attached Filesdiff file icon fix_fltk_detection.diff [^] (1,701 bytes) 2008-10-13 20:06 [Show Content]
patch file icon fix_fltk_trim_inc_dir.patch [^] (296 bytes) 2009-01-22 20:15 [Show Content]

 Relationships

  Notes
(0014136)
Rodolfo Schulz de Lima (reporter)
2008-11-19 15:03

Any feedback on this?
(0014658)
Philip Lowman (developer)
2009-01-21 23:55

Thanks for the bug report and patch!

I committed your patch with a few minor tweaks.
* Made OpenGL optional
* The fltk-config detected stuff now gets added to the search paths instead of being assigned directly
* Stripped -D defines from fltk-config --cxxflags

Testing would be appreciated if you have the time.

lowman@locke:~/cvs/CMake_write/Modules$ cvs commit FindFLTK.cmake
Committer: Philip Lowman <philip@yhbt.com>
/cvsroot/CMake/CMake/Modules/FindFLTK.cmake,v <-- FindFLTK.cmake
new revision: 1.39; previous revision: 1.38

(0014672)
Rodolfo Schulz de Lima (reporter)
2009-01-22 20:14

Doesn't work yet, the _FLTK_POSSIBLE_INCLUDE_DIRS variable should have its leading spaces removed (as it occurs on my system).

I've attached a little patch to correct this. With it applied, FindFLTK works fine.

While we're at it, wouldn't it be better to get the include paths from fltk-config output using:

STRING(REGEX MATCHALL "-I[^ ]*" _FLTK_POSSIBLE_INCLUDE_DIRS ${FLTK_CXXFLAGS})
STRING(REPLACE ";" " " _FLTK_POSSIBLE_INCLUDE_DIRS "${_FLTK_POSSIBLE_INCLUDE_DIRS}")
STRING(REPLACE "-I" "" _FLTK_POSSIBLE_INCLUDE_DIRS "${_FLTK_POSSIBLE_INCLUDE_DIRS}")

? IMHO it's more resilient to other switches that might be present in FLTK_CXXFLAGS (apart the -D ones you already took care of). The only issue with above solution is if there are spaces in the include path (windows?), but a better regexp could be used.
(0014673)
Philip Lowman (developer)
2009-01-23 00:35

lowman@locke:~/cvs/CMake_write/Modules$ cvs commit FindFLTK.cmake
Committer: Philip Lowman <philip@yhbt.com>
/cvsroot/CMake/CMake/Modules/FindFLTK.cmake,v <-- FindFLTK.cmake
new revision: 1.40; previous revision: 1.39

Thanks, that does work much better. I didn't like removing the ";" though because I wanted a list of possible includes not a string with spaces. I left the STRIP in there for good measure although I think it may be superfluous now.

I'm fine with the limitation of no spaces in filenames.

Also, I added some control variables to allow more control over FLTK_FOUND and FLTK_LIBRARIES.
(0015305)
Philip Lowman (developer)
2009-02-23 22:42

Thanks for the help with this, fix available in 2.6.3

 Issue History
Date Modified Username Field Change
2008-10-13 20:06 Rodolfo Schulz de Lima New Issue
2008-10-13 20:06 Rodolfo Schulz de Lima File Added: fix_fltk_detection.diff
2008-11-19 15:03 Rodolfo Schulz de Lima Note Added: 0014136
2009-01-20 23:44 Philip Lowman Status new => assigned
2009-01-20 23:44 Philip Lowman Assigned To => Philip Lowman
2009-01-21 23:55 Philip Lowman Note Added: 0014658
2009-01-21 23:55 Philip Lowman Resolution open => fixed
2009-01-22 17:53 Rodolfo Schulz de Lima Note Added: 0014669
2009-01-22 18:33 Rodolfo Schulz de Lima Note Deleted: 0014669
2009-01-22 20:14 Rodolfo Schulz de Lima Note Added: 0014672
2009-01-22 20:15 Rodolfo Schulz de Lima File Added: fix_fltk_trim_inc_dir.patch
2009-01-23 00:35 Philip Lowman Note Added: 0014673
2009-01-27 01:06 Philip Lowman Status assigned => resolved
2009-02-23 22:42 Philip Lowman Note Added: 0015305
2009-02-23 22:42 Philip Lowman Status resolved => closed
2009-02-23 22:42 Philip Lowman Fixed in Version => CMake-2-6


Copyright © 2000 - 2018 MantisBT Team