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

static lib and dynamic lib shouldn't be duplicate cmake targets #51

Closed
johnb003 opened this issue Jun 26, 2018 · 2 comments
Closed

static lib and dynamic lib shouldn't be duplicate cmake targets #51

johnb003 opened this issue Jun 26, 2018 · 2 comments

Comments

@johnb003
Copy link

the cmake file for libraries is meant just to define how things are related, then you rely on the compiler to interpret those and put them together.

Static libs and shared libs can be built with pretty much the same definition of relationships.

The preferred way of doing it is: add_library(target sources), without STATIC or SHARED, thus relying on whatever is specified in BUILD_SHARED_LIBS to determine it. See https://cgold.readthedocs.io/en/latest/tutorials/libraries/static-shared.html

@johnb003 johnb003 changed the title static lib and dynamic lib shouldn't duplicate targets static lib and dynamic lib shouldn't be duplicate cmake targets Jun 26, 2018
@0-wiz-0
Copy link
Member

0-wiz-0 commented Jun 26, 2018

Which CMakeLists.txt file and which part do you mean? I don't understand.

@johnb003
Copy link
Author

Never mind, I might have written this after reading the PR that was never merged ><

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

No branches or pull requests

2 participants