FLTK logo

Re: [fltk/fltk] Cannot build project with CMake (add_library cannot create ALIAS target "fltk" because target "fltk::fltk" is imported but not globally visible) (Issue #970)

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 ]

Re: [fltk/fltk] Cannot build project with CMake (add_library cannot create ALIAS target "fltk" because target "fltk::fltk" is imported but not globally visible) (Issue #970) Alejandro Suárez 03:14 May 09  
 

@Albrecht-S Thank you for your rapid response!

Actually, I have a strong preference for avoiding setting the FLTK_DIR path in the project's CMakeLists.txt file, because I prefer this file to be agnostic as to where FLTK is installed - i.e. I don't want it to reflect FLTK's location in my particular computer. However, I've tried setting it directly in CMakeLists.txt and the problem persists. I'm pretty sure CMake it's locating the correct FLTK installation. I output FLTK version to stdout whenever I execute cmake, and the reported version is 1.4 (as it should be). Like I said, the project compiles just fine when I comment out lines 87 to 119 of FLTKConfig.cmake, and it identifies the correct FLTK version (1.4, rather than the one provided by my package manager, which is much older, 1.3.something). Plus, I use features exclusive to 1.4 that are not available in the system-wide installation of FLTK.

I believe that the problem lies with CMake version. The version I use in this computer is 1.16, which should be fine according to README.CMake.txt. However, I've seen similar issues with alias exports with versions of CMake older than 1.23 in issues from other unrelated libraries. Out of curiosity, what version of CMake are you using?

Maybe the issue could just be solved by upgrading the CMake minimum requirement? I'll come back when I have a chance to try in a environment with a newer CMake.


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/970/2102373224@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'.