FLTK logo

STR #3415

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 
 Home  |  Articles & FAQs  |  Bugs & Features  |  Documentation  |  Download  |  Screenshots  ]

Return to Bugs & Features | Post Text | Post File | SVN ⇄ GIT | Prev | Next ]

STR #3415

Application:FLTK Library
Status:3 - Active
Priority:3 - Moderate, e.g. unable to compile the software
Scope:2 - Specific to an operating system
Subsystem:Build Files
Summary:CMake: Programs may need some definitions from FLTK to work correctly
Created By:taeril
Assigned To:AlbrechtS
Fix Version:Unassigned
Update Notification:

Receive EMails Don't Receive EMails

Trouble Report Files:

Post File ]
Name/Time/Date Filename/Size  
#1 taeril
07:02 Oct 08, 2017
#2 taeril
07:03 Oct 08, 2017
#3 taeril
07:03 Oct 08, 2017
#4 taeril
07:05 Oct 08, 2017

Trouble Report Comments:

Post Text ]
Name/Time/Date Text  
#1 taeril
07:02 Oct 08, 2017
I was playing with fl_filename_isdir to see how it work and my code was
based on usage inside FLTK. Just list files and print names, but while
I got correct number of entries there was no names!
It was cmake build for Linux.
More curious same code crosscompiled for windows run OK printing
names as expected.
Even more interesting slimed down code to report one file compiled by
fltk-config worked OK.

As it turns out I need one of:
to make it work.

I don't see how I can get those in cmake build so with small change:

diff --git a/CMake/FLTKConfig.cmake.in b/CMake/FLTKConfig.cmake.in
index baa25a6..62c8af5 100644
--- a/CMake/FLTKConfig.cmake.in
+++ b/CMake/FLTKConfig.cmake.in
@@ -13,4 +13,5 @@ set(FLTK_VERSION @FLTK_VERSION_FULL@)


I can in my CMakeLists.txt use  add_definitions(${FLTK_DEFINITIONS})  and
have program working correctly.

Above is what I sent to mailing list some time ago. Attached patch highlights additionally two places documenting that added line, but maybe there is more to say about it?

Tested on Linux with current svn version r12482
#2 taeril
07:12 Oct 08, 2017
I've added simple program showing error. Compiling with cmake shows only numbers - no filenames. Using fltk-config - all is OK.
CMakeLists.txt have add_definitions utilizing changes from my patch.

Additionally target_includes_and_definitions.diff make cmake automatically add definitions and include directories making calls to include_directories and add_definitions unnecessary.

Based on online documentation 2.8.11 is first version with needed functionality, but I tested it only with cmake 3.9.1
#3 AlbrechtS
08:25 Oct 13, 2017
Thanks for the report and the patches. Our CMake support files are not yet complete, so this will be one step forward.

The patches look good at a first glance. I'll take a closer look later when time permits.

Note: changed subject (aka "Summary") to mark the STR with CMake.

Return to Bugs & Features | Post Text | Post File ]


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'.