24 lines
611 B
CMake
24 lines
611 B
CMake
cmake_minimum_required(VERSION 3.20)
|
|
set(CMAKE_CXX_STANDARD 17)
|
|
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
|
include_directories(/usr/include/SFML)
|
|
include(FetchContent)
|
|
# FetchContent_Declare(SFML
|
|
# GIT_REPOSITORY https://github.com/SFML/SFML.git
|
|
# GIT_TAG 3.0.0
|
|
# GIT_SHALLOW ON
|
|
# EXCLUDE_FROM_ALL
|
|
# SYSTEM)
|
|
#FetchContent_MakeAvailable(SFML)
|
|
find_package(SFML 2.5 COMPONENTS system window graphics REQUIRED)
|
|
project(hello VERSION 1.0)
|
|
add_executable(hello main.cpp)
|
|
#target_link_libraries(hello sfml-graphics)
|
|
target_link_libraries(hello
|
|
sfml-system
|
|
sfml-window
|
|
sfml-graphics
|
|
sfml-audio
|
|
)
|
|
|