Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
caosdb-cpplib
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
caosdb
Software
caosdb-cpplib
Commits
59fa4cef
Commit
59fa4cef
authored
Jun 12, 2024
by
Joscha Schmiedt
Browse files
Options
Downloads
Patches
Plain Diff
Fix errors in CMakeLists.txt for Debug
parent
c8b7bc33
No related branches found
No related tags found
2 merge requests
!61
Release 0.3.0
,
!49
Resolve "EXTERN: Adapt to Conan 2"
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
CMakeLists.txt
+50
-30
50 additions, 30 deletions
CMakeLists.txt
with
50 additions
and
30 deletions
CMakeLists.txt
+
50
−
30
View file @
59fa4cef
...
@@ -147,6 +147,9 @@ add_custom_command(
...
@@ -147,6 +147,9 @@ add_custom_command(
${
PROTO_FILES
}
${
PROTO_FILES
}
DEPENDS
${
PROTO_FILES
}
)
DEPENDS
${
PROTO_FILES
}
)
# show generated files
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_grpc] - only in Debug builds. Otherwise this library is compiled
...
@@ -157,51 +160,66 @@ add_custom_command(
...
@@ -157,51 +160,66 @@ add_custom_command(
### * ccaosdbcli - A plain C test client.
### * ccaosdbcli - A plain C test client.
###############################################################################
###############################################################################
find_package
(
gRPC
)
find_package
(
gRPC CONFIG REQUIRED
)
find_package
(
protobuf
)
find_package
(
Protobuf CONFIG REQUIRED
)
find_package
(
Boost
)
find_package
(
Boost REQUIRED
)
find_package
(
GTest
)
find_package
(
GTest REQUIRED
)
# print include directories for debugging
message
(
DEBUG
"CMAKE_INCLUDE_PATH:
${
CMAKE_INCLUDE_PATH
}
"
)
message
(
DEBUG
"PROTOBUF_INCLUDE_DIRS:
${
PROTOBUF_INCLUDE_DIRS
}
"
)
message
(
DEBUG
"gRPC_INCLUDE_DIRS:
${
gRPC_INCLUDE_DIRS
}
"
)
# libcaosdb
# libcaosdb
# ---------
# In Debug, build separate libraries for grpc-generated code and caosdb
if
(
"
${
CMAKE_BUILD_TYPE
}
"
MATCHES
"Debug"
)
if
(
"
${
CMAKE_BUILD_TYPE
}
"
MATCHES
"Debug"
)
add_library
(
caosdb_grpc SHARED
${
GRPC_GENERATED
}
)
add_library
(
caosdb SHARED
${
libcaosdb_INCL
}
${
libcaosdb_SRC
}
)
target_link_libraries
(
caosdb caosdb_grpc
grpc::grpc protobuf::protobuf boost::boost gtest::gtest
)
set
(
LIBCAOSDB caosdb caosdb_grpc
)
add_library
(
caosdb_grpc SHARED
${
GRPC_GENERATED
}
)
target_link_libraries
(
caosdb_grpc
grpc::grpc protobuf::protobuf boost::boost
)
target_include_directories
(
caosdb_grpc PUBLIC
target_include_directories
(
caosdb_grpc PUBLIC
$<BUILD_INTERFACE:
${
libcaosdb_SOURCE_DIR
}
/include
>
$<BUILD_INTERFACE:
${
PROJECT_INCLUDE_DIR
}
>
$<BUILD_INTERFACE:
${
libcaosdb
_BINARY_DIR
}
/include>
$<BUILD_INTERFACE:
${
CMAKE_CURRENT
_BINARY_DIR
}
/include>
$<INSTALL_INTERFACE:include>
$<INSTALL_INTERFACE:include>
)
)
target_include_directories
(
caosdb_grpc SYSTEM PUBLIC
${
CONAN_INCLUDE_DIRS
}
add_library
(
caosdb SHARED
${
libcaosdb_INCL
}
${
libcaosdb_SRC
}
)
target_link_libraries
(
caosdb
caosdb_grpc grpc::grpc protobuf::protobuf boost::boost
)
)
set
(
LIBCAOSDB caosdb caosdb_grpc
)
else
()
else
()
add_library
(
caosdb
add_library
(
caosdb
SHARED
${
libcaosdb_INCL
}
${
libcaosdb_SRC
}
${
GRPC_GENERATED
}
)
SHARED
${
libcaosdb_INCL
}
${
libcaosdb_SRC
}
${
GRPC_GENERATED
}
)
set
(
LIBCAOSDB caosdb
)
endif
()
target_link_libraries
(
caosdb
target_link_libraries
(
caosdb
grpc::grpc protobuf::protobuf boost::boost
gtest::gtest
grpc::grpc protobuf::protobuf boost::boost
stdc++fs
stdc++fs
)
)
set
(
LIBCAOSDB caosdb
)
endif
()
target_include_directories
(
caosdb PUBLIC
target_include_directories
(
caosdb PUBLIC
$<BUILD_INTERFACE:
${
libcaosdb_SOURCE_DIR
}
/include>
$<BUILD_INTERFACE:
${
libcaosdb_SOURCE_DIR
}
/include>
$<BUILD_INTERFACE:
${
libcaosdb_BINARY_DIR
}
/include>
$<BUILD_INTERFACE:
${
libcaosdb_BINARY_DIR
}
/include>
$<BUILD_INTERFACE:
${
libcaosdb_SOURCE_DIR
}
/src>
$<BUILD_INTERFACE:
${
libcaosdb_SOURCE_DIR
}
/src>
$<INSTALL_INTERFACE:include>
$<INSTALL_INTERFACE:include>
)
)
target_include_directories
(
caosdb SYSTEM PUBLIC
${
CONAN_INCLUDE_DIRS
}
)
# libccaosdb
# libccaosdb
# ----------
add_library
(
ccaosdb SHARED src/ccaosdb.cpp
)
add_library
(
ccaosdb SHARED src/ccaosdb.cpp
)
target_link_libraries
(
ccaosdb
target_link_libraries
(
ccaosdb
grpc::grpc protobuf::protobuf boost::boost
gtest::gtest
grpc::grpc protobuf::protobuf boost::boost
${
LIBCAOSDB
}
${
LIBCAOSDB
}
stdc++fs
stdc++fs
)
)
...
@@ -224,11 +242,13 @@ target_include_directories(ccaosdbcli SYSTEM PUBLIC
...
@@ -224,11 +242,13 @@ target_include_directories(ccaosdbcli SYSTEM PUBLIC
)
)
target_link_libraries
(
ccaosdbcli
target_link_libraries
(
ccaosdbcli
grpc::grpc protobuf::protobuf boost::boost
gtest::gtest
grpc::grpc protobuf::protobuf boost::boost
${
LIBCAOSDB
}
${
LIBCAOSDB
}
ccaosdb
ccaosdb
)
)
# cxxcaosdbcli
# ------------
add_executable
(
cxxcaosdbcli EXCLUDE_FROM_ALL src/cxxcaosdbcli.cpp
)
add_executable
(
cxxcaosdbcli EXCLUDE_FROM_ALL src/cxxcaosdbcli.cpp
)
target_include_directories
(
cxxcaosdbcli PUBLIC
target_include_directories
(
cxxcaosdbcli PUBLIC
$<BUILD_INTERFACE:
${
libcaosdb_SOURCE_DIR
}
/include>
$<BUILD_INTERFACE:
${
libcaosdb_SOURCE_DIR
}
/include>
...
@@ -240,7 +260,7 @@ target_include_directories(cxxcaosdbcli SYSTEM PUBLIC
...
@@ -240,7 +260,7 @@ target_include_directories(cxxcaosdbcli SYSTEM PUBLIC
)
)
target_link_libraries
(
cxxcaosdbcli
target_link_libraries
(
cxxcaosdbcli
${
LIBCAOSDB
}
${
LIBCAOSDB
}
grpc::grpc protobuf::protobuf boost::boost
gtest::gtest
grpc::grpc protobuf::protobuf boost::boost
)
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment