Merge pull request #93 from Nakmak98/fix_libstdc++_linking

Fixed std::filesystem library linking for gcc>=9
This commit is contained in:
Mike Oliphant
2025-11-09 08:50:51 -08:00
committed by GitHub
+1 -1
View File
@@ -12,7 +12,7 @@ set(CMAKE_CXX_EXTENSIONS OFF)
if (CMAKE_SYSTEM_NAME STREQUAL "Darwin")
include_directories(SYSTEM /usr/local/include)
elseif (CMAKE_SYSTEM_NAME STREQUAL "Linux")
link_libraries(stdc++fs)
link_libraries( "$<$<AND:$<CXX_COMPILER_ID:GNU>,$<VERSION_LESS:$<CXX_COMPILER_VERSION>,9.0>>:-lstdc++fs>" )
elseif (CMAKE_SYSTEM_NAME STREQUAL "Windows")
add_compile_definitions(NOMINMAX WIN32_LEAN_AND_MEAN)
else()