File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed
Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -2273,12 +2273,21 @@ if (APPLE)
22732273 )
22742274
22752275 # make sure Packages repo, https://github.com/PokemonAutomation/Packages is placed in the same folder as this Arduino-Source repo
2276- # so the post-build command can copy the resources folder Packages/SerialPrograms/Resources/ into the built app bundle
2276+ # so the post-build command can copy the resources folder Packages/SerialPrograms/Resources/ into the built app bundle:
2277+ string (FIND "${CMAKE_CURRENT_SOURCE_DIR} " "Arduino-Source-Internal" internal_repro_position) # determine if this is an internal repo
2278+ if (internal_repro_position EQUAL -1) # no "Arduino-Source-Internal" substr in the current source dir
2279+ # we are building the public repo
2280+ set (RESOURCES_PATH "${CMAKE_CURRENT_SOURCE_DIR} /../../Packages/SerialPrograms/Resources" )
2281+ else ()
2282+ # we are building the internal repo
2283+ set (RESOURCES_PATH "${CMAKE_CURRENT_SOURCE_DIR} /../../../../Packages/SerialPrograms/Resources" )
2284+ endif ()
2285+ message (STATUS "Set Resources folder path from Packages repo: ${RESOURCES_PATH} " )
22772286 add_custom_command (
22782287 TARGET SerialPrograms
22792288 POST_BUILD
22802289 COMMAND ${CMAKE_COMMAND} -E copy_directory
2281- "${CMAKE_CURRENT_SOURCE_DIR} /../../Packages/SerialPrograms/Resources "
2290+ "${RESOURCES_PATH} "
22822291 "$<TARGET_FILE_DIR:SerialPrograms>/../Resources"
22832292 )
22842293else () # WIN and Linux:
You can’t perform that action at this time.
0 commit comments