Skip to content

Conversation

@offa
Copy link
Contributor

@offa offa commented Jul 1, 2025

Description of the change

Adds install and find_package support for CMake. Install commands (ie. make install) will now install all files needed.

Consumers can now use:

find_package(maddy REQUIRED)

add_executable(my_exe)
target_link_libraries(my_exe PRIVATE maddy::maddy)

(Readme is updated with that example)

Checklist for contributor

  • if you want to be mentioned in the AUTHORS file, you added yourself
  • added an entry to CHANGELOG.md at "Upcoming"
  • if any Markdown definition changed, you updated the definition docs
  • your C++ code change is accommodated with a unit/integration test where it makes sense
  • your code meets the code format style (clang-format) of the project (tools/format.py)

@offa offa force-pushed the cmake_install_support branch from a942567 to fd1e0c0 Compare July 1, 2025 18:28
@progsource
Copy link
Owner

Hi, thank you for your contribution. Feel free, to also add the find_package support. Would you want to do it in this PR or in another one?

@offa offa force-pushed the cmake_install_support branch from fd1e0c0 to 9323873 Compare July 2, 2025 17:14
@offa offa changed the title Add basic cmake install support Add Cmake install and find_package support Jul 2, 2025
@offa
Copy link
Contributor Author

offa commented Jul 2, 2025

I have updated the PR 👍.

@offa offa force-pushed the cmake_install_support branch from 9323873 to 2c0fd11 Compare July 2, 2025 18:28
@progsource
Copy link
Owner

progsource commented Jul 2, 2025

I consider writing a test build (like in tests/cmake) with a tiny example executable to check if the find_package works, but I can do that in an own PR later. (before releasing the next maddy version)
What do you think?

@offa
Copy link
Contributor Author

offa commented Jul 2, 2025

In case you want to run the test locally too, you have to change the CMake prefix path, as the default shouldn't be writeable.

However, in most cases the install or cmake call should already issue an error if something is wrong.

@progsource
Copy link
Owner

Local test worked 🙂 looks good to me.

@progsource progsource merged commit 3682207 into progsource:master Jul 2, 2025
4 checks passed
@progsource
Copy link
Owner

Thank you very much.

@offa offa deleted the cmake_install_support branch July 2, 2025 19:24
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