Skip to content

Commit

Permalink
Merge pull request #129 from eyalroz/development
Browse files Browse the repository at this point in the history
CMakeLists.txt installation directory fixup.
  • Loading branch information
Eyal Rozenberg authored Jan 14, 2020
2 parents f708142 + 75a3ada commit f983473
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ PROJECT(cuda-api-wrappers
LANGUAGES CUDA CXX)

include(FindCUDA)
include(GNUInstallDirs)

set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "lib/")
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "lib/")
Expand All @@ -34,7 +35,7 @@ target_include_directories(
cuda-api-wrappers
PUBLIC
"$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/src>"
"$<INSTALL_INTERFACE:include>"
"$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>"
)

# The following lines _should_ have been something like:
Expand All @@ -52,21 +53,21 @@ endif()
install(
TARGETS cuda-api-wrappers
EXPORT cuda-api-wrappers_export
RUNTIME DESTINATION bin
ARCHIVE DESTINATION lib
LIBRARY DESTINATION lib
INCLUDES DESTINATION include
RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}"
ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}"
LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}"
INCLUDES DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}"
)

install(
DIRECTORY src/cuda
DESTINATION include
DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}"
FILES_MATCHING REGEX "\\.(h|hpp|cuh)$"
)

install(
EXPORT cuda-api-wrappers_export
DESTINATION "share/cmake/cuda-api-wrappers"
DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/cuda-api-wrappers"
NAMESPACE "cuda-api-wrappers::"
# In this CMake config file no dependencies are considered. But since we
# do not use any `find_package` call here this approach is sufficient.
Expand Down

0 comments on commit f983473

Please sign in to comment.