diff options
author | dan sinclair <dj2@everburning.com> | 2018-12-10 15:49:25 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-12-10 15:49:25 -0500 |
commit | 6a03f7936fd3f0af55fef312edcc314ad234f42d (patch) | |
tree | 9af12d7c23b602e2c84412d0a90143269ee87516 /samples | |
parent | 18f5ae987730381a79b900cdaebcb613362b0410 (diff) | |
download | amber-6a03f7936fd3f0af55fef312edcc314ad234f42d.tar.gz |
Make spirv-tools, googletest and shaderc build optional (#144)
This CL allows spriv-tools, googletest and shaderc to be disabled at
build time. (Disabling spriv-tools will also disable shaderc).
Diffstat (limited to 'samples')
-rw-r--r-- | samples/CMakeLists.txt | 5 | ||||
-rw-r--r-- | samples/amber.cc | 4 |
2 files changed, 5 insertions, 4 deletions
diff --git a/samples/CMakeLists.txt b/samples/CMakeLists.txt index fc63e54..afc8c2f 100644 --- a/samples/CMakeLists.txt +++ b/samples/CMakeLists.txt @@ -31,10 +31,7 @@ add_custom_command( ${CMAKE_CURRENT_SOURCE_DIR}/../tools/update_build_version.py ${CMAKE_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR} - ${spirv-tools_SOURCE_DIR} - ${CMAKE_CURRENT_SOURCE_DIR}/../third_party/spirv-headers - ${glslang_SOURCE_DIR} - ${shaderc_SOURCE_DIR} + ${CMAKE_CURRENT_SOURCE_DIR}/../third_party WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/.." COMMENT "Update build-versions.h in the build directory" ) diff --git a/samples/amber.cc b/samples/amber.cc index 2c735ee..7c1339b 100644 --- a/samples/amber.cc +++ b/samples/amber.cc @@ -163,10 +163,14 @@ int main(int argc, const char** argv) { if (options.show_version_info) { std::cout << "Amber : " << AMBER_VERSION << std::endl; +#if AMBER_ENABLE_SPIRV_TOOLS std::cout << "SPIRV-Tools : " << SPIRV_TOOLS_VERSION << std::endl; std::cout << "SPIRV-Headers: " << SPIRV_HEADERS_VERSION << std::endl; +#endif // AMBER_ENABLE_SPIRV_TOOLS +#if AMBER_ENABLE_SHADERC std::cout << "GLSLang : " << GLSLANG_VERSION << std::endl; std::cout << "Shaderc : " << SHADERC_VERSION << std::endl; +#endif // AMBER_ENABLE_SHADERC } if (options.show_help) { |