Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
actor-incubator
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
cpp-libs
actor-incubator
Commits
0bc32b58
Commit
0bc32b58
authored
Dec 07, 2019
by
Dominik Charousset
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix library version of shared objects
parent
d6e0c75f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
5 deletions
+24
-5
CMakeLists.txt
CMakeLists.txt
+22
-0
libcaf_net/CMakeLists.txt
libcaf_net/CMakeLists.txt
+2
-5
No files found.
CMakeLists.txt
View file @
0bc32b58
...
...
@@ -162,6 +162,28 @@ endif()
find_package
(
CAF COMPONENTS core io test
)
# -- fetch CAF version ---------------------------------------------------------
# read content of config.hpp
file
(
READ
"
${
CAF_INCLUDE_DIR_CORE
}
/caf/config.hpp"
CONFIG_HPP
)
# get line containing the version
string
(
REGEX MATCH
"#define CAF_VERSION [0-9]+"
VERSION_LINE
"
${
CONFIG_HPP
}
"
)
# extract version number from line
string
(
REGEX MATCH
"[0-9]+"
VERSION_INT
"
${
VERSION_LINE
}
"
)
# calculate major, minor, and patch version
math
(
EXPR CAF_VERSION_MAJOR
"
${
VERSION_INT
}
/ 10000"
)
math
(
EXPR CAF_VERSION_MINOR
"(
${
VERSION_INT
}
/ 100) % 100"
)
math
(
EXPR CAF_VERSION_PATCH
"
${
VERSION_INT
}
% 100"
)
# create full version string
set
(
CAF_VERSION
"
${
CAF_VERSION_MAJOR
}
.
${
CAF_VERSION_MINOR
}
.
${
CAF_VERSION_PATCH
}
"
)
# set the library version for our shared library targets
if
(
CMAKE_HOST_SYSTEM_NAME MATCHES
"OpenBSD"
)
set
(
CAF_LIB_VERSION
"
${
CAF_VERSION_MAJOR
}
.
${
CAF_VERSION_MINOR
}
"
)
else
()
set
(
CAF_LIB_VERSION
"
${
CAF_VERSION
}
"
)
endif
()
# -- compiler setup ------------------------------------------------------------
# Enable a ton of warnings if --more-clang-warnings is used.
...
...
libcaf_net/CMakeLists.txt
View file @
0bc32b58
cmake_minimum_required
(
VERSION 2.8.12
)
project
(
caf_net C CXX
)
# get header files; only needed by CMake generators,
# e.g., for creating proper Xcode projects
file
(
GLOB_RECURSE LIBCAF_NET_HDRS
"caf/*.hpp"
)
...
...
@@ -42,7 +39,7 @@ set(LIBCAF_NET_SRCS
src/stream_socket.cpp
src/udp_datagram_socket.cpp
src/defaults.cpp
src/message_queue.cpp
src/message_queue.cpp
src/worker.cpp
)
...
...
@@ -60,7 +57,7 @@ if (NOT CAF_BUILD_STATIC_ONLY)
set_target_properties
(
libcaf_net_shared
PROPERTIES
SOVERSION
${
CAF_VERSION
}
VERSION
${
CAF_VERSION
}
VERSION
${
CAF_
LIB_
VERSION
}
OUTPUT_NAME caf_net
)
install
(
TARGETS libcaf_net_shared
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment