diff --git a/cmake/BuildShaders.cmake b/cmake/BuildShaders.cmake index 844f2ee..0445552 100755 --- a/cmake/BuildShaders.cmake +++ b/cmake/BuildShaders.cmake @@ -1,7 +1,7 @@ macro(compile_shader src) string(REGEX REPLACE "\\.[^.]*$" "" MYFILE_WITHOUT_EXT ${src}) - set(SHADER_COMPILER_COMMAND "${CMAKE_BINARY_DIR}/bin/Debug/ShaderCompiler") + set(SHADER_COMPILER_COMMAND $) if(ENABLE_IOS) set(SHADER_COMPILER_COMMAND "${CMAKE_CURRENT_SOURCE_DIR}/../build/bin/Debug/ShaderCompiler") endif() diff --git a/cmake/Common.cmake b/cmake/Common.cmake index 7c33e43..2f65385 100755 --- a/cmake/Common.cmake +++ b/cmake/Common.cmake @@ -1,17 +1,20 @@ macro(set_engine_properties target) target_compile_features(${target} PUBLIC cxx_std_17) set_target_properties(${target} PROPERTIES CXX_EXTENSIONS OFF) - target_compile_options(${target} PUBLIC - -Wall - -Wextra - -Wno-c++98-compat - -Wno-c++98-compat-pedantic - -Wno-padded - -Wno-documentation-unknown-command - -Wno-used-but-marked-unused - -Wno-system-headers - -Wconversion - -Wno-sign-conversion) + + if(NOT ENABLE_WINDOWS) + target_compile_options(${target} PUBLIC + -Wall + -Wextra + -Wno-c++98-compat + -Wno-c++98-compat-pedantic + -Wno-padded + -Wno-documentation-unknown-command + -Wno-used-but-marked-unused + -Wno-system-headers + -Wconversion + -Wno-sign-conversion) + endif() if(ENABLE_MACOS) target_compile_definitions(${target} PUBLIC PLATFORM_MACOS) diff --git a/platforms/windows/CMakeLists.txt b/platforms/windows/CMakeLists.txt index 5773f89..036237a 100755 --- a/platforms/windows/CMakeLists.txt +++ b/platforms/windows/CMakeLists.txt @@ -1,23 +1,15 @@ include(../../cmake/AddPlatformExecutable.cmake) -add_library(WindowsSupport - windows.cpp) -target_link_libraries(WindowsSupport PRIVATE Platform) - add_platform( MAIN_FILE main.cpp.in + SRC + ${CMAKE_CURRENT_SOURCE_DIR}/file.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/windows.cpp EXECUTABLE_PROPERTIES LINK_LIBRARIES Core GFXVulkan - FileWindows - LangWindows - WindowsSupport - GFXDummy - GFXOpenGL - Platform - COMPILE_OPTIONS ) add_custom_target(PlatformWindows_IDE SOURCES diff --git a/tools/shadercompiler/main.cpp b/tools/shadercompiler/main.cpp index f565cbd..74fd8ff 100755 --- a/tools/shadercompiler/main.cpp +++ b/tools/shadercompiler/main.cpp @@ -1,10 +1,18 @@ #include #include +#ifdef PLATFORM_WINDOWS +#include +#include +#include +#include +#else #include #include #include #include +#endif + #include "DirStackIncluder.h" #include "log.hpp" @@ -102,17 +110,18 @@ const TBuiltInResource DefaultTBuiltInResource = { /* .maxTaskWorkGroupSizeY_NV = */ 1, /* .maxTaskWorkGroupSizeZ_NV = */ 1, /* .maxMeshViewCountNV = */ 4, + /* .maxDualSourceDrawBuffersEXT = */ 4, - /* .limits = */ { - /* .nonInductiveForLoops = */ 1, - /* .whileLoops = */ 1, - /* .doWhileLoops = */ 1, - /* .generalUniformIndexing = */ 1, - /* .generalAttributeMatrixVectorIndexing = */ 1, - /* .generalVaryingIndexing = */ 1, - /* .generalSamplerIndexing = */ 1, - /* .generalVariableIndexing = */ 1, - /* .generalConstantMatrixVectorIndexing = */ 1, + /* .limits = */ TLimits{ + /* .nonInductiveForLoops = */ true, + /* .whileLoops = */ true, + /* .doWhileLoops = */ true, + /* .generalUniformIndexing = */ true, + /* .generalAttributeMatrixVectorIndexing = */ true, + /* .generalVaryingIndexing = */ true, + /* .generalSamplerIndexing = */ true, + /* .generalVariableIndexing = */ true, + /* .generalConstantMatrixVectorIndexing = */ true, }}; const std::vector CompileGLSL(const std::string& filename, EShLanguage ShaderType) {