Skip to content
Snippets Groups Projects
Commit 2e3043a5 authored by Joscha Schmiedt's avatar Joscha Schmiedt
Browse files

Cleanup of CMakeLists.txt

- add generated protobuf source directory to global include folders
parent 2a3ae983
No related branches found
No related tags found
2 merge requests!61Release 0.3.0,!48Fix compilation errors on Windows
Pipeline #54420 passed with warnings
Pipeline: caosdb-julialib

#54429

    Pipeline: CaosDB Octave library

    #54428

      Pipeline: caosdb-cppinttest

      #54424

        ...@@ -133,14 +133,15 @@ add_custom_command( ...@@ -133,14 +133,15 @@ add_custom_command(
        ${PROTO_FILES} ${PROTO_FILES}
        DEPENDS ${PROTO_FILES}) DEPENDS ${PROTO_FILES})
        # add generated files to include path
        include_directories(${CMAKE_CURRENT_BINARY_DIR}/include)
        # show generated files # show generated files
        message(DEBUG "GRPC_GENERATED: ${GRPC_GENERATED}") message(DEBUG "GRPC_GENERATED: ${GRPC_GENERATED}")
        ############################################################################### ###############################################################################
        ### Set up main targets ### Set up main targets
        ### * [caosdb_grpc] - only in Debug builds. Otherwise this library is compiled ### * caosdb - The main library including the protobuf and grpc generated files.
        ### into caosdb libraray
        ### * caosdb (links to caosdb_grpc) - The main library.
        ### * cxxcaosdbcli - A C++ test client. ### * cxxcaosdbcli - A C++ test client.
        ### * ccaosdb - A C-Wrapper of the C++ caosdb library. ### * ccaosdb - A C-Wrapper of the C++ caosdb library.
        ### * ccaosdbcli - A plain C test client. ### * ccaosdbcli - A plain C test client.
        ...@@ -158,12 +159,17 @@ find_package(GTest REQUIRED) ...@@ -158,12 +159,17 @@ find_package(GTest REQUIRED)
        message(DEBUG "CMAKE_INCLUDE_PATH: ${CMAKE_INCLUDE_PATH}") message(DEBUG "CMAKE_INCLUDE_PATH: ${CMAKE_INCLUDE_PATH}")
        message(DEBUG "PROTOBUF_INCLUDE_DIRS: ${PROTOBUF_INCLUDE_DIRS}") message(DEBUG "PROTOBUF_INCLUDE_DIRS: ${PROTOBUF_INCLUDE_DIRS}")
        message(DEBUG "gRPC_INCLUDE_DIRS: ${gRPC_INCLUDE_DIRS}") message(DEBUG "gRPC_INCLUDE_DIRS: ${gRPC_INCLUDE_DIRS}")
        message(DEBUG "Boost_INCLUDE_DIRS: ${Boost_INCLUDE_DIRS}")
        message(DEBUG "GTest_INCLUDE_DIRS: ${GTest_INCLUDE_DIRS}")
        message(DEBUG "CMAKE_CXX_FLAGS: ${CMAKE_CXX_FLAGS}")
        message(DEBUG "libcaosdb_SOURCE_DIR: ${libcaosdb_SOURCE_DIR}")
        message(DEBUG "libcaosdb_BINARY_DIR: ${libcaosdb_BINARY_DIR}")
        # libcaosdb # libcaosdb
        # --------- # ---------
        add_library(caosdb SHARED add_library(caosdb SHARED
        ${libcaosdb_INCL} ${libcaosdb_SRC} ${GRPC_GENERATED_SOURCES}) ${libcaosdb_INCL} ${libcaosdb_SRC} ${GRPC_GENERATED})
        target_link_libraries(caosdb PUBLIC target_link_libraries(caosdb PUBLIC
        gRPC::grpc gRPC::grpc++ protobuf::libprotobuf ${Boost_LIBRARIES} gRPC::grpc gRPC::grpc++ protobuf::libprotobuf ${Boost_LIBRARIES}
        ) )
        ...@@ -178,7 +184,7 @@ target_include_directories(caosdb PUBLIC ...@@ -178,7 +184,7 @@ target_include_directories(caosdb PUBLIC
        # libccaosdb # libccaosdb
        # ---------- # ----------
        add_library(ccaosdb SHARED src/ccaosdb.cpp ${GRPC_GENERATED_SOURCES}) add_library(ccaosdb SHARED src/ccaosdb.cpp ${GRPC_GENERATED})
        target_link_libraries(ccaosdb PUBLIC target_link_libraries(ccaosdb PUBLIC
        caosdb caosdb
        gRPC::grpc gRPC::grpc++ protobuf::libprotobuf ${Boost_LIBRARIES} gRPC::grpc gRPC::grpc++ protobuf::libprotobuf ${Boost_LIBRARIES}
        ......
        0% Loading or .
        You are about to add 0 people to the discussion. Proceed with caution.
        Finish editing this message first!
        Please register or to comment