Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Cameo
cameo
Commits
cfacea6c
Commit
cfacea6c
authored
Oct 06, 2020
by
Shervin Nourbakhsh
Browse files
(split2) Merge branch 'cpp_master'
parents
56ef3a31
0eea43a2
Pipeline
#8854
failed with stage
Changes
94
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/cameo
/Response.h
→
include
/Response.h
View file @
cfacea6c
File moved
src/cameo
/Serializer.h
→
include
/Serializer.h
View file @
cfacea6c
File moved
src/cameo
/Server.h
→
include
/Server.h
View file @
cfacea6c
File moved
src/cameo
/Services.h
→
include
/Services.h
View file @
cfacea6c
File moved
src/cameo
/SocketException.h
→
include
/SocketException.h
View file @
cfacea6c
File moved
src/cameo
/SubscriberCreationException.h
→
include
/SubscriberCreationException.h
View file @
cfacea6c
File moved
src/cameo
/TimeCondition.h
→
include
/TimeCondition.h
View file @
cfacea6c
File moved
src/cameo
/UnmanagedApplicationException.h
→
include
/UnmanagedApplicationException.h
View file @
cfacea6c
File moved
src/cameo
/cameo.h
→
include
/cameo.h
View file @
cfacea6c
File moved
src/
cameo/
Application.cpp
→
src/Application.cpp
View file @
cfacea6c
File moved
src/CMakeLists.txt
0 → 100644
View file @
cfacea6c
if
(
NOT DEFINED PROJECT_NAME
)
cmake_minimum_required
(
VERSION 3.7.2
)
# Project name and version
project
(
cameo VERSION 0.3.0 LANGUAGES CXX
)
endif
()
include
(
GNUInstallDirs
)
include
(
CMakePackageConfigHelpers
)
if
(
NOT DEFINED BUILD_SHARED_LIBS
)
set
(
BUILD_SHARED_LIBS True
)
endif
()
# fix the RPATH for the linker
#if(not APPLE)
# set(CMAKE_INSTALL_RPATH $ORIGIN)
#endif()
#------------------------------------------------------------
# Dependencies
#------------------------------------------------------------
list
(
APPEND CMAKE_MODULE_PATH
${
CMAKE_CURRENT_SOURCE_DIR
}
)
find_package
(
ZeroMQ REQUIRED
)
# I cannot find it
find_package
(
Protobuf 3.0.0 REQUIRED
)
#------------------------------------------------------------
# Libraries
#------------------------------------------------------------
#---------------
# Files
file
(
GLOB_RECURSE CAMEO_SOURCE_FILES
"./cameo/*.cpp"
)
file
(
GLOB CAMEO_PUBLIC_HEADER_FILES
"./cameo/*.h"
)
#message(${CAMEO_PUBLIC_HEADER_FILES})
#message(${CAMEO_SOURCE_FILES})
# this generates the Messages.pb.h and Messages.pb.cc files
protobuf_generate_cpp
(
PROTO_SRCS PROTO_HDRS ./proto/Messages.proto
)
add_library
(
cameo
${
CAMEO_SOURCE_FILES
}
${
PROTO_SRCS
}
)
target_link_libraries
(
cameo PRIVATE zmq protobuf
${
Protobuf_LIBRARIES
}
)
target_include_directories
(
cameo
PRIVATE
${
CMAKE_CURRENT_BINARY_DIR
}
# this is to get protobuf messages
PRIVATE
${
CMAKE_CURRENT_SOURCE_DIR
}
/src/cameo/impl
PUBLIC $<BUILD_INTERFACE:
${
CMAKE_CURRENT_SOURCE_DIR
}
/cameo>
PUBLIC $<INSTALL_INTERFACE:
${
CMAKE_INSTALL_INCLUDEDIR
}
>
)
#target_compile_features(cameo PUBLIC cxx_std_11)
set_target_properties
(
cameo PROPERTIES
SOVERSION
${
PROJECT_VERSION_MAJOR
}
VERSION
${
PROJECT_VERSION
}
)
message
(
${
PROJECT_VERSION_MAJOR
}
)
message
(
${
PROJECT_VERSION
}
)
#---------------
# Library version
write_basic_package_version_file
(
cameoConfigVersion.cmake
COMPATIBILITY SameMajorVersion
VERSION
${
PROJECT_VERSION
}
)
#------------------------------------------------------------
# Install
#------------------------------------------------------------
install
(
FILES
${
CMAKE_CURRENT_BINARY_DIR
}
/cameoConfigVersion.cmake
DESTINATION
${
CMAKE_INSTALL_LIBDIR
}
/cmake
)
# this is to install the headers
install
(
FILES
${
CAMEO_PUBLIC_HEADER_FILES
}
DESTINATION
${
CMAKE_INSTALL_INCLUDEDIR
}
/
${
PROJECT_NAME
}
)
# in CMake 3.14 you just need #install(TARGETS cameo)
install
(
TARGETS cameo
EXPORT cameoexport
RUNTIME DESTINATION
${
CMAKE_INSTALL_BINDIR
}
# windows
COMPONENT cameo_Runtime
LIBRARY DESTINATION
${
CMAKE_INSTALL_LIBDIR
}
# dynamic
COMPONENT cameo_Runtime
# NAMELINK_COMPONENT cameo_Development #from CMake 3.12
ARCHIVE DESTINATION
${
CMAKE_INSTALL_LIBDIR
}
# static
COMPONENT cameo_Development
PUBLIC_HEADER DESTINATION
${
CMAKE_INSTALL_INCLUDEDIR
}
INCLUDES DESTINATION
${
CMAKE_INSTALL_INCLUDEDIR
}
)
# This makes the project importable from the install directory
# Put config file in per-project dir (name MUST match), can also
# just go into 'cmake'.
install
(
EXPORT cameoexport
DESTINATION
${
CMAKE_INSTALL_LIBDIR
}
/cmake
FILE
${
PROJECT_NAME
}
Config.cmake
)
# makes the project importable from the build directory
export
(
TARGETS cameo FILE
${
CMAKE_BINARY_DIR
}
/
${
PROJECT_NAME
}
Config.cmake
)
# the install_manifest file is created only after the installation....
#install(FILES ${CMAKE_CURRENT_BINARY_DIR}/install_manifest.txt
# DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake
# RENAME cameo_install_manifest.txt
# )
src/
cameo/
CancelEvent.cpp
→
src/CancelEvent.cpp
View file @
cfacea6c
File moved
src/
cameo/
CancelEvent.h
→
src/CancelEvent.h
View file @
cfacea6c
File moved
src/
cameo/
ConnectionChecker.cpp
→
src/ConnectionChecker.cpp
View file @
cfacea6c
File moved
src/
cameo/
ConnectionTimeout.cpp
→
src/ConnectionTimeout.cpp
View file @
cfacea6c
File moved
src/
cameo/
Event.cpp
→
src/Event.cpp
View file @
cfacea6c
File moved
src/
cameo/
EventListener.cpp
→
src/EventListener.cpp
View file @
cfacea6c
File moved
src/
cameo/
EventStreamSocket.cpp
→
src/EventStreamSocket.cpp
View file @
cfacea6c
File moved
src/
cameo/
EventThread.cpp
→
src/EventThread.cpp
View file @
cfacea6c
File moved
src/
cameo/
EventThread.h
→
src/EventThread.h
View file @
cfacea6c
File moved
Prev
1
2
3
4
5
Next
Shervin Nourbakhsh
@nourbakhsh
mentioned in commit
17a036e6
·
Oct 06, 2020
mentioned in commit
17a036e6
mentioned in commit 17a036e66d6bf0e10a1e127afc03038d3aeefde8
Toggle commit list
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