-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
[package] sqlite3/all: how to use components to mimic findSQLite3 and imported target SQLite::SQLite3 #2144
Comments
This should be the last mile needed fo this transparent integration: conan-io/conan#7254 And then something like
|
Nice. Maybe https://github.com/conan-io/conan is a better place to discuss about this, but there are also:
How to deal with that? |
When you consume a library via
IMO, this is like a project changing its name, we should focus on the new name and forget about the deprecated one.
Here it is an example: conan-io/conan#7254 (comment), different packages providing targets in the same namespace |
For
...
# Create imported target SPIRV-Tools
add_library(SPIRV-Tools STATIC IMPORTED)
set_target_properties(SPIRV-Tools PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/include"
)
...
...
# Create imported target SPIRV-Tools-opt
add_library(SPIRV-Tools-opt STATIC IMPORTED)
set_target_properties(SPIRV-Tools-opt PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/include"
INTERFACE_LINK_LIBRARIES "SPIRV-Tools"
)
...
...
# Create imported target SPIRV-Tools-link
add_library(SPIRV-Tools-link STATIC IMPORTED)
set_target_properties(SPIRV-Tools-link PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/include"
INTERFACE_LINK_LIBRARIES "SPIRV-Tools-opt"
)
...
...
# Create imported target SPIRV-Tools-reduce
add_library(SPIRV-Tools-reduce STATIC IMPORTED)
set_target_properties(SPIRV-Tools-reduce PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/include"
INTERFACE_LINK_LIBRARIES "SPIRV-Tools;SPIRV-Tools-opt"
)
... Therefore, consumers would expect to use |
I see. My personal opinion is that sometimes we need to be a little bit opinionated and try to force some changes when there is an outlier. I don't know if this library is one of those cases or we need to add an exception to the hook because this is an exception but everyone expects (and wants) to consume it that way. |
This issue can be closed, sqlite3 recipe now properly mimics official sqlite3 imported target and module filename. |
According to CMake documentation https://cmake.org/cmake/help/v3.14/module/FindSQLite3.html:
SQLite
(imported target isSQLite::SQLite3
)find_package(SQLite3)
conan components doesn't seem to provide a way to handle this case.
The text was updated successfully, but these errors were encountered: