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 8350093
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T08:12:21+00:00 2026-06-09T08:12:21+00:00

Is there a way to prevent CMake from creating a symlink for shared libraries

  • 0

Is there a way to prevent CMake from creating a symlink for shared libraries like libfoo.so when you are using so-versioning (which means you would have something like libfoo.so.0.8)?

The reason why I am asking this is that I have a project where I would like to make multiple versions of that project installable in parallel. Most package managers however reject a parallel installation if a file like the symlink is present in multiple packages.

As a background info: we are using CPack to build the packages and ultimately I think it is a flaw of CPack that you cannot prevent this symlink or at least being able to separate dev and runtime packages e.g. for debian. However, so far I have the illusions that just preventing CMake from creating the symlink at all might be the easier thing to do than patching CPack.

  • 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-09T08:12:23+00:00Added an answer on June 9, 2026 at 8:12 am

    For shared libraries you can use the NAMELINK_SKIP option of the install command to prevent the generation of the versionless library name symbolic link to the versioned library file.
    The generated CPack installer will honor that setting upon installation. The library version has to specified by setting the SOVERSION property of the shared library target:

    The following sample code sketches the required steps:

    add_library(foo SHARED foo.c)
    
    set_target_properties(foo PROPERTIES SOVERSION "0.8")
    
    install(TARGETS foo LIBRARY DESTINATION lib NAMELINK_SKIP)
    
    include(CPack)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there a way to prevent ad networks from creating pop-ups in my site.
Is there any way to prevent the CQL command Update from creating a new
Is there a way to prevent XStream from displaying something like follows: <user class=string>user</user>
Is there any way to prevent Visual Studio from creating a VSMacros80 folder in
Is there a way to prevent users from committing without using --force when a
I am using apache server. Is there a way to prevent users from accessing
Is there a way to prevent programs like Firebug from manipulating the DOM of
Is there a way to prevent users from getting into SQL Server Management Studio
Is there a way to prevent Castle Windsor from automatically injecting dependencies into properties
Is there a way to prevent a NSDrawer from being resized? I've tried setting

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.