[buildcore] Switch to conan
This commit is contained in:
parent
6656320359
commit
2ab6ef201e
29
deps/buildcore/base.mk
vendored
29
deps/buildcore/base.mk
vendored
@ -25,11 +25,14 @@ SETUP_BUILD=python3 ${SCRIPTS}/setup-build.py
|
|||||||
PYBB=python3 ${SCRIPTS}/pybb.py
|
PYBB=python3 ${SCRIPTS}/pybb.py
|
||||||
CMAKE_BUILD=${PYBB} cmake-build
|
CMAKE_BUILD=${PYBB} cmake-build
|
||||||
RM_RF=${PYBB} rm
|
RM_RF=${PYBB} rm
|
||||||
ifndef VCPKG_DIR_BASE
|
ifdef USE_VCPKG
|
||||||
|
ifndef VCPKG_DIR_BASE
|
||||||
VCPKG_DIR_BASE=.vcpkg
|
VCPKG_DIR_BASE=.vcpkg
|
||||||
endif
|
endif
|
||||||
ifndef VCPKG_VERSION
|
ifndef VCPKG_VERSION
|
||||||
VCPKG_VERSION=2020.06
|
VCPKG_VERSION=2020.06
|
||||||
|
endif
|
||||||
|
VCPKG_TOOLCHAIN=--toolchain=${VCPKG_DIR}/scripts/buildsystems/vcpkg.cmake
|
||||||
endif
|
endif
|
||||||
VCPKG_DIR=$(VCPKG_DIR_BASE)/$(VCPKG_VERSION)-$(HOST_ENV)
|
VCPKG_DIR=$(VCPKG_DIR_BASE)/$(VCPKG_VERSION)-$(HOST_ENV)
|
||||||
DEVENV=devenv$(shell pwd | sed 's/\//-/g')
|
DEVENV=devenv$(shell pwd | sed 's/\//-/g')
|
||||||
@ -82,6 +85,7 @@ devenv-destroy:
|
|||||||
devenv-shell:
|
devenv-shell:
|
||||||
${ENV_RUN} bash
|
${ENV_RUN} bash
|
||||||
|
|
||||||
|
ifdef USE_VCPKG
|
||||||
.PHONY: vcpkg
|
.PHONY: vcpkg
|
||||||
vcpkg: ${VCPKG_DIR} vcpkg-install
|
vcpkg: ${VCPKG_DIR} vcpkg-install
|
||||||
|
|
||||||
@ -102,20 +106,31 @@ ifneq (${OS},windows)
|
|||||||
else
|
else
|
||||||
${VCPKG_DIR}/vcpkg install --triplet x64-windows ${VCPKG_PKGS}
|
${VCPKG_DIR}/vcpkg install --triplet x64-windows ${VCPKG_PKGS}
|
||||||
endif
|
endif
|
||||||
|
endif # USE_VCPKG
|
||||||
|
|
||||||
|
.PHONY: setup-conan
|
||||||
|
setup-conan:
|
||||||
|
ifeq ($(OS),linux)
|
||||||
|
conan profile update settings.compiler.libcxx=libstdc++11 ${PROJECT_NAME}
|
||||||
|
endif
|
||||||
|
conan remote add -f bincrafters https://api.bintray.com/conan/bincrafters/public-conan -pr=${PROJECT_NAME}
|
||||||
|
.PHONY: conan
|
||||||
|
conan:
|
||||||
|
@mkdir -p .conanbuild && cd .conanbuild && conan install ../ --build=missing
|
||||||
|
|
||||||
.PHONY: configure-xcode
|
.PHONY: configure-xcode
|
||||||
configure-xcode:
|
configure-xcode:
|
||||||
${ENV_RUN} ${SETUP_BUILD} --toolchain=${VCPKG_DIR}/scripts/buildsystems/vcpkg.cmake --build_tool=xcode --current_build=0
|
${ENV_RUN} ${SETUP_BUILD} ${VCPKG_TOOLCHAIN} --build_tool=xcode --current_build=0
|
||||||
|
|
||||||
.PHONY: configure-release
|
.PHONY: configure-release
|
||||||
configure-release:
|
configure-release:
|
||||||
${ENV_RUN} ${SETUP_BUILD} --toolchain=${VCPKG_DIR}/scripts/buildsystems/vcpkg.cmake --build_type=release
|
${ENV_RUN} ${SETUP_BUILD} ${VCPKG_TOOLCHAIN} --build_type=release
|
||||||
|
|
||||||
.PHONY: configure-debug
|
.PHONY: configure-debug
|
||||||
configure-debug:
|
configure-debug:
|
||||||
${ENV_RUN} ${SETUP_BUILD} --toolchain=${VCPKG_DIR}/scripts/buildsystems/vcpkg.cmake --build_type=debug
|
${ENV_RUN} ${SETUP_BUILD} ${VCPKG_TOOLCHAIN} --build_type=debug
|
||||||
|
|
||||||
.PHONY: configure-asan
|
.PHONY: configure-asan
|
||||||
configure-asan:
|
configure-asan:
|
||||||
${ENV_RUN} ${SETUP_BUILD} --toolchain=${VCPKG_DIR}/scripts/buildsystems/vcpkg.cmake --build_type=asan
|
${ENV_RUN} ${SETUP_BUILD} ${VCPKG_TOOLCHAIN} --build_type=asan
|
||||||
|
|
||||||
|
2
deps/buildcore/scripts/setup-build.py
vendored
2
deps/buildcore/scripts/setup-build.py
vendored
@ -24,7 +24,7 @@ def main():
|
|||||||
default='{:s}-{:s}'.format(sys.platform, platform.machine()))
|
default='{:s}-{:s}'.format(sys.platform, platform.machine()))
|
||||||
parser.add_argument('--build_type', help='Build type (asan,debug,release)', default='release')
|
parser.add_argument('--build_type', help='Build type (asan,debug,release)', default='release')
|
||||||
parser.add_argument('--build_tool', help='Build tool (default,xcode)', default='')
|
parser.add_argument('--build_tool', help='Build tool (default,xcode)', default='')
|
||||||
parser.add_argument('--toolchain', help='Path to CMake toolchain file')
|
parser.add_argument('--toolchain', help='Path to CMake toolchain file', default='')
|
||||||
parser.add_argument('--current_build', help='Indicates whether or not to make this the active build', default=1)
|
parser.add_argument('--current_build', help='Indicates whether or not to make this the active build', default=1)
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user