All Questions
Tagged with objective-c cmake
31
questions
0
votes
0
answers
40
views
CMake sets “Generate Debug Symbols” - a Xcode build setting to wrong value
I’m trying to generate Xcode project file of some libraries with CMake.
I want to generate dSYM file in all build config type.
I set values in all my CMakelists.txt as below:
set(CMAKE_CXX_FLAGS &...
1
vote
1
answer
49
views
Error building C++ code on MacOS using CMake. Error with Cocoa and Foundations
I am trying to build a cross platform application on MacOS which is written in C++. In my CMake I've included
cmake_minimum_required(VERSION 3.28)
project(lel LANGUAGES C CXX)
if(APPLE)
...
0
votes
1
answer
840
views
Mix C++ and Objective-C code using CMake and get C++ executable
The Idea
I'm trying to implement a game engine in C++.
I'm using macOS for development (arm-64 architecture). I want to create a window using Foundation framework.
CMakeLists.txt utilizes C++ and ...
1
vote
0
answers
141
views
Gnustep with Cmake
I am currently trying to use objective-c with cmake and GNUStep and managed to enable objective c in cmake using mingw compiler but i wanted to know how to use gnustep with cmake so i could program ...
2
votes
1
answer
157
views
Issues with porting Xcode MacOS game template to СMake
I want to integrate basic Objective-C and Metal code to my cross-platform C++ framework to allow MacOS target. I tried to port MacOS Game template to CMake as it is a build system that I use and I ...
0
votes
1
answer
73
views
Programatically checking for NSBundle in macOS
I am building my application for macOS using CMake. My application can either be MACOSX_BUNDLE i.e. generated as a .app through CMake or it can even be a Unix-style executable.
Is there a ...
1
vote
3
answers
1k
views
Xcode, CMake unable to link C++ library with ObjC++ library
I have created a minimalistic C++ library that I want to use in my Xcode project. It has this directory structure -
library/
- CMakeLists.txt
- build/ // build files will reside here
...
0
votes
1
answer
974
views
Cmake project set LANGUAGES from variable
currently I've got the following project definition :
set(supported_languages "CXX OBJC OBJCXX")
project(
myProj
VERSION ${ver}
LANGUAGES ${supported_languages})
where ...
4
votes
1
answer
2k
views
SDL2 doesn't compile on macos Big Sur
In one of my projects I'm using git submodules to download the SDL2 Library and compile it. This is giving me a strange error so I tried to compile SDL2 Standalone and I got the same error.
I'm on a ...
2
votes
0
answers
423
views
How to enable separate unity build for objcpp .mm files?
I have following situation:
I have some modules, for each of them I enable unity build:
set_target_properties(${target} PROPERTIES UNITY_BUILD ON UNITY_BUILD_MODE GROUP)
Then I split their main ...
1
vote
1
answer
646
views
How can I set “Other Linker Flags” to include -ObjC with CMake?
I am trying to generate an XCode project with CMake, but I can't define "Other linker flags" in project settings. I have tried using the following:
set(CMAKE_SHARED_LINKER_FLAGS "-ObjC&...
0
votes
1
answer
410
views
error: target Objective-C runtime differs in PCH file vs. current file
I'm trying to compile Objective-C or .m file using command-line (generated by CMake) for Catalyst, but am stuck with two compile errors!
1. Whenever I enable Catalyst with one of below flags:
-target ...
1
vote
3
answers
885
views
Embedding files in an iOS app (C++/Qt/cmake)
In an iOS c++/Qt application, I need to ship a few files and to keep them in their directory structure.
For the Android version, we bundle a zip which we unzip on the target before creating the ...
0
votes
1
answer
1k
views
Statically linking to macOS framework in CMake
I am using a third party macOS framework called CrashReporter in my CMake project like so:
cmake_minimum_required(VERSION 3.15)
set(CMAKE_OSX_DEPLOYMENT_TARGET "10.9" CACHE STRING "Minimum OS X ...
0
votes
0
answers
388
views
CMake does not include/embed linked library
I have a CMake list file that builds a c++ library that I have, including 5 third party c++ libraries, which are also built with cmake. This project builds an android .aar library and an iOS framework....