-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Make main target installable. (#103)
This allows to run `cmake --install .` to install the project to a system such that it can be consumed with `find_package()`. This required the following changes: * Add `install(TARGET ...)` commands for all library and executable targets. * Add all public header files to the `HEADER` `FILE_SET` of their respective target. * Export all these targets to an export set and `install(EXPORT ...)` that export set. * Provide install-time paths for several `target_include_directories()`, some of which are empty because the headers are not installed. Since some of the library targets depend on external projects (`abseil-cpp` and `yaml-cpp`), the install logic of these projects also needs to be enabled. This change is not only necessary to actually install the project, but also to consume it via `add_subdirectory` from any project that, itself, is installable. (All dependencies of installable targets must be installable.)
- Loading branch information
1 parent
579d884
commit cc8d08a
Showing
12 changed files
with
89 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,19 @@ | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
add_library(substrait_expression DecimalLiteral.cpp) | ||
target_sources( | ||
substrait_expression | ||
PUBLIC FILE_SET HEADERS BASE_DIRS ../../../include/ FILES | ||
../../../include/substrait/expression/DecimalLiteral.h) | ||
|
||
target_link_libraries(substrait_expression substrait_proto absl::numeric | ||
absl::strings) | ||
|
||
if(${SUBSTRAIT_CPP_BUILD_TESTING}) | ||
add_subdirectory(tests) | ||
endif() | ||
|
||
install( | ||
TARGETS substrait_expression | ||
EXPORT SubstraitTargets | ||
FILE_SET HEADERS) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters