diff --git a/CMakeLists.txt b/CMakeLists.txt index ad535cd..66fab35 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -10,6 +10,10 @@ include(${CMAKE_CURRENT_LIST_DIR}/cmake/Common.cmake) include(${CMAKE_CURRENT_LIST_DIR}/cmake/AddPlatformExecutable.cmake) include(FetchContent) +# options +option(BUILD_TOOLS "Build tools for curating content for Prism" OFF) +option(BUILD_EXAMPLE "Build example program" ON) + if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux") message("Linux build detected!") @@ -53,7 +57,7 @@ endif() if(${CMAKE_SYSTEM_NAME} STREQUAL "tvOS") message("tvOS build detected!") - #set(ENABLE_VULKAN TRUE) + set(ENABLE_VULKAN TRUE) set(ENABLE_DARWIN TRUE) set(ENABLE_TVOS TRUE) set(ENABLE_METAL TRUE) @@ -111,7 +115,7 @@ add_subdirectory(extern) # enable lto if (CMAKE_BUILD_TYPE EQUAL "Release") set(CMAKE_INTERPROCEDURAL_OPTIMIZATION TRUE) -endif () +endif() add_subdirectory(platforms) @@ -119,4 +123,7 @@ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin) add_subdirectory(engine) add_subdirectory(tools) -add_subdirectory(example) \ No newline at end of file + +if(BUILD_EXAMPLE) + add_subdirectory(example) +endif() \ No newline at end of file diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt index 9d652fa..40014ef 100755 --- a/tools/CMakeLists.txt +++ b/tools/CMakeLists.txt @@ -1,6 +1,6 @@ set(CMAKE_FOLDER "Tools") -if(NOT IOS AND NOT ENABLE_TVOS) +if(NOT NEEDS_HOSTED_SHADER_COMPILER) add_subdirectory(shadercompiler) endif()