Skip to content

Commit

Permalink
feat: Move all third-party deps into git submodules (#1083)
Browse files Browse the repository at this point in the history
This also normalizes the structure of all submodule folders so that
there is a clear place to put configurations, outside the submodule
source, but limited in scope to that folder.

Issue #1047 (New build system)
  • Loading branch information
joeyparrish authored Aug 17, 2022
1 parent 31e116f commit 1ff26b4
Show file tree
Hide file tree
Showing 22 changed files with 248 additions and 349 deletions.
5 changes: 0 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,3 @@
.settings
build/
/packager/docs/
/packager/third_party/icu/
/packager/third_party/libpng/src/
/packager/third_party/libwebm/src/
/packager/third_party/modp_b64/
/packager/third_party/zlib/
29 changes: 22 additions & 7 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,18 +1,33 @@
[submodule "packager/testing/googletest"]
[submodule "packager/third_party/googletest/source"]
path = packager/third_party/googletest/source
url = https://github.com/google/googletest
[submodule "packager/third_party/abseil-cpp"]
[submodule "packager/third_party/abseil-cpp/source"]
path = packager/third_party/abseil-cpp/source
url = https://github.com/abseil/abseil-cpp
[submodule "packager/third_party/curl"]
[submodule "packager/third_party/curl/source"]
path = packager/third_party/curl/source
url = https://github.com/curl/curl
[submodule "packager/third_party/glog"]
[submodule "packager/third_party/glog/source"]
path = packager/third_party/glog/source
url = https://github.com/google/glog
[submodule "packager/third_party/json"]
path = packager/third_party/json
[submodule "packager/third_party/json/source"]
path = packager/third_party/json/source
url = https://github.com/nlohmann/json
[submodule "packager/third_party/mbedtls"]
[submodule "packager/third_party/mbedtls/source"]
path = packager/third_party/mbedtls/source
url = https://github.com/Mbed-TLS/mbedtls
[submodule "packager/third_party/zlib/source"]
path = packager/third_party/zlib/source
url = https://github.com/joeyparrish/zlib
[submodule "packager/third_party/libpng/source"]
path = packager/third_party/libpng/source
url = https://github.com/glennrp/libpng
[submodule "packager/third_party/libwebm/source"]
path = packager/third_party/libwebm/source
url = https://github.com/webmproject/libwebm
[submodule "packager/third_party/libxml2/source"]
path = packager/third_party/libxml2/source
url = https://gitlab.gnome.org/GNOME/libxml2
[submodule "packager/third_party/protobuf/source"]
path = packager/third_party/protobuf/source
url = https://github.com/protocolbuffers/protobuf
5 changes: 5 additions & 0 deletions packager/third_party/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,9 @@ add_subdirectory(curl EXCLUDE_FROM_ALL)
add_subdirectory(glog EXCLUDE_FROM_ALL)
add_subdirectory(googletest EXCLUDE_FROM_ALL)
add_subdirectory(json EXCLUDE_FROM_ALL)
add_subdirectory(libpng EXCLUDE_FROM_ALL)
add_subdirectory(libwebm EXCLUDE_FROM_ALL)
add_subdirectory(libxml2 EXCLUDE_FROM_ALL)
add_subdirectory(mbedtls EXCLUDE_FROM_ALL)
add_subdirectory(protobuf EXCLUDE_FROM_ALL)
add_subdirectory(zlib EXCLUDE_FROM_ALL)
2 changes: 0 additions & 2 deletions packager/third_party/abseil-cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@

# CMake build file to host abseil-cpp configuration.

# Variables that must be defined for third-party libraries.

# This will be the new default, so turn it on now to suppress a warning.
set(ABSL_PROPAGATE_CXX_STD ON)

Expand Down
5 changes: 5 additions & 0 deletions packager/third_party/glog/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,10 @@ set(WITH_GTEST OFF)
# Don't depend on or search for libunwind.
set(WITH_UNWIND OFF)

# Disable this warning/error, which occurs in demangle.c on macOS:
if(NOT MSVC)
add_compile_options(-Wno-shorten-64-to-32)
endif()

# With these set in scope of this folder, load the library's own CMakeLists.txt.
add_subdirectory(source)
12 changes: 12 additions & 0 deletions packager/third_party/json/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Copyright 2022 Google LLC. All rights reserved.
#
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file or at
# https://developers.google.com/open-source/licenses/bsd

# CMake build file to host the nlohmann json library configuration.

# No configuration is currently required.

# With these set in scope of this folder, load the library's own CMakeLists.txt.
add_subdirectory(source)
30 changes: 30 additions & 0 deletions packager/third_party/libpng/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Copyright 2022 Google LLC. All rights reserved.
#
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file or at
# https://developers.google.com/open-source/licenses/bsd

# CMake build file to host libpng configuration.

# Turn these features on.
set(PNG_STATIC ON)
set(PNG_HARDWARE_OPTIMIZATIONS ON)

# Turn these features off.
set(PNG_SHARED OFF)
set(PNG_TESTS OFF)
set(PNG_FRAMEWORK OFF)
set(PNG_DEBUG OFF)

# Don't install anything.
set(SKIP_INSTALL_ALL ON)

# A confusing name, but this means "let us tell you where to find zlib".
set(PNG_BUILD_ZLIB ON)
# Tell libpng where to find zlib headers.
set(ZLIB_INCLUDE_DIR ../zlib/source/)
# Tell libpng where to find zlib library to link to.
set(ZLIB_LIBRARY zlibstatic)

# With these set in scope of this folder, load the library's own CMakeLists.txt.
add_subdirectory(source)
52 changes: 0 additions & 52 deletions packager/third_party/libpng/libpng.gyp

This file was deleted.

219 changes: 0 additions & 219 deletions packager/third_party/libpng/pnglibconf.h

This file was deleted.

1 change: 1 addition & 0 deletions packager/third_party/libpng/source
Submodule source added at a40189
Loading

0 comments on commit 1ff26b4

Please sign in to comment.