Skip to content

Commit

Permalink
Merge pull request #892 from Geode-solutions/fix/offline
Browse files Browse the repository at this point in the history
fix(CMake): add a download target to only download all third parties
  • Loading branch information
panquez committed Feb 6, 2024
2 parents 2755a1b + eef7e1b commit 5aa3414
Show file tree
Hide file tree
Showing 14 changed files with 43 additions and 2 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.

cmake_minimum_required(VERSION 3.15)
cmake_minimum_required(VERSION 3.19)

cmake_policy(SET CMP0091 NEW)
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreadedDLL")
Expand Down
2 changes: 2 additions & 0 deletions cmake/ConfigureAbseil.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,5 @@ ExternalProject_Add(abseil
CMAKE_CACHE_ARGS
-DCMAKE_INSTALL_PREFIX:PATH=${ABSEIL_INSTALL_PREFIX}
)

ExternalProject_Add_StepTargets(abseil download)
2 changes: 2 additions & 0 deletions cmake/ConfigureAsync++.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,5 @@ ExternalProject_Add(asyncplusplus
CMAKE_CACHE_ARGS
-DCMAKE_INSTALL_PREFIX:PATH=${ASYNCPLUSPLUS_INSTALL_PREFIX}
)

ExternalProject_Add_StepTargets(asyncplusplus download)
2 changes: 2 additions & 0 deletions cmake/ConfigureBitsery.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,5 @@ ExternalProject_Add(bitsery
CMAKE_CACHE_ARGS
-DCMAKE_INSTALL_PREFIX:PATH=${BITSERY_INSTALL_PREFIX}
)

ExternalProject_Add_StepTargets(bitsery download)
2 changes: 2 additions & 0 deletions cmake/ConfigureFilesystem.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,5 @@ ExternalProject_Add(ghcFilesystem
-DGHC_FILESYSTEM_BUILD_EXAMPLES:BOOL=OFF
-DCMAKE_INSTALL_PREFIX:PATH=${FILESYSTEM_INSTALL_PREFIX}
)

ExternalProject_Add_StepTargets(ghcFilesystem download)
2 changes: 2 additions & 0 deletions cmake/ConfigureGDAL.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -63,3 +63,5 @@ ExternalProject_Add(gdal
DEPENDS
proj
)

ExternalProject_Add_StepTargets(gdal download)
2 changes: 2 additions & 0 deletions cmake/ConfigureMinizip.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,5 @@ ExternalProject_Add(minizip
-DMZ_LIBBSD:BOOL=OFF
-DCMAKE_INSTALL_PREFIX:PATH=${MINIZIP_INSTALL_PREFIX}
)

ExternalProject_Add_StepTargets(minizip download)
2 changes: 2 additions & 0 deletions cmake/ConfigureNanoflann.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,5 @@ ExternalProject_Add(nanoflann
-DNANOFLANN_BUILD_EXAMPLES:BOOL=OFF
-DNANOFLANN_BUILD_TESTS:BOOL=OFF
)

ExternalProject_Add_StepTargets(nanoflann download)
19 changes: 18 additions & 1 deletion cmake/ConfigureOpenGeode.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ ExternalProject_Add(opengeode
-DSQLITE_INSTALL_PREFIX:PATH=${SQLITE_INSTALL_PREFIX}
-DPYBIND11_INSTALL_PREFIX:PATH=${PYBIND11_INSTALL_PREFIX}
-DPYBIND11_PYTHON_VERSION:STRING=${PYTHON_VERSION}
-DCMAKE_INSTALL_PREFIX:PATH=${OpenGeode_PATH_INSTALL}
-DCMAKE_INSTALL_PREFIX:PATH=${OpenGeode_PATH_INSTALL}
BINARY_DIR ${OpenGeode_PATH_BIN}
DEPENDS
abseil
Expand All @@ -75,3 +75,20 @@ add_custom_target(third_party
DEPENDS
opengeode-configure
)

add_custom_target(download
DEPENDS
abseil-download
asyncplusplus-download
bitsery-download
ghcFilesystem-download
gdal-download
minizip-download
nanoflann-download
proj-download
spdlog-download
sqlite-download
)
if(OPENGEODE_WITH_PYTHON OR INCLUDE_PYBIND11)
add_dependencies(download pybind11-download)
endif()
2 changes: 2 additions & 0 deletions cmake/ConfigurePROJ.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,5 @@ ExternalProject_Add(proj
DEPENDS
sqlite
)

ExternalProject_Add_StepTargets(proj download)
2 changes: 2 additions & 0 deletions cmake/ConfigurePybind11.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,5 @@ ExternalProject_Add(pybind11
-DCMAKE_INSTALL_PREFIX:PATH=${PYBIND11_INSTALL_PREFIX}
-DPYBIND11_CMAKECONFIG_INSTALL_DIR:STRING=lib/cmake/pybind11
)

ExternalProject_Add_StepTargets(pybind11 download)
2 changes: 2 additions & 0 deletions cmake/ConfigureSQLite.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,5 @@ ExternalProject_Add(sqlite
-DCMAKE_INSTALL_PREFIX:PATH=${SQLITE_INSTALL_PREFIX}
-DBUILD_SHELL:BOOL=ON
)

ExternalProject_Add_StepTargets(sqlite download)
2 changes: 2 additions & 0 deletions cmake/ConfigureSpdlog.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,5 @@ ExternalProject_Add(spdlog
-DSPDLOG_BUILD_TESTS:BOOL=OFF
-DCMAKE_INSTALL_PREFIX:PATH=${SPDLOG_INSTALL_PREFIX}
)

ExternalProject_Add_StepTargets(spdlog download)
2 changes: 2 additions & 0 deletions cmake/SuperBuild.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.

cmake_policy(SET CMP0114 NEW)

if(NOT CPACK_PACKAGE_VERSION)
set(CPACK_PACKAGE_VERSION "master")
endif()
Expand Down

0 comments on commit 5aa3414

Please sign in to comment.