forked from SFML/cmake-sfml-project
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b2c1b23
commit bfcf815
Showing
1 changed file
with
2 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,10 @@ | ||
cmake_minimum_required(VERSION 3.15) | ||
|
||
project(CMakeSFMLProject LANGUAGES CXX) | ||
|
||
# Tell CMake to build a executable | ||
add_executable(CMakeSFMLProject src/main.cpp) | ||
|
||
# CMake SFML Project uses C++17 features | ||
target_compile_features(CMakeSFMLProject PRIVATE cxx_std_17) | ||
|
||
# Find SFML | ||
find_package(SFML 2.5 COMPONENTS graphics REQUIRED) | ||
|
||
# Link SFML | ||
add_executable(CMakeSFMLProject src/main.cpp) | ||
target_link_libraries(CMakeSFMLProject PRIVATE sfml-graphics) | ||
target_compile_features(CMakeSFMLProject PRIVATE cxx_std_17) | ||
|
||
# Install executable | ||
install(TARGETS CMakeSFMLProject) |