Browse Source

concurrentqueue: Restore concurrentqueue/concurrentqueue.h include (#3016)

https://github.com/xmake-io/xmake-repo/commit/095e769f1f6db3aa501300ecbe8ad5fb4bb4c5d4 reworked concurrentqueue which no longer has `concurrentqueue/concurrentqueue.h` includes, this breaks compilation for existing project using it.

This commit adds a temporary include allowing existing projects to compile, but prints a compiler message
Jérôme Leclercq 1 year ago
parent
commit
5e16d18d2b
1 changed files with 7 additions and 0 deletions
  1. 7 0
      packages/c/concurrentqueue/xmake.lua

+ 7 - 0
packages/c/concurrentqueue/xmake.lua

@@ -26,6 +26,13 @@ package("concurrentqueue")
         table.insert(configs, "-DBUILD_SHARED_LIBS=" .. (package:config("shared") and "ON" or "OFF"))
         table.insert(configs, "-DBUILD_SHARED_LIBS=" .. (package:config("shared") and "ON" or "OFF"))
         import("package.tools.cmake").install(package, configs)
         import("package.tools.cmake").install(package, configs)
 
 
+        io.writefile(path.join(package:installdir("include"), "concurrentqueue", "concurrentqueue.h"), [[
+#pragma once
+
+#pragma message please update include <concurrentqueue/concurrentqueue.h> to <concurrentqueue.h>
+#include "moodycamel/concurrentqueue.h"
+        ]])
+
         if package:config("c_api") then
         if package:config("c_api") then
             io.writefile("xmake.lua", [[
             io.writefile("xmake.lua", [[
                 add_rules("mode.debug", "mode.release")
                 add_rules("mode.debug", "mode.release")