Skip to content
Snippets Groups Projects
Verified Commit 078ad20c authored by Timm Fitschen's avatar Timm Fitschen
Browse files

WIP: conan

parent b4807aad
No related branches found
No related tags found
No related merge requests found
Pipeline #9531 failed
...@@ -69,12 +69,12 @@ set_target_properties(caosdb PROPERTIES ...@@ -69,12 +69,12 @@ set_target_properties(caosdb PROPERTIES
CXX_CLANG_TIDY "${_CMAKE_CXX_CLANG_TIDY}" CXX_CLANG_TIDY "${_CMAKE_CXX_CLANG_TIDY}"
CXX_INCLUDE_WHAT_YOU_USE "${_CMAKE_CXX_INCLUDE_WHAT_YOU_USE}" CXX_INCLUDE_WHAT_YOU_USE "${_CMAKE_CXX_INCLUDE_WHAT_YOU_USE}"
) )
#add_executable(caosdbcli src/caosdbcli.cpp) add_executable(caosdbcli src/caosdbcli.cpp)
#set_target_properties(caosdbcli PROPERTIES set_target_properties(caosdbcli PROPERTIES
#CXX_CLANG_TIDY "${_CMAKE_CXX_CLANG_TIDY}" CXX_CLANG_TIDY "${_CMAKE_CXX_CLANG_TIDY}"
#CXX_INCLUDE_WHAT_YOU_USE "${_CMAKE_CXX_INCLUDE_WHAT_YOU_USE}" CXX_INCLUDE_WHAT_YOU_USE "${_CMAKE_CXX_INCLUDE_WHAT_YOU_USE}"
#) )
#target_link_libraries(caosdbcli caosdb caosdb_info_v1alpha1 ${CONAN_LIBS}) target_link_libraries(caosdbcli caosdb)
if("${CMAKE_BUILD_TYPE}" MATCHES "Debug") if("${CMAKE_BUILD_TYPE}" MATCHES "Debug")
# supress warnings during build of gtest # supress warnings during build of gtest
...@@ -89,8 +89,8 @@ endif() ...@@ -89,8 +89,8 @@ endif()
## CODE GENERATION ## CODE GENERATION
#option(GRPC_FETCHCONTENT "Fetch and build GRPC from the sources" OFF) option(GRPC_FETCHCONTENT "Fetch and build GRPC from the sources" OFF)
#include(FetchGRPC) include(FetchGRPC)
# #
# Protobuf/Grpc source files # Protobuf/Grpc source files
...@@ -109,11 +109,11 @@ set(hw_grpc_srcs "${CMAKE_CURRENT_BINARY_DIR}/include/caosdb/${hw_hdrs_path}/mai ...@@ -109,11 +109,11 @@ set(hw_grpc_srcs "${CMAKE_CURRENT_BINARY_DIR}/include/caosdb/${hw_hdrs_path}/mai
set(hw_grpc_hdrs "${CMAKE_CURRENT_BINARY_DIR}/include/caosdb/${hw_hdrs_path}/main.grpc.pb.h") set(hw_grpc_hdrs "${CMAKE_CURRENT_BINARY_DIR}/include/caosdb/${hw_hdrs_path}/main.grpc.pb.h")
add_custom_command( add_custom_command(
OUTPUT "${hw_proto_srcs}" "${hw_proto_hdrs}" "${hw_grpc_srcs}" "${hw_grpc_hdrs}" OUTPUT "${hw_proto_srcs}" "${hw_proto_hdrs}" "${hw_grpc_srcs}" "${hw_grpc_hdrs}"
COMMAND ${CMAKE_BINARY_DIR}/build_tools/protoc COMMAND ${_PROTOBUF_PROTOC}
ARGS --grpc_out "${CMAKE_CURRENT_BINARY_DIR}/include" ARGS --grpc_out "${CMAKE_CURRENT_BINARY_DIR}/include"
--cpp_out "${CMAKE_CURRENT_BINARY_DIR}/include" --cpp_out "${CMAKE_CURRENT_BINARY_DIR}/include"
-I "${PROTO_PATH}" -I "${PROTO_PATH}"
--plugin=protoc-gen-grpc="${CMAKE_BINARY_DIR}/build_tools/grpc_cpp_plugin" --plugin=protoc-gen-grpc="${_GRPC_CPP_PLUGIN_EXECUTABLE}"
"${PROTO_FILES}" "${PROTO_FILES}"
DEPENDS "${PROTO_FILES}") DEPENDS "${PROTO_FILES}")
...@@ -126,7 +126,9 @@ add_library(caosdb_info_v1alpha1 ...@@ -126,7 +126,9 @@ add_library(caosdb_info_v1alpha1
${hw_proto_srcs} ${hw_proto_srcs}
${hw_proto_hdrs}) ${hw_proto_hdrs})
target_link_libraries(caosdb_info_v1alpha1 target_link_libraries(caosdb_info_v1alpha1
${CONAN_LIBS}) ${_REFLECTION}
${_GRPC_GRPCPP}
${_PROTOBUF_LIBPROTOBUF})
target_include_directories(caosdb_info_v1alpha1 PUBLIC target_include_directories(caosdb_info_v1alpha1 PUBLIC
# headers to include when building from source # headers to include when building from source
$<BUILD_INTERFACE:${libcaosdb_SOURCE_DIR}/include> $<BUILD_INTERFACE:${libcaosdb_SOURCE_DIR}/include>
...@@ -136,7 +138,9 @@ target_include_directories(caosdb_info_v1alpha1 PUBLIC ...@@ -136,7 +138,9 @@ target_include_directories(caosdb_info_v1alpha1 PUBLIC
target_link_libraries(caosdb target_link_libraries(caosdb
caosdb_info_v1alpha1 caosdb_info_v1alpha1
${CONAN_LIBS}) ${_REFLECTION}
${_GRPC_GRPCPP}
${_PROTOBUF_LIBPROTOBUF})
############################################### ###############################################
...@@ -193,7 +197,7 @@ install( ...@@ -193,7 +197,7 @@ install(
TARGETS TARGETS
caosdb caosdb
caosdb_info_v1alpha1 caosdb_info_v1alpha1
#${CONAN_LIBS_GRPC} ${_GRPC_DEPS}
# name of the CMake "export group" containing the targets we want to install # name of the CMake "export group" containing the targets we want to install
EXPORT caosdbTargets EXPORT caosdbTargets
# Dynamic, static library and include destination locations after running # Dynamic, static library and include destination locations after running
......
[requires] [requires]
boost/1.76.0 boost/1.76.0
grpc/1.38.0
[generators] [generators]
cmake cmake
[imports]
bin, protoc* -> ./build_tools
bin, grpc_cpp_plugin* -> ./build_tools
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment