TheGoodDoktor / 8BitAnalysers

MIT License
83 stars 11 forks source link

Clean build fails with lua.lib file missing on Windows 10 and 11 #40

Open kborowinski opened 6 months ago

kborowinski commented 6 months ago

@TheGoodDoktor Clean build fails with lua.lib file missing on Windows 10 and 11: image

Build script:

cmake.exe -S Source\ZXSpectrum -B build
msbuild.exe build\SpectrumAnalyser.vcxproj /P:Configuration="Release"
kborowinski commented 6 months ago

@TheGoodDoktor After a bit of tinkering, I have found the issue. And this boils down to the following:

  1. The lua shared libs are not build set(BUILD_SHARED_LIBS OFF) so clean build will fail
  2. Changing it to ON does not help since the CMAKE will happily igore it due how CMAKE handles the option() command

The fix is to cache the variable so it does not get overwritten later: set(BUILD_SHARED_LIBS CACHE STRING "ON" FORCE)

I'll make PR shortly.

TheStruggleForAntiSpaghetti commented 6 months ago

Also ran into this issue myself. I was able to build it once, but keeps being a bit cumbersome. Thank you in advance for helping to solve it.