Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Cmake as a build system #53

Merged
merged 14 commits into from
Jun 30, 2024
Merged

Conversation

masatake
Copy link
Member

This is mostly based on @ParticleG's work. See #51.

ParticleG and others added 11 commits June 15, 2024 01:47
- Add options to build shared library
- Update README.md
…passed -release option of libtool

We have used Autotools for building libreadtags.so.  To support both
Autotools and Cmake, we must clarify what the maintainer has to do
when releasing a new version.

An issue supporting multiple build-sys is the consistency of the
interface version of libreadtags.so.

If we use only Autotools, what the maintainer has to do is just
update LT_VERSION in configure.ac. libtool calculates the string
appended to libreadtags.so.<>. When building libreadtags.so, cmake
doesn't use libtool. To make the name of the library file the same
in both build systems, the maintainer may have to specify the
string calculated by libtool to BUILD_VERSION of CMakeLists.txt.

To avoid a potential mistake, I decided to record the strings to
configure.ac.

Signed-off-by: Masatake YAMATO <[email protected]>
@masatake
Copy link
Member Author

@ParticleG You wrote in #51:

I'm coding on Windows and use vcpkg to manage CMake packages.

I would like to know more about this.
Do you mean you will use libreadtags with vcpkg when I merge this pull request? If so, I want to test this use case on GitHub actions (or Appveryor?).

README.md Outdated

### Build
```shell
./autogen.sh
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This step is for the source code cloned from the git repository.

@ParticleG
Copy link
Contributor

@ParticleG You wrote in #51:

I'm coding on Windows and use vcpkg to manage CMake packages.

I would like to know more about this. Do you mean you will use libreadtags with vcpkg when I merge this pull request? If so, I want to test this use case on GitHub actions (or Appveryor?).

Hmmm, currently I wrote a custom fetch_libreadtags.cmake, which is using my forked repo, the logic is exactly the same as I mentioned in README.md:

include(FetchContent)

if (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/cmake/libreadtags-master.zip")
    FetchContent_Declare(
            libreadtags
            URL file://${CMAKE_CURRENT_SOURCE_DIR}/cmake/libreadtags-master.zip
    )
else ()
    FetchContent_Declare(
            libreadtags
            GIT_REPOSITORY https://github.com/ParticleG/libreadtags.git
            GIT_TAG master
    )
endif ()

FetchContent_MakeAvailable(libreadtags)

If you want to use this IN vcpkg (which is a C++ CMake based dependency manager by Microsoft), you need to create a PR in their repo and add some more stuff like manifest (Yes, it's Git-based version controll)

@ParticleG
Copy link
Contributor

Also CMake come along with a testing tool called CTest. I'm not sure if you'd like to use it, I just pasted the link to the official documentation here

@masatake
Copy link
Member Author

@ParticleG thank you for the information.

I'm interested in registering libreadtags to vckg. However, I cannot put it as a high-priority item in my queue.

Using CTest is more interesting. Anyway, I will merge this.

@masatake masatake merged commit b865829 into universal-ctags:master Jun 30, 2024
4 checks passed
@masatake
Copy link
Member Author

@ParticleG, thank you very much.

I'm thinking about releasing a new version.

@ParticleG
Copy link
Contributor

@ParticleG thank you for the information.

I'm interested in registering libreadtags to vckg. However, I cannot put it as a high-priority item in my queue.

Using CTest is more interesting. Anyway, I will merge this.

I can try making a port and create a PR to vcpkg, if you want. But I'm quite busy this month, so this could go slowly

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.

2 participants