diff --git a/.gitignore b/.gitignore
index 49eb714..27478e6 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,10 @@
#Ignore folder
Untracked
+CMakeFiles
+*.swp
+Makefile
+*.a
+cmake_install.cmake
+src/forgetIt
+CMakeCache.txt
+clearCMake.sh
diff --git a/CMakeLists.txt b/CMakeLists.txt
new file mode 100644
index 0000000..3186252
--- /dev/null
+++ b/CMakeLists.txt
@@ -0,0 +1,13 @@
+
+project(forgetIt)
+set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules/")
+
+set(VERSION_MAJOR 0)
+set(VERSION_MINOR 1)
+set(VERSION_REV 0)
+set(VERSION "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_REV}")
+
+cmake_minimum_required(VERSION 2.6)
+
+add_subdirectory(src)
+
diff --git a/Readme.md b/Readme.md
index d9fc293..b94ba4e 100644
--- a/Readme.md
+++ b/Readme.md
@@ -8,5 +8,10 @@ Pour cela **forgetIt** utilise des algorithmes de cryptages ayant fait leurs pre
L'analyse des fichiers une fois décryptés, s'organisera autour de la librairie *libxml++*.
La conception d'une interface graphique est prévue, et sera basé sur la bibliothèque *GTK+*.
+##Programmer Zone
+
+> Please read **Readme.md** in src folder.
+
+
##Suite en construction...
diff --git a/cmake/Modules/FindGTK3.cmake b/cmake/Modules/FindGTK3.cmake
new file mode 100644
index 0000000..4102b97
--- /dev/null
+++ b/cmake/Modules/FindGTK3.cmake
@@ -0,0 +1,25 @@
+find_package(PkgConfig)
+
+pkg_check_modules(PC_GTK3 QUIET gtk+-3.0)
+
+set(GTK3_DEFINITIONS ${PC_GTK3_CFLAGS_OTHER})
+
+
+find_path(GTK3_INCLUDE_DIR
+NAMES gtk/gtk.h
+PATHS ${PC_GTK3_INCLUDE_DIRS}
+)
+
+##message(${PC_GTK3_INCLUDE_DIRS})
+
+
+find_library(GTK3_LIBRARY NAMES gtk-3
+ HINTS ${PC_GTK3_LIBDIR} ${PC_GTK3_LIBRARY_DIRS} )
+
+set(GTK3_LIBRARIES ${GTK3_LIBRARY} )
+set(GTK3_INCLUDE_DIRS ${GTK3_INCLUDE_DIR} ${PC_GTK3_INCLUDE_DIRS} )
+
+find_package_handle_standard_args(GTK3 DEFAULT_MSG
+ GTK3_LIBRARY GTK3_INCLUDE_DIR)
+
+##mark_as_advanced(GTK3_INCLUDE_DIR GTK3_LIBRARY )
diff --git a/cmake/Modules/FindLibXML++.cmake b/cmake/Modules/FindLibXML++.cmake
new file mode 100644
index 0000000..3bbb021
--- /dev/null
+++ b/cmake/Modules/FindLibXML++.cmake
@@ -0,0 +1,37 @@
+# find libxml++
+#
+# exports:
+#
+# LibXML++_FOUND
+# LibXML++_INCLUDE_DIRS
+# LibXML++_LIBRARIES
+#
+include(FindPkgConfig)
+include(FindPackageHandleStandardArgs)
+# Use pkg-config to get hints about paths
+pkg_check_modules(LibXML++_PKGCONF REQUIRED libxml++-2.6)
+# Include dir
+find_path(LibXML++_INCLUDE_DIR
+NAMES libxml++/libxml++.h
+PATHS ${LibXML++_PKGCONF_INCLUDE_DIRS}
+)
+
+# Finally the library itself
+find_library(LibXML++_LIBRARY
+NAMES xml++ xml++-2.6
+PATHS ${LibXML++_PKGCONF_LIBRARY_DIRS}
+)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(LibXML++ DEFAULT_MSG LibXML++_LIBRARY LibXML++_INCLUDE_DIR)
+if(LibXML++_PKGCONF_FOUND)
+set(LibXML++_LIBRARIES ${LibXML++_LIBRARY} ${LibXML++_PKGCONF_LIBRARIES})
+set(LibXML++_INCLUDE_DIRS ${LibXML++_INCLUDE_DIR} ${LibXML++_PKGCONF_INCLUDE_DIRS})
+set(LibXML++_FOUND yes)
+else()
+set(LibXML++_LIBRARIES)
+set(LibXML++_INCLUDE_DIRS)
+set(LibXML++_FOUND no)
+endif()
+# Set the include dir variables and the libraries and let libfind_process do the rest.
+# NOTE: Singular variables for this library, plural for libraries this this lib depends on.
+#set(LibXML++_PROCESS_INCLUDES LibXML++_INCLUDE_DIR)
+#set(LibXML++_PROCESS_LIBS LibXML++_LIBRARY)
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
new file mode 100644
index 0000000..438d2dc
--- /dev/null
+++ b/src/CMakeLists.txt
@@ -0,0 +1,21 @@
+add_executable(
+ forgetIt
+ ./main.cpp
+)
+
+find_package(LibXML++ REQUIRED)
+find_package(GTK3 REQUIRED)
+
+include_directories(${LibXML++_INCLUDE_DIRS} ${GTK3_INCLUDE_DIRS})
+target_link_libraries(forgetIt ${LibXML++_LIBRARIES} ${GTK3_LIBRARIES})
+
+set_property(GLOBAL PROPERTY LibXML++_INCLUDE_DIRS "${LibXML++_INCLUDE_DIRS}")
+set_property(GLOBAL PROPERTY LibXML++_LIBRARIES "${LibXML++_LIBRARIES}")
+
+
+add_subdirectory(./CryptClass/)
+add_subdirectory(./IOFileClass/)
+add_subdirectory(./ParserClass/)
+
+
+
diff --git a/src/CryptClass/CMakeLists.txt b/src/CryptClass/CMakeLists.txt
new file mode 100644
index 0000000..173e737
--- /dev/null
+++ b/src/CryptClass/CMakeLists.txt
@@ -0,0 +1 @@
+add_library(CryptClass ./AESCrypt.cpp ./HASHCrypt.cpp)
diff --git a/src/IOFileClass/CMakeLists.txt b/src/IOFileClass/CMakeLists.txt
new file mode 100644
index 0000000..af1ec84
--- /dev/null
+++ b/src/IOFileClass/CMakeLists.txt
@@ -0,0 +1 @@
+add_library(IOFileClass ./FileManIOFile.cpp)
diff --git a/src/IOFileClass/FileManIOFile.cpp b/src/IOFileClass/FileManIOFile.cpp
index ea49201..3b45b0b 100644
--- a/src/IOFileClass/FileManIOFile.cpp
+++ b/src/IOFileClass/FileManIOFile.cpp
@@ -35,7 +35,7 @@ void FileManIOFile::read(std::string key){
this->data.clear();
//Open file
- file.open (this->filename, std::ios::in | std::ios::binary);
+ file.open ((this->filename).c_str(), std::ios::in | std::ios::binary);
//Get MD5 of decrypted data
byte fileMD5[16];
@@ -124,7 +124,7 @@ void FileManIOFile::writeRoutine(std::string data, std::string dataEncrypted){
std::ofstream file;
//Open it
- file.open(this->filename, std::ios::out | std::ios::binary);
+ file.open((this->filename).c_str(), std::ios::out | std::ios::binary);
//Write MD5 on 16 first bytes
file.write((char *) digest,sizeof(digest));
diff --git a/src/IOFileClass/FileManIOFile.hpp b/src/IOFileClass/FileManIOFile.hpp
index 221cf13..a1595ec 100644
--- a/src/IOFileClass/FileManIOFile.hpp
+++ b/src/IOFileClass/FileManIOFile.hpp
@@ -20,8 +20,8 @@
//----- class -----
-#include "HASHCrypt.hpp"
-#include "AESCrypt.hpp"
+#include "../CryptClass/HASHCrypt.hpp"
+#include "../CryptClass/AESCrypt.hpp"
diff --git a/src/ParserClass/CMakeLists.txt b/src/ParserClass/CMakeLists.txt
new file mode 100644
index 0000000..90317fb
--- /dev/null
+++ b/src/ParserClass/CMakeLists.txt
@@ -0,0 +1,14 @@
+add_library(ParserClass ./AbstractIDManager.cpp ./FileManParser.cpp)
+
+
+get_property(LibXML++_INCLUDE_DIRS GLOBAL PROPERTY LibXML++_INCLUDE_DIRS)
+
+
+
+
+target_link_libraries(ParserClass ${LibXML++_LIBRARIES})
+
+
+
+
+add_subdirectory(./FileManContainer/)
diff --git a/src/ParserClass/FileManContainer/CMakeLists.txt b/src/ParserClass/FileManContainer/CMakeLists.txt
new file mode 100644
index 0000000..0988d54
--- /dev/null
+++ b/src/ParserClass/FileManContainer/CMakeLists.txt
@@ -0,0 +1 @@
+add_library(FileManContainer ./Website.cpp)
diff --git a/src/ParserClass/FileManContainer/Website.hpp b/src/ParserClass/FileManContainer/Website.hpp
index cb293d4..62e823a 100644
--- a/src/ParserClass/FileManContainer/Website.hpp
+++ b/src/ParserClass/FileManContainer/Website.hpp
@@ -27,7 +27,7 @@
*/
#include
-#include "AbstractIDManager.hpp"
+#include "../AbstractIDManager.hpp"
/**
* @class Website Website.hpp "/ParserClass/FileManContainer/Website.hpp"
diff --git a/src/ParserClass/FileManParser.hpp b/src/ParserClass/FileManParser.hpp
index f0d01e5..aaef47b 100644
--- a/src/ParserClass/FileManParser.hpp
+++ b/src/ParserClass/FileManParser.hpp
@@ -22,7 +22,7 @@
#include
//----- class -----
-#include "Website.hpp"
+#include "./FileManContainer/Website.hpp"
//----- libxml++ -----
#include
diff --git a/src/Readme.md b/src/Readme.md
index 1f3455a..d6dbe35 100644
--- a/src/Readme.md
+++ b/src/Readme.md
@@ -1,3 +1,10 @@
+Build System
+=====
+
+##CMake (v3.0.2)
+
+
+
Library Versions
=====
diff --git a/src/main.cpp b/src/main.cpp
index b2f344f..32b1e29 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -20,9 +20,9 @@
//----- class -----
-#include "FileManIOFile.hpp"
-#include "FileManParser.hpp"
-#include "Website.hpp"
+#include "./IOFileClass/FileManIOFile.hpp"
+#include "./ParserClass/FileManParser.hpp"
+#include "./ParserClass/FileManContainer/Website.hpp"
#include
@@ -53,7 +53,7 @@ int main(int argc, char *argv[]){
GtkWidget* bouton;
- bouton=gtk_button_new_with_label("Hello Bro :");
+ bouton=gtk_button_new_with_label("Hello !");
gtk_container_add(GTK_CONTAINER(MainWindow), bouton);
g_signal_connect(G_OBJECT(bouton), "leave", G_CALLBACK(gtk_main_quit), NULL);