Cmake не может связаться с SFML - PullRequest
0 голосов
/ 06 марта 2020

Мой cmake видит SFML, но не хочет его использовать. Помогите, пожалуйста. CmakeLists в главной папке:

cmake_minimum_required(VERSION 3.8 FATAL_ERROR)
project(sfml-lab-1)
add_subdirectory(00)

CmakeLists в папке 00

find_package(SFML 2.5.1 COMPONENTS graphics audio  PATHS C:/SFML-2.5.1/)
add_executable(00 main.cpp) 
target_link_libraries(00 sfml-graphics sfml-audio)

Что cmd говорит:

d:\try_cmake>cmake --build .
CMake Warning at 00/CMakeLists.txt:1 (find_package):
Could not find a configuration file for package "SFML" that is compatible
with requested version "2.5.1".

  The following configuration files were considered but not accepted:

    C:/SFML-2.5.1/lib/cmake/SFML/SFMLConfig.cmake, version: 2.5.1 (64bit)



-- Configuring done
-- Generating done
-- Build files have been written to: D:/try_cmake
[ 50%] Building CXX object 00/CMakeFiles/00.dir/main.cpp.obj
D:\try_cmake\00\main.cpp:1:29: fatal error: SFML/Graphics.hpp: No such file or directory
 #include <SFML/Graphics.hpp>
                         ^
compilation terminated.

1 Ответ

0 голосов
/ 06 марта 2020

Помогло переключиться на 32-битную версию вместо 64-битной

...