Skip to content

Third party glslang needs a CMakeLists.txt #7

@Petross404

Description

@Petross404

I am getting this error about a missing cmakelist.txt

--   Libclang C library:  /usr/local/Cellar/llvm/11.0.0/lib/libclang.dylib
--   Builtin include dir: /usr/local/Cellar/llvm/11.0.0/lib/clang/11.0.0/include
CMake Error at CMakeLists.txt:44 (add_subdirectory):
  The source directory

    /Users/petros/projects/cide/third_party/glslang

  does not contain a CMakeLists.txt file.


CMake Warning at third_party/googletest/CMakeLists.txt:54 (project):
  VERSION keyword not followed by a value or was followed by a value that
  expanded to nothing.


-- Configuring incomplete, errors occurred!
See also "/Users/petros/projects/cide/build/CMakeFiles/CMakeOutput.log".

Commenting out the line that is adding the directory leads the compilation to fail later with:

FAILED: CMakeFiles/CIDEBaseLib.dir/src/cide/glsl_parser.cc.o 
/Library/Developer/CommandLineTools/usr/bin/c++ -DCIDEBaseLib_EXPORTS -DQT_CORE_LIB -DQT_GUI_LIB -DQT_HELP_LIB -DQT_NO_DEBUG -DQT_SQL_LIB -DQT_SVG_LIB -DQT_WIDGETS_LIB -I. -I../ -ICIDEBaseLib_autogen/include -I../src -I../third_party/yaml-cpp-0.6.3/include -I../third_party/googletest/include -I/usr/local/Cellar/llvm/11.0.0/include -I/usr/local/include -iframework /usr/local/opt/qt/lib -isystem /usr/local/opt/qt/lib/QtWidgets.framework/Headers -isystem /usr/local/opt/qt/lib/QtGui.framework/Headers -isystem /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/OpenGL.framework/Headers -isystem /usr/local/opt/qt/lib/QtCore.framework/Headers -isystem /usr/local/opt/qt/./mkspecs/macx-clang -isystem /usr/local/opt/qt/lib/QtHelp.framework/Headers -isystem /usr/local/opt/qt/lib/QtSql.framework/Headers -isystem /usr/local/opt/qt/lib/QtSvg.framework/Headers -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk -fPIC -Wall -Wextra -O2 -msse2 -msse3 -Wno-sign-compare -Wno-strict-overflow -fPIC -std=gnu++11 -MD -MT CMakeFiles/CIDEBaseLib.dir/src/cide/glsl_parser.cc.o -MF CMakeFiles/CIDEBaseLib.dir/src/cide/glsl_parser.cc.o.d -o CMakeFiles/CIDEBaseLib.dir/src/cide/glsl_parser.cc.o -c ../src/cide/glsl_parser.cc
../src/cide/glsl_parser.cc:147:21: error: excess elements in scalar initializer
    /* .limits = */ {
                    ^
../src/cide/glsl_parser.cc:157:6: warning: missing field 'doWhileLoops' initializer [-Wmissing-field-initializers]
    }};
     ^
../src/cide/glsl_parser.cc:145:42: warning: suggest braces around initialization of subobject [-Wmissing-braces]
    /* .maxDualSourceDrawBuffersEXT = */ 1,
                                         ^~
                                         {
../src/cide/glsl_parser.cc:343:19: error: use of undeclared identifier 'EShLangRayGen'; did you mean 'EShLangRayGenNV'?
    shaderStage = EShLangRayGen;
                  ^~~~~~~~~~~~~
                  EShLangRayGenNV
/usr/local/include/glslang/Public/ShaderLang.h:95:5: note: 'EShLangRayGenNV' declared here
    EShLangRayGenNV,
    ^
../src/cide/glsl_parser.cc:345:19: error: use of undeclared identifier 'EShLangIntersect'; did you mean 'EShLangIntersectNV'?
    shaderStage = EShLangIntersect;
                  ^~~~~~~~~~~~~~~~
                  EShLangIntersectNV
/usr/local/include/glslang/Public/ShaderLang.h:96:5: note: 'EShLangIntersectNV' declared here
    EShLangIntersectNV,
    ^
../src/cide/glsl_parser.cc:347:19: error: use of undeclared identifier 'EShLangAnyHit'; did you mean 'EShLangAnyHitNV'?
    shaderStage = EShLangAnyHit;
                  ^~~~~~~~~~~~~
                  EShLangAnyHitNV
/usr/local/include/glslang/Public/ShaderLang.h:97:5: note: 'EShLangAnyHitNV' declared here
    EShLangAnyHitNV,
    ^
../src/cide/glsl_parser.cc:349:19: error: use of undeclared identifier 'EShLangClosestHit'; did you mean 'EShLangClosestHitNV'?
    shaderStage = EShLangClosestHit;
                  ^~~~~~~~~~~~~~~~~
                  EShLangClosestHitNV
/usr/local/include/glslang/Public/ShaderLang.h:98:5: note: 'EShLangClosestHitNV' declared here
    EShLangClosestHitNV,
    ^
../src/cide/glsl_parser.cc:351:19: error: use of undeclared identifier 'EShLangMiss'; did you mean 'EShLangMissNV'?
    shaderStage = EShLangMiss;
                  ^~~~~~~~~~~
                  EShLangMissNV
/usr/local/include/glslang/Public/ShaderLang.h:99:5: note: 'EShLangMissNV' declared here
    EShLangMissNV,
    ^
../src/cide/glsl_parser.cc:353:19: error: use of undeclared identifier 'EShLangCallable'; did you mean 'EShLangCallableNV'?
    shaderStage = EShLangCallable;
                  ^~~~~~~~~~~~~~~
                  EShLangCallableNV
/usr/local/include/glslang/Public/ShaderLang.h:100:5: note: 'EShLangCallableNV' declared here
    EShLangCallableNV,
    ^
2 warnings and 7 errors generated.
[8/33] Building CXX object CMakeFiles/CIDEBaseLib.dir/src/cide/project.cc.o
ninja: build stopped: subcommand failed.

Glslang is distributed and can be installed separately (even on mac os with homebrew). Do you think linking to the bundled lib unconditionally is the best option?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions