From 09306008061c5c2eb9c15cfb775012a18d284e0c Mon Sep 17 00:00:00 2001
From: Bram Veenboer <bram.veenboer@gmail.com>
Date: Tue, 3 Oct 2023 16:51:39 +0200
Subject: [PATCH] Fix tcc-config.cmake

---
 CMakeLists.txt        |  5 +----
 cmake/Utils.cmake     | 13 -------------
 libtcc/CMakeLists.txt |  1 -
 3 files changed, 1 insertion(+), 18 deletions(-)
 delete mode 100644 cmake/Utils.cmake

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 6900562..354c4cd 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -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
diff --git a/cmake/Utils.cmake b/cmake/Utils.cmake
deleted file mode 100644
index d20abf7..0000000
--- a/cmake/Utils.cmake
+++ /dev/null
@@ -1,13 +0,0 @@
-# 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)
diff --git a/libtcc/CMakeLists.txt b/libtcc/CMakeLists.txt
index 3c89eac..7e9cb24 100644
--- a/libtcc/CMakeLists.txt
+++ b/libtcc/CMakeLists.txt
@@ -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
-- 
GitLab