Commit | Line | Data |
---|---|---|
9621eb22 TJ |
1 | # Show basic usage of libt2n and cmake |
2 | # Requires Libt2n.cmake | |
3 | ||
4 | # Setup libt2n | |
5 | set(t2n_mydaemon_GROUP | |
6 | ${CMAKE_SOURCE_DIR}/src/t2n_mydaemon.cpp | |
7 | ) | |
8 | include(Libt2n.cmake) | |
9 | ||
10 | # Call setup_libt2n with the CMDGROUP name | |
11 | setup_libt2n(t2n_mydaemon) | |
12 | ||
13 | # ------------------------------------------------------------------------------------------------------ | |
14 | ||
15 | set(keymaker_cpp_sources | |
16 | something.cpp | |
17 | ${t2n_mydaemon_GROUP} | |
18 | ) | |
19 | ||
20 | add_executable(mydaemon main.cpp ${keymaker_cpp_sources} t2n_mydaemon_server.cpp) | |
21 | target_link_libraries(mydaemon ${LIBT2N_LIBRARIES}) | |
22 | # Wait till generated code is available | |
23 | add_dependencies(mydaemon t2n_mydaemon_codegen_done) |