From 4119ff9e3a57d197e36b34f8f6ef4208871b032e Mon Sep 17 00:00:00 2001 From: manzerbredes Date: Tue, 28 Apr 2015 19:15:36 +0200 Subject: [PATCH] Create first hello world in SFML (Thank you LaurentGomila for your FindSFML.cmake) --- .gitignore | 4 ++++ CMakeLists.txt | 18 ++++++++++++++++++ src/2P11 | Bin 0 -> 18576 bytes src/CMakeLists.txt | 15 +++++++++++++++ src/main.cpp | 25 +++++++++++++++++++++++++ 5 files changed, 62 insertions(+) create mode 100644 .gitignore create mode 100644 CMakeLists.txt create mode 100755 src/2P11 create mode 100644 src/CMakeLists.txt diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..9be2b10 --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +CMakeFiles +cmake_install.cmake +Makefile +CMakeCache.txt diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..c822dc4 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,18 @@ +#Defined project name +project(2P11) + +#Assign Modules path +set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules/") + +#Defined project VERSION +set(VERSION_MAJOR 0) +set(VERSION_MINOR 1) +set(VERSION_REV 0) +set(VERSION "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_REV}") + +#Minimum cmake VERSION +cmake_minimum_required(VERSION 2.6) + +#Add source directory +add_subdirectory(src) + diff --git a/src/2P11 b/src/2P11 new file mode 100755 index 0000000000000000000000000000000000000000..1313b4c121bfc075b01bad5eabd13b346fb9fc22 GIT binary patch literal 18576 zcmcg!eRx#WnLjg=KokfA#1b&dK!FA;(~NU z;s&T=gwif5^=U2bQ6Ji+)mmt~T^^-w0=UMO+SH=i-+Ml0?%dpo zwtwv5x$~a$dq2*5KJUHfzTqpLh9y>u#l~c^vfG#i`E;p^BjT5_(<%eh#TKw4{7z$K zY!u3c9K#Q%t{j>sV@Qe?i6Wy43n*`ufYl{3l9q`QY7j}9;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k?! zs3O~l9DTD=^{eyry)x+c0V%2cS8|Hp0X}^LQ)PATUM@ehbxVEnpZrw*OPFm(hMKDM z)%pAZsoy3ARsBj|wSTA7Uo7R+IsTy3SKs|epU#Ml`g?&#OeqE~&r6(BTxQOG(lF$m{jfr7mLQ?@Bpg-;?7nN?AQseh3-8zWPoZa0m&! zF6JaTtuoj_bu2$hmg3U1SK`re;Bx4Uwz-$ zH(e;qHz*kEPaE{rcaZ0234Jv$L`l@8@->QB!{|2F>uU~!7 zX)7md+4Uky*|M_p0T_CH_1&jK>YrAMk}5q#M?qPyul^o?!5pEW{8VO?o+^)pGGVI! z+T`~Euhi$pl`yD7m#6FmS$~BASNaPLIQdFRQHtqNb#sRNxm(shRS8PmP~>*h+SBVF kyg`)u)WjUduoJ!9nOFB$yopY0X|3MEdT%j literal 0 HcmV?d00001 diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt new file mode 100644 index 0000000..b30833e --- /dev/null +++ b/src/CMakeLists.txt @@ -0,0 +1,15 @@ +#Defined executable +add_executable( + 2P11 + ./main.cpp +) + +#Find all libraries +find_package(SFML 2.2 COMPONENTS system window graphics audio REQUIRED) + + +#Include "Includes" and "Libraries" +include_directories(${SFML_INCLUDE_DIR}) +target_link_libraries(2P11 ${SFML_LIBRARIES}) + +message("${SFML_LIBRARIES}") diff --git a/src/main.cpp b/src/main.cpp index e69de29..0d3b950 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -0,0 +1,25 @@ +#include +#include + +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; +}