crpc/CMakeLists.txt
tqcq c910b747ef
Some checks failed
build-crpc / build (Release, mingw-w64-x86_64.toolchain.cmake) (push) Failing after 39s
build-crpc / build (Debug, host.toolchain.cmake) (push) Failing after 12m18s
build-crpc / build (Debug, mingw-w64-x86_64.toolchain.cmake) (push) Failing after 12m21s
build-crpc / build (Release, host.toolchain.cmake) (push) Failing after 15m4s
fix cmake version required
2023-12-03 08:34:17 +08:00

39 lines
1.1 KiB
CMake

cmake_minimum_required(VERSION 3.10)
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
)
INSTALL(TARGETS crpc DESTINATION bin)