11# Does your system only have an older version of CMake? Not to worry!
2- # CMake offers download-and-use binary packages, with no installation
3- # necessary... Visit https://cmake.org/download/ and grab one for
2+ # CMake offers download-and-use binary packages, with no installation
3+ # necessary... Visit https://cmake.org/download/ and grab one for
44# your platform. They are not finicky with library dependencies, so
55# compatability is very likely. Also, the package's CMake binary will
66# not mistake any other local CMake-related files for its own.
@@ -12,7 +12,6 @@ PROJECT(cuda-api-wrappers
1212 HOMEPAGE_URL https://github.com/eyalroz/cuda-api-wrappers
1313)
1414
15- include (GNUInstallDirs )
1615set (CMAKE_LIBRARY_OUTPUT_DIRECTORY "lib/" )
1716set (CMAKE_ARCHIVE_OUTPUT_DIRECTORY "lib/" )
1817
@@ -122,7 +121,7 @@ if(CUDAToolkit_VERSION VERSION_GREATER_EQUAL 12.4)
122121
123122 if (TARGET CUDA::nvfatbin_static)
124123 target_link_libraries (caw_fatbin_static INTERFACE CUDA::nvfatbin_static )
125- elseif (EXISTS "${CUDA_nvfatbin_static_LIBRARY} " )
124+ elseif (EXISTS "${CUDA_nvfatbin_static_LIBRARY} " )
126125 target_link_libraries (caw_fatbin_static INTERFACE "${CUDA_nvfatbin_static_LIBRARY} " )
127126 else ()
128127 message (WARNING "Could not locate a valid NVIDIA non-fatbin creator target or library file" )
@@ -176,6 +175,8 @@ endif()
176175# Installing the libraries
177176# ------------------------
178177
178+ include (GNUInstallDirs )
179+
179180install (FILES "${PROJECT_SOURCE_DIR} /cmake/cuda-api-wrappers-config.cmake"
180181 DESTINATION "${CMAKE_INSTALL_LIBDIR} /cmake/cuda-api-wrappers" )
181182
@@ -185,6 +186,9 @@ install(
185186 FILE_SET HEADERS
186187)
187188
189+ # This command is not part of an installation per se, but rather
190+ # allows adding the built package into a package registry without
191+ # installation
188192export (
189193 EXPORT cuda-api-wrappers_export
190194 NAMESPACE "${caw_namespace} ::"
0 commit comments