shiva
last version
last version
  • Shiva Documentation
  • Shiva
    • Changelog
    • FAQ
    • Gallery
    • Installation
    • Modules
      • shiva::box2d
      • shiva::dll
      • shiva::ecs
      • shiva::entt
      • shiva::enums
      • shiva::error
      • shiva::event
      • shiva::filesystem
      • shiva::input
      • shiva::json
      • shiva::lua
      • shiva::meta
      • shiva::pp
      • shiva::pyscripting
      • shiva::range
      • shiva::reflection
      • shiva::scenes
      • shiva::sfml
        • shiva::system-sfml-animation
        • shiva::system-sfml-graphics
        • shiva::system-sfml-inputs
        • shiva::system-sfml-resources
      • shiva::spdlog
      • shiva::stacktrace
      • shiva::timer
      • shiva::world
    • Roadmap
    • Scripting
      • Lua
      • Python
    • Tutorial
      • Quick'start
      • How to create/build/install a system plugin
      • How to create a scripted system
      • How to create a project through the CLI tools and build it
Powered by GitBook
On this page
  1. Shiva
  2. Modules

shiva::filesystem

This module simply makes a namespace alias and some preprocessing mandatory to use std::filesystem. This module is represented by a cmake interface library that facilitates its handling through other modules.

filesystem.hpp
#if __has_include(<experimental/filesystem>)
    #include <experimental/filesystem>
    namespace shiva
    {
        namespace fs = std::experimental::filesystem;
    }
#elif __has_include(<filesystem>)
    #include <filesystem>
    namespace shiva
    {
      namespace fs = std::filesystem;
    }
#endif

To manage it from side of cmake you have to do as follow:

if (LINUX)
    target_link_libraries(filesystem INTERFACE stdc++fs)
endif(LINUX)

if(APPLE)
    target_link_libraries(filesystem INTERFACE c++experimental)
endif(APPLE)
Previousshiva::eventNextshiva::input

Last updated 6 years ago