fix(CMake): find std::filesystem across platforms (#6914)

* fix(CORE): Find std::filesystem across platforms
Closes #6889

* Squeeze blank lines to make check-codestyle happy

* Move find_package(Filesystem ...) to deps/stdfs

* CMAKE_CXX_STANDARD gets already set in ConfigureBaseTargets.cmake
This commit is contained in:
Necropola
2021-07-17 11:41:36 +02:00
committed by GitHub
parent ca6483dbfc
commit c7129fa0dd
4 changed files with 263 additions and 0 deletions

18
deps/stdfs/CMakeLists.txt vendored Normal file
View File

@@ -0,0 +1,18 @@
# Copyright (C) 2008-2016 TrinityCore <http://www.trinitycore.org/>
# Copyright (C) 2016+ AzerothCore <www.azerothcore.org>, released under GNU AGPL v3 license: https://github.com/azerothcore/azerothcore-wotlk/blob/master/LICENSE-AGPL3
#
# This file is free software; as a special exception the author gives
# unlimited permission to copy and/or distribute it, with or without
# modifications, as long as this notice is preserved.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
find_package(Filesystem REQUIRED)
add_library(stdfs INTERFACE)
target_link_libraries(stdfs
INTERFACE
std::filesystem)