Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmake: Could not find a package configuration file provided by "SDL2" #17

Closed
ritiek opened this issue Jan 1, 2019 · 3 comments
Closed

Comments

@ritiek
Copy link

ritiek commented Jan 1, 2019

I had this error when running cmake:

$ cmake ..
-- The C compiler identification is GNU 7.3.0
-- The CXX compiler identification is GNU 7.3.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- Found OpenGL: /usr/lib/x86_64-linux-gnu/libOpenGL.so
CMake Warning at CMakeLists.txt:28 (find_package):
  By not providing "FindSDL2.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "SDL2", but
  CMake did not find one.

  Could not find a package configuration file provided by "SDL2" with any of
  the following names:

    SDL2Config.cmake
    sdl2-config.cmake

  Add the installation prefix of "SDL2" to CMAKE_PREFIX_PATH or set
  "SDL2_DIR" to a directory containing one of the above files.  If "SDL2"
  provides a separate development package or SDK, be sure it has been
  installed.


-- Found FFTW: /usr/lib/x86_64-linux-gnu/libfftw3.so;/usr/lib/x86_64-linux-gnu/libfftw3f.so
CMake Warning at CMakeLists.txt:32 (message):
  Unable to find SDL2 library.  It is either not installed or CMake cannot
  find it.  In the latter case, setting the USE_FINDSDL2 variable might help:

     $ cmake -D USE_FINDSDL2 ..


CMake Error at CMakeLists.txt:37 (message):
  Aborting


-- Configuring incomplete, errors occurred!
See also "/home/ritiek/Downloads/kbd-audio/build/CMakeFiles/CMakeOutput.log".
See also "/home/ritiek/Downloads/kbd-audio/build/CMakeFiles/CMakeError.log".

Installing libsdl2-dev fixed it for me:

$ sudo apt install libsdl2-dev

It may be helpful to note this in README.md

ggerganov added a commit that referenced this issue Jan 2, 2019
Add possible ways to install libsdl (#17)
@ggerganov
Copy link
Owner

ggerganov commented Jan 2, 2019

Added a note to the README.md as suggested.

@ritiek ritiek closed this as completed Jan 2, 2019
@arjunskumar
Copy link

Thanks @ritiek

@brunolm
Copy link

brunolm commented Jan 18, 2024

On Windows download this

image

Rename the folder to SDL2 and put on your project folder.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants