Skip to content

Commit

Permalink
Allow subdirectories for install files
Browse files Browse the repository at this point in the history
  • Loading branch information
the-other-james committed Feb 7, 2022
1 parent 6925cea commit ffd9467
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions cmake/arch_build.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -701,16 +701,22 @@ function(process_arch SYSVAR)
include(${MISSION_DEFS}/${TGTNAME}/install_custom.cmake OPTIONAL)

foreach(INSTFILE ${${TGTNAME}_FILELIST})
get_filename_component(FILE ${INSTFILE} NAME)
get_filename_component(PATH ${INSTFILE} DIRECTORY)
if (SIMULATION)
if(EXISTS ${MISSION_DEFS}/native_${INSTFILE})
set(FILESRC ${MISSION_DEFS}/native_${INSTFILE})
if(EXISTS ${MISSION_DEFS}/${PATH}/native_${FILE})
set(FILESRC ${MISSION_DEFS}/${PATH}/native_${FILE})
else()
set(FILESRC)
endif()
elseif(EXISTS ${MISSION_DEFS}/${TGTNAME}/${INSTFILE})
set(FILESRC ${MISSION_DEFS}/${TGTNAME}/${INSTFILE})
elseif(EXISTS ${MISSION_DEFS}/${TGTNAME}_${INSTFILE})
set(FILESRC ${MISSION_DEFS}/${TGTNAME}_${INSTFILE})
elseif(EXISTS ${MISSION_DEFS}/${INSTFILE})
set(FILESRC ${MISSION_DEFS}/${INSTFILE})
elseif(EXISTS ${MISSION_DEFS}/${PATH}/${TGTNAME}_${FILE})
set(FILESRC ${MISSION_DEFS}/${PATH}/${TGTNAME}_${FILE})
else()
set(FILESRC)
endif()
Expand Down

0 comments on commit ffd9467

Please sign in to comment.