Skip to content
Snippets Groups Projects
Commit 09306008 authored by Bram Veenboer's avatar Bram Veenboer
Browse files

Fix tcc-config.cmake

parent 1a1f5654
No related branches found
No related tags found
No related merge requests found
Pipeline #59908 failed
......@@ -32,14 +32,11 @@ endif()
# Install project cmake targets
include(CMakePackageConfigHelpers)
configure_file(cmake/${PROJECT_NAME}-config.cmake.in
${PROJECT_NAME}-config.cmake @ONLY)
write_basic_package_version_file(
${PROJECT_NAME}-config-version.cmake
VERSION ${cudawrappers_VERSION}
COMPATIBILITY AnyNewerVersion)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}-config.cmake
${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}-config-version.cmake
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}-config-version.cmake
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME})
# --- auto-ignore build directory
......
# Make it possible to #include cuda source code
function(include_cuda_code target input_file)
# Save file containing cuda code as a C++ raw string literal
file(READ ${input_file} content)
set(delim "for_c++_include")
set(content "R\"${delim}(\n${content})${delim}\"")
set(output_file "${CMAKE_CURRENT_BINARY_DIR}/${input_file}")
file(WRITE ${output_file} "${content}")
# Add save path to the include directories
get_filename_component(output_subdir ${input_file} DIRECTORY)
target_include_directories(
${target} PRIVATE "${CMAKE_CURRENT_BINARY_DIR}/${output_subdir}")
endfunction(include_cuda_code)
......@@ -20,5 +20,4 @@ install(
# Install tcc cmake targets
install(
EXPORT tcc-config
NAMESPACE ${PROJECT_NAME}::
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME})
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment