Skip to content

Add support of CMake config modules#763

Merged
ayaka14732 merged 1 commit intoBYVoid:masterfrom
WhiredPlanck:cmake-config
Feb 6, 2023
Merged

Add support of CMake config modules#763
ayaka14732 merged 1 commit intoBYVoid:masterfrom
WhiredPlanck:cmake-config

Conversation

@WhiredPlanck
Copy link
Copy Markdown
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