Closed jaoxford closed 3 years ago
You have to specify the TARGET, also building in a separate directory is recommended:
mkdir build && cd build
cmake -DTARGET=linux.cmake ../cmake
make
Thanks for reaching out to me. Just tried that. Here's the output:
mkdir build && cd build
[jacob@jacob build]$ cmake -DTARGET=linux.cmake ../cmake
CMake files for linux.cmake found
CMake Warning (dev) at /usr/share/cmake-3.21/Modules/FindOpenGL.cmake:315 (message):
Policy CMP0072 is not set: FindOpenGL prefers GLVND by default when
available. Run "cmake --help-policy CMP0072" for policy details. Use the
cmake_policy command to set the policy and suppress this warning.
FindOpenGL found both a legacy GL library:
OPENGL_gl_LIBRARY: /usr/lib/libGL.so
and GLVND libraries for OpenGL and GLX:
OPENGL_opengl_LIBRARY: /usr/lib/libOpenGL.so
OPENGL_glx_LIBRARY: /usr/lib/libGLX.so
OpenGL_GL_PREFERENCE has not been set to "GLVND" or "LEGACY", so for
compatibility with CMake 3.10 and below the legacy GL library will be used.
Call Stack (most recent call first):
linux.cmake:6 (find_package)
CMakeLists.txt:29 (include)
This warning is for project developers. Use -Wno-dev to suppress it.
-- Found OpenGL: /usr/lib/libOpenGL.so
SDL2 Include : /usr/include;/usr/include/SDL2
SDL2 Libraries: /usr/lib/libSDL2main.a;/usr/lib/libSDL2-2.0.so.0.16.0
-- Configuring done
-- Generating done
-- Build files have been written to: /home/jacob/Downloads/cannonball/cmake
[jacob@jacob build]$ make
make: *** No targets specified and no makefile found. Stop.
[jacob@jacob build]$
I think you forgot to mention that I had to cd
into the cmake
directory to run make
. Doing that built it.
I am unable to build on arch linux. The steps I took were:
Output:
Any ideas on what to do?