Lines 155-174
Link Here
|
155 |
###################################################################### |
155 |
###################################################################### |
156 |
# Clone "strings" repo with translations into bin/data/strings.git |
156 |
# Clone "strings" repo with translations into bin/data/strings.git |
157 |
|
157 |
|
158 |
include(FetchContent) |
158 |
if(ENABLE_I18N_STRINGS_REPO) |
159 |
|
159 |
include(FetchContent) |
160 |
FetchContent_Declare( |
160 |
find_package(Git) |
161 |
clone_strings |
161 |
if(GIT_FOUND) |
162 |
GIT_REPOSITORY https://github.com/aseprite/strings.git |
162 |
FetchContent_Declare( |
163 |
GIT_TAG origin/main |
163 |
clone_strings |
164 |
SOURCE_DIR ${DATA_OUTPUT_DIR}/strings.git |
164 |
GIT_REPOSITORY https://github.com/aseprite/strings.git |
165 |
CONFIGURE_COMMAND "" |
165 |
GIT_TAG origin/main |
166 |
BUILD_COMMAND "" |
166 |
SOURCE_DIR ${DATA_OUTPUT_DIR}/strings.git |
167 |
INSTALL_COMMAND "" |
167 |
CONFIGURE_COMMAND "" |
168 |
TEST_COMMAND "") |
168 |
BUILD_COMMAND "" |
169 |
FetchContent_MakeAvailable(clone_strings) |
169 |
INSTALL_COMMAND "" |
170 |
add_custom_target(clone_strings DEPENDS clone_strings) |
170 |
TEST_COMMAND "") |
171 |
|
171 |
FetchContent_MakeAvailable(clone_strings) |
|
|
172 |
add_custom_target(clone_strings DEPENDS clone_strings) |
173 |
else() |
174 |
add_custom_target(clone_strings) |
175 |
endif() |
176 |
else() |
177 |
add_custom_target(clone_strings) |
178 |
endif() |
172 |
###################################################################### |
179 |
###################################################################### |
173 |
# Copy data/ directory target into bin/data/ |
180 |
# Copy data/ directory target into bin/data/ |
174 |
|
181 |
|
Lines 181-195
Link Here
|
181 |
MAIN_DEPENDENCY ${SOURCE_DATA_DIR}/${fn}) |
188 |
MAIN_DEPENDENCY ${SOURCE_DATA_DIR}/${fn}) |
182 |
list(APPEND out_data_files ${DATA_OUTPUT_DIR}/${fn}) |
189 |
list(APPEND out_data_files ${DATA_OUTPUT_DIR}/${fn}) |
183 |
endforeach() |
190 |
endforeach() |
184 |
|
191 |
if(ENABLE_I18N_STRINGS_REPO AND GIT_FOUND) |
185 |
# Copy original en.ini to strings.git/en.ini to keep it updated. We |
192 |
# Copy original en.ini to strings.git/en.ini to keep it updated. We |
186 |
# have to manually sync the "en.ini" file in the "strings" repo from |
193 |
# have to manually sync the "en.ini" file in the "strings" repo from |
187 |
# the "aseprite" repo. |
194 |
# the "aseprite" repo. |
188 |
add_custom_command( |
195 |
add_custom_command( |
189 |
OUTPUT ${DATA_OUTPUT_DIR}/strings.git/en.ini |
196 |
OUTPUT ${DATA_OUTPUT_DIR}/strings.git/en.ini |
190 |
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${SOURCE_DATA_DIR}/strings/en.ini ${DATA_OUTPUT_DIR}/strings.git/en.ini |
197 |
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${SOURCE_DATA_DIR}/strings/en.ini ${DATA_OUTPUT_DIR}/strings.git/en.ini |
191 |
MAIN_DEPENDENCY ${SOURCE_DATA_DIR}/strings/en.ini) |
198 |
MAIN_DEPENDENCY ${SOURCE_DATA_DIR}/strings/en.ini) |
192 |
list(APPEND out_data_files ${DATA_OUTPUT_DIR}/strings.git/en.ini) |
199 |
list(APPEND out_data_files ${DATA_OUTPUT_DIR}/strings.git/en.ini) |
|
|
200 |
endif() |
193 |
|
201 |
|
194 |
add_custom_command( |
202 |
add_custom_command( |
195 |
OUTPUT ${DATA_OUTPUT_DIR}/README.md |
203 |
OUTPUT ${DATA_OUTPUT_DIR}/README.md |