Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 935448
Collapse All | Expand All

(-)a/CMakeLists.txt (+1 lines)
Lines 64-69 Link Here
64
option(ENABLE_STEAM        "Compile with Steam library" off)
64
option(ENABLE_STEAM        "Compile with Steam library" off)
65
option(ENABLE_DEVMODE      "Compile vesion for developers" off)
65
option(ENABLE_DEVMODE      "Compile vesion for developers" off)
66
option(ENABLE_UI           "Compile UI (turn off to compile CLI-only version)" on)
66
option(ENABLE_UI           "Compile UI (turn off to compile CLI-only version)" on)
67
option(ENABLE_I18N_STRINGS "Clone i18n strings repo (https://github.com/aseprite/strings) to bin/data/strings.git" off)
67
option(FULLSCREEN_PLATFORM "Enable fullscreen by default" off)
68
option(FULLSCREEN_PLATFORM "Enable fullscreen by default" off)
68
option(ENABLE_CLANG_TIDY   "Enable static analysis" off)
69
option(ENABLE_CLANG_TIDY   "Enable static analysis" off)
69
option(ENABLE_CCACHE       "Use CCache to improve recompilation speed (optional)" on)
70
option(ENABLE_CCACHE       "Use CCache to improve recompilation speed (optional)" on)
(-)a/src/CMakeLists.txt (-23 / +31 lines)
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

Return to bug 935448