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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T02:12:05+00:00 2026-06-15T02:12:05+00:00

I have custom wrapper over CMake, which perform configuring, compilation, and creating distrib for

  • 0

I have custom wrapper over CMake, which perform configuring, compilation, and creating distrib for various platforms (win32, SunOS and so on) and different compilers. I need to put into distrib all needed runtime libraries (libgcc_s.so, libstdc++.so for *nix like OS. msvcr90.dll, msvcp100.dll for win32). For example, gcc has mechanism, which allows to get full names of these libraries:

# get location of libgcc_s of default compiler
bash-3.2$ g++ -print-file-name=libgcc_s.so
/usr/local/lib/gcc/sparc-sun-solaris2.10/3.4.6/../../../libgcc_s.so

# get location of libstdc++ of custom compiler
bash-3.2$ g++-4.5.3 -print-file-name=libstdc++.so
/u/gccbuild/installed/gcc-4.5.3/lib/gcc/sparc-sun-solaris2.10/4.5.3/../../../libstdc++.so

So i need similar mechanism for msvc (2008, 2010), is this possible? (It can be environment variable for given compiler, or registry value, or smth else). Or maybe there is some CMake mechanism for obtaining such information.

  • 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-15T02:12:07+00:00Added an answer on June 15, 2026 at 2:12 am

    You could use the InstallRequiredSystemLibraries cmake-module. for CMake which will add the msvc dlls (and manifests) to your cmake-install target.

    As an alternative, you could write your own little cmake code which checks the registry for installed visual studio versions and finds the vcredist. You could then add the vcredist package to your own distribution and “slipstream” its installation in your own installer.

    E.g. something like the following will search for vcredist_2010 and add it to the NSIS installer:

    if(CMAKE_CL_64)
         set(CMAKE_MSVC_ARCH amd64)
       else(CMAKE_CL_64)
         set(CMAKE_MSVC_ARCH x86)
    endif(CMAKE_CL_64)
    
    # Try and find the vcredist_XX.exe, normally this is in the WindowsSDK folder.
    if( MSVC10 )
        find_program(MSVC_REDIST NAMES VC/vcredist_${CMAKE_MSVC_ARCH}.exe
            PATHS
            "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Microsoft SDKs\\Windows\\v7.1;InstallationFolder]/Redist/"               
            )
            get_filename_component(vcredist_name "${MSVC_REDIST}" NAME)
    endif( MSVC10 )
    
    # If we found a vcredist-package, we add it simply to the 
    # installation-folder and run it with NSis.
    if( vcredist_name )
        message( STATUS "    Adding " ${vcredist_name} " to Install" )
        install(PROGRAMS ${MSVC_REDIST} COMPONENT System DESTINATION bin)
        # Add /q to make the vcredist install silent
        set(CPACK_NSIS_EXTRA_INSTALL_COMMANDS "ExecWait '\\\"$INSTDIR\\\\bin\\\\${vcredist_name}\\\" /q'" )
    endif( vcredist_name )
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a custom gtk.treeview wrapper class that manages its own liststore. The class
I have made a custom sort of wrapper for the JQuery's Ajax function and
Suppose I have a custom file format, which can be analogous to N tables.
I have my custom theme, in which I would like to make changes to
I have a custom wrapper object for my properties: MyType<t> . I have private
I have a custom wrapper function around jquery ajax. custom.get = function (path, callback)
I have custom UITableViewCell . It contains UITextLabel . When I press this cell
I have custom validation rule: public function customRule($check) { } Inside this rule I
I have custom classes that I currently instantiate within App.xaml as resources. I want
i have custom cell with 2 buttons(the function of these buttons is just 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.