Skip to content

Commit 4a038ea

Browse files
svenvharcady-lunarg
authored andcommitted
Fix pre-gcc-9 builds for libstdc++fs
Until gcc 9, users of `std::filesystem` had to explicitly link against libstdc++fs. Signed-off-by: Sven van Haastregt <[email protected]>
1 parent 5c078fa commit 4a038ea

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

StandAlone/CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,8 @@ glslang_set_link_args(glslang-standalone)
5959

6060
set(LIBRARIES
6161
glslang
62-
glslang-default-resource-limits)
62+
glslang-default-resource-limits
63+
$<$<AND:$<CXX_COMPILER_ID:GNU>,$<VERSION_LESS:$<CXX_COMPILER_VERSION>,9.0>>:stdc++fs>)
6364

6465
if(WIN32)
6566
set(LIBRARIES ${LIBRARIES} psapi)

gtests/CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,8 @@ if(GLSLANG_TESTS)
8888
endif()
8989

9090
set(LIBRARIES
91-
glslang glslang-default-resource-limits)
91+
glslang glslang-default-resource-limits
92+
$<$<AND:$<CXX_COMPILER_ID:GNU>,$<VERSION_LESS:$<CXX_COMPILER_VERSION>,9.0>>:stdc++fs>)
9293

9394
if(ENABLE_SPVREMAPPER)
9495
set(LIBRARIES ${LIBRARIES} SPVRemapper)

0 commit comments

Comments
 (0)