diff --git a/cmake/Modules/AXBuildHelpers.cmake b/cmake/Modules/AXBuildHelpers.cmake index 43b7eb5945..87ad7ac503 100644 --- a/cmake/Modules/AXBuildHelpers.cmake +++ b/cmake/Modules/AXBuildHelpers.cmake @@ -391,10 +391,11 @@ function(ax_setup_app_config app_name) ax_find_shaders(${app_shaders_dir} app_shaders RECURSE) if (app_shaders) - list(LENGTH ${app_shaders} app_shaders_count) - message(STATUS "${app_shaders_count} found in ${app_shaders_dir}") + list(LENGTH app_shaders app_shaders_count) + message(STATUS "${app_shaders_count} shader sources found in ${app_shaders_dir}") # compile app shader to ${CMAKE_BINARY_DIR}/runtime/axslc/custom/ - ax_target_compile_shaders(${app_name} FILES ${app_shaders} CUSTOM) + ax_target_compile_shaders(${app_name} FILES ${app_shaders} CUSTOM) + source_group("Source Files/Source/shaders" FILES ${app_shaders}) else() message(STATUS "No shader found in ${app_shaders_dir}") endif() diff --git a/cmake/Modules/AXGLSLCC.cmake b/cmake/Modules/AXGLSLCC.cmake index eeb6b50289..fc8367903d 100644 --- a/cmake/Modules/AXGLSLCC.cmake +++ b/cmake/Modules/AXGLSLCC.cmake @@ -5,12 +5,12 @@ cmake_policy(SET CMP0057 NEW) ## enable shader lang by shader compiler: glslcc macro(glslcc_option variable value) if(NOT DEFINED ${variable}) - set(${variable} ${value} CACHE STRING "" FORCE) + set(${variable} ${value} CACHE STATIC "" FORCE) endif() endmacro() -glslcc_option(GLSLCC_FRAG_SOURCE_FILE_EXTENSIONS .frag;.fsh) -glslcc_option(GLSLCC_VERT_SOURCE_FILE_EXTENSIONS .vert;.vsh) +glslcc_option(GLSLCC_FRAG_SOURCE_FILE_EXTENSIONS ".frag;.fsh") +glslcc_option(GLSLCC_VERT_SOURCE_FILE_EXTENSIONS ".vert;.vsh") glslcc_option(GLSLCC_OUT_DIR ${CMAKE_BINARY_DIR}/runtime/axslc) glslcc_option(GLSLCC_FIND_PROG_ROOT "")