Skip to content

Conversation

mpapierski
Copy link

Hello,

Here is my attempt to "cmakify" msgpack-c library. The support is basic and there is still few things to do (like INSTALL command, removing Makefiles, automake scripts and so on) thought you are able to build msgpack library in your project using ADD_SUBDIRECTORY. This was my primary goal.

Preprocess script is fully integrated within CMake script. It calls Ruby that generates header files.

I have also removed Visual Studio projects and solutions which are completely useless now. To generate Visual Studio solution you have to run CMake with proper -G switch.

@okuoku
Copy link

okuoku commented Jul 21, 2013

Hi, i also have my own private branch that shares the same goal.
From my branch:

  • You might have to mark source language as CXX on MSVC. Msgpack-C uses C99 constructs that are not available on VS. https://github.com/okuoku/msgpack-c/blob/d3dc29756fc0961ff3d2efe051aa1a682c5aa46e/CMakeLists.txt#L95
  • CMake has file(MAKE_DIRECTORY ...) command to make directory at configuration time. (edit: make_directory() was deprecated long ago. It is still usable though.)
  • Is there any specific reason to remove autotools stuff from the repository? Since not every packaging system do support CMake, I personally feel it might be better to keep them as-is.

@mpapierski
Copy link
Author

  1. Good point.
  2. That was stupid. I knew about this but I somehow did make_directory through cmake command.
  3. I thought about the pain of supporting both build systems at once. Can you tell me what packaging systems do you mean?

@okuoku
Copy link

okuoku commented Jul 22, 2013

I thought about the pain of supporting both build systems at once. Can you tell me what packaging systems do you mean?

For example, FreeBSD ports and pkgsrc supports CMake as build system. What we need is just saying USE_CMAKE=yes in their recipe so the system would take care remaining things (adding cmake itself in our build dependencies, invoke CMake configuration with cmake command, ...)

Unfortunately, most binary-package-minded packaging systems such as RPM has no direct support. We have to re-package if we drop autotools.

@cicku
Copy link

cicku commented Jan 9, 2014

We RPM packagers really don't have need to use both building systems at the same time. We just build it and use it.

@equalsraf
Copy link

+1 for this, any reason why this shouldn't go through?

Even if autotools are not removed CMake would be a big help for windows - e.g. build with MSVC or Mingw.

redboltz added a commit to redboltz/msgpack-c that referenced this pull request Jun 5, 2014
msgpack#20
Removed 'preprocess' from original CMakeLists.txt.
Removed file copy from original CMakeLists.txt.

Removed 'preprocess' from bootstrap.
Removed file copy from bootstrap.

Added erb generated files. Ruby is no longer required.
Moved cases.mpac, cases_compact.mpa, pack_define.h,
pack_template.h, unpack_define.h, unpack_template.h,
and sysdep.h to apropriate location.

If you want to re-generate zone.hpp, define.hpp, and tuple.hpp,
then you execute preprocess.
redboltz added a commit to redboltz/msgpack-c that referenced this pull request Jun 5, 2014
msgpack#20
Removed 'preprocess' from original CMakeLists.txt.
Removed file copy from original CMakeLists.txt.

Removed 'preprocess' from bootstrap.
Removed file copy from bootstrap.

Added erb generated files. Ruby is no longer required.
Moved cases.mpac, cases_compact.mpa, pack_define.h,
pack_template.h, unpack_define.h, unpack_template.h,
and sysdep.h to apropriate location.

If you want to re-generate zone.hpp, define.hpp, and tuple.hpp,
then you execute preprocess.
redboltz added a commit to redboltz/msgpack-c that referenced this pull request Jun 5, 2014
msgpack#20
Removed 'preprocess' from original CMakeLists.txt.
Removed file copy from original CMakeLists.txt.

Removed 'preprocess' from bootstrap.
Removed file copy from bootstrap.

Added erb generated files. Ruby is no longer required.
Moved cases.mpac, cases_compact.mpa, pack_define.h,
pack_template.h, unpack_define.h, unpack_template.h,
and sysdep.h to apropriate location.

If you want to re-generate zone.hpp, define.hpp, and tuple.hpp,
then you execute preprocess.
@redboltz redboltz mentioned this pull request Jun 5, 2014
@nobu-k
Copy link
Member

nobu-k commented Jul 2, 2014

Solved by #87 . Thanks!

@nobu-k nobu-k closed this Jul 2, 2014
@cicku
Copy link

cicku commented Jul 2, 2014

Ok.

I hope you can release 0.59 soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants