-
Notifications
You must be signed in to change notification settings - Fork 9
Enable install find package #82
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Excited to use ExternalProject_Add
, I assume you will be refactoring ET to use this as a follow up?
|
||
install( | ||
DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/third-party/json/single_include/ | ||
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Won't this single include also be found in ${CMAKE_CURRENT_SOURCE_DIR}/include/? Then you can update the pattern to also accept *.hpp
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not in ${CMAKE_CURRENT_SOURCE_DIR}/include/
Allowing parent repo to be able to cmake --target install and then find_package(tokenizers CONFIG) This comes in handy when we want to build tokenizers as an external project or rely on FetchContent.
a2bac3b
to
9aea7ff
Compare
This pull request introduces several enhancements to the
CMakeLists.txt
file and adds a new configuration file for thetokenizers
package. The changes focus on improving build system support, adding installation rules, and providing a package configuration file for easier integration with other projects.Build system improvements:
CMakeLists.txt
: IncludedCMakePackageConfigHelpers
to enable the use ofconfigure_package_config_file
for generating CMake configuration files.CMakeLists.txt
: Updatedtarget_include_directories
to use$<BUILD_INTERFACE>
for better handling of include directories during the build process.Installation rules:
CMakeLists.txt
: Added installation rules for the library, headers, and CMake configuration files, includingtokenizers-targets.cmake
andtokenizers-config.cmake
. These rules ensure the library and its dependencies are correctly installed.Package configuration:
cmake/tokenizers-config.cmake.in
: Added a new configuration file for thetokenizers
package, defining variables such asTOKENIZERS_FOUND
,TOKENIZERS_INCLUDE_DIRS
, andTOKENIZERS_LIBRARIES
. It includes dependency checks and ensures thesentencepiece
library is available.For any CMake project we should be able to do the following: