crpc/CMakeLists.txt

37 lines
1.1 KiB
CMake
Raw Normal View History

2023-12-02 00:32:54 +08:00
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
2023-12-02 08:45:42 +08:00
${SRC_LIST}
2023-12-02 00:32:54 +08:00
main.cpp
src/item.cpp
src/message.cpp
src/rpc.cpp
src/service.cpp
src/plugins/c/c_message_plugin.cpp
2023-12-02 08:45:42 +08:00
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
2023-12-02 00:32:54 +08:00
)
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/gen/ src/)
2023-12-02 11:05:25 +08:00
FILE(GLOB_RECURSE TEST_SRC_LIST ${CMAKE_CURRENT_BINARY_DIR}/gen/*.c)
add_executable(test ${TEST_SRC_LIST}
test/test.c
${CMAKE_CURRENT_SOURCE_DIR}/3party/tpl/tpl.c
)
target_include_directories(test PRIVATE
${CMAKE_CURRENT_BINARY_DIR}/gen/
${CMAKE_CURRENT_SOURCE_DIR}/3party/tpl
)