From 78122a98293552b81dc48c4fed979fb4481402a3 Mon Sep 17 00:00:00 2001 From: Xenofon Foukas <137962+xfoukas@users.noreply.github.com> Date: Tue, 10 Dec 2024 11:16:12 +0000 Subject: [PATCH] Added simple cmake file (#8) --- CMakeLists.txt | 26 ++++++++++++++++++++++++++ jbpf | 2 +- 2 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 CMakeLists.txt diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..fff932e --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,26 @@ +cmake_minimum_required(VERSION 3.16) + +project(jbpf-protobuf) +include(ExternalProject) + +add_definitions(-DPB_FIELD_32BIT) + +execute_process( + COMMAND bash ./init_submodules.sh + WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} + RESULT_VARIABLE result + OUTPUT_VARIABLE output + ERROR_VARIABLE error +) + +add_subdirectory(jbpf) + +if (NOT PROJECT_IS_TOP_LEVEL) + ######## Export header files for other projects ############ + set(JBPF_IO_HEADER_FILES ${JBPF_IO_HEADER_FILES} PARENT_SCOPE) + set(JBPF_MEM_MGMT_HEADER_FILES ${JBPF_MEM_MGMT_HEADER_FILES} PARENT_SCOPE) + set(JBPF_LIB_HEADER_FILES ${JBPF_LIB_HEADER_FILES} PARENT_SCOPE) + set(JBPF_CK_HEADER_FILES ${JBPF_CK_INCLUDES} PARENT_SCOPE) + set(JBPF_COMMON_HEADERS ${JBPF_COMMON_HEADERS} PARENT_SCOPE) + set(JBPF_LCM_IPC_HEADER_FILES ${JBPF_LCM_IPC_HEADER_FILES} PARENT_SCOPE) +endif() diff --git a/jbpf b/jbpf index eabdeed..feb60ea 160000 --- a/jbpf +++ b/jbpf @@ -1 +1 @@ -Subproject commit eabdeed69001962a1e4b9f55a8d6cba0e4f8015b +Subproject commit feb60ea3b349ebe7b49f3ba950a6eee7bad1bc54