On 20.03.12 14:01:31, Oliver Smith wrote:
> I'm trying to make a CMakeLists for libevent, and had a couple of
> questions that would make it a bit cleaner:
>
> - Other than using a macro to do { add_executable(...)
> target_link_libraries(...) } is there a /clean/ way to make
> everything in a subdirectory automatically link a given library?
No.
> - The makefiles I'm basing this on build libevent_core.lib,
> libevent_extras.lib and then libevent.lib which is basically the two
> previous libraries merged.
>
> I wanted to do:
>
> ADD_LIBRARY(libevent_core ${CoreSrcFiles})
> ADD_LIBRARY(libevent_extras ${ExtraSrcFiles})
> ADD_LIBRARY(libevent)
> TARGET_LINK_LIBRARIES(libevent libevent_core libevent_extras)
>
> but this generates a warning/error, listing the two libraries in
Whats the error? It should just work.
Andreas
--
Powered by www.kitware.com
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Please keep messages on-topic and check the CMake FAQ at:
http://www.cmake.org/Wiki/CMake_FAQ
Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake