1
General discussions / Re: Functioning Project for Running SFML in CLion IDE
« on: July 21, 2017, 11:58:15 am »
Here is a cleaner version of the CMakeLists.txt file:
Quote
cmake_minimum_required(VERSION 3.7)
project(Game)
set(CMAKE_CXX_STANDARD 11)
set(SOURCE_FILES main.cpp)
add_executable(Game ${SOURCE_FILES})
# Detect and add SFML
set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake_modules" ${CMAKE_MODULE_PATH})
find_package(SFML 2 REQUIRED system window graphics network audio)
if(SFML_FOUND)
include_directories(${SFML_INCLUDE_DIR})
target_link_libraries(${PROJECT_NAME} ${SFML_LIBRARIES})
endif()