mirror of https://github.com/axmolengine/axmol.git
Fix shader files search
This commit is contained in:
parent
0d4a274d41
commit
9770aaa812
|
@ -391,10 +391,11 @@ function(ax_setup_app_config app_name)
|
||||||
|
|
||||||
ax_find_shaders(${app_shaders_dir} app_shaders RECURSE)
|
ax_find_shaders(${app_shaders_dir} app_shaders RECURSE)
|
||||||
if (app_shaders)
|
if (app_shaders)
|
||||||
list(LENGTH ${app_shaders} app_shaders_count)
|
list(LENGTH app_shaders app_shaders_count)
|
||||||
message(STATUS "${app_shaders_count} found in ${app_shaders_dir}")
|
message(STATUS "${app_shaders_count} shader sources found in ${app_shaders_dir}")
|
||||||
# compile app shader to ${CMAKE_BINARY_DIR}/runtime/axslc/custom/
|
# 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()
|
else()
|
||||||
message(STATUS "No shader found in ${app_shaders_dir}")
|
message(STATUS "No shader found in ${app_shaders_dir}")
|
||||||
endif()
|
endif()
|
||||||
|
|
|
@ -5,12 +5,12 @@ cmake_policy(SET CMP0057 NEW)
|
||||||
## enable shader lang by shader compiler: glslcc
|
## enable shader lang by shader compiler: glslcc
|
||||||
macro(glslcc_option variable value)
|
macro(glslcc_option variable value)
|
||||||
if(NOT DEFINED ${variable})
|
if(NOT DEFINED ${variable})
|
||||||
set(${variable} ${value} CACHE STRING "" FORCE)
|
set(${variable} ${value} CACHE STATIC "" FORCE)
|
||||||
endif()
|
endif()
|
||||||
endmacro()
|
endmacro()
|
||||||
|
|
||||||
glslcc_option(GLSLCC_FRAG_SOURCE_FILE_EXTENSIONS .frag;.fsh)
|
glslcc_option(GLSLCC_FRAG_SOURCE_FILE_EXTENSIONS ".frag;.fsh")
|
||||||
glslcc_option(GLSLCC_VERT_SOURCE_FILE_EXTENSIONS .vert;.vsh)
|
glslcc_option(GLSLCC_VERT_SOURCE_FILE_EXTENSIONS ".vert;.vsh")
|
||||||
glslcc_option(GLSLCC_OUT_DIR ${CMAKE_BINARY_DIR}/runtime/axslc)
|
glslcc_option(GLSLCC_OUT_DIR ${CMAKE_BINARY_DIR}/runtime/axslc)
|
||||||
glslcc_option(GLSLCC_FIND_PROG_ROOT "")
|
glslcc_option(GLSLCC_FIND_PROG_ROOT "")
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue