Skip to content

Allow target name subdirectory for install files and handle symlinks #790

@excaliburtb

Description

@excaliburtb

Is your feature request related to a problem? Please describe.
Just need to add to the paths of locations for the install list from TGT_FILELIST the possibility of target_defs/<TGT_NAME>/

Also, if the file is a symlink, it needs to be followed to its source but copied as the name in FILELIST suggests.

Describe the solution you'd like

    foreach(INSTFILE ${TGT${TGTID}_FILELIST})
      if(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})
      else()
        set(FILESRC)
      endif()
      if (FILESRC)
        get_filename_component(_resolvedFile "${FILESRC}" REALPATH)
        install(FILES ${_resolvedFile} DESTINATION ${TGT_NAME}/${INSTALL_SUBDIR} RENAME ${INSTFILE})
      else(FILESRC)
        message("WARNING: Install file ${INSTFILE} for ${TGTNAME} not found")
      endif (FILESRC)
    endforeach(INSTFILE ${TGT${TGTID}_FILELIST})

Something like that maybe?

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context about the feature request here.

Requester Info
Full name and company/organization if applicable

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions