Ver código fonte

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]>
Sven van Haastregt 5 meses atrás
pai
commit
4a038eafdf
2 arquivos alterados com 4 adições e 2 exclusões
  1. 2 1
      StandAlone/CMakeLists.txt
  2. 2 1
      gtests/CMakeLists.txt

+ 2 - 1
StandAlone/CMakeLists.txt

@@ -59,7 +59,8 @@ glslang_set_link_args(glslang-standalone)
 
 
 set(LIBRARIES
 set(LIBRARIES
     glslang
     glslang
-    glslang-default-resource-limits)
+    glslang-default-resource-limits
+    $<$<AND:$<CXX_COMPILER_ID:GNU>,$<VERSION_LESS:$<CXX_COMPILER_VERSION>,9.0>>:stdc++fs>)
 
 
 if(WIN32)
 if(WIN32)
     set(LIBRARIES ${LIBRARIES} psapi)
     set(LIBRARIES ${LIBRARIES} psapi)

+ 2 - 1
gtests/CMakeLists.txt

@@ -88,7 +88,8 @@ if(GLSLANG_TESTS)
         endif()
         endif()
 
 
         set(LIBRARIES
         set(LIBRARIES
-            glslang glslang-default-resource-limits)
+            glslang glslang-default-resource-limits
+            $<$<AND:$<CXX_COMPILER_ID:GNU>,$<VERSION_LESS:$<CXX_COMPILER_VERSION>,9.0>>:stdc++fs>)
 
 
         if(ENABLE_SPVREMAPPER)
         if(ENABLE_SPVREMAPPER)
             set(LIBRARIES ${LIBRARIES} SPVRemapper)
             set(LIBRARIES ${LIBRARIES} SPVRemapper)