hi, im trying to use Clion with SFML, im using minGW compiler, im on Windows 10.
When i try to compile, i get this error: No rule to make target '01Chess'. Stop.
Cmake file
cmake_minimum_required(VERSION 3.2)
project(01Chess)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
set(SOURCE_FILES main.cpp)
add_executable(01Chess ${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(01Chess ${SFML_LIBRARIES})
endif()
main.cpp file
#include <SFML/Graphics.hpp>
#include "config.h"
int main() {
sf::RenderWindow window(sf::VideoMode(200, 200), "SFML works!");
sf::CircleShape shape(100.f);
shape.setFillColor(sf::Color::Green);
while (window.isOpen()) {
sf::Event event;
while (window.pollEvent(event)) {
if (event.type == sf::Event::Closed)
window.close();
}
window.clear();
window.draw(shape);
window.display();
}
return 0;
}