FLTK logo

STR #3298

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 | Roadmap 1.3 | SVN ⇄ GIT ]

STR #3298

Application:FLTK Library
Status:1 - Closed w/Resolution
Priority:2 - Low, e.g. a documentation error or undocumented side-effect
Scope:3 - Applies to all machines and operating systems
Subsystem:Build Files
Summary:remove redundant linking in CMake build process
Version:1.3-current
Created By:mjsurette
Assigned To:AlbrechtS
Fix Version:1.3.4 (SVN: v11442)
Update Notification:

Receive EMails Don't Receive EMails

Trouble Report Files:


Name/Time/Date Filename/Size  
 
#1 mjsurette
11:02 Mar 26, 2016
remove_redundant.patch
1k
 
 
#2 mjsurette
17:55 Mar 28, 2016
shared.patch
1k
 
     

Trouble Report Comments:


Name/Time/Date Text  
 
#1 mjsurette
11:02 Mar 26, 2016
The lines at the end of the CMake macro CREATE_EXAMPLE link optional libraries to an example.  These libraries are already linked to the FLTK libraries and so this linking is redundant.

The attached patch removes these unneeded lines.

Mike
 
 
#2 AlbrechtS
14:09 Mar 27, 2016
Fixed in Subversion repository.

Thank you for your continuing support to improve our CMake build system.

To the patch: I had to add libXrender to the linked libraries in src/CMakeLists.txt, but then I could also remove the "optional" libraries from fluid/CMakeLists.txt.

This does not only remove redundant libs from the linker commandline, it also simplifies the CMake files. That's good!

I hope you can confirm the correctness of my additional fixes in svn r11442. TIA.


Note: I also committed another (not directly related) update in svn r 11444 that removes duplicate code in src/CMakeLists.txt by putting file and library lists in variables so they can be shared when building static and shared libs.
 
 
#3 mjsurette
17:54 Mar 28, 2016
I like the organization: very clear and easy to follow.

You did however, rename the shared libraries to the same name as the static libraries and proceed to link the optional libraries against the old name.

The attached patch gives the shared libraries their old names back, which should avoid any unpleasantness when building shared libraries.
 
 
#4 AlbrechtS
02:46 Mar 29, 2016
Doh, thanks for finding that. Silly copy'n'paste error.

I'll fix this ASAP.
 
 
#5 AlbrechtS
03:03 Mar 29, 2016
The shared library name issue (shared.patch) is fixed now in r11460 (r11461 in branch-1.3-porting).  
 
#6 AlbrechtS
03:41 Mar 29, 2016
I reverted the commits of shared.patch.

The code was correct, and my commit (r11444) didn't change the library names in these lines.

FL_ADD_LIBRARY needs the bare library name with the SHARED argument and CMake adds the _SHARED prefix to the _target_ name. The following lines use the target name (with _SHARED suffix).
 
     

Return to Bugs & Features ]

 
 

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