{"id":97,"date":"2026-07-19T13:08:14","date_gmt":"2026-07-19T13:08:14","guid":{"rendered":"https:\/\/demensdeum.com\/blog\/2026\/07\/19\/crosscompile-for-macos-on-ubuntu-cmake\/"},"modified":"2026-07-19T13:08:14","modified_gmt":"2026-07-19T13:08:14","slug":"crosscompile-for-macos-on-ubuntu-cmake","status":"publish","type":"post","link":"https:\/\/demensdeum.com\/blog\/hi\/2026\/07\/19\/crosscompile-for-macos-on-ubuntu-cmake\/","title":{"rendered":"Ubuntu OSXCross CMake \u0915\u0947 \u0932\u093f\u090f macOS \u090f\u092a\u094d\u0932\u093f\u0915\u0947\u0936\u0928 \u0915\u093e \u0928\u093f\u0930\u094d\u092e\u093e\u0923"},"content":{"rendered":"<p>\u0907\u0938 \u092a\u094b\u0938\u094d\u091f \u092e\u0947\u0902, \u092e\u0948\u0902 CMake \u0914\u0930 osxcross \u0915\u093e \u0909\u092a\u092f\u094b\u0917 \u0915\u0930\u0915\u0947 Ubuntu \u092c\u093f\u0932\u094d\u0921 \u092e\u0936\u0940\u0928 \u092a\u0930 macOS \u0915\u0947 \u0932\u093f\u090f \u0915\u094d\u0930\u0949\u0938-\u092a\u094d\u0932\u0947\u091f\u092b\u093c\u0949\u0930\u094d\u092e C++ \u090f\u092a\u094d\u0932\u093f\u0915\u0947\u0936\u0928 \u092c\u0928\u093e\u0928\u0947 \u0915\u093e \u0935\u0930\u094d\u0923\u0928 \u0915\u0930\u0942\u0902\u0917\u093e\u0964<br \/>\n\u0938\u092c\u0938\u0947 \u092a\u0939\u0932\u0947, osxcross \u091f\u0942\u0932\u091a\u0947\u0928 \u0938\u094d\u0925\u093e\u092a\u093f\u0924 \u0915\u0930\u0947\u0902:<br \/>\n<a href=\"https:\/\/github.com\/tpoechtrager\/osxcross\" rel=\"noopener\" target=\"_blank\">https:\/\/github.com\/tpoechtrager\/osxcross<\/a><br \/>\n\u0938\u094d\u0925\u093e\u092a\u0928\u093e 3 \u091a\u0930\u0923\u094b\u0902 \u092e\u0947\u0902 \u0939\u094b\u0924\u0940 \u0939\u0948, \u0921\u093e\u0909\u0928\u0932\u094b\u0921\u093f\u0902\u0917 \u0928\u093f\u0930\u094d\u092d\u0930\u0924\u093e\u090f\u0901:<\/p>\n<div class=\"hcb_wrap\">\n<pre class=\"prism undefined-numbers lang-unknown\" data-lang=\"unknown\"><code>cd tools\n.\/get_dependencies.sh\n<\/code><\/pre>\n<\/div>\n<p>\u0906\u0927\u093f\u0915\u093e\u0930\u093f\u0915 Apple \u0935\u0947\u092c\u0938\u093e\u0907\u091f \u0938\u0947 XCode.xip \u0921\u093e\u0909\u0928\u0932\u094b\u0921 \u0915\u0930\u0947\u0902, \u092b\u093f\u0930 XCode \u0938\u0947 SDK \u0921\u093e\u0909\u0928\u0932\u094b\u0921 \u0915\u0930\u0947\u0902:<\/p>\n<div class=\"hcb_wrap\">\n<pre class=\"prism undefined-numbers lang-unknown\" data-lang=\"unknown\"><code>.\/gen_sdk_package_pbzx.sh \/media\/demensdeum\/2CE62A79E62A4404\/LinuxSupportStorage\/xcode111.xip\n<\/code><\/pre>\n<\/div>\n<p>\u092e\u0941\u091d\u0947 \u0906\u0936\u093e \u0939\u0948 \u0915\u093f \u0906\u092a\u0928\u0947 \u0905\u0902\u0924\u093f\u092e \u091a\u0930\u0923 \u092e\u0947\u0902 XCode \u0932\u093e\u0907\u0938\u0947\u0902\u0938 \u0905\u0928\u0941\u092c\u0902\u0927 \u092a\u0922\u093c\u093e \u0939\u094b\u0917\u093e? \u0907\u0938\u0915\u0947 \u092c\u093e\u0926, \u0906\u0935\u0936\u094d\u092f\u0915 \u0909\u092a\u0938\u0930\u094d\u0917 \u0915\u0947 \u0938\u093e\u0925 \u091f\u0942\u0932\u091a\u0947\u0928 \u092c\u0928\u093e\u090f\u0902:<\/p>\n<div class=\"hcb_wrap\">\n<pre class=\"prism undefined-numbers lang-unknown\" data-lang=\"unknown\"><code>INSTALLPREFIX=\/home\/demensdeum\/Apps\/osxcross .\/build.sh \n<\/code><\/pre>\n<\/div>\n<p>\u0905\u092c \u0906\u092a \u092a\u093f\u091b\u0932\u0947 \u091a\u0930\u0923 \u0915\u0940 \u0909\u092a\u0938\u0930\u094d\u0917 \u0928\u093f\u0930\u094d\u0926\u0947\u0936\u093f\u0915\u093e \u0938\u0947 osxcross \u0915\u093e \u0909\u092a\u092f\u094b\u0917 \u0915\u0930 \u0938\u0915\u0924\u0947 \u0939\u0948\u0902\u0964 \u0906\u0907\u090f CMake \u0915\u0947 \u0932\u093f\u090f \u090f\u0915 \u0928\u092f\u093e \u092c\u093f\u0932\u094d\u0921 \u092e\u0948\u0915\u094d\u0930\u094b \u091c\u094b\u0921\u093c\u0947\u0902 \u0914\u0930 \u0938\u092d\u0940 \u0906\u0935\u0936\u094d\u092f\u0915 \u091a\u0940\u091c\u093c\u0947\u0902 \u0932\u093f\u0916\u0947\u0902:<\/p>\n<div class=\"hcb_wrap\">\n<pre class=\"prism undefined-numbers lang-unknown\" data-lang=\"unknown\"><code>if (OSXCROSS)\nSET(CMAKE_SYSTEM_NAME Darwin)\nSET(CMAKE_C_COMPILER o64-clang)\nSET(CMAKE_CXX_COMPILER o64-clang++)\nSET(CMAKE_C_COMPILER_AR x86_64-apple-darwin19-ar)\nSET(CMAKE_CXX_COMPILER_AR x86_64-apple-darwin19-ar)\nSET(CMAKE_LINKER x86_64-apple-darwin19-ld)\nSET(ENV{OSXCROSS_MP_INC} 1)\nendif()\n<\/code><\/pre>\n<\/div>\n<p>\u0921\u093e\u092f\u0928\u093e\u092e\u093f\u0915 \u0932\u093f\u0902\u0915\u093f\u0902\u0917 \u092e\u0947\u0930\u0947 \u0932\u093f\u090f \u0938\u092b\u0932 \u0928\u0939\u0940\u0902 \u0930\u0939\u0940, \u0907\u0938\u0932\u093f\u090f \u0939\u092e \u092a\u0941\u0938\u094d\u0924\u0915\u093e\u0932\u092f\u094b\u0902 \u0915\u094b \u0938\u094d\u0925\u093f\u0930 \u0930\u0942\u092a \u0938\u0947 \u0928\u093f\u0930\u094d\u092f\u093e\u0924 \u0915\u0930\u0924\u0947 \u0939\u0948\u0902:<\/p>\n<div class=\"hcb_wrap\">\n<pre class=\"prism undefined-numbers lang-unknown\" data-lang=\"unknown\"><code>if (OSXCROSS)\nadd_library(FlameSteelCore STATIC ${SOURCE_FILES})\nelse()\n<\/code><\/pre>\n<\/div>\n<p>\u0907\u0938\u0915\u0947 \u092c\u093e\u0926, \u0906\u092a\u0915\u094b \u0907\u0938 \u0924\u0925\u094d\u092f \u0915\u093e \u0938\u093e\u092e\u0928\u093e \u0915\u0930\u0928\u093e \u092a\u0921\u093c \u0938\u0915\u0924\u093e \u0939\u0948 \u0915\u093f \u0906\u092a\u0915\u0947 \u092a\u093e\u0938 osxcross \u0915\u0947 \u0932\u093f\u090f \u0906\u0935\u0936\u094d\u092f\u0915 \u0932\u093e\u0907\u092c\u094d\u0930\u0947\u0930\u0940 \u0928\u0939\u0940\u0902 \u0939\u0948, SDL2 \u0915\u093e \u0909\u092a\u092f\u094b\u0917 \u0915\u0930\u0924\u0947 \u0938\u092e\u092f \u092e\u0941\u091d\u0947 \u0907\u0938\u0915\u093e \u0938\u093e\u092e\u0928\u093e \u0915\u0930\u0928\u093e \u092a\u0921\u093c\u093e\u0964 osxcross \u0924\u0948\u092f\u093e\u0930 \u0932\u093e\u0907\u092c\u094d\u0930\u0947\u0930\u0940 \u092a\u0948\u0915\u0947\u091c\u094b\u0902 \u0915\u093e \u0938\u092e\u0930\u094d\u0925\u0928 \u0915\u0930\u0924\u093e \u0939\u0948 &#8211; \u092e\u0948\u0915\u092a\u094b\u0930\u094d\u091f\u094d\u0938\u0964 \u0909\u0926\u093e\u0939\u0930\u0923 \u0915\u0947 \u0932\u093f\u090f, SDL2-\u092e\u093f\u0915\u094d\u0938\u0930 \u0938\u094d\u0925\u093e\u092a\u093f\u0924 \u0915\u0930\u0928\u093e:<\/p>\n<div class=\"hcb_wrap\">\n<pre class=\"prism undefined-numbers lang-unknown\" data-lang=\"unknown\"><code>osxcross-macports -v install libsdl2_mixer\n<\/code><\/pre>\n<\/div>\n<p>\u0907\u0938\u0915\u0947 \u092c\u093e\u0926, \u0906\u092a \u0939\u092e\u0947\u0936\u093e \u0915\u0940 \u0924\u0930\u0939 \u0938\u0947\u092e\u0947\u0915-\u092e\u0947\u0915 \u0932\u093f\u0902\u0915 \u092e\u0947\u0902 \u0932\u093e\u0907\u092c\u094d\u0930\u0947\u0930\u0940\/\u090f\u092a\u094d\u0932\u093f\u0915\u0947\u0936\u0928 \u092c\u0928\u093e\u0928\u093e \u0936\u0941\u0930\u0942 \u0915\u0930 \u0938\u0915\u0924\u0947 \u0939\u0948\u0902, \u092f\u0926\u093f \u0906\u0935\u0936\u094d\u092f\u0915 \u0939\u094b \u0924\u094b \u0932\u093e\u0907\u092c\u094d\u0930\u0947\u0930\u0940 \u0915\u0940 \u0938\u094d\u091f\u0948\u091f\u093f\u0915 \u0932\u093f\u0902\u0915\u093f\u0902\u0917 \u0928\u093f\u0930\u094d\u0926\u093f\u0937\u094d\u091f \u0915\u0930\u0928\u093e \u0928 \u092d\u0942\u0932\u0947\u0902\u0964<\/p>\n<h3>\u092a\u0941\u0938\u094d\u0924\u0915\u093e\u0932\u092f\u094b\u0902 \u0915\u0940 \u092e\u0948\u0928\u094d\u092f\u0941\u0905\u0932 \u0905\u0938\u0947\u0902\u092c\u0932\u0940<\/h3>\n<p>\u0935\u0930\u094d\u0924\u092e\u093e\u0928 \u092e\u0947\u0902, \u092e\u0941\u091d\u0947 \u0938\u094d\u0925\u0948\u0924\u093f\u0915 \u0932\u093f\u0902\u0915\u093f\u0902\u0917 \u0915\u0947 \u0926\u094c\u0930\u093e\u0928 \u092a\u0941\u0938\u094d\u0924\u0915\u093e\u0932\u092f\u094b\u0902 \u0915\u0947 \u0917\u0932\u0924 \u0938\u0902\u0917\u094d\u0930\u0939 \u0915\u0940 \u0938\u092e\u0938\u094d\u092f\u093e \u0915\u093e \u0938\u093e\u092e\u0928\u093e \u0915\u0930\u0928\u093e \u092a\u0921\u093c\u093e \u0939\u0948; \u0905\u0902\u0924\u093f\u092e \u090f\u092a\u094d\u0932\u093f\u0915\u0947\u0936\u0928 \u092c\u0928\u093e\u0924\u0947 \u0938\u092e\u092f \u092e\u0941\u091d\u0947 \u0924\u094d\u0930\u0941\u091f\u093f \u092a\u094d\u0930\u093e\u092a\u094d\u0924 \u0939\u094b\u0924\u0940 \u0939\u0948:<\/p>\n<div class=\"hcb_wrap\">\n<pre class=\"prism undefined-numbers lang-unknown\" data-lang=\"unknown\"><code>file was built for archive which is not the architecture being linked (x86_64)\n<\/code><\/pre>\n<\/div>\n<p><a href='https:\/\/github.com\/tpoechtrager\/osxcross\/issues\/11' rel='noopener' target='_blank'>\u0907\u0938 \u091f\u093f\u0915\u091f<\/a> \u0915\u0947 \u0938\u092e\u093e\u0928, \u0939\u092e \u090f\u0915 \u0935\u0930\u094d\u0915\u0905\u0930\u093e\u0909\u0902\u0921 \u0932\u093e\u0917\u0942 \u0915\u0930\u0928\u0947 \u092e\u0947\u0902 \u0915\u093e\u092e\u092f\u093e\u092c \u0930\u0939\u0947 \u091c\u093f\u0938\u0915\u0947 \u092a\u0930\u093f\u0923\u093e\u092e\u0938\u094d\u0935\u0930\u0942\u092a \u092c\u093f\u0932\u094d\u0921 \u0938\u0939\u0940 \u0922\u0902\u0917 \u0938\u0947 \u092a\u0942\u0930\u093e \u0939\u0941\u0906\u0964 \u0906\u0907\u090f \u0938\u094d\u091f\u0948\u091f\u093f\u0915 \u0932\u093e\u0907\u092c\u094d\u0930\u0947\u0930\u0940 \u0915\u094b \u0905\u0928\u091c\u093c\u093f\u092a \u0915\u0930\u0947\u0902 \u0914\u0930 \u0913\u090f\u0938\u090f\u0915\u094d\u0938\u0915\u094d\u0930\u0949\u0938 \u0906\u0930\u094d\u0915\u093e\u0907\u0935\u0930 \u0915\u093e \u0909\u092a\u092f\u094b\u0917 \u0915\u0930\u0915\u0947 \u0907\u0938\u0947 \u0928\u090f \u0938\u093f\u0930\u0947 \u0938\u0947 \u092c\u0928\u093e\u090f\u0902:<\/p>\n<div class=\"hcb_wrap\">\n<pre class=\"prism undefined-numbers lang-unknown\" data-lang=\"unknown\"><code>ar x ..\/libFlameSteelCore.a\nrm ..\/libFlameSteelCore.a\nx86_64-apple-darwin19-ar rcs ..\/libFlameSteelCore.a *.o\n<\/code><\/pre>\n<\/div>\n<p>\u0907\u0938\u0915\u0947 \u0905\u0932\u093e\u0935\u093e, \u091c\u093f\u0928 \u0938\u092e\u0938\u094d\u092f\u093e\u0913\u0902 \u092a\u0930 \u092e\u0948\u0902 \u0935\u094d\u092f\u0915\u094d\u0924\u093f\u0917\u0924 \u0930\u0942\u092a \u0938\u0947 \u0935\u093f\u091a\u093e\u0930 \u0915\u0930\u0924\u093e \u0939\u0942\u0902 \u0909\u0928\u092e\u0947\u0902 \u0938\u0947 \u090f\u0915 \u0938\u0940\u0927\u0947 \u0909\u092c\u0902\u091f\u0942 \u092a\u0930 \u092e\u0948\u0915\u0913\u090f\u0938 \u0905\u0928\u0941\u092a\u094d\u0930\u092f\u094b\u0917\u094b\u0902 \u0915\u094b \u091a\u0932\u093e\u0928\u0947 \u0915\u0940 \u0915\u094d\u0937\u092e\u0924\u093e \u0915\u0940 \u0915\u092e\u0940 \u0939\u0948 (\u0915\u092e \u0938\u0947 \u0915\u092e \u0915\u093e\u0930\u094d\u092f\u0915\u094d\u0937\u092e\u0924\u093e \u0915\u0947 \u0939\u093f\u0938\u094d\u0938\u0947 \u0915\u0947 \u0938\u093e\u0925)\u0964 \u092c\u0947\u0936\u0915, \u090f\u0915 \u092a\u0930\u093f\u092f\u094b\u091c\u0928\u093e \u0939\u0948 <a href='https:\/\/github.com\/darlinghq\/darling' rel='noopener' target='_blank'>darling<\/a>, \u0932\u0947\u0915\u093f\u0928 \u0938\u092e\u0930\u094d\u0925\u0928 \u0905\u092d\u0940 \u092d\u0940 \u0935\u093e\u0902\u091b\u093f\u0924 \u0939\u094b\u0928\u0947 \u0915\u0947 \u0932\u093f\u090f \u092c\u0939\u0941\u0924 \u0915\u0941\u091b \u092c\u093e\u0915\u0940 \u0939\u0948\u0964<\/p>\n<h3>\u0938\u094d\u0930\u094b\u0924<\/h3>\n<p><a href=\"https:\/\/github.com\/tpoechtrager\/osxcross\" rel=\"noopener\" target=\"_blank\">https:\/\/github.com\/tpoechtrager\/osxcross<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u0907\u0938 \u092a\u094b\u0938\u094d\u091f \u092e\u0947\u0902, \u092e\u0948\u0902 CMake \u0914\u0930 osxcross \u0915\u093e \u0909\u092a\u092f\u094b\u0917 \u0915\u0930\u0915\u0947 Ubuntu \u092c\u093f\u0932\u094d\u0921 \u092e\u0936\u0940\u0928 \u092a\u0930 macOS \u0915\u0947 \u0932\u093f\u090f \u0915\u094d\u0930\u0949\u0938-\u092a\u094d\u0932\u0947\u091f\u092b\u093c\u0949\u0930\u094d\u092e C++ \u090f\u092a\u094d\u0932\u093f\u0915\u0947\u0936\u0928 \u092c\u0928\u093e\u0928\u0947 \u0915\u093e \u0935\u0930\u094d\u0923\u0928 \u0915\u0930\u0942\u0902\u0917\u093e\u0964 \u0938\u092c\u0938\u0947 \u092a\u0939\u0932\u0947, osxcross \u091f\u0942\u0932\u091a\u0947\u0928 \u0938\u094d\u0925\u093e\u092a\u093f\u0924 \u0915\u0930\u0947\u0902: https:\/\/github.com\/tpoechtrager\/osxcross \u0938\u094d\u0925\u093e\u092a\u0928\u093e 3 \u091a\u0930\u0923\u094b\u0902 \u092e\u0947\u0902 \u0939\u094b\u0924\u0940 \u0939\u0948, \u0921\u093e\u0909\u0928\u0932\u094b\u0921\u093f\u0902\u0917 \u0928\u093f\u0930\u094d\u092d\u0930\u0924\u093e\u090f\u0901: cd tools .\/get_dependencies.sh \u0906\u0927\u093f\u0915\u093e\u0930\u093f\u0915 Apple \u0935\u0947\u092c\u0938\u093e\u0907\u091f \u0938\u0947 XCode.xip \u0921\u093e\u0909\u0928\u0932\u094b\u0921 \u0915\u0930\u0947\u0902, \u092b\u093f\u0930 XCode \u0938\u0947 SDK \u0921\u093e\u0909\u0928\u0932\u094b\u0921 \u0915\u0930\u0947\u0902: [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[],"class_list":["post-97","post","type-post","status-publish","format-standard","hentry","category-notes"],"translation":{"provider":"WPGlobus","version":"3.0.5","language":"hi","enabled_languages":["en","ru","zh","de","ja","fr","es","pt","hi"],"languages":{"en":{"title":true,"content":true,"excerpt":false},"ru":{"title":true,"content":true,"excerpt":false},"zh":{"title":true,"content":true,"excerpt":false},"de":{"title":true,"content":true,"excerpt":false},"ja":{"title":true,"content":true,"excerpt":false},"fr":{"title":true,"content":true,"excerpt":false},"es":{"title":false,"content":false,"excerpt":false},"pt":{"title":true,"content":true,"excerpt":false},"hi":{"title":true,"content":true,"excerpt":false}}},"_links":{"self":[{"href":"https:\/\/demensdeum.com\/blog\/hi\/wp-json\/wp\/v2\/posts\/97","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/demensdeum.com\/blog\/hi\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/demensdeum.com\/blog\/hi\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/demensdeum.com\/blog\/hi\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/demensdeum.com\/blog\/hi\/wp-json\/wp\/v2\/comments?post=97"}],"version-history":[{"count":0,"href":"https:\/\/demensdeum.com\/blog\/hi\/wp-json\/wp\/v2\/posts\/97\/revisions"}],"wp:attachment":[{"href":"https:\/\/demensdeum.com\/blog\/hi\/wp-json\/wp\/v2\/media?parent=97"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/demensdeum.com\/blog\/hi\/wp-json\/wp\/v2\/categories?post=97"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/demensdeum.com\/blog\/hi\/wp-json\/wp\/v2\/tags?post=97"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}