Skip to content

Commit

Permalink
Merge pull request #1054 from redboltz/unify_project_name_cxx
Browse files Browse the repository at this point in the history
Unify all package related names to msgpack-cxx.
  • Loading branch information
redboltz authored Mar 4, 2023
2 parents 8824c62 + ec88951 commit bc2c446
Show file tree
Hide file tree
Showing 16 changed files with 53 additions and 48 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# 2023-02-28 version 6.0.0
## << breaking changes >>
* Change CMake package name of C++ library to msgpack-cxx (#1054)
Unified all C++ package, library, cmake, tarball name become msgpack-cxx.

# 2023-01-10 version 5.0.0 for C++
* Fix config for new MSVC preprocessor (#1040)
## << breaking changes >>
Expand Down
54 changes: 27 additions & 27 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ CMAKE_MINIMUM_REQUIRED (VERSION 3.1 FATAL_ERROR)

CMAKE_POLICY (SET CMP0054 NEW)

PROJECT (msgpackc-cxx LANGUAGES CXX)
PROJECT (msgpack-cxx LANGUAGES CXX)

ADD_LIBRARY (msgpackc-cxx INTERFACE)
ADD_LIBRARY (msgpack-cxx INTERFACE)

FILE (READ ${CMAKE_CURRENT_SOURCE_DIR}/include/msgpack/version_master.hpp contents)
STRING (REGEX MATCH "#define MSGPACK_VERSION_MAJOR *([0-9a-zA-Z_]*)" NULL_OUT ${contents})
Expand Down Expand Up @@ -57,11 +57,11 @@ ENDIF ()

IF (MSGPACK_32BIT)
IF ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
TARGET_COMPILE_OPTIONS(msgpackc-cxx INTERFACE -m32)
TARGET_LINK_OPTIONS(msgpackc-cxx INTERFACE -m32)
TARGET_COMPILE_OPTIONS(msgpack-cxx INTERFACE -m32)
TARGET_LINK_OPTIONS(msgpack-cxx INTERFACE -m32)
ELSEIF ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
TARGET_COMPILE_OPTIONS(msgpackc-cxx INTERFACE -m32)
TARGET_LINK_OPTIONS(msgpackc-cxx INTERFACE -m32)
TARGET_COMPILE_OPTIONS(msgpack-cxx INTERFACE -m32)
TARGET_LINK_OPTIONS(msgpack-cxx INTERFACE -m32)
ENDIF ()
ENDIF ()

Expand All @@ -78,18 +78,18 @@ IF (MSGPACK_USE_BOOST)

FIND_PACKAGE (Boost REQUIRED)
ELSE ()
TARGET_COMPILE_DEFINITIONS(msgpackc-cxx INTERFACE MSGPACK_NO_BOOST)
TARGET_COMPILE_DEFINITIONS(msgpack-cxx INTERFACE MSGPACK_NO_BOOST)
ENDIF ()

IF (MSGPACK_CHAR_SIGN)
TARGET_COMPILE_OPTIONS(msgpackc-cxx INTERFACE -f${MSGPACK_CHAR_SIGN}-char)
TARGET_COMPILE_OPTIONS(msgpack-cxx INTERFACE -f${MSGPACK_CHAR_SIGN}-char)
ENDIF ()

IF (MSGPACK_DEFAULT_API_VERSION)
TARGET_COMPILE_DEFINITIONS(msgpackc-cxx INTERFACE MSGPACK_DEFAULT_API_VERSION=${MSGPACK_DEFAULT_API_VERSION})
TARGET_COMPILE_DEFINITIONS(msgpack-cxx INTERFACE MSGPACK_DEFAULT_API_VERSION=${MSGPACK_DEFAULT_API_VERSION})
ELSE ()
SET (MSGPACK_DEFAULT_API_VERSION 3)
TARGET_COMPILE_DEFINITIONS(msgpackc-cxx INTERFACE MSGPACK_DEFAULT_API_VERSION=3)
TARGET_COMPILE_DEFINITIONS(msgpack-cxx INTERFACE MSGPACK_DEFAULT_API_VERSION=3)
ENDIF ()

IF ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
Expand All @@ -112,15 +112,15 @@ ENDIF ()

INCLUDE (Files.cmake)

TARGET_INCLUDE_DIRECTORIES (msgpackc-cxx
TARGET_INCLUDE_DIRECTORIES (msgpack-cxx
INTERFACE
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/include>
$<INSTALL_INTERFACE:include>
)

IF (MSGPACK_USE_BOOST)
TARGET_LINK_LIBRARIES (msgpackc-cxx INTERFACE Boost::boost)
TARGET_LINK_LIBRARIES (msgpack-cxx INTERFACE Boost::boost)
ENDIF ()

IF (MSGPACK_GEN_COVERAGE)
Expand Down Expand Up @@ -156,7 +156,7 @@ IF (MSGPACK_FUZZ_REGRESSION)
ENDIF ()

IF ("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "sparc")
TARGET_COMPILE_DEFINITIONS(msgpackc-cxx INTERFACE MSGPACK_ZONE_ALIGN=8)
TARGET_COMPILE_DEFINITIONS(msgpack-cxx INTERFACE MSGPACK_ZONE_ALIGN=8)
ENDIF ()

IF (MSGPACK_BUILD_EXAMPLES)
Expand Down Expand Up @@ -193,9 +193,9 @@ ENDIF ()
include (GNUInstallDirs)

# Install library.
INSTALL (TARGETS msgpackc-cxx
EXPORT msgpackc-cxx-targets
COMPONENT msgpackc-cxx
INSTALL (TARGETS msgpack-cxx
EXPORT msgpack-cxx-targets
COMPONENT msgpack-cxx
# This provides include directory in exported target
# relative to prefix in single directory we've put everything in.
INCLUDES DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}"
Expand All @@ -204,43 +204,43 @@ INSTALL (TARGETS msgpackc-cxx
# Install headers from source tree.
INSTALL (DIRECTORY include/
DESTINATION include
COMPONENT msgpackc-cxx
COMPONENT msgpack-cxx
)

INCLUDE (CMakePackageConfigHelpers)

IF (NOT (CMAKE_VERSION VERSION_LESS 3.14))
SET (extra_version_file_args ARCH_INDEPENDENT)
ENDIF ()
SET (cmake_config_path "${CMAKE_INSTALL_LIBDIR}/cmake/msgpackc-cxx")
SET (cmake_config_path "${CMAKE_INSTALL_LIBDIR}/cmake/msgpack-cxx")

# Configure the main package file from source tree.
CONFIGURE_PACKAGE_CONFIG_FILE (
msgpackc-cxx-config.cmake.in
"${CMAKE_CURRENT_BINARY_DIR}/msgpackc-cxx-config.cmake"
msgpack-cxx-config.cmake.in
"${CMAKE_CURRENT_BINARY_DIR}/msgpack-cxx-config.cmake"
INSTALL_DESTINATION "${cmake_config_path}"
)

# Write package version file.
WRITE_BASIC_PACKAGE_VERSION_FILE (
msgpackc-cxx-config-version.cmake
msgpack-cxx-config-version.cmake
VERSION ${VERSION}
COMPATIBILITY SameMajorVersion
${extra_version_file_args}
)

# Install the generated package version file and the main package file.
INSTALL (FILES
"${CMAKE_CURRENT_BINARY_DIR}/msgpackc-cxx-config.cmake"
"${CMAKE_CURRENT_BINARY_DIR}/msgpackc-cxx-config-version.cmake"
"${CMAKE_CURRENT_BINARY_DIR}/msgpack-cxx-config.cmake"
"${CMAKE_CURRENT_BINARY_DIR}/msgpack-cxx-config-version.cmake"
DESTINATION "${cmake_config_path}"
COMPONENT msgpackc-cxx
COMPONENT msgpack-cxx
)

# This installs package in install tree for using installed targets.
INSTALL (
EXPORT msgpackc-cxx-targets
FILE msgpackc-cxx-targets.cmake
EXPORT msgpack-cxx-targets
FILE msgpack-cxx-targets.cmake
DESTINATION "${cmake_config_path}"
COMPONENT msgpackc-cxx
COMPONENT msgpack-cxx
)
2 changes: 1 addition & 1 deletion Files.cmake
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
SET (msgpackc_HEADERS
SET (msgpack-cxx_HEADERS
include/msgpack.hpp
include/msgpack/adaptor/adaptor_base.hpp
include/msgpack/adaptor/adaptor_base_decl.hpp
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
`msgpack` for C++
===================

Version 5.0.0 [![Build Status](https://github.com/msgpack/msgpack-c/workflows/CI/badge.svg?branch=cpp_master)](https://github.com/msgpack/msgpack-c/actions) [![Build status](https://ci.appveyor.com/api/projects/status/8kstcgt79qj123mw/branch/cpp_master?svg=true)](https://ci.appveyor.com/project/redboltz/msgpack-c/branch/cpp_master)
Version 6.0.0 [![Build Status](https://github.com/msgpack/msgpack-c/workflows/CI/badge.svg?branch=cpp_master)](https://github.com/msgpack/msgpack-c/actions) [![Build status](https://ci.appveyor.com/api/projects/status/8kstcgt79qj123mw/branch/cpp_master?svg=true)](https://ci.appveyor.com/project/redboltz/msgpack-c/branch/cpp_master)
[![codecov](https://codecov.io/gh/msgpack/msgpack-c/branch/cpp_master/graph/badge.svg)](https://codecov.io/gh/msgpack/msgpack-c/branch/cpp_master)

It's like JSON but smaller and faster.
Expand Down Expand Up @@ -98,7 +98,7 @@ Usage
# ...
find_package(msgpack REQUIRED)
# ...
target_link_libraries(your_target_name <PRIVATE/PUBLIC/INTERFACE> msgpackc-cxx)
target_link_libraries(your_target_name <PRIVATE/PUBLIC/INTERFACE> msgpack-cxx)
# ...
```

Expand Down
2 changes: 1 addition & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version: 5.0.0.{build}
version: 6.0.0.{build}

branches:
only:
Expand Down
2 changes: 1 addition & 1 deletion example/boost/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ FOREACH (source_file ${exec_PROGRAMS})
${source_file}
)
TARGET_LINK_LIBRARIES (${source_file_we} PRIVATE
msgpackc-cxx
msgpack-cxx
Boost::system
Threads::Threads
)
Expand Down
6 changes: 3 additions & 3 deletions example/cpp03/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ FOREACH (source_file ${exec_PROGRAMS})
${source_file}
)
TARGET_LINK_LIBRARIES (${source_file_we} PRIVATE
msgpackc-cxx
msgpack-cxx
)
IF ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
SET_PROPERTY (TARGET ${source_file_we} APPEND_STRING PROPERTY COMPILE_FLAGS " -Wall -Wextra")
Expand All @@ -64,7 +64,7 @@ FOREACH (source_file ${with_pthread_PROGRAMS})
${source_file}
)
TARGET_LINK_LIBRARIES (${source_file_we} PRIVATE
msgpackc-cxx
msgpack-cxx
Threads::Threads
)
IF ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
Expand All @@ -86,7 +86,7 @@ FOREACH (source_file ${with_boost_lib_PROGRAMS})
${source_file}
)
TARGET_LINK_LIBRARIES (${source_file_we} PRIVATE
msgpackc-cxx
msgpack-cxx
Boost::timer
)
IF (NOT MSVC AND NOT APPLE)
Expand Down
2 changes: 1 addition & 1 deletion example/cpp11/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ IF (MSGPACK_CXX11 OR MSGPACK_CXX14 OR MSGPACK_CXX17)
${source_file}
)
TARGET_LINK_LIBRARIES (${source_file_we} PRIVATE
msgpackc-cxx
msgpack-cxx
)
IF ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
SET_PROPERTY (TARGET ${source_file_we} APPEND_STRING PROPERTY COMPILE_FLAGS " -Wall -Wextra")
Expand Down
4 changes: 2 additions & 2 deletions example/x3/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ IF (MSGPACK_USE_X3_PARSE AND MSGPACK_DEFAULT_API_VERSION VERSION_GREATER 1)
${source_file_we}
${source_file}
)
TARGET_LINK_LIBRARIES (${source_file_we} PRIVATE msgpackc-cxx)
TARGET_LINK_LIBRARIES (${source_file_we} PRIVATE msgpack-cxx)

IF ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
SET_PROPERTY (TARGET ${source_file_we} APPEND_STRING PROPERTY COMPILE_FLAGS " -Wall -Wextra")
Expand All @@ -40,7 +40,7 @@ IF (MSGPACK_USE_X3_PARSE AND MSGPACK_DEFAULT_API_VERSION VERSION_GREATER 1)
${source_file}
)
TARGET_LINK_LIBRARIES (${source_file_we} PRIVATE
msgpackc-cxx
msgpack-cxx
Boost::context
Boost::system
Threads::Threads
Expand Down
2 changes: 1 addition & 1 deletion fuzz/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ FOREACH (source_file ${check_PROGRAMS})
$<IF:$<BOOL:${MSGPACK_USE_STATIC_BOOST}>,,BOOST_TEST_DYN_LINK>)

TARGET_LINK_LIBRARIES (${source_file_we}
msgpackc-cxx
msgpack-cxx
Threads::Threads
Boost::filesystem
Boost::system
Expand Down
2 changes: 1 addition & 1 deletion include/msgpack/version_master.hpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#define MSGPACK_VERSION_MAJOR 5
#define MSGPACK_VERSION_MAJOR 6
#define MSGPACK_VERSION_MINOR 0
#define MSGPACK_VERSION_REVISION 0
2 changes: 1 addition & 1 deletion make_file_list.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

find include -name "*.hpp" -or -name "*.h" | sed -e 's/\s\+/\n/g' | LC_ALL=C sort > cpp_headers.tmp

echo 'SET (msgpackc_HEADERS' > Files.cmake
echo 'SET (msgpack-cxx_HEADERS' > Files.cmake
cat cpp_headers.tmp | sed -e 's/^/ /g' >> Files.cmake
echo ')' >> Files.cmake

Expand Down
2 changes: 1 addition & 1 deletion makedist.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ tar --append --file=$filename $prefix/ChangeLog
tar --append --file=$filename $prefix/NEWS
tar --append --file=$filename $prefix/COPYING
tar --append --file=$filename $prefix/README
tar --append --file=$filename $prefix/msgpackc-cxx-config.cmake.in
tar --append --file=$filename $prefix/msgpack-cxx-config.cmake.in
rm -f $prefix

gzip -f $filename
4 changes: 2 additions & 2 deletions msgpackc-cxx-config.cmake.in → msgpack-cxx-config.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ IF (@MSGPACK_USE_BOOST@)
find_dependency(Boost REQUIRED)
ENDIF ()

include("${CMAKE_CURRENT_LIST_DIR}/msgpackc-cxx-targets.cmake")
include("${CMAKE_CURRENT_LIST_DIR}/msgpack-cxx-targets.cmake")

check_required_components(msgpackc-cxx)
check_required_components(msgpack-cxx)
4 changes: 2 additions & 2 deletions test-install/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ project(test-install LANGUAGES CXX)

set(CMAKE_CXX_STANDARD_REQUIRED ON)

find_package(msgpackc-cxx REQUIRED)
find_package(msgpack-cxx REQUIRED)

add_executable(test-install simple.cpp)
target_link_libraries(test-install PRIVATE msgpackc-cxx)
target_link_libraries(test-install PRIVATE msgpack-cxx)
4 changes: 2 additions & 2 deletions test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ FOREACH (source_file ${check_PROGRAMS})
$<IF:$<BOOL:${MSGPACK_USE_STATIC_BOOST}>,,BOOST_TEST_DYN_LINK>)

TARGET_LINK_LIBRARIES (${source_file_we}
msgpackc-cxx
msgpack-cxx
Boost::system
Boost::unit_test_framework
Threads::Threads
Expand Down Expand Up @@ -109,7 +109,7 @@ ADD_EXECUTABLE (
)

TARGET_LINK_LIBRARIES (multi_file
msgpackc-cxx
msgpack-cxx
)

ADD_TEST (multi_file multi_file)

0 comments on commit bc2c446

Please sign in to comment.