Skip to content

Instantly share code, notes, and snippets.

@aleparedes00
Created October 7, 2018 20:25
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aleparedes00/91d54855f77c4c73435aa3b102484203 to your computer and use it in GitHub Desktop.
Save aleparedes00/91d54855f77c4c73435aa3b102484203 to your computer and use it in GitHub Desktop.
Configuration SFML with CLion on MacOS

#Installation de SFML

IDE CLion MacOS

##Install brew update brew install sfml

CMakeLists.txt: cmake_minimum_required(VERSION 3.2) project(PlantsVsZombies)

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")

set(SOURCE_FILES main.cpp) add_executable(PlantsVsZombies ${SOURCE_FILES})

set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake_modules") find_package(SFML REQUIRED system window graphics network audio) if (SFML_FOUND) include_directories(${SFML_INCLUDE_DIR}) target_link_libraries(PlantsVsZombies ${SFML_LIBRARIES}) endif()

Same directory CMakeLists.txt create folder: cmake_modeules Inside cmake_modules → https://raw.githubusercontent.com/SFML/SFML-Game-Development-Book/master/CMake/FindSFML.cmake

Directory where you should have something: ./usr/local/include/SFML ./usr/local/Cellar/sfml/2.4.2_1/include/SFML ./usr/local/Cellar/sfml/2.4.2_1/share/SFML ./usr/local/share/SFML

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment