First functional monitoring server - can return the trust router version
[trust_router.git] / CMakeLists.txt
1 # Rudimentary CMakeLists.txt
2 #
3 # This is not used for real builds, it mostly exists to enable code navigation in
4 # CLion. Real builds use autotools + make.
5 #
6 cmake_minimum_required(VERSION 3.6)
7 project(trust_router)
8
9 set(CMAKE_CXX_STANDARD 11)
10
11 include(FindPkgConfig)
12 pkg_check_modules(GLIB glib-2.0 REQUIRED)
13 include_directories(${GLIB_INCLUDE_DIRS})
14
15 include_directories(include)
16
17 set(SOURCE_FILES
18         common/tests/cfg_test.c
19         common/tests/commtest.c
20     common/tests/dh_test.c
21     common/tests/mq_test.c
22     common/tests/thread_test.c
23     common/jansson_iterators.h
24     common/t_constraint.c
25     common/tr_apc.c
26     common/tr_comm.c
27     common/tr_config.c
28     common/tr_constraint.c
29     common/tr_debug.c
30     common/tr_dh.c
31     common/tr_filter.c
32         common/tr_gss_names.c
33     common/tr_idp.c
34     common/tr_mq.c
35     common/tr_msg.c
36     common/tr_name.c
37     common/tr_rp.c
38     common/tr_util.c
39     gsscon/test/gsscon_client.c
40     gsscon/test/gsscon_server.c
41     gsscon/gsscon_active.c
42     gsscon/gsscon_common.c
43     gsscon/gsscon_passive.c
44     include/trust_router/tid.h
45     include/trust_router/tr_constraint.h
46     include/trust_router/tr_dh.h
47     include/trust_router/tr_name.h
48     include/trust_router/tr_versioning.h
49     include/trust_router/trp.h
50     include/gsscon.h
51     include/tid_internal.h
52     include/tr.h
53     include/tr_apc.h
54     include/tr_cfgwatch.h
55     include/tr_comm.h
56     include/tr_config.h
57     include/tr_debug.h
58     include/tr_event.h
59     include/tr_filter.h
60         include/tr_gss_names.h
61     include/tr_idp.h
62     include/tr_mq.h
63     include/tr_msg.h
64     include/tr_rp.h
65     include/tr_tid.h
66     include/tr_trp.h
67     include/tr_util.h
68     include/trp_internal.h
69     include/trp_ptable.h
70     include/trp_rtable.h
71     tid/example/tidc_main.c
72     tid/example/tids_main.c
73     tid/tid_req.c
74     tid/tid_resp.c
75     tid/tidc.c
76     tid/tids.c
77     tr/tr.c
78     tr/tr_cfgwatch.c
79     tr/tr_event.c
80     tr/tr_main.c
81     tr/tr_tid.c
82     tr/tr_trp.c
83     tr/trpc_main.c
84     trp/test/ptbl_test.c
85     trp/test/rtbl_test.c
86     trp/msgtst.c
87     trp/trp_conn.c
88     trp/trp_ptable.c
89     trp/trp_req.c
90     trp/trp_rtable.c
91     trp/trp_upd.c
92     trp/trpc.c
93     trp/trps.c include/tr_name_internal.h mon/mon_req.c mon/mon_req_encode.c mon/mon_req_decode.c
94         mon/mon_resp.c mon/mon_common.c mon/mon_resp_encode.c mon/mon_resp_decode.c tr/tr_mon.c mon/mons.c include/tr_socket.h common/tr_gss.c include/tr_gss.h common/tr_config_internal.c mon/mons_handlers.c mon/mons_handlers.h mon/mons_handlers_show.c)
95
96 # Does not actually build!
97 add_executable(trust_router ${SOURCE_FILES})
98
99 add_executable(trmon mon/monc.c tr/trmon_main.c common/tr_gss_client.c include/tr_gss_client.h)
100
101 # Test build targets - for debugging
102 add_executable(test_mon_req_encode mon/mon_common.c mon/mon_req.c mon/tests/test_mon_req_encode.c mon/mon_req_encode.c)
103 target_link_libraries(test_mon_req_encode jansson talloc glib-2.0)
104
105 add_executable(test_mon_req_decode mon/mon_common.c mon/mon_req.c mon/tests/test_mon_req_decode.c mon/mon_req_decode.c)
106 target_link_libraries(test_mon_req_decode jansson talloc glib-2.0)
107
108 add_executable(test_mon_resp_encode mon/mon_common.c mon/mon_req.c mon/mon_resp.c mon/mon_resp_encode.c common/tr_name.c mon/tests/test_mon_resp_encode.c)
109 target_link_libraries(test_mon_resp_encode jansson talloc glib-2.0)