浏览代码

Fix Urho3DAll.h generation (#2890)

1vanK 3 年之前
父节点
当前提交
2c0ed5ead4
共有 1 个文件被更改,包括 6 次插入3 次删除
  1. 6 3
      Source/Urho3D/CMakeLists.txt

+ 6 - 3
Source/Urho3D/CMakeLists.txt

@@ -551,17 +551,20 @@ install_header_files (DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/ DESTINATION ${DEST_
 # Generate the include-all-headers header file even though we do not encourage Urho3D library users to use it
 # Generate the include-all-headers header file even though we do not encourage Urho3D library users to use it
 list (SORT URHO_HEADERS)
 list (SORT URHO_HEADERS)
 list (REVERSE URHO_HEADERS)
 list (REVERSE URHO_HEADERS)
-set (OPTIONAL_SUBS AngelScript Database IK Lua Navigation Network Physics Physics2D Urho2D)
+set (OPTIONAL_SUBS AngelScript Database IK LuaScript Navigation Network Physics Physics2D Urho2D)
 foreach (SUB ${OPTIONAL_SUBS})
 foreach (SUB ${OPTIONAL_SUBS})
-    if (URHO_HEADERS MATCHES "(include/Urho3D/${SUB}[^;]+)")
+    if (URHO_HEADERS MATCHES "(include/Urho3D/${SUB}/[^;]+)")
         list (FIND URHO_HEADERS ${CMAKE_MATCH_1} FOUND_INDEX)
         list (FIND URHO_HEADERS ${CMAKE_MATCH_1} FOUND_INDEX)
         list (INSERT URHO_HEADERS ${FOUND_INDEX} "#endif")
         list (INSERT URHO_HEADERS ${FOUND_INDEX} "#endif")
     endif ()
     endif ()
 endforeach ()
 endforeach ()
 list (REVERSE URHO_HEADERS)
 list (REVERSE URHO_HEADERS)
 foreach (SUB ${OPTIONAL_SUBS})
 foreach (SUB ${OPTIONAL_SUBS})
-    if (URHO_HEADERS MATCHES "(include/Urho3D/${SUB}[^;]+)")
+    if (URHO_HEADERS MATCHES "(include/Urho3D/${SUB}/[^;]+)")
         string (TOUPPER ${SUB} SUB)
         string (TOUPPER ${SUB} SUB)
+        if("${SUB}" STREQUAL "LUASCRIPT")
+            set (SUB "LUA")
+        endif ()
         list (FIND URHO_HEADERS ${CMAKE_MATCH_1} FOUND_INDEX)
         list (FIND URHO_HEADERS ${CMAKE_MATCH_1} FOUND_INDEX)
         list (INSERT URHO_HEADERS ${FOUND_INDEX} "#if URHO3D_${SUB}")
         list (INSERT URHO_HEADERS ${FOUND_INDEX} "#if URHO3D_${SUB}")
     endif ()
     endif ()