Open spl opened 5 years ago
Do you already have -DGRAPHITE2_NFILEFACE=OFF
? I assume so as the examples test shouldn't get built unless that's the case. You can also get a more targeted approach by setting -DGRAPHITE2_NFILEFACE=ON
As that will prevent any test code that depends on the fileface from being built (at the expense of being unavailable in your static lib). If you cannot get a clean build and make test with -DGRAPHITE2_NFILEFACE=ON
, then there are definitely issues.
I'll try to reproduce here in the mean time.
Do you already have
-DGRAPHITE2_NFILEFACE=OFF
?
The build log shows:
-- File Face support: enabled
I'm building on Travis-CI, so you can see the build history there.
With -DGRAPHITE2_NFILEFACE=ON
and without the aforementioned changes to CMakeLists.txt
, the build still fails. I get 7 errors instead of 124, and most of them are linking errors (LNK2019
).
Also, I should have mentioned this, in case it matters: Travis-CI is using Visual Studio 15 2017.
I think I am having the same or a similar issue, but I am building with MSYS2/MinGW. See my report here: https://github.com/msys2/MINGW-packages/issues/5619
Edit: I am trying to build version 1.3.13.
I was able to resolve my issue by patching the CMake configurations. See here: https://github.com/msys2/MINGW-packages/issues/5619#issuecomment-514544744
The patch may not work for everyone as there are other patches applied in the MSYS2/MinGW-w64 package before mine. But I was able to come up with it looking over this patch for version 1.3.10.
@AntumDeluge Thanks for adding your voice to this issue.
It seems like the changes to CMakeLists.txt
are rather straightforward for a static MSVC/MinGW build. Would the maintainers have time to look into this before the next release? @tim-eves?
I'm trying to build a static library on Windows (using MSVC). Given that I'm not that familiar with
cmake
and building on Windows, I'm a bit lost in the dark. But perhaps you can help me shed some light on the problem.First, here's what I run:
With this, I get a number of errors:
Now, if I make the following change (inspired by https://github.com/Microsoft/vcpkg/pull/3102 and the
fix-static-build.patch
):the build is successful.
Is that the right change to make? If so, can
CMakeLists.txt
be updated with flags to support this? If not, what should I be doing differently or what can be done to support a static build on Windows?