Skip to content

Commit

Permalink
Fix broken DIR_LIBRARY usages (BYVoid#764)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
WhiredPlanck authored Feb 6, 2023
1 parent a13ed0a commit 4d3fc0d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -131,15 131,15 @@ write_basic_package_version_file(
configure_package_config_file(
OpenCCConfig.cmake.in
${CMAKE_CURRENT_BINARY_DIR}/OpenCCConfig.cmake
INSTALL_DESTINATION lib/cmake/opencc
INSTALL_DESTINATION ${DIR_LIBRARY}/cmake/opencc
)

install(
FILES
${CMAKE_CURRENT_BINARY_DIR}/OpenCCConfig.cmake
${CMAKE_CURRENT_BINARY_DIR}/OpenCCConfigVersion.cmake
DESTINATION
lib/cmake/opencc
${DIR_LIBRARY}/cmake/opencc
)

######## Compiler flags
Expand Down
6 changes: 3 additions & 3 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -150,15 150,15 @@ endif()

install(
TARGETS ${INSTALL_TARGETS} EXPORT ${targets_export_name}
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib
LIBRARY DESTINATION ${DIR_LIBRARY}
ARCHIVE DESTINATION ${DIR_LIBRARY}
RUNTIME DESTINATION bin
)

install(
EXPORT ${targets_export_name}
FILE ${targets_export_name}.cmake
DESTINATION lib/cmake/opencc
DESTINATION ${DIR_LIBRARY}/cmake/opencc
NAMESPACE OpenCC::
)

Expand Down

0 comments on commit 4d3fc0d

Please sign in to comment.