File: FindGNUstepObjC.cmake

package info (click to toggle)
swiftlang 6.0.3-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,519,992 kB
  • sloc: cpp: 9,107,863; ansic: 2,040,022; asm: 1,135,751; python: 296,500; objc: 82,456; f90: 60,502; lisp: 34,951; pascal: 19,946; sh: 18,133; perl: 7,482; ml: 4,937; javascript: 4,117; makefile: 3,840; awk: 3,535; xml: 914; fortran: 619; cs: 573; ruby: 573
file content (41 lines) | stat: -rw-r--r-- 1,167 bytes parent folder | download | duplicates (10)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#.rst:
# FindGNUstepObjC
# ---------------
#
# Find the GNUstep libobjc2 shared library.

set(gnustep_install_dir "")

if (UNIX)
  set(gnustep_lib lib/libobjc.so)
  set(gnustep_header include/objc/runtime.h)
  if (GNUstepObjC_DIR)
    if (EXISTS "${GNUstepObjC_DIR}/${gnustep_lib}" AND
        EXISTS "${GNUstepObjC_DIR}/${gnustep_header}")
      set(gnustep_install_dir ${GNUstepObjC_DIR})
    endif()
  else()
    set(gnustep_install_dir)
    find_path(gnustep_install_dir NAMES lib/libobjc.so include/objc/runtime.h)
  endif()
  if (gnustep_install_dir)
    set(GNUstepObjC_FOUND TRUE)
  endif()
elseif (WIN32)
  set(gnustep_lib lib/objc.dll)
  set(gnustep_header include/objc/runtime.h)
  if (GNUstepObjC_DIR)
    set(gnustep_install_dir ${GNUstepObjC_DIR})
  else()
    set(gnustep_install_dir "C:/Program Files (x86)/libobjc")
  endif()
  if (EXISTS "${gnustep_install_dir}/${gnustep_lib}" AND
      EXISTS "${gnustep_install_dir}/${gnustep_header}")
    set(GNUstepObjC_FOUND TRUE)
  endif()
endif()

if (GNUstepObjC_FOUND)
  set(GNUstepObjC_DIR ${gnustep_install_dir})
  message(STATUS "Found GNUstep ObjC runtime: ${GNUstepObjC_DIR}/${gnustep_lib}")
endif()