mirror of
https://github.com/pumpitupdev/pumptools.git
synced 2024-12-18 09:25:52 +01:00
13 lines
454 B
CMake
13 lines
454 B
CMake
# Compilation step for static resources
|
|
FUNCTION(ADD_RESOURCES out_var path file)
|
|
SET(result)
|
|
SET(result "${PROJECT_BINARY_DIR}/${file}.o")
|
|
ADD_CUSTOM_COMMAND(OUTPUT ${result}
|
|
COMMAND ld -m elf_i386 -L"${path}" -r -b binary -o ${result} ${file}
|
|
DEPENDS ${path}/${file}
|
|
WORKING_DIRECTORY ${path}
|
|
COMMENT "Building binary data object ${result}"
|
|
VERBATIM)
|
|
SET(${out_var} "${result}" PARENT_SCOPE)
|
|
ENDFUNCTION()
|