fix WDEF and SystemExtension samples in Nix build

the nix build currently puts the REZ_INCLUDE_PATH in an environment variable rather than CMake, so REZ_INCLUDE_PATH is undefined in CMake
This commit is contained in:
Wolfgang Thaller 2023-12-29 01:19:52 +01:00
parent c525614549
commit 1d05fb39b5
2 changed files with 10 additions and 2 deletions

View File

@ -46,10 +46,14 @@ set_target_properties(SystemExtension PROPERTIES
# of code in a data file
LINK_FLAGS -Wl,--mac-flat)
if (REZ_INCLUDE_PATH)
set(REZ_INCLUDE_FLAG -I${REZ_INCLUDE_PATH})
endif()
# Use Rez to put it together
add_custom_command(
OUTPUT SystemExtension.bin SystemExtension.dsk
COMMAND ${REZ} -I ${REZ_INCLUDE_PATH}
COMMAND ${REZ} ${REZ_INCLUDE_FLAG}
${CMAKE_CURRENT_SOURCE_DIR}/SystemExtension.r
--copy ${CMAKE_CURRENT_SOURCE_DIR}/Icons.rsrc.bin
-o SystemExtension.bin

View File

@ -67,10 +67,14 @@ elseif(CMAKE_SYSTEM_NAME MATCHES RetroPPC)
set(WDEF_RESOURCE WDEF.pef)
endif()
if (REZ_INCLUDE_PATH)
set(REZ_INCLUDE_FLAG -I${REZ_INCLUDE_PATH})
endif()
# wrap the compiled WDEF into a resource
add_custom_command(
OUTPUT WDEF.rsrc.bin
COMMAND ${REZ} -I ${REZ_INCLUDE_PATH}
COMMAND ${REZ} ${REZ_INCLUDE_FLAG}
${CMAKE_CURRENT_SOURCE_DIR}/${WDEF_R}
-o WDEF.rsrc.bin