From 87a65f6913429b26e63fdee17cb8cfe93990db35 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Tue, 2 Jan 2018 17:38:18 +0100 Subject: Add support for cmake Not working fully yet, will investigate why --- include/CmakeModule.hpp | 13 +++++++++++++ include/Conf.hpp | 4 ++-- include/FileUtil.hpp | 1 + 3 files changed, 16 insertions(+), 2 deletions(-) create mode 100644 include/CmakeModule.hpp (limited to 'include') diff --git a/include/CmakeModule.hpp b/include/CmakeModule.hpp new file mode 100644 index 0000000..0df4a2e --- /dev/null +++ b/include/CmakeModule.hpp @@ -0,0 +1,13 @@ +#pragma once + +#include "Conf.hpp" +#include "Linker.hpp" + +namespace sibs +{ + class CmakeModule + { + public: + Result compile(const SibsConfig &config, const FileString &buildPath, LinkerFlagCallbackFunc staticLinkerFlagCallbackFunc, LinkerFlagCallbackFunc dynamicLinkerFlagCallbackFunc, GlobalIncludeDirCallbackFunc globalIncludeDirCallback); + }; +} diff --git a/include/Conf.hpp b/include/Conf.hpp index d3d80f9..764b3f9 100644 --- a/include/Conf.hpp +++ b/include/Conf.hpp @@ -160,10 +160,10 @@ namespace sibs switch(optimizationLevel) { case OPT_LEV_DEBUG: - cmakeArgsGlobal = "\"-DCMAKE_BUILD_TYPE=Debug\""; + cmakeArgsGlobal = "-G Ninja \"-DCMAKE_BUILD_TYPE=Debug\""; break; case OPT_LEV_RELEASE: - cmakeArgsGlobal = "\"-DCMAKE_BUILD_TYPE=Release\""; + cmakeArgsGlobal = "-G Ninja \"-DCMAKE_BUILD_TYPE=Release\""; break; } } diff --git a/include/FileUtil.hpp b/include/FileUtil.hpp index 64d0c99..7288426 100644 --- a/include/FileUtil.hpp +++ b/include/FileUtil.hpp @@ -56,6 +56,7 @@ namespace sibs Result createDirectoryRecursive(const _tinydir_char_t *path); Result getRealPath(const _tinydir_char_t *path); bool pathEquals(const std::string &path, const std::string &otherPath); + Result getFileLastModifiedTime(const _tinydir_char_t *path); } #endif //SIBS_FILEUTIL_HPP -- cgit v1.2.3