crpc/CMakeLists.txt
2023-12-03 08:04:44 +08:00

35 lines
1.1 KiB
CMake

cmake_minimum_required(VERSION 3.26)
project(crpc)
find_package(antlr4-runtime CONFIG REQUIRED)
set(CMAKE_CXX_STANDARD 17)
FILE(GLOB_RECURSE SRC_LIST ${PROJECT_SOURCE_DIR}/src/*.cpp)
add_executable(crpc
${SRC_LIST}
main.cpp
src/item.cpp
src/message.cpp
src/rpc.cpp
src/service.cpp
src/plugins/c/c_message_plugin.cpp
src/plugins/c/items/c_item.cpp
src/plugins/service_plugin.cpp
src/plugins/plugin.cpp
src/plugins/c/c_service_server_plugin.cpp
src/plugins/c/rpcs/crpc_client.cpp
src/plugins/c/rpcs/crpc.cpp
src/plugins/c/c_service_plugin.cpp
)
target_link_libraries(crpc PRIVATE antlr4_static)
target_include_directories(crpc PRIVATE /opt/dev/vcpkg/installed/arm64-osx/include/antlr4-runtime)
target_include_directories(crpc PRIVATE src/grammar/ src/)
FILE(GLOB_RECURSE TEST_SRC_LIST ${CMAKE_CURRENT_BINARY_DIR}/grammar/*.c)
add_executable(test ${TEST_SRC_LIST}
test/test.c
)
target_include_directories(test PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}/3party/tpl
)