mirror of
https://github.com/FairRootGroup/FairMQ.git
synced 2025-10-13 08:41:16 +00:00
Remove the alias target
In some cases the definition of the alias target fails, because of target visibility problems.
This commit is contained in:
parent
cc4a8b8f7f
commit
e54db27242
|
@ -80,7 +80,7 @@ set(CMAKE_PREFIX_PATH /path/to/FairMQ_install_prefix ${CMAKE_PREFIX_PATH})
|
||||||
find_package(FairMQ)
|
find_package(FairMQ)
|
||||||
```
|
```
|
||||||
|
|
||||||
`find_package(FairMQ)` will define an imported target `FairMQ::FairMQ` (An alias `FairRoot::FairMQ` is also defined (if you use CMake 3.11+) for backwards compatibility, but it is deprecated).
|
`find_package(FairMQ)` will define an imported target `FairMQ::FairMQ`.
|
||||||
|
|
||||||
In order to succesfully compile and link against the `FairMQ::FairMQ` target, you need to discover its public package dependencies, too.
|
In order to succesfully compile and link against the `FairMQ::FairMQ` target, you need to discover its public package dependencies, too.
|
||||||
|
|
||||||
|
|
|
@ -32,9 +32,4 @@ set(CMAKE_MODULE_PATH ${@PROJECT_NAME@_CMAKEMODDIR} ${CMAKE_MODULE_PATH})
|
||||||
### Import targets
|
### Import targets
|
||||||
include(@PACKAGE_CMAKE_INSTALL_PREFIX@/@PACKAGE_INSTALL_DESTINATION@/@PROJECT_EXPORT_SET@.cmake)
|
include(@PACKAGE_CMAKE_INSTALL_PREFIX@/@PACKAGE_INSTALL_DESTINATION@/@PROJECT_EXPORT_SET@.cmake)
|
||||||
|
|
||||||
### Alias target for backwards compat (DEPRECATED)
|
|
||||||
if((NOT TARGET FairRoot::@PROJECT_NAME@) AND (CMAKE_VERSION VERSION_GREATER 3.10.99))
|
|
||||||
add_library(FairRoot::@PROJECT_NAME@ ALIAS @PROJECT_NAME@::@PROJECT_NAME@)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
@PACKAGE_COMPONENTS@
|
@PACKAGE_COMPONENTS@
|
||||||
|
|
Loading…
Reference in New Issue
Block a user