Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 8 additions & 12 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,6 @@ set(DOWNLOAD_DIR ${CMAKE_BINARY_DIR}/downloads CACHE PATH "Default download path
set(OFFLINE YES CACHE BOOL "Check repo updates")
set(UPDATE_DISCONNECTED_SUPPORT UPDATE_DISCONNECTED ${OFFLINE})

if("${CMAKE_VERSION}" VERSION_GREATER 3.6.0)
set(GIT_SHALLOW_SUPPORT GIT_SHALLOW 1)
endif()

# Installation directory. Can be overriden from command line.
if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
set(CMAKE_INSTALL_PREFIX ${CMAKE_BINARY_DIR}/vitasdk CACHE PATH "Default install path" FORCE)
Expand Down Expand Up @@ -185,7 +181,7 @@ function(toolchain_deps toolchain_deps_dir toolchain_install_dir toolchain_suffi
DEPENDS zlib${suffix}
GIT_REPOSITORY https://github.com/vitasdk/libzip
GIT_TAG ${LIBZIP_TAG}
${GIT_SHALLOW_SUPPORT}
GIT_SHALLOW 1
PATCH_COMMAND patch -d <SOURCE_DIR> -p1 -t -N < ${PROJECT_SOURCE_DIR}/patches/libzip.patch || true
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${toolchain_deps_dir}
${toolchain_cmake_args} ${libzip_configure}
Expand Down Expand Up @@ -306,7 +302,7 @@ function(toolchain_deps toolchain_deps_dir toolchain_install_dir toolchain_suffi
DEPENDS libelf${suffix} zlib${suffix} libzip${suffix} libyaml${suffix}
GIT_REPOSITORY https://github.com/vitasdk/vita-toolchain
GIT_TAG ${TOOLCHAIN_TAG}
${GIT_SHALLOW_SUPPORT}
GIT_SHALLOW 1
# Set prefix to "/" here to be able to install twice
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=/ ${toolchain_cmake_args}
-DTOOLCHAIN_DEPS_DIR=${toolchain_deps_dir}
Expand Down Expand Up @@ -532,7 +528,7 @@ ExternalProject_add(vita-headers
DEPENDS binutils_${build_suffix} vita-toolchain_${build_suffix}
GIT_REPOSITORY https://github.com/vitasdk/vita-headers
GIT_TAG ${HEADERS_TAG}
${GIT_SHALLOW_SUPPORT}
GIT_SHALLOW 1
# CONFIGURE_COMMAND ""
# BUILD_COMMAND VITA_LIBS_GEN=${vita_libs_gen_command}
# ARCH=${binutils_prefix}
Expand Down Expand Up @@ -568,7 +564,7 @@ ExternalProject_Add(newlib
DEPENDS binutils_${target_suffix} gcc-base vita-headers
GIT_REPOSITORY https://github.com/vitasdk/newlib
GIT_TAG ${NEWLIB_TAG}
${GIT_SHALLOW_SUPPORT}
GIT_SHALLOW 1
# Pass the compiler_target_tools here so newlib picks up the fresh gcc-base compiler
CONFIGURE_COMMAND ${compiler_flags} ${toolchain_tools} ${compiler_target_tools}
${wrapper_command} <SOURCE_DIR>/configure "CFLAGS_FOR_TARGET=-g -O2 -ffunction-sections -fdata-sections"
Expand Down Expand Up @@ -638,7 +634,7 @@ ExternalProject_Add(pthread-embedded
DEPENDS binutils_${target_suffix} gcc-base newlib vita-headers
GIT_REPOSITORY https://github.com/vitasdk/pthread-embedded
GIT_TAG ${PTHREAD_TAG}
${GIT_SHALLOW_SUPPORT}
GIT_SHALLOW 1
# TODO: this project should have a proper makefile to support out-of-source builds
BUILD_IN_SOURCE 1
CONFIGURE_COMMAND ""
Expand Down Expand Up @@ -694,7 +690,7 @@ ExternalProject_add(gcc-final
ExternalProject_Add(samples
GIT_REPOSITORY https://github.com/vitasdk/samples
GIT_TAG ${SAMPLES_TAG}
${GIT_SHALLOW_SUPPORT}
GIT_SHALLOW 1
BUILD_IN_SOURCE 1
CONFIGURE_COMMAND ""
BUILD_COMMAND ""
Expand All @@ -709,7 +705,7 @@ ExternalProject_Add(samples
ExternalProject_Add(vdpm
GIT_REPOSITORY https://github.com/vitasdk/vdpm.git
GIT_TAG ${VDPM_TAG}
${GIT_SHALLOW_SUPPORT}
GIT_SHALLOW 1
BUILD_IN_SOURCE 1
CONFIGURE_COMMAND ""
BUILD_COMMAND ""
Expand All @@ -723,7 +719,7 @@ ExternalProject_Add(vdpm
ExternalProject_Add(vita-makepkg
GIT_REPOSITORY https://github.com/vitasdk/vita-makepkg.git
GIT_TAG ${VITA_MAKEPKG_TAG}
${GIT_SHALLOW_SUPPORT}
GIT_SHALLOW 1
BUILD_IN_SOURCE 1
CONFIGURE_COMMAND ""
BUILD_COMMAND ""
Expand Down
16 changes: 7 additions & 9 deletions cmake/Utils.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,12 @@ endfunction()
# Workaround for: ExternalProject: detect if SCM source changed before triggering subsequent steps.
# https://gitlab.kitware.com/cmake/cmake/issues/15914
function(fix_repo_update name)
if("${CMAKE_VERSION}" VERSION_GREATER 3.2.0)
# internal function available since cmake 2.8.9
_ep_get_step_stampfile(${name} skip-update skip-update_stamp_file)
# internal function available since cmake 2.8.9
_ep_get_step_stampfile(${name} skip-update skip-update_stamp_file)

ExternalProject_Add_Step(${name}
skip-workaround
DEPENDEES skip-update
COMMAND ${CMAKE_COMMAND} -E touch "${skip-update_stamp_file}"
)
endif()
ExternalProject_Add_Step(${name}
skip-workaround
DEPENDEES skip-update
COMMAND ${CMAKE_COMMAND} -E touch "${skip-update_stamp_file}"
)
endfunction()
Loading