cmake check_objc_source_compiles examples

Signatures

check_objc_source_compiles(<code> <resultVar>
  [FAIL_REGEX <regex1> [<regex2>...]])

Examples

u3d-community/U3D Source/ThirdParty/SDL/CMakeLists.txt :1902

check_objc_source_compiles("
          #include <AvailabilityMacros.h>
          #include <TargetConditionals.h>
          #import <Foundation/Foundation.h>
          #import <GameController/GameController.h>
          #if MAC_OS_X_VERSION_MIN_REQUIRED < 1080
          #error GameController framework doesn't work on this configuration
          #endif
          #if TARGET_CPU_X86
          #error GameController framework doesn't work on this configuration
          #endif
          int main() { return 0; }" HAVE_FRAMEWORK_GAMECONTROLLER)

godlikepanos/anki-3d-engine ThirdParty/Sdl2/CMakeLists.txt :1887

check_objc_source_compiles("
          #include <AvailabilityMacros.h>
          #include <TargetConditionals.h>
          #import <Foundation/Foundation.h>
          #import <GameController/GameController.h>
          #if MAC_OS_X_VERSION_MIN_REQUIRED < 1080
          #error GameController framework doesn't work on this configuration
          #endif
          #if TARGET_CPU_X86
          #error GameController framework doesn't work on this configuration
          #endif
          int main() { return 0; }" HAVE_FRAMEWORK_GAMECONTROLLER)

cadaver/turso3d ThirdParty/SDL/CMakeLists.txt :2151

check_objc_source_compiles("
          #include <AvailabilityMacros.h>
          #include <TargetConditionals.h>
          #import <Foundation/Foundation.h>
          #import <GameController/GameController.h>
          #if MAC_OS_X_VERSION_MIN_REQUIRED < 1080
          #error GameController framework doesn't work on this configuration
          #endif
          #if TARGET_CPU_X86
          #error GameController framework doesn't work on this configuration
          #endif
          int main() { return 0; }" HAVE_FRAMEWORK_GAMECONTROLLER)

Hork-Engine/Hork-Source ThirdParty/SDL3/CMakeLists.txt :2209

check_objc_source_compiles("
          #include <AvailabilityMacros.h>
          #include <TargetConditionals.h>
          #import <Foundation/Foundation.h>
          #import <GameController/GameController.h>
          #if MAC_OS_X_VERSION_MIN_REQUIRED < 1080
          #error GameController framework doesn't work on this configuration
          #endif
          #if TARGET_CPU_X86
          #error GameController framework doesn't work on this configuration
          #endif
          int main() { return 0; }" HAVE_FRAMEWORK_GAMECONTROLLER)

RavEngine/RavEngine deps/SDL/CMakeLists.txt :2227

check_objc_source_compiles("
          #include <AvailabilityMacros.h>
          #include <TargetConditionals.h>
          #import <Foundation/Foundation.h>
          #import <GameController/GameController.h>
          #if MAC_OS_X_VERSION_MIN_REQUIRED < 1080
          #error GameController framework doesn't work on this configuration
          #endif
          #if TARGET_CPU_X86
          #error GameController framework doesn't work on this configuration
          #endif
          int main() { return 0; }" HAVE_FRAMEWORK_GAMECONTROLLER)

v6d-io/v6d cmake/CheckLinkerFlag.cmake :82

check_OBJC_source_compiles("${_source}" ${_var} ${_common_patterns})

vengi-voxel/vengi contrib/libs/sdl2/CMakeLists.txt :2153

check_objc_source_compiles("
          #include <AvailabilityMacros.h>
          #include <TargetConditionals.h>
          #import <Foundation/Foundation.h>
          #import <GameController/GameController.h>
          #if MAC_OS_X_VERSION_MIN_REQUIRED < 1080
          #error GameController framework doesn't work on this configuration
          #endif
          #if TARGET_CPU_X86
          #error GameController framework doesn't work on this configuration
          #endif
          int main() { return 0; }" HAVE_FRAMEWORK_GAMECONTROLLER)

rbfx/rbfx Source/ThirdParty/SDL/CMakeLists.txt :1991

check_objc_source_compiles("
          #include <AvailabilityMacros.h>
          #include <TargetConditionals.h>
          #import <Foundation/Foundation.h>
          #import <GameController/GameController.h>
          #if MAC_OS_X_VERSION_MIN_REQUIRED < 1080
          #error GameController framework doesn't work on this configuration
          #endif
          #if TARGET_CPU_X86
          #error GameController framework doesn't work on this configuration
          #endif
          int main() { return 0; }" HAVE_FRAMEWORK_GAMECONTROLLER)

ComputationalBiomechanicsLab/opensim-creator third_party/SDL/CMakeLists.txt :2227

check_objc_source_compiles("
          #include <AvailabilityMacros.h>
          #include <TargetConditionals.h>
          #import <Foundation/Foundation.h>
          #import <GameController/GameController.h>
          #if MAC_OS_X_VERSION_MIN_REQUIRED < 1080
          #error GameController framework doesn't work on this configuration
          #endif
          #if TARGET_CPU_X86
          #error GameController framework doesn't work on this configuration
          #endif
          int main() { return 0; }" HAVE_FRAMEWORK_GAMECONTROLLER)

cvet/fonline ThirdParty/SDL/CMakeLists.txt :2227

check_objc_source_compiles("
          #include <AvailabilityMacros.h>
          #include <TargetConditionals.h>
          #import <Foundation/Foundation.h>
          #import <GameController/GameController.h>
          #if MAC_OS_X_VERSION_MIN_REQUIRED < 1080
          #error GameController framework doesn't work on this configuration
          #endif
          #if TARGET_CPU_X86
          #error GameController framework doesn't work on this configuration
          #endif
          int main() { return 0; }" HAVE_FRAMEWORK_GAMECONTROLLER)

openc2e/openc2e externals/SDL2/CMakeLists.txt :2057

check_objc_source_compiles("
          #include <AvailabilityMacros.h>
          #include <TargetConditionals.h>
          #import <Foundation/Foundation.h>
          #import <GameController/GameController.h>
          #if MAC_OS_X_VERSION_MIN_REQUIRED < 1080
          #error GameController framework doesn't work on this configuration
          #endif
          #if TARGET_CPU_X86
          #error GameController framework doesn't work on this configuration
          #endif
          int main() { return 0; }" HAVE_FRAMEWORK_GAMECONTROLLER)

glKarin/com.n0n3m4.diii4a Q3E/src/main/jni/deplibs/SDL2/CMakeLists.txt :2157

check_objc_source_compiles("
          #include <AvailabilityMacros.h>
          #include <TargetConditionals.h>
          #import <Foundation/Foundation.h>
          #import <GameController/GameController.h>
          #if MAC_OS_X_VERSION_MIN_REQUIRED < 1080
          #error GameController framework doesn't work on this configuration
          #endif
          #if TARGET_CPU_X86
          #error GameController framework doesn't work on this configuration
          #endif
          int main() { return 0; }" HAVE_FRAMEWORK_GAMECONTROLLER)

syslog-ng/syslog-ng modules/darwinosl/CMakeLists.txt :26

check_objc_source_compiles("
      #include <OSLog/OSLog.h>
      int main(int, char**)
      { return 0; }
    " HAVE_OSLOG)

nvMcJohn/apitest thirdparty/SDL2-2.0.1/cmake/sdlchecks.cmake :504

check_objc_source_compiles("
        #import <Cocoa/Cocoa.h>
        int main (int argc, char** argv) {}" HAVE_VIDEO_COCOA)

skylersaleh/SkyEmu src/SDL2/CMakeLists.txt :1882

check_objc_source_compiles("
          #include <AvailabilityMacros.h>
          #include <TargetConditionals.h>
          #import <Foundation/Foundation.h>
          #import <GameController/GameController.h>
          #if MAC_OS_X_VERSION_MIN_REQUIRED < 1080
          #error GameController framework doesn't work on this configuration
          #endif
          #if TARGET_CPU_X86
          #error GameController framework doesn't work on this configuration
          #endif
          int main() { return 0; }" HAVE_FRAMEWORK_GAMECONTROLLER)

klaussilveira/qengine vendor/SDL2-2.0.22/CMakeLists.txt :1887

check_objc_source_compiles("
          #include <AvailabilityMacros.h>
          #include <TargetConditionals.h>
          #import <Foundation/Foundation.h>
          #import <GameController/GameController.h>
          #if MAC_OS_X_VERSION_MIN_REQUIRED < 1080
          #error GameController framework doesn't work on this configuration
          #endif
          #if TARGET_CPU_X86
          #error GameController framework doesn't work on this configuration
          #endif
          int main() { return 0; }" HAVE_FRAMEWORK_GAMECONTROLLER)

JulNadeauCA/libagar CMakeChecks.cmake :873

check_objc_source_compiles("
#import <Cocoa/Cocoa.h>

int main(int argc, char *argv[]) { return (0); }
" HAVE_COCOA)

mxcop/src-dgi extern/sdl/CMakeLists.txt :2156

check_objc_source_compiles("
          #include <AvailabilityMacros.h>
          #include <TargetConditionals.h>
          #import <Foundation/Foundation.h>
          #import <GameController/GameController.h>
          #if MAC_OS_X_VERSION_MIN_REQUIRED < 1080
          #error GameController framework doesn't work on this configuration
          #endif
          #if TARGET_CPU_X86
          #error GameController framework doesn't work on this configuration
          #endif
          int main() { return 0; }" HAVE_FRAMEWORK_GAMECONTROLLER)

tanis2000/binocle-c src/deps/sdl/CMakeLists.txt :2218

check_objc_source_compiles("
          #include <AvailabilityMacros.h>
          #include <TargetConditionals.h>
          #import <Foundation/Foundation.h>
          #import <GameController/GameController.h>
          #if MAC_OS_X_VERSION_MIN_REQUIRED < 1080
          #error GameController framework doesn't work on this configuration
          #endif
          #if TARGET_CPU_X86
          #error GameController framework doesn't work on this configuration
          #endif
          int main() { return 0; }" HAVE_FRAMEWORK_GAMECONTROLLER)