File tree Expand file tree Collapse file tree 2 files changed +15
-9
lines changed
Expand file tree Collapse file tree 2 files changed +15
-9
lines changed Original file line number Diff line number Diff line change @@ -68,9 +68,11 @@ shaderc_add_tests(
6868shaderc_add_asciidoc(glslc_doc_README README)
6969
7070if (SHADERC_ENABLE_INSTALL)
71- install (TARGETS glslc_exe
72- RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
73- BUNDLE DESTINATION ${CMAKE_INSTALL_BINDIR} )
71+ if (SHADERC_ENABLE_EXECUTABLES)
72+ install (TARGETS glslc_exe
73+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
74+ BUNDLE DESTINATION ${CMAKE_INSTALL_BINDIR} )
75+ endif (SHADERC_ENABLE_EXECUTABLES)
7476endif (SHADERC_ENABLE_INSTALL)
7577
7678add_subdirectory (test )
Original file line number Diff line number Diff line change @@ -21,10 +21,14 @@ if(${SHADERC_ENABLE_TESTS})
2121 COMMAND ${Python_EXECUTABLE} -m unittest glslc_test_framework_unittest.py
2222 WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} )
2323
24- add_test (NAME glslc_tests
25- COMMAND ${Python_EXECUTABLE}
26- ${CMAKE_CURRENT_SOURCE_DIR} /glslc_test_framework.py
27- $<TARGET_FILE:glslc_exe> $<TARGET_FILE:spirv-dis>
28- --test -dir ${CMAKE_CURRENT_SOURCE_DIR} )
29-
24+ # These tests use the glslc executable, so they can only run if
25+ # glslc has been built.
26+ if (${SHADERC_ENABLE_EXECUTABLES} )
27+ add_test (NAME glslc_tests
28+ COMMAND ${Python_EXECUTABLE}
29+ ${CMAKE_CURRENT_SOURCE_DIR} /glslc_test_framework.py
30+ $<TARGET_FILE:glslc_exe> $<TARGET_FILE:spirv-dis>
31+ --test -dir ${CMAKE_CURRENT_SOURCE_DIR} )
32+ endif ()
33+
3034endif ()
You can’t perform that action at this time.
0 commit comments