Skip to content

Commit

Permalink
build: add hlsl files to visual studio (doodlum#92)
Browse files Browse the repository at this point in the history
* refactor: remove redundant state load

* fix: set bLandSpecular to support Terrain Parallax

bLandSpecular may be disabled by certain mod lists and is necessary for
terrain parallax. This will force the setting to true when Terrain
Parallax is enabled.

* build: add hlsl files to visual studio

Adds Feature and Package files for editing in VS.
  • Loading branch information
alandtse authored Sep 13, 2023
1 parent ca06738 commit 5792521
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions cmake/AddCXXFiles.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,21 @@ function(add_cxx_files TARGET)
FILES ${SOURCE_FILES})

target_sources("${TARGET}" PRIVATE ${SOURCE_FILES})

file(GLOB_RECURSE HLSL_FILES
LIST_DIRECTORIES false
CONFIGURE_DEPENDS
"Features/**/*.hlsl"
"Features/**/*.hlsli"
"Package/**/*.hlsl"
"Package/**/*.hlsli"
)

source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR}/
PREFIX "HLSL Files"
FILES ${HLSL_FILES})

set_source_files_properties(${HLSL_FILES} PROPERTIES VS_TOOL_OVERRIDE "None")

target_sources("${TARGET}" PRIVATE ${HLSL_FILES})
endfunction()

0 comments on commit 5792521

Please sign in to comment.