[macOS] shaderutil.c:45:13: error: variable has incomplete type 'void'
While !65 (merged) fixes one of the issues on macOS, I still see some error with CMake build, which isn't observer with autotools
.
cmake -S . -B _build
➜ mesa-demos-cmake git:(mr/65) cmake -S . -B _build
CMake Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required):
Compatibility with CMake < 2.8.12 will be removed from a future version of
CMake.
Update the VERSION argument <min> value or use a ...<max> suffix to tell
CMake that the project does not need compatibility with older versions.
-- The C compiler identification is AppleClang 13.1.6.13160021
-- The CXX compiler identification is AppleClang 13.1.6.13160021
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/local/opt/ccache/libexec/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/local/opt/ccache/libexec/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found PkgConfig: /usr/local/bin/pkg-config (found version "0.29.2")
-- Found OpenGL: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk/System/Library/Frameworks/OpenGL.framework
-- Checking for module 'glut'
-- Found glut, version 3.2.2
-- Found GLUT: TRUE
-- Found X11: /usr/local/include
-- Looking for XOpenDisplay in /usr/local/lib/libX11.dylib;/usr/local/lib/libXext.dylib
-- Looking for XOpenDisplay in /usr/local/lib/libX11.dylib;/usr/local/lib/libXext.dylib - found
-- Looking for gethostbyname
-- Looking for gethostbyname - found
-- Looking for connect
-- Looking for connect - found
-- Looking for remove
-- Looking for remove - found
-- Looking for shmat
-- Looking for shmat - found
-- Looking for IceConnectionNumber in ICE
-- Looking for IceConnectionNumber in ICE - found
-- Checking for module 'egl'
-- No package 'egl' found
-- Checking for module 'glesv1_cm'
-- Found glesv1_cm, version 22.0.3
-- Checking for module 'glesv2'
-- Found glesv2, version 22.0.3
-- Checking for module 'osmesa'
-- No package 'osmesa' found
-- Looking for glutInitContextProfile
-- Looking for glutInitContextProfile - not found
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/yurikoles/work/mesa-demos-cmake/_build
cmake --build _build
➜ mesa-demos-cmake git:(mr/65) cmake --build _build
[ 0%] Building C object src/glad/CMakeFiles/glad.dir/src/glad.c.o
[ 0%] Linking C static library libglad.a
[ 0%] Built target glad
[ 0%] Building C object src/util/CMakeFiles/util.dir/readtex.c.o
[ 0%] Building C object src/util/CMakeFiles/util.dir/shaderutil.c.o
/Users/yurikoles/work/mesa-demos-cmake/src/util/shaderutil.c:45:13: error: variable has incomplete type 'void'
static void GLAPIENTRY
^
/Users/yurikoles/work/mesa-demos-cmake/src/glad/include/glad/glad.h:895:20: note: expanded from macro 'GLAPIENTRY'
#define GLAPIENTRY APIENTRY
^
/Users/yurikoles/work/mesa-demos-cmake/src/util/shaderutil.c:45:23: error: expected ';' after top level declarator
static void GLAPIENTRY
^
;
2 errors generated.
gmake[2]: *** [src/util/CMakeFiles/util.dir/build.make:90: src/util/CMakeFiles/util.dir/shaderutil.c.o] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:1517: src/util/CMakeFiles/util.dir/all] Error 2
gmake: *** [Makefile:156: all] Error 2
</details>
Edited by Yurii Kolesnykov