Hi Phil,
I have started to move my projects from MSVC Solutions on
Windows and Makefile on Linux.
Hmm, I can't parse the above sentence. Did you mean to append "...
to CMake" (on both platforms)?
I have successfully managed to move from Makefile to
CMakeLists.txt on Linux.
OK, great. I assume that applies to your application *and* to
building the FLTK library itself, right?
When I clone the repo on Windows I found an issue.
First, I had to learn how to install FLTK from sources on
MSVC. I eventually found this by using the Developer Power Shell
and running "sudo cmake --install ."
Hmm, didn't you move "from MSVC ... to ??". What exactly are you
doing (a) to build FLTK and (b) to build your application? Just for
my understanding. ;-)
I then had to remove my requiring version 1.4.4 as I am using
bleeding edge 1.5 check-out on Windows. I am using 1.4.4 on
Linux as there is another app (not mine) that doesn't yet work
with 1.5.
OK, but we're now talking about FLTK 1.5
on Windows ?
Now the problem: It seems to be looking for lib/blocks.lib as
fltk::blocks appears to be required. I remember seeing a comment
in the CMakesList that all fltk::* targets are looked for. I
pulled the latest git and the problem is still there.
Which CMakeLists.txt? There are always two involved, one for FLTK
itself, and one for your application.
Anyway, fltk::blocks should never be required to build your
application. If at all, fltk::blocks would be an executable that's
built during the FLTK build (and not a library). Hence fltk::blocks
should not be required, nor should it resolve to "C:/Program Files (x86)/FLTK/lib/blocks.lib"
which would be a library that doesn't exist.
PS C:\Users\pvros\source\repos\qbs\build> cmake ..
CMake Error at C:/Program Files (x86)/FLTK/CMake/FLTK-Targets.cmake:163 (message):
The imported target "fltk::blocks" references the file
"C:/Program Files (x86)/FLTK/lib/blocks.lib"
but this file does not exist. Possible reasons include:
* The file was deleted, renamed, or moved to another location.
* An install or uninstall procedure did not complete successfully.
* The installation package was faulty and contained
"C:/Program Files (x86)/FLTK/CMake/FLTK-Targets.cmake"
but not all the files it references.
Call Stack (most recent call first):
C:/Program Files (x86)/FLTK/CMake/FLTKConfig.cmake:39 (include)
CMakeLists.txt:33 (find_package)
-- Configuring incomplete, errors occurred
OK, given your error message above, I suggest that you post your
"installed" file "C:/Program Files (x86)/FLTK/lib/blocks.lib" so I
can take a look at it. I've just been working on a very similar
issue on Debian (and Ubuntu), but that war very likely caused by
*modifying* the file during or after installation by the
distribution maintainers (see GitHub Issue #1314
(
https://github.com/fltk/fltk/discussions/1314).
As I wrote in the context of issue #1314, `FLTK-Targets.cmake` is a
file generated by CMake (instructions derived from the FLTK CMake
files), hence I wonder what's happening in your case.
Please post your `FLTK-Targets.cmake` file as requested above, then
I can take a look and try it myself on a Windows box - but not
today, it's too late here for new tests today...