Fix libshader build for Windows.
This commit is contained in:
@@ -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})
|
||||
|
||||
Reference in New Issue
Block a user