Skip to content

cmake: Removes TINYXML2_EXPORT compile definition when building static library#805

Closed
wagcampbell wants to merge 1 commit intoleethomason:masterfrom
wagcampbell:master
Closed

cmake: Removes TINYXML2_EXPORT compile definition when building static library#805
wagcampbell wants to merge 1 commit intoleethomason:masterfrom
wagcampbell:master

Conversation

@wagcampbell
Copy link

This pull request prevents symbols from being exported from a shared library that links with tinxyml2 when tinyxml2 is built as a static library. With this change, symbols will only be exported if tinyxml2 is built as a shared library. This also removes references to the BUILD_STATIC_LIBS CMake variable in the documentation as that variable is not used.

NOTE: This exclusively impacts Windows/MSVC platforms as the visibility rules with other platforms are different.

@leethomason leethomason changed the title Removes TINYXML2_EXPORT compile definition when building static library cmake: Removes TINYXML2_EXPORT compile definition when building static library Mar 31, 2020
@leethomason
Copy link
Owner

Please see #804. There are so many build PRs open I'm not sure the best approach to reconcile them.

@c72578
Copy link
Contributor

c72578 commented Sep 16, 2020

@wagcampbell: Yes, exporting of symbols should be fixed, when building a static library. Could you please have a look at #820 too, if it would work for you? It contains a simple change to fix the issue.

@wagcampbell
Copy link
Author

@c72578 The fix from #820 works just as well and uses less code. Lets go with that instead 👍

@c72578
Copy link
Contributor

c72578 commented Sep 17, 2020

@leethomason This PR can be closed in favor of #820

@leethomason
Copy link
Owner

Sounds good; closing this, merging #820

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 this pull request may close these issues.

3 participants