diff options
| author | ruki <[email protected]> | 2025-07-02 22:47:13 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2025-07-02 22:47:13 +0800 |
| commit | cc50f4503c1b7159fdabe89429844ec6ca8eea1f (patch) | |
| tree | 367da67b893f601348bd63531df4ef3aeb17c01e /xmake/plugins/project/xcode/xcodeproj.lua | |
| parent | b1d2fc1295e85eb6773aa209ed19f6e6d2f21141 (diff) | |
rename xcode2 to xcode
Diffstat (limited to 'xmake/plugins/project/xcode/xcodeproj.lua')
| -rw-r--r-- | xmake/plugins/project/xcode/xcodeproj.lua | 31 |
1 files changed, 12 insertions, 19 deletions
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 |
