diff --git a/CMakeLists.txt b/CMakeLists.txt index b286229fe005c528692de7f7432494e261eff89c..8dd0019bc0f65013bfe395723e4daf61d0e659c6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -162,10 +162,8 @@ message(DEBUG "gRPC_INCLUDE_DIRS: ${gRPC_INCLUDE_DIRS}") # libcaosdb # --------- - - add_library(caosdb SHARED - ${libcaosdb_INCL} ${libcaosdb_SRC} ${GRPC_GENERATED}) + ${libcaosdb_INCL} ${libcaosdb_SRC} ${GRPC_GENERATED_SOURCES}) target_link_libraries(caosdb PUBLIC gRPC::grpc gRPC::grpc++ protobuf::libprotobuf ${Boost_LIBRARIES} ) @@ -180,7 +178,7 @@ target_include_directories(caosdb PUBLIC # libccaosdb # ---------- -add_library(ccaosdb SHARED src/ccaosdb.cpp ${GRPC_GENERATED}) +add_library(ccaosdb SHARED src/ccaosdb.cpp ${GRPC_GENERATED_SOURCES}) target_link_libraries(ccaosdb PUBLIC caosdb gRPC::grpc gRPC::grpc++ protobuf::libprotobuf ${Boost_LIBRARIES} @@ -200,8 +198,6 @@ target_include_directories(ccaosdbcli PUBLIC $<BUILD_INTERFACE:${libcaosdb_BINARY_DIR}/include> $<INSTALL_INTERFACE:include> ) -# target_include_directories(ccaosdbcli SYSTEM PUBLIC -# ) target_link_libraries(ccaosdbcli PRIVATE gRPC::grpc protobuf::libprotobuf ${Boost_LIBRARIES} @@ -216,7 +212,6 @@ target_include_directories(cxxcaosdbcli PUBLIC $<BUILD_INTERFACE:${libcaosdb_BINARY_DIR}/include> $<INSTALL_INTERFACE:include> ) - target_link_libraries(cxxcaosdbcli PRIVATE caosdb gRPC::grpc++ protobuf::libprotobuf ${Boost_LIBRARIES} ) @@ -345,9 +340,10 @@ endif() ### UNIT TEST ####################################################### -enable_testing() -add_subdirectory(test) - +if("${CMAKE_BUILD_TYPE}" MATCHES "Debug") + enable_testing() + add_subdirectory(test) +endif() # ############################################### # ############ INSTALLATION #####################