Browse Source

Compile common source as static lib

personal/stbuehler/wip
Stefan Bühler 13 years ago
parent
commit
4f9a695051
  1. 15
      src/CMakeLists.txt
  2. 1
      src/angel/angel_server.c

15
src/CMakeLists.txt

@ -264,18 +264,22 @@ RAGEL_PARSER(angel/angel_config_parser.rl)
SET(L_INSTALL_TARGETS)
ADD_LIBRARY(common STATIC
${COMMON_SRC}
)
ADD_EXECUTABLE(lighttpd
main/lighttpd.c
${LIGHTTPD_SHARED_SRC}
${COMMON_SRC}
)
TARGET_LINK_LIBRARIES(lighttpd common)
SET(L_INSTALL_TARGETS ${L_INSTALL_TARGETS} lighttpd)
ADD_EXECUTABLE(lighttpd-angel
angel/angel_main.c
${ANGEL_SHARED_SRC}
${COMMON_SRC}
)
TARGET_LINK_LIBRARIES(lighttpd-angel common)
SET(L_INSTALL_TARGETS ${L_INSTALL_TARGETS} lighttpd-angel)
IF(BUILD_EXTRA_WARNINGS)
@ -304,11 +308,14 @@ ADD_AND_INSTALL_LIBRARY(mod_rewrite "modules/mod_rewrite.c")
ADD_AND_INSTALL_LIBRARY(mod_status "modules/mod_status.c")
ADD_AND_INSTALL_LIBRARY(mod_vhost "modules/mod_vhost.c")
ADD_TARGET_PROPERTIES(common LINK_FLAGS ${COMMON_LDFLAGS})
ADD_TARGET_PROPERTIES(common COMPILE_FLAGS ${COMMON_CFLAGS})
ADD_TARGET_PROPERTIES(lighttpd LINK_FLAGS ${COMMON_LDFLAGS})
ADD_TARGET_PROPERTIES(lighttpd COMPILE_FLAGS ${COMMON_CFLAGS})
ADD_TARGET_PROPERTIES(lighttpd-angel LINK_FLAGS "${LUA_LDFLAGS} ${LIBEV_LDFLAGS} ${GTHREAD_LDFLAGS} ${GMODULE_LDFLAGS} ${WARN_FLAGS}")
ADD_TARGET_PROPERTIES(lighttpd-angel COMPILE_FLAGS "${LUA_CFLAGS} ${LIBEV_CFLAGS} ${GTHREAD_CFLAGS} ${GMODULE_CFLAGS} ${WARN_FLAGS}")
ADD_TARGET_PROPERTIES(lighttpd-angel LINK_FLAGS ${COMMON_LDFLAGS})
ADD_TARGET_PROPERTIES(lighttpd-angel COMPILE_FLAGS ${COMMON_CFLAGS})
# We use pcre through glib
#IF(WITH_PCRE)

1
src/angel/angel_server.c

@ -119,6 +119,7 @@ static void instance_angel_close_cb(liAngelConnection *acon, GError *err) {
static void instance_child_cb(struct ev_loop *loop, ev_child *w, int revents) {
liInstance *i = (liInstance*) w->data;
liInstanceState news;
UNUSED(revents);
if (i->s_dest == LI_INSTANCE_FINISHED) {
if (WIFEXITED(w->rstatus)) {

Loading…
Cancel
Save