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

Add support of CMake config modules #763

Merged
merged 1 commit into from
Feb 6, 2023

Conversation

WhiredPlanck
Copy link
Contributor

Currently OpenCC only has a pkg-config file, it's good for systems to locate standalone OpenCC package. But if a project using CMake that want to make OpenCC as its subproject / dependency, it will need to write a FindOpenCC.cmake to find package, which is a hassle to do so. And for Android platform, pkg-config is unavailable since NDK doesn't support it. So it's necessary to add support of CMake modules, then a project is able to just find_package(OpenCC) and target_link_libraries(<project_library_name> OpenCC::OpenCC) to add OpenCC as subproject / dependency.

Currently OpenCC only has a pkg-config file, it's good for systems to locate standalone OpenCC package. But if a project using CMake that want to make OpenCC as its subproject / dependency, it will need to write a FindOpenCC.cmake to find package, which is a hassle to do so. And for Android platform, pkg-config is unavailable since NDK doesn't support it. So it's necessary to add support of CMake modules, then a project is able to just `find_package(OpenCC)` and `target_link_libraries(<project_library_name> OpenCC::OpenCC)` to add OpenCC as subproject / dependency.
@ayaka14732 ayaka14732 merged commit a13ed0a into BYVoid:master Feb 6, 2023
WhiredPlanck added a commit to WhiredPlanck/OpenCC that referenced this pull request Feb 6, 2023
In the commit a13ed0a (PR BYVoid#763), some DIR_LIBRARY variable usages are modified to make install destination relative to be more portable, but this will break the original designed purpose of DIR_LIBRARY, so this commit will revert the changes.
ayaka14732 pushed a commit that referenced this pull request Feb 6, 2023
In the commit a13ed0a (PR #763), some DIR_LIBRARY variable usages are modified to make install destination relative to be more portable, but this will break the original designed purpose of DIR_LIBRARY, so this commit will revert the changes.
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