Commit Graph

13 Commits

Author SHA1 Message Date
Jim Van Verth
d9c6b75d4d Add mm files to cmake sources
Bug: skia:8938
Change-Id: Ic9c9859890ad18d1ec72ce72fc93d4635595affd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/206164
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2019-04-05 13:07:32 +00:00
Kevin Lubick
d5c6e16e3e Revert "Revert "make third_party() static libraries""
This reverts commit 32a71f126f.

Since more static_libraries are created, we use
target_link_libraries more, which passes the transitive
dependencies.

Bug: skia:8732
Change-Id: I1d05f89b078f5116545306a930b65ca4b5b29e8e
Reviewed-on: https://skia-review.googlesource.com/c/188623
Commit-Queue: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
2019-02-01 21:12:50 +00:00
Kevin Lubick
9a2bb09202 CMake: distinguish between file and dir copies by presence of '.' in src path
ANGLE's build requires a file copy. Nema's build requires a dir copy. CMake
uses a different command for each. gn does not distinguish which. We make
a guess that happens to work for these two use cases based on the whether
the base file name of the src contains a '.'


Change-Id: I3503fd9d632abda3f8f952d0eef964019d932bea
Reviewed-on: https://skia-review.googlesource.com/c/188626
Commit-Queue: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2019-02-01 18:58:46 +00:00
Kevin Lubick
8ea367c262 Make cmake copy_directory instead of just files
The only gn copy commands we do at the moment are for directories, which
copy (not copy_directory) will silently ignore.

Bug: skia:8732
Change-Id: Ibd8206972c90976085d4b560f28bbb088947ea75
Reviewed-on: https://skia-review.googlesource.com/c/188305
Auto-Submit: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2019-01-31 18:18:22 +00:00
Ben Wagner
4f0a011bd6 Improve CMakeLists.txt auto regeneration.
Check that the re-generation could actually run ninja.

Specify the gn_deps by absolute path names.

Depend on the gn_to_cmake.py generator.

Change-Id: I5f93031d35f0b239b899fe1716fb1f6a4c67f77e
Reviewed-on: https://skia-review.googlesource.com/137397
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Herb Derby <herb@google.com>
2018-06-26 20:33:29 +00:00
Ben Wagner
82cecb6027 Make CMakeLists.txt less relative.
Change-Id: I8ac60937d793161b37a3975735d21d93bbe7b216
Reviewed-on: https://skia-review.googlesource.com/131222
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2018-05-31 19:25:34 +00:00
Herb Derby
5699278b67 Add rules for cmake 3.11 to not error
As of cmake 3.11, the add_library target must have sources
associated with it. If there are sources, just compile
the file empty.cpp.

Change-Id: I7fec03dc0f0d2e6098572ed6e9fcdfaac3811024
Reviewed-on: https://skia-review.googlesource.com/129189
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2018-05-18 20:56:24 +00:00
Ben Wagner
187a771f59 Add support for lib_dirs to gn_to_cmake.py.
The vulcan code uses lib_dirs to point to the libs in the SDK.

Change-Id: I4a1a4235b8534f3f937640b10f9758b0c70434c9
Reviewed-on: https://skia-review.googlesource.com/4003
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2016-10-28 15:07:10 +00:00
Ben Wagner
388faa0fb9 Auto re-gen for gn cmake generator.
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=3028

Change-Id: I73c6ce9e852c280bbb2017c30717809b4cb44046
Reviewed-on: https://skia-review.googlesource.com/3028
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2016-10-06 21:12:21 +00:00
Ben Wagner
dc69dc7e5e Add action_foreach, copy, and proper target naming.
Also properly handles dependencies across OBJECT libraries.

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2939

Change-Id: I4aa48c896caf262772fe9769e742b54f6e265ab0
Reviewed-on: https://skia-review.googlesource.com/2939
Reviewed-by: Brian Salomon <bsalomon@google.com>
2016-10-05 14:07:04 +00:00
Ben Wagner
bc34404dc3 Implement 'action' in gn_to_cmake.py.
With this change it is possible to build all Skia targets.

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2784

Change-Id: I5c53a6ba5746d210e0ae8f7a29b409d40c7b9bff
Reviewed-on: https://skia-review.googlesource.com/2784
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Mike Klein <mtklein@chromium.org>
2016-09-30 13:29:52 +00:00
bungeman
e95ea08cf4 Improve GN to CMake translation for building.
This adds proper target types, dependencies, and library handling. This
is enough to build and run dm on Linux and Mac.

Change-Id: I5220f67f7dd3dbada7ad03ef83fff8fd80158fad
Reviewed-on: https://skia-review.googlesource.com/2664
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2016-09-28 21:20:29 +00:00
bungeman
623ef92e4f Json ide script for gn to output cmake.
Can be run like

gn gen out/debug --ide=json --json-ide-script=../../gn/gn_to_cmake.py

or

gn gen out/debug --ide=json
python gn/gn_to_cmake.py out/debug/project.json

This first pass creates CMakeLists.txt with just enough information for an
ide. Each target is just a static library with sources, include
directories, and defines.

NOTRY=true
This isn't automatically tested.

Review-Url: https://codereview.chromium.org/2363873002
2016-09-23 08:16:04 -07:00