Skip to content

Commit 9bb9d62

Browse files
authored
Set missing OPENCC_INCLUDE_DIR for CMake config modules (#766)
Ref: https://cmake.org/cmake/help/latest/module/CMakePackageConfigHelpers.html
1 parent 4d3fc0d commit 9bb9d62

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

CMakeLists.txt

+1
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,7 @@ configure_package_config_file(
132132
OpenCCConfig.cmake.in
133133
${CMAKE_CURRENT_BINARY_DIR}/OpenCCConfig.cmake
134134
INSTALL_DESTINATION ${DIR_LIBRARY}/cmake/opencc
135+
PATH_VARS DIR_INCLUDE
135136
)
136137

137138
install(

OpenCCConfig.cmake.in

+3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
@PACKAGE_INIT@
22

33
include(${CMAKE_CURRENT_LIST_DIR}/@targets_export_name@.cmake)
4+
5+
set_and_check(OPENCC_INCLUDE_DIR @PACKAGE_DIR_INCLUDE@opencc)
6+
47
check_required_components(OpenCC)

0 commit comments

Comments
 (0)