Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Missing SFML 2.5 dependencies in CMake  (Read 1464 times)

0 Members and 1 Guest are viewing this topic.

TarasHots

  • Newbie
  • *
  • Posts: 1
    • View Profile
Missing SFML 2.5 dependencies in CMake
« on: August 19, 2018, 03:01:13 pm »
Hello,

I've read https://en.sfml-dev.org/forums/index.php?topic=24070.0, and followed its advices. Unfortunately, SFML still errors about missing dependencies:

SFML found but some of its dependencies are missing ( X11 Xrandr UDev OpenGL FreeType)

My project structure is fairly simple and easy - only main.cpp, CMakeLists.txt, and src folder, where I put downloaded SFML-2.5.0 from https://www.sfml-dev.org/files/SFML-2.5.0-linux-gcc-64-bit.tar.gz.

CMakeLists.txt content is following:

cmake_minimum_required(VERSION 3.12)
project(SFML_test)

set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++1y -Wall")

set(SFML_STATIC_LIBRARIES TRUE)
set(SFML_DIR "src/SFML-2.5.0/lib/cmake/SFML")

find_package(SFML 2.5 COMPONENTS graphics window system REQUIRED)

add_executable(SFML_fun main.cpp)
 

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11034
    • View Profile
    • development blog
    • Email
Re: Missing SFML 2.5 dependencies in CMake
« Reply #1 on: August 19, 2018, 03:45:29 pm »
SFML doesn't provide the dependencies for Linux systems, instead you should install them through your package manager.
Additionally, you might want to build SFML from source, as the Linux package provided is most likely not compatible with your system.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

 

anything