<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
</head>
<body bgcolor="#FFFFFF" text="#000000">
I'm trying to make a CMakeLists for libevent, and had a couple of
questions that would make it a bit cleaner:<br>
<br>
- Other than using a macro to do { add_executable(...)
target_link_libraries(...) } is there a <i>clean</i> way to make
everything in a subdirectory automatically link a given library?<br>
<br>
- 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.<br>
<br>
I wanted to do:<br>
<br>
ADD_LIBRARY(libevent_core ${CoreSrcFiles})<br>
ADD_LIBRARY(libevent_extras ${ExtraSrcFiles})<br>
ADD_LIBRARY(libevent)<br>
TARGET_LINK_LIBRARIES(libevent libevent_core libevent_extras)<br>
<br>
but this generates a warning/error, listing the two libraries in
add_library doesn't work either.<br>
<br>
So for now I have<br>
<br>
ADD_LIBRARY(libevent_core ${CoreSrcFiles})<br>
ADD_LIBRARY(libevent_extras ${ExtraSrcFiles})<br>
ADD_LIBRARY(libevent ${CoreSrcFiles} ${ExtraSrcFiles})<br>
<br>
but that's clumsy :)<br>
<br>
- Oliver<br>
<br>
</body>
</html>