aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author浅倉麗子2020-08-24 14:49:01 -0400
committer浅倉麗子2020-08-24 14:49:01 -0400
commita2ffb221b52a5bb7b6837f92611520ebb7c812bd (patch)
tree583f19bab665479c2f6fd187aa370548b2b92e6a
parentRemove libgcc and memset (diff)
downloadsharpscale-a2ffb221b52a5bb7b6837f92611520ebb7c812bd.tar.gz
Add optional targets for external dependenciesHEADmaster
-rw-r--r--CMakeLists.txt44
-rw-r--r--scaling-test/CMakeLists.txt3
2 files changed, 46 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index edabc52..524700c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -19,6 +19,9 @@ set(CMAKE_TOOLCHAIN_FILE "$ENV{DOLCESDK}/share/dolce.toolchain.cmake" CACHE PATH
set(DOLCESDK_CMAKE_FILE "$ENV{DOLCESDK}/share/dolce.cmake" CACHE PATH "DolceSDK CMake functions file")
include("${DOLCESDK_CMAKE_FILE}" REQUIRED)
+option(CMAKE_TLS_VERIFY "Verify TLS" ON)
+include(ExternalProject REQUIRED)
+
project(sharpscale LANGUAGES C)
add_compile_options(
@@ -52,6 +55,47 @@ else()
set(LOG_PREFIX "\\033[0;35m[Sharpscale]\\033[0m ")
endif()
+# External dependencies
+
+set(DEP_INSTALL_PREFIX "${CMAKE_BINARY_DIR}/dep")
+include_directories("${DEP_INSTALL_PREFIX}/include")
+link_directories("${DEP_INSTALL_PREFIX}/lib")
+
+ExternalProject_Add(dep-psp2dbg
+ URL https://git.shotatoshounenwachigau.moe/vita/psp2dbg/snapshot/psp2dbg-master.tar.gz
+ PREFIX dep/psp2dbg
+ CMAKE_ARGS -D CMAKE_INSTALL_PREFIX=${DEP_INSTALL_PREFIX}
+ EXCLUDE_FROM_ALL ON
+)
+
+ExternalProject_Add(dep-fnblit
+ URL https://git.shotatoshounenwachigau.moe/vita/fnblit/snapshot/fnblit-master.tar.gz
+ PREFIX dep/fnblit
+ CMAKE_ARGS -D CMAKE_INSTALL_PREFIX=${DEP_INSTALL_PREFIX}
+ SOURCE_SUBDIR fnblit
+ EXCLUDE_FROM_ALL ON
+)
+
+ExternalProject_Add(dep-sfnconv
+ URL https://git.shotatoshounenwachigau.moe/vita/fnblit/snapshot/fnblit-master.tar.gz
+ PREFIX dep/sfnconv
+ CMAKE_ARGS -D CMAKE_INSTALL_PREFIX=${DEP_INSTALL_PREFIX}
+ SOURCE_SUBDIR sfnconv
+ EXCLUDE_FROM_ALL ON
+)
+
+ExternalProject_Add(dep-vita2d_sys
+ URL https://git.shotatoshounenwachigau.moe/vita/vita2d/snapshot/vita2d-lowmem.tar.gz
+ PREFIX dep/vita2d_sys
+ CMAKE_ARGS -D CMAKE_INSTALL_PREFIX=${DEP_INSTALL_PREFIX}
+ SOURCE_SUBDIR libvita2d_sys
+ EXCLUDE_FROM_ALL ON
+)
+
+add_custom_target(dep-all
+ DEPENDS dep-psp2dbg dep-fnblit dep-sfnconv dep-vita2d_sys
+)
+
# Build self
set(ELF "sharpscale.elf")
diff --git a/scaling-test/CMakeLists.txt b/scaling-test/CMakeLists.txt
index 2558153..79afb58 100644
--- a/scaling-test/CMakeLists.txt
+++ b/scaling-test/CMakeLists.txt
@@ -36,7 +36,8 @@ file(DOWNLOAD
add_custom_command(OUTPUT "${SFN_FILE}"
DEPENDS "${FONT_FILE}"
- COMMAND bit2sfn
+ COMMAND "${CMAKE_COMMAND}" -E env PATH="${DEP_INSTALL_PREFIX}/bin:$ENV{PATH}"
+ bit2sfn
-r "Basic Latin" "${FONT_FILE}"
-r "Latin-1 Supplement" "${FONT_FILE}"
-r 0x6D45 0x6D46 "${FONT_FILE}"