Skip to content

Commit

Permalink
Add CMakeLists.txt for building with CMake.
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffdav committed Mar 26, 2024
1 parent 141d9ec commit b799ffe
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 7 deletions.
15 changes: 8 additions & 7 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
.DS_Store
/.build
/Packages
xcuserdata/
DerivedData/
.swiftpm/
.netrc
.DS_Store
/.build
/build
/Packages
xcuserdata/
DerivedData/
.swiftpm/
.netrc
44 changes: 44 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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()

0 comments on commit b799ffe

Please sign in to comment.