[nostalgia] Switch back to conan

This commit is contained in:
Gary Talent 2021-03-28 00:25:30 -05:00
parent 2ab6ef201e
commit f1a1d94ac3
5 changed files with 19 additions and 7 deletions

3
.gitignore vendored
View File

@ -1,10 +1,9 @@
.clangd
.current_build
.vcpkg
scripts/__pycache__
compile_commands.json
build
conanbuild
.conanbuild
dist
tags
nostalgia.gba

View File

@ -20,6 +20,11 @@ if(NOSTALGIA_BUILD_TYPE STREQUAL "GBA")
set(OX_BARE_METAL ON)
endif()
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()
if(OX_BARE_METAL)
set(NOSTALGIA_BUILD_STUDIO OFF)
set(OX_USE_STDLIB OFF)

View File

@ -19,8 +19,8 @@ Install and use gmake instead of the make that comes with the system.
Build options: release, debug, asan, gba, gba-debug
make vcpkg
make purge configure-{gba,release,debug} install
make setup-conan
make purge conan configure-{gba,release,debug} install
## Run

9
conanfile.py Normal file
View File

@ -0,0 +1,9 @@
from conans import ConanFile, CMake
class NostalgiaConan(ConanFile):
settings = "os", "compiler", "build_type", "arch"
requires = "jsoncpp/1.9.4", "sdl2/2.0.14@bincrafters/stable"
generators = "cmake", "cmake_find_package", "cmake_paths"
#default_options = {
# "sdl2:nas": False
#}

View File

@ -4,12 +4,11 @@ add_library(
gfx.cpp
)
find_package(SDL2 REQUIRED)
find_package(sdl2 REQUIRED)
target_link_libraries(
NostalgiaCore-SDL PUBLIC
SDL2::SDL2main
SDL2::SDL2-static
SDL2::SDL2
NostalgiaCore-Userspace
)