Skip to content

Commit

Permalink
Enable RenderStateNotationParser on all plaforms
Browse files Browse the repository at this point in the history
  • Loading branch information
TheMostDiligent authored and MikhailGorobets committed Dec 17, 2021
1 parent a22d7b2 commit 3120e92
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ if((PLATFORM_WIN32 OR PLATFORM_LINUX OR PLATFORM_MACOS) AND GL_SUPPORTED)
add_subdirectory(HLSL2GLSLConverter)
endif()

add_subdirectory(RenderStateNotationParser)
if(PLATFORM_WIN32 OR PLATFORM_LINUX OR PLATFORM_MACOS)
add_subdirectory(RenderStateNotationParser)
add_subdirectory(RenderStatePackager)
endif()

Expand Down
8 changes: 4 additions & 4 deletions RenderStateNotationParser/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@ execute_process(COMMAND ${PYTHON_EXECUTABLE} -m pip install libclang)
execute_process(COMMAND ${PYTHON_EXECUTABLE} -m pip install jinja2)
execute_process(COMMAND ${PYTHON_EXECUTABLE} "${CMAKE_CURRENT_SOURCE_DIR}/scripts/cxx_generator.py" --dir "${CMAKE_CURRENT_SOURCE_DIR}/generated" --files ${REFLECTED})

if(PLATFORM_WIN32)
if(CMAKE_HOST_SYSTEM_NAME STREQUAL "Windows")
execute_process(COMMAND "${CMAKE_CURRENT_SOURCE_DIR}/../../DiligentCore/BuildTools/FormatValidation/clang-format_10.0.0.exe" -i *.h *.hpp WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/generated")
elseif(PLATFORM_LINUX)
elseif(CMAKE_HOST_SYSTEM_NAME STREQUAL "Linux")
execute_process(COMMAND "${CMAKE_CURRENT_SOURCE_DIR}/../../DiligentCore/BuildTools/FormatValidation/clang-format_linux_10.0.0" -i *.h *.hpp WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/generated")
elseif(PLATFORM_MACOS)
elseif(CMAKE_HOST_SYSTEM_NAME STREQUAL "Darwin")
execute_process(COMMAND "${CMAKE_CURRENT_SOURCE_DIR}/../../DiligentCore/BuildTools/FormatValidation/clang-format_mac_10.0.0" -i *.h *.hpp WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/generated")
else()
message(FATAL_ERROR "Invalid OS-platform" )
message(FATAL_ERROR "Unsupported host system")
endif()

file(GLOB COMMON_INCLUDE include/*)
Expand Down
7 changes: 5 additions & 2 deletions RenderStateNotationParser/include/pch.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@

#include "BasicMath.hpp"
#include "RenderDevice.h"
#include "SerializationDevice.h"
#include "DynamicLinearAllocator.hpp"
#include "StringTools.hpp"

Expand All @@ -46,4 +45,8 @@
#include "../generated/PipelineResourceSignatureParser.hpp"
#include "../generated/RenderPassParser.hpp"
#include "../generated/PipelineStateParser.hpp"
#include "../generated/SerializationDeviceParser.hpp"

#ifdef ARCHIVER_SUPPORTED
# include "SerializationDevice.h"
# include "../generated/SerializationDeviceParser.hpp"
#endif

0 comments on commit 3120e92

Please sign in to comment.