If there are two dynamic and static libraries with the same name in the directory, then cmake links dynamic, is there a way to tell cmake that it connects static?
- List the library along with the .a extension - Vladimir Gamalyan
- Are there any other options? I need the library to link in different configurations on different platforms and it will be inconvenient to compile the name of the library because it is different for each configuration. - Anton
- for example for the mylib library libmylib.a libmylibd.a libmylib.so
- The easiest way is to run the assembly from the sh script, you can define the platform in it and pass the necessary parameters to the CMake script (the name, for example). But you can do without the sh script by simply checking for the necessary files in the file system: stackoverflow.com/questions/13067401/… . - Xmaster
- But, if you do everything according to science, then you can try htcondor-wiki.cs.wisc.edu/index.cgi/fileview?f=build/cmake/… , i.e. determine the platform and, depending on this, form the name of the lib (s) in the variable. - Xmaster
|