diff --git a/CMakeLists.txt b/CMakeLists.txt index 74b6ea852..aaefb690b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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() diff --git a/RenderStateNotationParser/CMakeLists.txt b/RenderStateNotationParser/CMakeLists.txt index 82fe5cc88..828f6512d 100644 --- a/RenderStateNotationParser/CMakeLists.txt +++ b/RenderStateNotationParser/CMakeLists.txt @@ -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/*) diff --git a/RenderStateNotationParser/include/pch.h b/RenderStateNotationParser/include/pch.h index 0d300e42a..2244cad50 100644 --- a/RenderStateNotationParser/include/pch.h +++ b/RenderStateNotationParser/include/pch.h @@ -30,7 +30,6 @@ #include "BasicMath.hpp" #include "RenderDevice.h" -#include "SerializationDevice.h" #include "DynamicLinearAllocator.hpp" #include "StringTools.hpp" @@ -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