drogon/examples/CMakeLists.txt

28 lines
848 B
CMake
Raw Normal View History

link_libraries(drogon trantor pthread dl)
2018-06-28 15:29:40 +00:00
FILE(GLOB SCP_LIST ${CMAKE_CURRENT_SOURCE_DIR}/simple_example/*.csp)
2018-05-30 05:23:59 +00:00
foreach(cspFile ${SCP_LIST})
message(STATUS "cspFile:" ${cspFile})
EXEC_PROGRAM(basename ARGS "${cspFile} .csp" OUTPUT_VARIABLE classname)
2018-05-30 05:23:59 +00:00
message(STATUS "view classname:" ${classname})
add_custom_command(OUTPUT ${classname}.h ${classname}.cc
COMMAND drogon_ctl
ARGS create view ${cspFile}
DEPENDS ${cspFile}
VERBATIM )
set(VIEWSRC ${VIEWSRC} ${classname}.cc)
endforeach()
2018-06-28 15:29:40 +00:00
AUX_SOURCE_DIRECTORY(simple_example DIR_STATIC)
2018-05-30 05:23:59 +00:00
add_executable(webapp ${DIR_STATIC} ${VIEWSRC})
2018-05-30 05:59:12 +00:00
add_dependencies(webapp drogon_ctl)
2018-05-30 05:23:59 +00:00
2018-07-24 09:24:23 +00:00
AUX_SOURCE_DIRECTORY(client_example DIR_CLIENT)
AUX_SOURCE_DIRECTORY(benchmark DIR_BENCHMARK)
2018-07-24 09:24:23 +00:00
add_executable(client ${DIR_CLIENT})
add_executable(benchmark ${DIR_BENCHMARK})
2018-07-24 09:24:23 +00:00