[nostalgia] Switch from conan to vcpkg
This commit is contained in:
parent
0b0fd151c8
commit
be1a03c554
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,4 +1,5 @@
|
||||
.current_build
|
||||
.vcpkg
|
||||
compile_commands.json
|
||||
build
|
||||
conanbuild
|
||||
|
@ -22,11 +22,6 @@ list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules)
|
||||
include(GenerateExportHeader)
|
||||
include(address_sanitizer)
|
||||
|
||||
set(NOSTALGIA_CONAN_PATHS ${CMAKE_SOURCE_DIR}/conanbuild/conan_paths.cmake)
|
||||
if(NOT NOSTALGIA_BUILD_TYPE STREQUAL "GBA" AND EXISTS ${NOSTALGIA_CONAN_PATHS})
|
||||
include(${NOSTALGIA_CONAN_PATHS})
|
||||
endif()
|
||||
|
||||
set(CMAKE_INSTALL_PREFIX "${CMAKE_SOURCE_DIR}/dist/${NOSTALGIA_BUILD_CONFIG}")
|
||||
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
||||
|
||||
|
21
Makefile
21
Makefile
@ -2,6 +2,7 @@ OS=$(shell uname | tr [:upper:] [:lower:])
|
||||
HOST_ENV=${OS}-$(shell uname -m)
|
||||
DEVENV=devenv$(shell pwd | sed 's/\//-/g')
|
||||
DEVENV_IMAGE=nostalgia-devenv
|
||||
VCPKG_DIR=./.vcpkg/
|
||||
CURRENT_BUILD=$(file < .current_build)
|
||||
ifneq ($(shell which docker 2> /dev/null),)
|
||||
ifeq ($(shell docker inspect --format="{{.State.Status}}" ${DEVENV} 2>&1),running)
|
||||
@ -84,20 +85,12 @@ devenv-destroy:
|
||||
devenv-shell:
|
||||
${ENV_RUN} bash
|
||||
|
||||
ifeq ($(OS),linux)
|
||||
.PHONY: setup-conan
|
||||
setup-conan:
|
||||
conan profile update settings.compiler.libcxx=libstdc++11 default
|
||||
conan remote add -f bincrafters https://api.bintray.com/conan/bincrafters/public-conan
|
||||
else
|
||||
.PHONY: setup-conan
|
||||
setup-conan:
|
||||
conan remote add -f bincrafters https://api.bintray.com/conan/bincrafters/public-conan
|
||||
endif
|
||||
|
||||
.PHONY: conan
|
||||
conan:
|
||||
@mkdir -p conanbuild && cd conanbuild && conan install ../ --build=missing
|
||||
.PHONY: vcpkg
|
||||
vcpkg:
|
||||
${RM_RF} ${VCPKG_DIR}
|
||||
git clone https://github.com/microsoft/vcpkg ${VCPKG_DIR}
|
||||
${VCPKG_DIR}/bootstrap-vcpkg.sh
|
||||
${VCPKG_DIR}/vcpkg install sdl2 jsoncpp
|
||||
|
||||
.PHONY: configure-release
|
||||
configure-release:
|
||||
|
@ -5,7 +5,6 @@
|
||||
* Install GCC, Clang, or Visual Studio with C++17 support (including std::filesystem)
|
||||
* Install [devkitPro](https://devkitpro.org/wiki/Getting_Started) to build for GBA
|
||||
* Install Ninja, Make, and CMake
|
||||
* Install [Conan](https://conan.io/)
|
||||
* Consider also installing ccache for faster subsequent build times
|
||||
|
||||
## Platform Specific Setup
|
||||
@ -18,8 +17,8 @@ Install and use gmake instead of the make that comes with the system.
|
||||
|
||||
Build options: release, debug, asan, gba, gba-debug
|
||||
|
||||
make setup-conan
|
||||
make purge conan configure-{gba,release,debug} install
|
||||
make vcpkg
|
||||
make purge configure-{gba,release,debug} install
|
||||
|
||||
## Run
|
||||
|
||||
|
@ -1,9 +0,0 @@
|
||||
from conans import ConanFile, CMake
|
||||
|
||||
class NostalgiaConan(ConanFile):
|
||||
settings = "os", "compiler", "build_type", "arch"
|
||||
requires = "jsoncpp/1.9.2", "sdl2/2.0.10@bincrafters/stable"
|
||||
generators = "cmake", "cmake_find_package", "cmake_paths"
|
||||
#default_options = {
|
||||
# "sdl2:nas": False
|
||||
#}
|
@ -11,6 +11,7 @@ if [[ $target == gba ]]; then
|
||||
toolchain="-DCMAKE_TOOLCHAIN_FILE=cmake/modules/GBA.cmake"
|
||||
nostalgiaBuildType="GBA"
|
||||
else
|
||||
toolchain="-DCMAKE_TOOLCHAIN_FILE=.vcpkg/scripts/buildsystems/vcpkg.cmake"
|
||||
nostalgiaBuildType="Native"
|
||||
fi
|
||||
|
||||
|
@ -4,11 +4,12 @@ add_library(
|
||||
gfx.cpp
|
||||
)
|
||||
|
||||
find_package(sdl2 REQUIRED)
|
||||
find_package(SDL2 REQUIRED)
|
||||
|
||||
target_link_libraries(
|
||||
NostalgiaCore-SDL PUBLIC
|
||||
sdl2::sdl2
|
||||
SDL2::SDL2main
|
||||
SDL2::SDL2-static
|
||||
OxClaw
|
||||
OxFS
|
||||
OxStd
|
||||
|
Loading…
Reference in New Issue
Block a user