QtCreator/Visual Studio: Group glsl files in Shaders group.
authormano-wii <germano.costa@ig.com.br>
Sat, 15 Jun 2019 18:32:41 +0000 (15:32 -0300)
committermano-wii <germano.costa@ig.com.br>
Sat, 15 Jun 2019 18:32:41 +0000 (15:32 -0300)
build_files/cmake/macros.cmake

index d771691..cdbaea1 100644 (file)
@@ -177,12 +177,14 @@ function(blender_source_group
   source_group("Source Files" FILES CMakeLists.txt)
 
   foreach(_SRC ${sources})
-    get_filename_component(_SRC_EXT ${_SRC} EXT)
+    get_filename_component(_SRC_EXT ${_SRC} LAST_EXT)
     if((${_SRC_EXT} MATCHES ".h") OR
        (${_SRC_EXT} MATCHES ".hpp") OR
        (${_SRC_EXT} MATCHES ".hh"))
 
       set(GROUP_ID "Header Files")
+    elseif(${_SRC_EXT} MATCHES ".glsl")
+      set(GROUP_ID "Shaders")
     else()
       set(GROUP_ID "Source Files")
     endif()