Use json_is_true() in place of json_boolean_value() for compatibility
[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 # Fill these in so CLion doesn't complain. The real versions are set in the Makefile
18 add_definitions(-DPACKAGE_VERSION="built-with-cmake"
19                 -DPACKAGE_NAME="Moonshot Trust Router"
20                 -DPACKAGE_BUGREPORT="bugs@painless-security.com")
21
22 set(SOURCE_FILES
23         common/tests/cfg_test.c
24         common/tests/commtest.c
25     common/tests/dh_test.c
26     common/tests/mq_test.c
27     common/tests/thread_test.c
28     common/jansson_iterators.h
29     common/t_constraint.c
30     common/tr_apc.c
31     common/tr_comm.c
32     common/tr_config.c
33     common/tr_constraint.c
34     common/tr_debug.c
35     common/tr_dh.c
36     common/tr_filter.c
37         common/tr_gss_names.c
38     common/tr_idp.c
39     common/tr_mq.c
40     common/tr_msg.c
41     common/tr_name.c
42     common/tr_rp.c
43     common/tr_util.c
44     gsscon/test/gsscon_client.c
45     gsscon/test/gsscon_server.c
46     gsscon/gsscon_active.c
47     gsscon/gsscon_common.c
48     gsscon/gsscon_passive.c
49     include/trust_router/tid.h
50     include/trust_router/tr_constraint.h
51     include/trust_router/tr_dh.h
52     include/trust_router/tr_name.h
53     include/trust_router/tr_versioning.h
54     include/trust_router/trp.h
55     include/gsscon.h
56     include/tid_internal.h
57     include/tr.h
58     include/tr_apc.h
59     include/tr_cfgwatch.h
60     include/tr_comm.h
61     include/tr_config.h
62     include/tr_debug.h
63     include/tr_event.h
64     include/tr_filter.h
65         include/tr_gss_names.h
66     include/tr_idp.h
67     include/tr_mq.h
68     include/tr_msg.h
69     include/tr_rp.h
70     include/tr_tid.h
71     include/tr_trp.h
72     include/tr_util.h
73     include/trp_internal.h
74     include/trp_ptable.h
75     include/trp_rtable.h
76     tid/example/tidc_main.c
77     tid/example/tids_main.c
78     tid/tid_req.c
79     tid/tid_resp.c
80     tid/tidc.c
81     tid/tids.c
82     tr/tr.c
83     tr/tr_cfgwatch.c
84     tr/tr_event.c
85     tr/tr_main.c
86     tr/tr_tid.c
87     tr/tr_trp.c
88     tr/trpc_main.c
89     trp/test/ptbl_test.c
90     trp/test/rtbl_test.c
91     trp/msgtst.c
92     trp/trp_conn.c
93     trp/trp_ptable.c
94     trp/trp_req.c
95     trp/trp_rtable.c
96     trp/trp_upd.c
97     trp/trpc.c
98     trp/trps.c include/tr_name_internal.h mon/mon_req.c mon/mon_req_encode.c mon/mon_req_decode.c
99         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 include/mons_handlers.h tr/tr_tid_mons.c tr/tr_tid_mons.c trp/trp_route.c include/trp_route.h trp/trp_rtable_encoders.c trp/trp_route_encoders.c trp/trp_peer.c include/trp_peer.h trp/trp_peer_encoders.c trp/trp_ptable_encoders.c common/tr_idp_encoders.c common/tr_comm_encoders.c common/tr_rp_client.c include/tr_rp_client.h common/tr_rp_client_encoders.c common/tr_filter_encoders.c common/tr_config_encoders.c common/tr_config_filters.c common/tr_config_realms.c common/tr_config_rp_clients.c common/tr_config_orgs.c common/tr_config_comms.c common/tr_list.c include/tr_list.h include/tr_constraint_internal.h include/tr_json_util.h common/tr_aaa_server.c include/tr_aaa_server.h common/tr_inet_util.c include/tr_inet_util.h)
100
101 # Does not actually build!
102 add_executable(trust_router ${SOURCE_FILES})
103
104 add_executable(trmon mon/monc.c tr/trmon_main.c common/tr_gss_client.c include/tr_gss_client.h include/tr_json_util.h)
105
106 # Test build targets - for debugging
107 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 include/tr_json_util.h)
108 target_link_libraries(test_mon_req_encode jansson talloc glib-2.0)
109
110 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 include/tr_json_util.h)
111 target_link_libraries(test_mon_req_decode jansson talloc glib-2.0)
112
113 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 include/tr_json_util.h)
114 target_link_libraries(test_mon_resp_encode jansson talloc glib-2.0)