mirror of https://github.com/OpenRCT2/OpenRCT2.git
Obey DESTDIR during title sequence installation (#4899)
The $ is escaped to delay evaluation of DESTDIR until runtime. It's typically only specified when `make install` runs - not during the cmake invocation itself.
This commit is contained in:
parent
f2eb4c237d
commit
6bac01f36e
|
@ -396,9 +396,9 @@ list(APPEND DOC_FILES "${CMAKE_CURRENT_SOURCE_DIR}/contributors.md" "${CMAKE_CUR
|
|||
# CMake does not allow specifying a dependency chain which includes built-in
|
||||
# targets, like `install`, so we have to trick it and execute dependency ourselves.
|
||||
install(CODE "execute_process(COMMAND \"${CMAKE_COMMAND}\" --build \"${CMAKE_CURRENT_BINARY_DIR}\" --target g2)")
|
||||
install(CODE "file(DOWNLOAD https://github.com/OpenRCT2/title-sequences/releases/download/v0.0.5/title-sequence-v0.0.5.zip ${CMAKE_INSTALL_PREFIX}/share/${PROJECT}/title/title-sequences.zip EXPECTED_HASH_SHA1=79ffb2585d12abcbfce205d7696e3472a504b005 SHOW_PROGRESS)")
|
||||
install(CODE "execute_process(COMMAND \"${CMAKE_COMMAND}\" -E chdir ${CMAKE_INSTALL_PREFIX}/share/${PROJECT}/title/ \"${CMAKE_COMMAND}\" -E tar xvf title-sequences.zip)")
|
||||
install(CODE "file(REMOVE ${CMAKE_INSTALL_PREFIX}/share/${PROJECT}/title/title-sequences.zip)")
|
||||
install(CODE "file(DOWNLOAD https://github.com/OpenRCT2/title-sequences/releases/download/v0.0.5/title-sequence-v0.0.5.zip \$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/share/${PROJECT}/title/title-sequences.zip EXPECTED_HASH_SHA1=79ffb2585d12abcbfce205d7696e3472a504b005 SHOW_PROGRESS)")
|
||||
install(CODE "execute_process(COMMAND \"${CMAKE_COMMAND}\" -E chdir \$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/share/${PROJECT}/title/ \"${CMAKE_COMMAND}\" -E tar xvf title-sequences.zip)")
|
||||
install(CODE "file(REMOVE \$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/share/${PROJECT}/title/title-sequences.zip)")
|
||||
install(TARGETS ${PROJECT} RUNTIME DESTINATION bin)
|
||||
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/g2.dat" DESTINATION share/${PROJECT})
|
||||
install(DIRECTORY data/ DESTINATION share/${PROJECT})
|
||||
|
|
Loading…
Reference in New Issue