1#.rst: 2# FindGNUstepObjC 3# --------------- 4# 5# Find the GNUstep libobjc2 shared library. 6 7set(gnustep_install_dir "") 8 9if (UNIX) 10 set(gnustep_lib lib/libobjc.so) 11 set(gnustep_header include/objc/runtime.h) 12 if (GNUstepObjC_DIR) 13 if (EXISTS "${GNUstepObjC_DIR}/${gnustep_lib}" AND 14 EXISTS "${GNUstepObjC_DIR}/${gnustep_header}") 15 set(gnustep_install_dir ${GNUstepObjC_DIR}) 16 endif() 17 else() 18 set(gnustep_install_dir) 19 find_path(gnustep_install_dir NAMES lib/libobjc.so include/objc/runtime.h) 20 endif() 21 if (gnustep_install_dir) 22 set(GNUstepObjC_FOUND TRUE) 23 endif() 24elseif (WIN32) 25 set(gnustep_lib lib/objc.dll) 26 set(gnustep_header include/objc/runtime.h) 27 if (GNUstepObjC_DIR) 28 set(gnustep_install_dir ${GNUstepObjC_DIR}) 29 else() 30 set(gnustep_install_dir "C:/Program Files (x86)/libobjc") 31 endif() 32 if (EXISTS "${gnustep_install_dir}/${gnustep_lib}" AND 33 EXISTS "${gnustep_install_dir}/${gnustep_header}") 34 set(GNUstepObjC_FOUND TRUE) 35 endif() 36endif() 37 38if (GNUstepObjC_FOUND) 39 set(GNUstepObjC_DIR ${gnustep_install_dir}) 40 message(STATUS "Found GNUstep ObjC runtime: ${GNUstepObjC_DIR}/${gnustep_lib}") 41endif() 42