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
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
caosdb
Software
caosdb-cpplib
Commits
1d84a449
Commit
1d84a449
authored
10 months ago
by
Joscha Schmiedt
Browse files
Options
Downloads
Patches
Plain Diff
Improve boost linking
- Only use required components of boost - Link automatically to ${Boost_LIBRARIES}
parent
6e1c6203
Branches
Branches containing commit
Tags
Tags containing commit
2 merge requests
!61
Release 0.3.0
,
!53
Add vcpkg support
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
CMakeLists.txt
+16
-25
16 additions, 25 deletions
CMakeLists.txt
with
16 additions
and
25 deletions
CMakeLists.txt
+
16
−
25
View file @
1d84a449
...
@@ -2,7 +2,9 @@
...
@@ -2,7 +2,9 @@
# This file is a part of the CaosDB Project.
# This file is a part of the CaosDB Project.
#
#
# Copyright (C) 2021 Timm Fitschen <t.fitschen@indiscale.com>
# Copyright (C) 2021 Timm Fitschen <t.fitschen@indiscale.com>
# Copyright (C) 2021 IndiScale GmbH <info@indiscale.com>
# Copyright (C) 2021 Joscha Schmiedt <joscha@schmiedt.dev>
# Copyright (C) 2021-2024 IndiScale GmbH <info@indiscale.com>
#
#
#
# This program is free software: you can redistribute it and/or modify
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# it under the terms of the GNU Affero General Public License as
...
@@ -51,24 +53,8 @@ IF (BUILD_ACM)
...
@@ -51,24 +53,8 @@ IF (BUILD_ACM)
add_compile_definitions
(
"BUILD_ACM"
)
add_compile_definitions
(
"BUILD_ACM"
)
ENDIF
()
ENDIF
()
###########################################
### DEPENDENCY MANAGEMENT with CONAN
###########################################
message
(
STATUS
"Build directory
${
CMAKE_BINARY_DIR
}
"
)
message
(
STATUS
"Build directory
${
CMAKE_BINARY_DIR
}
"
)
# TODO: Is this still necessary?
# # fix grpc - remove unsecure (no-op ssl implementations)
# string(REGEX REPLACE "grpc\\+?\\+?_unsecure" "" CONAN_LIBS_GRPC
# "${CONAN_LIBS_GRPC}")
# string(REGEX REPLACE "grpc\\+?\\+?_unsecure" "" CONAN_PKG_LIBS_GRPC
# "${CONAN_PKG_LIBS_GRPC}")
# string(REGEX REPLACE "grpc\\+?\\+?_unsecure" "" CONAN_LIBS
# "${CONAN_LIBS}")
# string(REGEX REPLACE "grpc\\+?\\+?_unsecure" "" CONAN_PKG_LIBS
# "${CONAN_PKG_LIBS}")
# message(STATUS "CONAN_LIBS: ${CONAN_LIBS}")
###########################################
###########################################
### GENERAL SETUP of SOURCES
### GENERAL SETUP of SOURCES
###########################################
###########################################
...
@@ -81,7 +67,7 @@ add_subdirectory(doc)
...
@@ -81,7 +67,7 @@ add_subdirectory(doc)
### CODE GENERATION (WITH GRPC)
### CODE GENERATION (WITH GRPC)
####################################################################
####################################################################
find_package
(
P
rotobuf CONFIG REQUIRED
)
find_package
(
p
rotobuf CONFIG REQUIRED
)
# Protobuf/Grpc source files
# Protobuf/Grpc source files
set
(
PROTO_FILES
set
(
PROTO_FILES
...
@@ -161,7 +147,12 @@ message(DEBUG "GRPC_GENERATED: ${GRPC_GENERATED}")
...
@@ -161,7 +147,12 @@ message(DEBUG "GRPC_GENERATED: ${GRPC_GENERATED}")
###############################################################################
###############################################################################
find_package
(
gRPC CONFIG REQUIRED
)
find_package
(
gRPC CONFIG REQUIRED
)
find_package
(
Boost REQUIRED
)
find_package
(
Boost COMPONENTS json REQUIRED
)
find_package
(
Boost COMPONENTS filesystem REQUIRED
)
find_package
(
Boost COMPONENTS log REQUIRED
)
find_package
(
Boost COMPONENTS thread REQUIRED
)
find_package
(
Boost COMPONENTS system REQUIRED
)
find_package
(
Boost COMPONENTS beast REQUIRED
)
find_package
(
GTest REQUIRED
)
find_package
(
GTest REQUIRED
)
# print include directories for debugging
# print include directories for debugging
...
@@ -178,7 +169,7 @@ if("${CMAKE_BUILD_TYPE}" MATCHES "Debug")
...
@@ -178,7 +169,7 @@ if("${CMAKE_BUILD_TYPE}" MATCHES "Debug")
add_library
(
caosdb_grpc SHARED
${
GRPC_GENERATED
}
)
add_library
(
caosdb_grpc SHARED
${
GRPC_GENERATED
}
)
target_link_libraries
(
caosdb_grpc
target_link_libraries
(
caosdb_grpc
g
rpc
::grpc protobuf::protobuf
b
oost
::boost
g
RPC
::grpc protobuf::
lib
protobuf
${
B
oost
_LIBRARIES
}
)
)
target_include_directories
(
caosdb_grpc PUBLIC
target_include_directories
(
caosdb_grpc PUBLIC
$<BUILD_INTERFACE:
${
PROJECT_INCLUDE_DIR
}
>
$<BUILD_INTERFACE:
${
PROJECT_INCLUDE_DIR
}
>
...
@@ -189,7 +180,7 @@ if("${CMAKE_BUILD_TYPE}" MATCHES "Debug")
...
@@ -189,7 +180,7 @@ if("${CMAKE_BUILD_TYPE}" MATCHES "Debug")
add_library
(
caosdb SHARED
${
libcaosdb_INCL
}
${
libcaosdb_SRC
}
)
add_library
(
caosdb SHARED
${
libcaosdb_INCL
}
${
libcaosdb_SRC
}
)
target_link_libraries
(
caosdb
target_link_libraries
(
caosdb
caosdb_grpc g
rpc
::grpc protobuf::protobuf
b
oost
::boost
caosdb_grpc g
RPC
::grpc protobuf::
lib
protobuf
${
B
oost
_LIBRARIES
}
)
)
set
(
LIBCAOSDB caosdb caosdb_grpc
)
set
(
LIBCAOSDB caosdb caosdb_grpc
)
...
@@ -197,7 +188,7 @@ else()
...
@@ -197,7 +188,7 @@ else()
add_library
(
caosdb
add_library
(
caosdb
SHARED
${
libcaosdb_INCL
}
${
libcaosdb_SRC
}
${
GRPC_GENERATED
}
)
SHARED
${
libcaosdb_INCL
}
${
libcaosdb_SRC
}
${
GRPC_GENERATED
}
)
target_link_libraries
(
caosdb
target_link_libraries
(
caosdb
g
rpc
::grpc protobuf::protobuf
b
oost
::boost
g
RPC
::grpc protobuf::
lib
protobuf
${
B
oost
_LIBRARIES
}
stdc++fs
stdc++fs
)
)
set
(
LIBCAOSDB caosdb
)
set
(
LIBCAOSDB caosdb
)
...
@@ -218,7 +209,7 @@ target_include_directories(caosdb PUBLIC
...
@@ -218,7 +209,7 @@ target_include_directories(caosdb PUBLIC
# ----------
# ----------
add_library
(
ccaosdb SHARED src/ccaosdb.cpp
)
add_library
(
ccaosdb SHARED src/ccaosdb.cpp
)
target_link_libraries
(
ccaosdb
target_link_libraries
(
ccaosdb
g
rpc
::grpc protobuf::protobuf
b
oost
::boost
g
RPC
::grpc protobuf::
lib
protobuf
${
B
oost
_LIBRARIES
}
${
LIBCAOSDB
}
${
LIBCAOSDB
}
stdc++fs
stdc++fs
)
)
...
@@ -242,7 +233,7 @@ target_include_directories(ccaosdbcli SYSTEM PUBLIC
...
@@ -242,7 +233,7 @@ target_include_directories(ccaosdbcli SYSTEM PUBLIC
)
)
target_link_libraries
(
ccaosdbcli
target_link_libraries
(
ccaosdbcli
g
rpc
::grpc protobuf::protobuf
b
oost
::boost
g
RPC
::grpc protobuf::
lib
protobuf
${
B
oost
_LIBRARIES
}
${
LIBCAOSDB
}
${
LIBCAOSDB
}
ccaosdb
ccaosdb
)
)
...
@@ -260,7 +251,7 @@ target_include_directories(cxxcaosdbcli SYSTEM PUBLIC
...
@@ -260,7 +251,7 @@ target_include_directories(cxxcaosdbcli SYSTEM PUBLIC
)
)
target_link_libraries
(
cxxcaosdbcli
target_link_libraries
(
cxxcaosdbcli
${
LIBCAOSDB
}
${
LIBCAOSDB
}
g
rpc
::grpc protobuf::protobuf
b
oost
::boost
g
RPC
::grpc protobuf::
lib
protobuf
${
B
oost
_LIBRARIES
}
)
)
...
...
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