diff --git a/.gitignore b/.gitignore index 671d4f4..803dd3a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,8 @@ -.DS_Store -/.build -/Packages -xcuserdata/ -DerivedData/ -.swiftpm/ -.netrc +.DS_Store +/.build +/build +/Packages +xcuserdata/ +DerivedData/ +.swiftpm/ +.netrc diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..8606988 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,44 @@ +cmake_minimum_required(VERSION 3.25) + +project(SwiftWebDriver + LANGUAGES Swift) + +set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib) +set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib) +set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin) +set(CMAKE_Swift_MODULE_DIRECTORY ${CMAKE_BINARY_DIR}/swift) + +add_library(WebDriver + Sources/WebDriver/Capabilities.swift + Sources/WebDriver/Element.swift + Sources/WebDriver/ErrorResponse.swift + Sources/WebDriver/HTTPWebDriver.swift + Sources/WebDriver/Keys.swift + Sources/WebDriver/Location.swift + Sources/WebDriver/MouseButton.swift + Sources/WebDriver/Poll.swift + Sources/WebDriver/Request.swift + Sources/WebDriver/Requests.swift + Sources/WebDriver/ScreenOrientation.swift + Sources/WebDriver/Session.swift + Sources/WebDriver/TimeoutType.swift + Sources/WebDriver/TouchClickKind.swift + Sources/WebDriver/URLRequestExtensions.swift + Sources/WebDriver/WebDriver.swift + Sources/WebDriver/WebDriverStatus.swift + Sources/WebDriver/Window.swift) + +if(WIN32) + add_library(WinAppDriver + Sources/WinAppDriver/CommandLine.swift + Sources/WinAppDriver/ErrorResponse+WinAppDriver.swift + Sources/WinAppDriver/ReexportWebDriver.swift + Sources/WinAppDriver/Win32Error.swift + Sources/WinAppDriver/Win32ProcessTree.swift + Sources/WinAppDriver/WinAppDriver+Attributes.swift + Sources/WinAppDriver/WinAppDriver+Capabilities.swift + Sources/WinAppDriver/WinAppDriver.swift + Sources/WinAppDriver/WindowsSystemPaths.swift) + target_link_libraries(WinAppDriver PRIVATE + WebDriver) +endif()