From 6f825aa8c2bc5951f031837b7e373497014c944e Mon Sep 17 00:00:00 2001 From: Chuck Walbourn Date: Sat, 20 Jun 2020 23:08:42 -0700 Subject: [PATCH] CMakeLists.txt updated for use as add_subdirectory --- CMakeLists.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 93b6e0c..8bfa9e6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -71,12 +71,12 @@ endif() add_library(${PROJECT_NAME} STATIC ${LIBRARY_SOURCES} DirectXTex/Shaders/Compiled/BC6HEncode_EncodeBlockCS.inc) add_custom_command( - OUTPUT "${CMAKE_SOURCE_DIR}/DirectXTex/Shaders/Compiled/BC6HEncode_EncodeBlockCS.inc" - MAIN_DEPENDENCY "${CMAKE_SOURCE_DIR}/DirectXTex/Shaders/CompileShaders.cmd" + OUTPUT "${PROJECT_SOURCE_DIR}/DirectXTex/Shaders/Compiled/BC6HEncode_EncodeBlockCS.inc" + MAIN_DEPENDENCY "${PROJECT_SOURCE_DIR}/DirectXTex/Shaders/CompileShaders.cmd" DEPENDS ${SHADER_SOURCES} COMMENT "Generating HLSL shaders..." COMMAND "CompileShaders.cmd" - WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}/DirectXTex/Shaders" + WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}/DirectXTex/Shaders" USES_TERMINAL) source_group(${PROJECT_NAME} REGULAR_EXPRESSION DirectXTex/*.*)