Last active
August 20, 2018 08:46
-
-
Save MarioLiebisch/0a38370ed1d3d3009277 to your computer and use it in GitHub Desktop.
A minimal CMakeLists.txt file for a SFML project
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
cmake_minimum_required(VERSION 3.10) | |
project(my_sfml_project) | |
# Find SFML and the given components | |
find_package(SFML 2.5 COMPONENTS graphics window system) | |
# Add the SFML include dir | |
include_directories(${SFML_INCLUDE_DIR}) | |
# Create the executable file | |
add_executable(my_sfml_app main.cpp) | |
# As an alternative, this could also create a library: | |
# add_library(my_sfml_lib library.cpp) | |
# Link SFML and its dependencies | |
target_link_libraries(my_sfml_app sfml-graphics sfml-window sfml-system) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment