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

CMake script does not install STATIC library and static dependencies #1208

Closed
pfeatherstone opened this issue Jun 12, 2024 · 3 comments · Fixed by #1274
Closed

CMake script does not install STATIC library and static dependencies #1208

pfeatherstone opened this issue Jun 12, 2024 · 3 comments · Fixed by #1274

Comments

@pfeatherstone
Copy link

I'm building and installing this library using the following commands:

cmake . -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build --parallel
sudo cmake --build build --target install

I was expecting it to build the static library libdatachannel-static.a by default and installing it along with its dependencies:

  • libjuice-static.a
  • libsrtp2.a
  • libusrsctp.a
    That doesn't seem to be the case. Is this possible?
@paullouisageneau
Copy link
Owner

CMakelists builds the shared library by default. The static library can be built with the target datachannel-static, however only the shared library can be installed.

@pfeatherstone
Copy link
Author

Cheers. It is possible to amend the script to allow for installing the static library along with it dependencies ?

@mkm85
Copy link

mkm85 commented Aug 20, 2024

Had the same issue, maybe just remove the static vs dynamic stuff and only provide a single library called LibDataChannel, then it is up to the one who compiles the library to specify if it should be built as static or dynamic. Consumers of the library can then simply link against LibDataChannel::LibDataChannel without having to worry about how it is compiled.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants