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

SDL2 include dir not found #51

Open
nikita-yfh opened this issue Mar 25, 2021 · 1 comment
Open

SDL2 include dir not found #51

nikita-yfh opened this issue Mar 25, 2021 · 1 comment

Comments

@nikita-yfh
Copy link

I tried build SDL_FontCache with CMake, but it not build:

nikita ~/c++/hagen/src/SDL_FontCache $ cmake .
-- The C compiler identification is GNU 10.2.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
CMake Error at CMakeLists.txt:12 (message):
  SDL2 include dir not found


-- Configuring incomplete, errors occurred!
See also "/home/nikita/c++/hagen/src/SDL_FontCache/CMakeFiles/CMakeOutput.log".

The SDL2 libraries installed. How to build it?

@TG-Galeforce
Copy link

TG-Galeforce commented Jun 20, 2021

I tried build SDL_FontCache with CMake, but it not build:

nikita ~/c++/hagen/src/SDL_FontCache $ cmake .
-- The C compiler identification is GNU 10.2.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
CMake Error at CMakeLists.txt:12 (message):
  SDL2 include dir not found


-- Configuring incomplete, errors occurred!
See also "/home/nikita/c++/hagen/src/SDL_FontCache/CMakeFiles/CMakeOutput.log".

The SDL2 libraries installed. How to build it?

Seems like an issue with your Cmake file rather than with SDL_FontCache. Do you specify where to find your SDL2 dependencies? You'd need a line like:
include_directories(${SDL2_INCLUDE_DIRS} ${SDL2_IMAGE_INCLUDE_DIRS} ${SDL2_TTF_INCLUDE_DIRS} ${SDL2_MIXER_INCLUDE_DIRS})
You can also look here for additional files that you may need to add in order for CMake to find the dependencies: https://github.com/aminosbh/sdl2-cmake-modules

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

2 participants