[CMake] How to generate a STATIC Library using ExternalProject_Add
Marshall, Rob
robm at qti.qualcomm.com
Wed Oct 31 11:51:45 EDT 2012
Hi,
I am using ExternalProject_Add to build websocketpp.
The build is successful and libwebsocketpp.a is generated.
But it appears to be generated as a "UTILITY" rather than a "STATIC".
How can I configure ExternalProject_Add to build websocketapp as "STATIC"?
When I try and link in websocketpp with MyApp an error occurs:
CMake Error at CMake/CMakeMacros.cmake:434 (target_link_libraries):
Target "websocketpp" of type UTILITY may not be linked into another target.
One may link only to STATIC or SHARED libraries, or to executables with the
ENABLE_EXPORTS property set.
Call Stack (most recent call first):
/app/MyApp/CMakeLists.txt:25 (my_link_libraries)
Thanks,
Rob
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20121031/8e19ac80/attachment.htm>
More information about the CMake
mailing list