Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Pierre Kim
OpenRCT2-mod
Commits
0779859d
Commit
0779859d
authored
7 years ago
by
Ted John
Browse files
Options
Download
Email Patches
Plain Diff
Do not download objects if they already exist
parent
742edd45
develop
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
CMakeLists.txt
+9
-4
CMakeLists.txt
with
9 additions
and
4 deletions
+9
-4
CMakeLists.txt
+
9
-
4
View file @
0779859d
...
...
@@ -214,10 +214,15 @@ if (DOWNLOAD_TITLE_SEQUENCES)
endif ()"
)
endif
()
if
(
DOWNLOAD_OBJECTS
)
set
(
OBJECT_DIR
"
\$
ENV{DESTDIR}
${
CMAKE_INSTALL_FULL_DATADIR
}
/
${
PROJECT
}
/object"
)
install
(
CODE
"file(DOWNLOAD
${
OBJECTS_URL
}
${
OBJECT_DIR
}
/objects.zip EXPECTED_HASH SHA1=
${
OBJECTS_SHA1
}
SHOW_PROGRESS)"
)
install
(
CODE
"execute_process(COMMAND
\"
${
CMAKE_COMMAND
}
\"
-E chdir
${
OBJECT_DIR
}
/
\"
${
CMAKE_COMMAND
}
\"
-E tar xvf objects.zip)"
)
install
(
CODE
"file(REMOVE
${
OBJECT_DIR
}
/objects.zip)"
)
# If rct2.wtrcyan.json or data/object/ exists, assume all the objects are already present
install
(
CODE
"if (EXISTS
\"\$
ENV{DESTDIR}/
${
CMAKE_INSTALL_FULL_DATADIR
}
/
${
PROJECT
}
/object/rct2/water/rct2.wtrcyan.json
\"
OR EXISTS
${
CMAKE_SOURCE_DIR
}
/data/object/)
\n
\
message(
\"
Using cached objects
\"
)
\n
\
else ()
\n
\
file(DOWNLOAD
${
OBJECTS_URL
}
\$
ENV{DESTDIR}/
${
CMAKE_INSTALL_FULL_DATADIR
}
/
${
PROJECT
}
/object/objects.zip EXPECTED_HASH SHA1=
${
OBJECTS_SHA1
}
SHOW_PROGRESS)
\n
\
execute_process(COMMAND
\"
${
CMAKE_COMMAND
}
\"
-E chdir
\$
ENV{DESTDIR}/
${
CMAKE_INSTALL_FULL_DATADIR
}
/
${
PROJECT
}
/object/
\"
${
CMAKE_COMMAND
}
\"
-E tar xvf objects.zip)
\n
\
file(REMOVE
\$
ENV{DESTDIR}/
${
CMAKE_INSTALL_FULL_DATADIR
}
/
${
PROJECT
}
/object/objects.zip)
\n
\
endif ()"
)
endif
()
install
(
TARGETS
"libopenrct2"
LIBRARY DESTINATION
"
${
CMAKE_INSTALL_LIBDIR
}
"
ARCHIVE DESTINATION
"
${
CMAKE_INSTALL_LIBDIR
}
"
)
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Projects
Groups
Snippets
Help