blob: 433ca5dd13bc9b11b421c5d0237bb7a810d6dc26 [file] [log] [blame]
Brian Waters13d96012017-12-08 16:53:31 -06001# The app_acct extension
2PROJECT("Simple Accounting server" C)
3
4########################
5# Search for libpg (postgresql package)
6FIND_PACKAGE(PostgreSQL REQUIRED)
7INCLUDE_DIRECTORIES(${POSTGRESQL_INCLUDE_DIR})
8
9########################
10# Parser files
11BISON_FILE(acct_conf.y)
12FLEX_FILE(acct_conf.l)
13SET_SOURCE_FILES_PROPERTIES(lex.acct_conf.c acct_conf.tab.c PROPERTIES COMPILE_FLAGS "-I ${CMAKE_CURRENT_SOURCE_DIR}")
14
15# List of source files
16SET( APP_ACCT_SRC
17 app_acct.h
18 app_acct.c
19 acct_db.c
20 acct_records.c
21)
22SET( APP_ACCT_SRC_GEN
23 lex.acct_conf.c
24 acct_conf.tab.c
25 acct_conf.tab.h
26)
27
28# Compile as a module
29FD_ADD_EXTENSION(app_acct ${APP_ACCT_SRC} ${APP_ACCT_SRC_GEN})
30TARGET_LINK_LIBRARIES(app_acct ${POSTGRESQL_LIBRARIES})
31
32
33####
34## INSTALL section ##
35
36INSTALL(TARGETS app_acct
37 LIBRARY DESTINATION ${INSTALL_EXTENSIONS_SUFFIX}
38 COMPONENT freeDiameter-accounting-server)