-
Notifications
You must be signed in to change notification settings - Fork 549
install arrayfire cmake configuration and version file #470
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
|
and of course the example in the commit is quite wrong - the user should choose the backend |
|
@glehmann could you please clarify the goal of these changes? I think this is what you wish to accomplish:
|
Many useful informations on config and version files can be found at http://www.cmake.org/cmake/help/v3.0/command/find_package.html |
3a994e3 to
357fc6a
Compare
|
Very nice. I was not aware of this functionality in CMake. It is indeed far superior to the present |
so arrayfire can be used in a cmake project with the usual find_package command
find_package(ArrayFire REQUIRED)
include_directories(${ArrayFire_INCLUDE_DIRS})
tarkget_link_libraries(mytarget ${ArrayFire_LIBRARIES})
When installed in a system location, arrayfire location is discovered automatically
by the project running find_package(ArrayFire REQUIRED). FindArrayFire.cmake
doesn't need to be copied by the project using arrayfire or copied in cmake's
Modules directory.
arrayfire can also be used directly for the build directory.
find_package can search for a specific arrayfire version.
The imported targets automatically deal with MSVC's build configurations.
The installed files are still fully relocatable.
The target files are generated separately for each backend, so the backend
and their config files can be packaged and installed separately. The available
target files are discovered during the configuration of the project using
arrayfire. This should help some linux distro to properly package arrayfire.
c117845 to
8432372
Compare
install arrayfire cmake configuration and version file
so arrayfire can be used in a cmake project with the usual find_package command
find_package(arrayfire REQUIRED)
include_directories(${ARRAYFIRE_INCLUDE_DIRS})
tarkget_link_libraries(mytarget ${ARRAYFIRE_LIBRARIES})