floooh / fips-bgfx

fipsified version of bgfx (https://github.com/bkaradzic/bgfx)
17 stars 8 forks source link

"bgfx shaderc not found" in a clean build #15

Open fo-fo opened 7 years ago

fo-fo commented 7 years ago

I was trying to create a simple project just to try fips and bgfx out.

I get the following error when doing a clean build (fips build in the mytest directory with nothing else in the fips-workspace directory): "[ERROR] bgfx shaderc executable not found, please run 'make tools' in bgfx directory:"

InitializeBuildStatus:
  Touching "x64\Debug\ALL_GENERATE\ALL_GENERATE.tlog\unsuccessfulbuild".
CustomBuild:
  Building Custom Rule C:/dev/practice/fips/fips-workspace/fips-bgfx/CMakeLists.txt
  CMake does not need to re-run because C:\dev\practice\fips\fips-workspace\fips-build\mytest\win64-vstudio-debug\fips-
  bgfx_bgfx\CMakeFiles\generate.stamp is up-to-date.
  [ERROR] bgfx shaderc executable not found, please run 'make tools' in bgfx directory:
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppCommon.targets(171,5): error MSB6006: "cmd.exe" exi
ted with code 10. [C:\dev\practice\fips\fips-workspace\fips-build\mytest\win64-vstudio-debug\fips-bgfx_bgfx\ALL_GENERAT
E.vcxproj]
Done Building Project "C:\dev\practice\fips\fips-workspace\fips-build\mytest\win64-vstudio-debug\fips-bgfx_bgfx\ALL_GEN
ERATE.vcxproj" (default targets) -- FAILED.

CMakeLists.txt:

cmake_minimum_required(VERSION 2.8)
get_filename_component(FIPS_ROOT_DIR "../fips" ABSOLUTE)
include("${FIPS_ROOT_DIR}/cmake/fips.cmake")
fips_setup(PROJECT mytest)
fips_begin_app(foo cmdline)
    fips_src(src)
    fips_deps(bgfx bgfx-examples-common)
fips_end_app()
fips_finish()

src directory simply contains helloworld.cpp and logo.h from the bgfx 00-helloworld example.

This is easily fixed by doing fips build in the fips-bgfx directory, but is it possible to avoid the extra step? (I like the idea of git clone, fips build, done.)

floooh commented 7 years ago

Ooops sorry about that. The idea is definitely that it should build out of the box, but I haven't worked in this repo for a long time, may be some things have rotted or not properly tested (for instance I see you're on Windows, I don't know if this received proper testing).

I'll try to have a look but it might be a few days. If you want to get a bit familiar with fips alone in the meantime you can use Oryol for testing, or even just https://github.com/floooh/fips-hello-world :)