# Build the swiftObjC dylib.
set(SHARED_LIBRARY ON)

set(SWIFTOBJC_SOURCES
    ObjectiveC.swift)

# Definition of ObjCBool is platform-specific.
if (SWIFT_DEPLOYMENT_OS MATCHES "^macosx" 
    OR
    (SWIFT_DEPLOYMENT_OS MATCHES "^iphone" 
     AND NOT (CMAKE_OSX_ARCHITECTURES MATCHES "64$")))
  # OS X or 32-bit iOS: Objective-C BOOL is signed char
  list(APPEND SWIFTOBJC_SOURCES 
    ObjectiveC-BOOLchar.swift)
else()
  # Others: Objective-C BOOL is C99/C++ bool.
  list(APPEND SWIFTOBJC_SOURCES 
    ObjectiveC-BOOLbool.swift)
endif()

add_swift_library(swiftObjectiveC INSTALL
  ${SWIFTOBJC_SOURCES}
  DEPENDS swift_stdlib_core)

add_subdirectory(Foundation)
add_subdirectory(SpriteKit)

if (SWIFT_DEPLOYMENT_OS MATCHES "^macosx")
  add_subdirectory(AppKit)
else()
  add_subdirectory(UIKit)
endif()

# Only build XCTest for OS X for now.
if (SWIFT_DEPLOYMENT_OS MATCHES "^macosx")
  add_subdirectory(XCTest)
endif()

# Build the swiftObjC dylib.
set(SHARED_LIBRARY ON)

set(SWIFTOBJC_SOURCES
    ObjectiveC.swift)

# Definition of ObjCBool is platform-specific.
if (SWIFT_DEPLOYMENT_OS MATCHES "^macosx" 
    OR
    (SWIFT_DEPLOYMENT_OS MATCHES "^iphone" 
     AND NOT (CMAKE_OSX_ARCHITECTURES MATCHES "64$")))
  # OS X or 32-bit iOS: Objective-C BOOL is signed char
  list(APPEND SWIFTOBJC_SOURCES 
    ObjectiveC-BOOLchar.swift)
else()
  # Others: Objective-C BOOL is C99/C++ bool.
  list(APPEND SWIFTOBJC_SOURCES 
    ObjectiveC-BOOLbool.swift)
endif()

add_swift_library(swiftObjectiveC INSTALL
  ${SWIFTOBJC_SOURCES}
  DEPENDS swift_stdlib_core)

add_subdirectory(Foundation)
add_subdirectory(SpriteKit)

if (SWIFT_DEPLOYMENT_OS MATCHES "^macosx")
  add_subdirectory(AppKit)
else()
  add_subdirectory(UIKit)
endif()

# Only build XCTest for OS X for now.
# FIXME: Temporarily allow one to disable building this overlay module.
option(SWIFT_BUILD_XCTEST "Build XCTest overlay" YES)
if (SWIFT_DEPLOYMENT_OS MATCHES "^macosx")
  if (SWIFT_BUILD_XCTEST)
    add_subdirectory(XCTest)
  endif()
endif()

Allow one to disable building the XCTest overlay via the CMake option SWIFT_BUILD_XCTEST.
Allow one to disable building the XCTest overlay via the CMake option SWIFT_BUILD_XCTEST.


Swift SVN r15922
