Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7870973
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T01:46:14+00:00 2026-06-03T01:46:14+00:00

I’m using cmake and cpack to build my project and build packages. I’m creating

  • 0

I’m using cmake and cpack to build my project and build packages. I’m creating a few executables in my project, let’s call them EXE1 and EXE2.

When creating different versions of these executables, I want to name to reflect the version of the executable (let’s say EXE1_1.0.0). I can change the name of the output for a target by doing set_target_properties.

However, now when doing an install, I want to do create a symlink to this versioned name of the executable, i.e. I want to have

  • the “versioned” executable installed in bin directory, i.e. EXE1_1.0.0
  • create a symlink to the “versioned” executable, i.e. create symlink EXE1, which points to EXE1_1.0.0

Can someone suggest me how to do this?

Second question is:
How to install configuration files /etc/MYPROJECT/ directory? What DESTINATION I need to use for configuration files, like I use bin for executables and lib for libraries? Is using an absolute path like /etc an acceptable practice with cmake?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T01:46:17+00:00Added an answer on June 3, 2026 at 1:46 am

    I asked this question on cmake mailing list subsequently, and this is the response I received:

    The validity of the answer will depend on which CMake version you use
    and which set of platform you want to support.

    Symlinks are not that portable

    a) Creation may not be [currently] done portably but if you are
    targeting Unix you can use cmake -E create_symlink to create one.

    b) Depending on the CPack generator you use and CMake/CPack version
    symlinks may be embedded in the package or not.

    i.e. CPack pre 2.8.7 cannot create ZIP archive which contains
    symlinks CPack 2.8.8 can do that now.

    Then you can use an install(SCRIPT … or install(CODE …) to do that
    at install time.

    Another option if you are using RPM is to use package specific post
    install script. cpack –help-variable
    CPACK_RPM_POST_INSTALL_SCRIPT_FILE

    this last solution will off course only work for CPack RPM.

    For second question

    You can use absolute destination path, they should be handled just
    fine by CPack DEB and RPM, I don’t know for other.

    If your software should be installed on Windows this is won’t work
    with archive generator (ZIP, TGZ, etc…) and/or NSIS.

    May be you can do something like:

    if(UNIX AND NOT APPLE) set(CONFDEST “/etc/${CMAKE_PROJECT_NAME}”)
    else() set(CONFDEST “etc”) endif()

    install(FILES yourconffile DESTINATION ${CONFDEST})

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and
We're building an app, our first using Rails 3, and we're having to build
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
That's pretty much it. I'm using Nokogiri to scrape a web page what has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I am reading a book about Javascript and jQuery and using one of the
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
We are using XSLT to translate a RIXML file to XML. Our RIXML contains
I have thousands of HTML files to process using Groovy/Java and I need to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.