summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2025-07-02 22:47:13 +0800
committerruki <[email protected]>2025-07-02 22:47:13 +0800
commitcc50f4503c1b7159fdabe89429844ec6ca8eea1f (patch)
tree367da67b893f601348bd63531df4ef3aeb17c01e
parentb1d2fc1295e85eb6773aa209ed19f6e6d2f21141 (diff)
rename xcode2 to xcode
-rw-r--r--xmake/plugins/project/main.lua4
-rw-r--r--xmake/plugins/project/xcode/get_xcode_info.lua (renamed from xmake/plugins/project/xcode2/get_xcode_info.lua)0
-rw-r--r--xmake/plugins/project/xcode/pbxproj.lua (renamed from xmake/plugins/project/xcode2/pbxproj.lua)0
-rw-r--r--xmake/plugins/project/xcode/xcodeproj.lua31
-rw-r--r--xmake/plugins/project/xcode2/xcodeproj2.lua38
-rw-r--r--xmake/plugins/project/xmake.lua3
6 files changed, 14 insertions, 62 deletions
diff --git a/xmake/plugins/project/main.lua b/xmake/plugins/project/main.lua
index 2540889b5..666314d5d 100644
--- a/xmake/plugins/project/main.lua
+++ b/xmake/plugins/project/main.lua
@@ -25,7 +25,6 @@ import("core.project.config")
import("make.makefile")
import("make.xmakefile")
import("cmake.cmakelists")
-import("xcode.xcodeproj")
import("ninja.build_ninja")
import("vstudio.vs")
import("vsxmake.vsxmake")
@@ -33,7 +32,7 @@ import("clang.compile_flags")
import("clang.compile_commands")
import("private.utils.statistics")
import("private.service.remote_build.action", {alias = "remote_build_action"})
-import("xcode2.xcodeproj2")
+import("xcode.xcodeproj")
function makers()
return {
@@ -43,7 +42,6 @@ function makers()
, cmake = cmakelists.make
, cmakelists = cmakelists.make
, xcode = xcodeproj.make
- , xcode2 = xcodeproj2.make
, ninja = build_ninja.make
, vs2002 = vs.make(2002)
, vs2003 = vs.make(2003)
diff --git a/xmake/plugins/project/xcode2/get_xcode_info.lua b/xmake/plugins/project/xcode/get_xcode_info.lua
index d8d6d3b6f..d8d6d3b6f 100644
--- a/xmake/plugins/project/xcode2/get_xcode_info.lua
+++ b/xmake/plugins/project/xcode/get_xcode_info.lua
diff --git a/xmake/plugins/project/xcode2/pbxproj.lua b/xmake/plugins/project/xcode/pbxproj.lua
index ef2d73abf..ef2d73abf 100644
--- a/xmake/plugins/project/xcode2/pbxproj.lua
+++ b/xmake/plugins/project/xcode/pbxproj.lua
diff --git a/xmake/plugins/project/xcode/xcodeproj.lua b/xmake/plugins/project/xcode/xcodeproj.lua
index 15ba420f8..6f9e104e7 100644
--- a/xmake/plugins/project/xcode/xcodeproj.lua
+++ b/xmake/plugins/project/xcode/xcodeproj.lua
@@ -14,32 +14,25 @@
--
-- Copyright (C) 2015-present, TBOOX Open Source Group.
--
--- @author ruki
+-- @author JXMaster
-- @file xcodeproj.lua
--
-- imports
-import(".cmake.cmakelists")
-import("lib.detect.find_tool")
+import("get_xcode_info")
+import("pbxproj")
--- TODO maybe we need to implement it by myself, do not use cmake
function make(outputdir)
- -- check
- assert(is_plat(os.host()), "only support host platform now!")
+ -- collect xcode info.
+ -- see get_xcode_info.lua file for detailed description
+ -- of the returned info table.
+ local info = get_xcode_info(outputdir)
- -- find cmake
- local cmake = assert(find_tool("cmake"), "we need cmake to generate xcode project!")
+ -- create xcode dir.
+ local project_bundle = path.join(info.project_dir, info.project_bundle)
+ os.mkdir(project_bundle)
- -- get the cmakelists file
- local cmakefile = path.join(outputdir, "CMakeLists.txt")
- if not os.isfile(cmakefile) then
- cmakelists.make(outputdir)
- end
- assert(os.isfile(cmakefile), "CMakeLists.txt not found!")
-
- -- generate xcode project
- local oldir = os.cd(os.projectdir())
- os.vrunv(cmake.program, {"-G", "Xcode", cmakefile})
- os.cd(oldir)
+ -- create .pbxproj file.
+ pbxproj(info)
end
diff --git a/xmake/plugins/project/xcode2/xcodeproj2.lua b/xmake/plugins/project/xcode2/xcodeproj2.lua
deleted file mode 100644
index 48f240df7..000000000
--- a/xmake/plugins/project/xcode2/xcodeproj2.lua
+++ /dev/null
@@ -1,38 +0,0 @@
---!A cross-platform build utility based on Lua
---
--- Licensed under the Apache License, Version 2.0 (the "License");
--- you may not use this file except in compliance with the License.
--- You may obtain a copy of the License at
---
--- http://www.apache.org/licenses/LICENSE-2.0
---
--- Unless required by applicable law or agreed to in writing, software
--- distributed under the License is distributed on an "AS IS" BASIS,
--- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
--- See the License for the specific language governing permissions and
--- limitations under the License.
---
--- Copyright (C) 2015-present, TBOOX Open Source Group.
---
--- @author JXMaster
--- @file xcodeproj2.lua
---
-
--- imports
-import("get_xcode_info")
-import("pbxproj")
-
-function make(outputdir)
-
- -- collect xcode info.
- -- see get_xcode_info.lua file for detailed description
- -- of the returned info table.
- local info = get_xcode_info(outputdir)
-
- -- create xcode dir.
- local project_bundle = path.join(info.project_dir, info.project_bundle)
- os.mkdir(project_bundle)
-
- -- create .pbxproj file.
- pbxproj(info)
-end
diff --git a/xmake/plugins/project/xmake.lua b/xmake/plugins/project/xmake.lua
index 6f6066b54..431518fac 100644
--- a/xmake/plugins/project/xmake.lua
+++ b/xmake/plugins/project/xmake.lua
@@ -43,8 +43,7 @@ task("project")
, " - xmakefile (makefile with xmake)"
, " - cmake"
, " - ninja"
- , " - xcode (need cmake)"
- , " - xcode2"
+ , " - xcode"
, " - compile_flags"
, " - compile_commands (clang compilation database with json format)"
, " - vs (auto detect), vs2002 - vs2022"