src/CMakeLists.txt
changeset 119 64f50072db9e
parent 118 05b8d5150313
child 121 4682ebbc5644
equal deleted inserted replaced
118:05b8d5150313 119:64f50072db9e
    16 set (CONSOLE_SOURCES console.c lua_console.c)
    16 set (CONSOLE_SOURCES console.c lua_console.c)
    17 
    17 
    18 set (NEXUS_SOURCES nexus.c ${CORE_SOURCES} ${SOCK_SOURCES} ${IRC_SOURCES} ${LUA_SOURCES} ${CONSOLE_SOURCES} signals.c module.c config.c)
    18 set (NEXUS_SOURCES nexus.c ${CORE_SOURCES} ${SOCK_SOURCES} ${IRC_SOURCES} ${LUA_SOURCES} ${CONSOLE_SOURCES} signals.c module.c config.c)
    19 set (TEST_SOURCES test.c ${CORE_SOURCES} ${SOCK_SOURCES} ${IRC_SOURCES})
    19 set (TEST_SOURCES test.c ${CORE_SOURCES} ${SOCK_SOURCES} ${IRC_SOURCES})
    20 set (IRC_LOG_SOURCES modules/irc_log.c)
    20 set (IRC_LOG_SOURCES modules/irc_log.c)
       
    21 set (LOGWATCH_SOURCES modules/logwatch.c modules/logwatch_source.c)
    21 
    22 
    22 # define our libraries
    23 # define our libraries
    23 set (MODULE_LIBRARIES "dl")
    24 set (MODULE_LIBRARIES "dl")
    24 set (NEXUS_LIBRARIES ${LibEvent_LIBRARIES} ${GnuTLS_LIBRARIES} ${MODULE_LIBRARIES} "readline" ${Lua51_LIBRARIES})
    25 set (NEXUS_LIBRARIES ${LibEvent_LIBRARIES} ${GnuTLS_LIBRARIES} ${MODULE_LIBRARIES} "readline" ${Lua51_LIBRARIES})
    25 
    26 
    30 add_executable (nexus ${NEXUS_SOURCES})
    31 add_executable (nexus ${NEXUS_SOURCES})
    31 add_executable (test EXCLUDE_FROM_ALL ${TEST_SOURCES})
    32 add_executable (test EXCLUDE_FROM_ALL ${TEST_SOURCES})
    32 
    33 
    33 # add our modules
    34 # add our modules
    34 add_library (irc_log MODULE ${IRC_LOG_SOURCES})
    35 add_library (irc_log MODULE ${IRC_LOG_SOURCES})
       
    36 add_library (logwatch MODULE ${LOGWATCH_SOURCES})
    35 
    37 
    36 # set libraries
    38 # set libraries
    37 target_link_libraries (nexus ${NEXUS_LIBRARIES})
    39 target_link_libraries (nexus ${NEXUS_LIBRARIES})
    38 target_link_libraries (test ${NEXUS_LIBRARIES})
    40 target_link_libraries (test ${NEXUS_LIBRARIES})
    39 target_link_libraries (irc_log ${Evsql_LIBRARIES})
    41 target_link_libraries (irc_log ${Evsql_LIBRARIES})
    40 
    42 
    41 # global target properties
    43 # global target properties
    42 set_target_properties (nexus test irc_log PROPERTIES
    44 set_target_properties (nexus test irc_log logwatch PROPERTIES
    43     COMPILE_FLAGS   ${CFLAGS}
    45     COMPILE_FLAGS   ${CFLAGS}
    44 )
    46 )
    45 
    47 
    46 # nexus needs to export its symbols to be able to load modules
    48 # nexus needs to export its symbols to be able to load modules
    47 set_target_properties (nexus PROPERTIES
    49 set_target_properties (nexus PROPERTIES
    48     LINK_FLAGS      "--export-dynamic"
    50     LINK_FLAGS      "--export-dynamic"
    49 )
    51 )
    50 
    52 
    51 # modules have weird names
    53 # modules have weird names
    52 set_target_properties (irc_log PROPERTIES
    54 set_target_properties (irc_log logwatch PROPERTIES
    53     PREFIX                      "mod_"
    55     PREFIX                      "mod_"
    54     LIBRARY_OUTPUT_DIRECTORY    "modules"
    56     LIBRARY_OUTPUT_DIRECTORY    "modules"
    55 )
    57 )
    56 
    58 
    57 ## setup install info
    59 ## setup install info