ADD_LIBRARY of cmake

In case you are having warning related to ADD_LIBRARY from cmake:

ADD_LIBRARY called with SHARED option but the target platform does not
 support dynamic linking. Building a STATIC library instead. This may lead
 to problems.
This warning is for project developers. Use -Wno-dev to suppress it.
To fix this warning, add following line to CMakeList.txt of the project:
SET_PROPERTY(GLOBAL PROPERTY TARGET_SUPPORTS_SHARED_LIBS "TRUE")

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s