diff --git a/CMakeLists.txt b/CMakeLists.txt index 6827cdf89c6cce7001a78a1524629fd05bd5e50c..039800c612c1f2cee71fa65bf4551bd25ff7f36c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -101,11 +101,11 @@ set(PROTO_FILES set(PROTO_PATH ${PROJECT_SOURCE_DIR}/proto/proto) # Generated sources -set(hw_hdrs_path "caosdb/info/v1alpha1") -set(hw_proto_srcs "${CMAKE_CURRENT_BINARY_DIR}/include/caosdb/info/v1alpha1/main.pb.cc") -set(hw_proto_hdrs "${CMAKE_CURRENT_BINARY_DIR}/include/${hw_hdrs_path}/main.pb.h") -set(hw_grpc_srcs "${CMAKE_CURRENT_BINARY_DIR}/include/caosdb/info/v1alpha1/main.grpc.pb.cc") -set(hw_grpc_hdrs "${CMAKE_CURRENT_BINARY_DIR}/include/${hw_hdrs_path}/main.grpc.pb.h") +set(hw_hdrs_path "info/v1alpha1") +set(hw_proto_srcs "${CMAKE_CURRENT_BINARY_DIR}/include/caosdb/${hw_hdrs_path}/main.pb.cc") +set(hw_proto_hdrs "${CMAKE_CURRENT_BINARY_DIR}/include/caosdb/${hw_hdrs_path}/main.pb.h") +set(hw_grpc_srcs "${CMAKE_CURRENT_BINARY_DIR}/include/caosdb/${hw_hdrs_path}/main.grpc.pb.cc") +set(hw_grpc_hdrs "${CMAKE_CURRENT_BINARY_DIR}/include/caosdb/${hw_hdrs_path}/main.grpc.pb.h") add_custom_command( OUTPUT "${hw_proto_srcs}" "${hw_proto_hdrs}" "${hw_grpc_srcs}" "${hw_grpc_hdrs}" COMMAND ${CMAKE_BINARY_DIR}/build_tools/protoc @@ -142,13 +142,8 @@ target_link_libraries(caosdb ############ INSTALLATION ##################### ############################################### -# These variables slightly modify the install location to allow for version -# specific installations. -if(NOT INSTALL_DIR_NAME) - set(INSTALL_DIR_NAME "libcaosdb") -endif() -set(libcaosdb_INCLUDE_DEST "include/${INSTALL_DIR_NAME}") -set(libcaosdb_LIB_DEST "lib/${INSTALL_DIR_NAME}") +set(libcaosdb_INCLUDE_DEST "include/caosdb") +set(libcaosdb_LIB_DEST "lib") # generator expressions are needed for the include directories, since @@ -175,7 +170,7 @@ target_include_directories(caosdb PUBLIC ) -set(CMAKE_INSTALL_PREFIX "$ENV{HOME}/libcaosdb/") +set(CMAKE_INSTALL_PREFIX "$ENV{HOME}/.local/") # Install libcaosdb in CMAKE_INSTALL_PREFIX (defaults to /usr/local on linux). # To change the install location, run # cmake -DCMAKE_INSTALL_PREFIX=<desired-install-path> .. diff --git a/test/test_connection.cpp b/test/test_connection.cpp index fb33989d574af3859f18bfdba854604b5c448f88..bee68e2a50fb83e999146c983fc0194628db88b1 100644 --- a/test/test_connection.cpp +++ b/test/test_connection.cpp @@ -38,8 +38,10 @@ TEST(test_connection, configure_insecure_localhost_8080) { } TEST(test_connection, configure_ssl_localhost_8080) { - auto cacert = std::make_shared<caosdb::connection::PemCACertProvider>("ca chain"); - caosdb::connection::SslCaosDBConnectionConfig config("localhost", 44300, cacert); + auto cacert = + std::make_shared<caosdb::connection::PemCACertProvider>("ca chain"); + caosdb::connection::SslCaosDBConnectionConfig config("localhost", 44300, + cacert); ASSERT_EQ("localhost", config.getHost()); ASSERT_EQ(44300, config.getPort());