Link against filesystem

An extra link is required on some versions of GCC and Clang to use the
filesystem library.

See: https://en.cppreference.com/w/cpp/filesystem#Notes
This commit is contained in:
friendlyanon 2021-01-06 01:08:16 +00:00
parent cfa3fc8c9e
commit 9e25033c85

View File

@ -30,6 +30,13 @@ target_include_directories(
target_compile_features(ssp INTERFACE cxx_std_17) target_compile_features(ssp INTERFACE cxx_std_17)
target_link_libraries(
ssp
INTERFACE
"$<$<AND:$<CXX_COMPILER_ID:AppleClang,Clang>,$<VERSION_LESS:$<CXX_COMPILER_VERSION>,9.0>>:c++fs>"
"$<$<AND:$<CXX_COMPILER_ID:GNU>,$<VERSION_LESS:$<CXX_COMPILER_VERSION>,9.1>>:stdc++fs>"
)
# ---- Install ---- # ---- Install ----
include(CMakePackageConfigHelpers) include(CMakePackageConfigHelpers)