Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
excaliburtb opened this issue Aug 4, 2020 · 2 comments · Fixed by #1158 or #1171
Closed

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

excaliburtb opened this issue Aug 4, 2020 · 2 comments · Fixed by #1158 or #1171
Assignees
Milestone

Comments

@excaliburtb
Copy link

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

@skliper
Copy link
Contributor

skliper commented Jan 11, 2021

@excaliburtb Do you need this in Caelum?

@excaliburtb
Copy link
Author

It would be really nice if it made it.

@skliper skliper added this to the 7.0.0 milestone Jan 11, 2021
jphickey added a commit to jphickey/cFE that referenced this issue Feb 5, 2021
Checks a name-based subdirectory under ${MISSION_DEFS} for
files listed in the FILELIST for that target.

If file is a symlink, the link should be followed so the correct
content is installed, not a symlink.
astrogeco added a commit that referenced this issue Feb 24, 2021
Fix #790, allow directories and symlinks in FILELIST.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants