Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix RenderStateNotationParser build on all platforms #75

Merged
merged 1 commit into from
Dec 17, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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