diff --git a/shaders/CMakeLists.txt b/shaders/CMakeLists.txt index 92f32816bf..d19ff96519 100644 --- a/shaders/CMakeLists.txt +++ b/shaders/CMakeLists.txt @@ -64,8 +64,13 @@ if (DEFINED RESGEN_FLAGS) set_source_files_properties(${RESGEN_SOURCE} PROPERTIES COMPILE_FLAGS ${RESGEN_FLAGS}) endif() +# WIN32 seems to require at least one C file, so create an empty one. +set(DUMMY_SRC "${RESOURCE_DIR}/dummy.c") +add_custom_command(OUTPUT ${DUMMY_SRC} + COMMAND echo "//" > ${DUMMY_SRC}) + # ================================================================================================== # Include and target definitions # ================================================================================================== -add_library(${TARGET} STATIC ${RESGEN_SOURCE}) +add_library(${TARGET} STATIC ${DUMMY_SRC} ${RESGEN_SOURCE}) target_include_directories(${TARGET} PUBLIC ${CMAKE_CURRENT_BINARY_DIR})