Skip to content

Commit

Permalink
Refactor.
Browse files Browse the repository at this point in the history
  • Loading branch information
dboris committed May 10, 2024
1 parent a1514fb commit 8a134a8
Show file tree
Hide file tree
Showing 10 changed files with 34 additions and 18 deletions.
1 change: 1 addition & 0 deletions appkit/dune
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
(library
(name appkit)
(public_name camlkit-gui.appkit)
(flags :standard -ccopt "-framework AppKit")
(libraries foundation))
1 change: 1 addition & 0 deletions appkit_extra/dune
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
(library
(name appkit_extra)
(public_name camlkit-gui.appkit-extra)
(flags :standard -ccopt "-framework AppKit")
(libraries foundation))
5 changes: 5 additions & 0 deletions bin/dune
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
(executable
(name main)
(enabled_if (and
(<> %{context_name} default.ios)
(<> %{context_name} device.ios)
(<> %{context_name} simulator.ios)
(<> %{context_name} catalyst.ios)))
(libraries foundation appkit webkit))
2 changes: 0 additions & 2 deletions camlkit-base-ios.opam
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ depends: [
"dune" {>= "3.13"}
"ctypes-ios"
"ctypes-foreign-ios"
"odoc" {with-doc}
]
build: [
[
Expand All @@ -25,7 +24,6 @@ build: [
"-j" jobs
"-x" "ios"
"@install"
"@doc" {with-doc}
]
]
dev-repo: "git+https://github.com/dboris/camlkit.git"
4 changes: 2 additions & 2 deletions camlkit-gui-ios.opam
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# This file is generated by dune, edit dune-project instead
opam-version: "2.0"
version: "0.1.1"
synopsis: "OCaml bindings to the AppKit and UIKit frameworks"
description: "OCaml bindings to the AppKit and UIKit frameworks"
synopsis: "OCaml bindings to the UIKit framework"
description: "OCaml bindings to the UIKit framework"
maintainer: ["Boris D. <[email protected]>"]
authors: ["Boris D. <[email protected]>"]
license: "ISC"
Expand Down
4 changes: 2 additions & 2 deletions camlkit-gui.opam
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# This file is generated by dune, edit dune-project instead
opam-version: "2.0"
version: "0.1.1"
synopsis: "OCaml bindings to the AppKit and UIKit frameworks"
description: "OCaml bindings to the AppKit and UIKit frameworks"
synopsis: "OCaml bindings to the AppKit framework"
description: "OCaml bindings to the AppKit framework"
maintainer: ["Boris D. <[email protected]>"]
authors: ["Boris D. <[email protected]>"]
license: "ISC"
Expand Down
3 changes: 1 addition & 2 deletions demo/dune
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
(= %{context_name} device.ios)
(= %{context_name} simulator.ios)
(= %{context_name} catalyst.ios)))
(flags :standard -ccopt "-framework UIKit")
(libraries camlkit-base.foundation camlkit-gui.uikit))
(libraries camlkit-base.foundation camlkit-gui-ios.uikit))

(subdir Demo.app
(rule
Expand Down
16 changes: 8 additions & 8 deletions dune-project
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,14 @@

(package
(name camlkit-gui)
(synopsis "OCaml bindings to the AppKit and UIKit frameworks")
(description "OCaml bindings to the AppKit and UIKit frameworks")
(synopsis "OCaml bindings to the AppKit framework")
(description "OCaml bindings to the AppKit framework")
(depends
ocaml
dune
(camlkit-base (= :version))
(alcotest :with-test))
(tags (objc bindings cocoa ios gnustep)))
(tags (objc bindings cocoa macos gnustep)))

(package
(name camlkit)
Expand All @@ -58,19 +58,19 @@
ctypes
ctypes-foreign
(alcotest :with-test))
(tags (objc bindings cocoa ios gnustep)))
(tags (objc bindings cocoa ios)))

(package
(name camlkit-gui-ios)
(synopsis "OCaml bindings to the AppKit and UIKit frameworks")
(description "OCaml bindings to the AppKit and UIKit frameworks")
(synopsis "OCaml bindings to the UIKit framework")
(description "OCaml bindings to the UIKit framework")
(allow_empty)
(depends
ocaml
dune
(camlkit-base (= :version))
(alcotest :with-test))
(tags (objc bindings cocoa ios gnustep)))
(tags (objc bindings cocoa ios)))

(package
(name camlkit-ios)
Expand All @@ -83,4 +83,4 @@
(camlkit-base-ios (= :version))
(camlkit-gui-ios (= :version))
(alcotest :with-test))
(tags (objc cocoa ios gnustep)))
(tags (objc cocoa ios)))
8 changes: 7 additions & 1 deletion uikit/dune
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
(library
(name uikit)
(public_name camlkit-gui.uikit)
(public_name camlkit-gui-ios.uikit)
(enabled_if (or
(= %{context_name} default.ios)
(= %{context_name} device.ios)
(= %{context_name} simulator.ios)
(= %{context_name} catalyst.ios)))
(flags :standard -ccopt "-framework UIKit")
(libraries foundation))
8 changes: 7 additions & 1 deletion uikit_extra/dune
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
(library
(name uikit_extra)
(public_name camlkit-gui.uikit-extra)
(public_name camlkit-gui-ios.uikit-extra)
(enabled_if (or
(= %{context_name} default.ios)
(= %{context_name} device.ios)
(= %{context_name} simulator.ios)
(= %{context_name} catalyst.ios)))
(flags :standard -ccopt "-framework UIKit")
(libraries foundation))

0 comments on commit 8a134a8

Please sign in to comment.