Wow! I can't believe I haven't started this project again!

This commit is contained in:
2024-11-25 15:59:50 -06:00
parent a02e87c3fa
commit f8c008fd45
47 changed files with 177 additions and 845 deletions

View File

@@ -1,8 +0,0 @@
# Copyright (c) 2022 Dominic Masters
#
# This software is released under the MIT License.
# https://opensource.org/licenses/MIT
# Includes
add_subdirectory(hosts)
add_subdirectory(targets)

View File

@@ -1,15 +0,0 @@
# Copyright (c) 2022 Dominic Masters
#
# This software is released under the MIT License.
# https://opensource.org/licenses/MIT
# Check for build target, or default
if(WIN32)
set(DAWN_BUILD_HOST "build-host-win32")
elseif(UNIX AND NOT APPLE)
set(DAWN_BUILD_HOST "build-host-linux")
elseif(UNIX AND APPLE)
set(DAWN_BUILD_HOST "build-host-osx")
endif()
add_subdirectory(${DAWN_BUILD_HOST})

View File

@@ -1,4 +0,0 @@
# CMake Hosts
CMake Hosts help the build system define how a HOST (Not the target/client) does
its building. Host would be the system you are using, right now, to do the build
with.

View File

@@ -1,6 +0,0 @@
# Copyright (c) 2022 Dominic Masters
#
# This software is released under the MIT License.
# https://opensource.org/licenses/MIT
set(DAWN_BUILD_HOST_LIBS "m" CACHE INTERNAL ${DAWN_CACHE_TARGET})

View File

@@ -1,6 +0,0 @@
# Copyright (c) 2022 Dominic Masters
#
# This software is released under the MIT License.
# https://opensource.org/licenses/MIT
set(DAWN_BUILD_HOST_LIBS "" CACHE INTERNAL ${DAWN_CACHE_TARGET})

View File

@@ -1,6 +0,0 @@
# Copyright (c) 2022 Dominic Masters
#
# This software is released under the MIT License.
# https://opensource.org/licenses/MIT
set(DAWN_BUILD_HOST_LIBS "" CACHE INTERNAL ${DAWN_CACHE_TARGET})

View File

@@ -1,49 +0,0 @@
find_path(GLFW_INCLUDE_DIR GLFW/glfw3.h
HINTS
ENV GLFWDIR
PATHS
"/usr"
"/usr/local"
"~/Library/Frameworks"
"/Library/Frameworks"
"/opt"
"$ENV{PROGRAMFILES}/glfw"
"$ENV{PROGRAMFILES}/glfw3"
PATH_SUFFIXES
include
)
# Search for the library
FIND_LIBRARY(GLFW_LIBRARY
NAMES
glfw glfw3 GLFW GLFW3
HINTS
ENV GLFWDIR
PATHS
"/usr"
"/usr/local"
"~/Library/Frameworks"
"/Library/Frameworks"
"/opt"
"$ENV{PROGRAMFILES}/glfw"
"$ENV{PROGRAMFILES}/glfw3"
PATH_SUFFIXES
lib
lib32
lib64
libs
lib-vc2012
lib-vc2013
lib-vc2015
lib-vc2017
lib-vc2019
lib-vc2022
)
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(
GLFW
REQUIRED_VARS GLFW_LIBRARY GLFW_INCLUDE_DIR
)
mark_as_advanced(GLFW_LIBRARY GLFW_INCLUDE_DIR)

View File

@@ -1,49 +0,0 @@
find_path(OPENAL_INCLUDE_DIR al.h
HINTS
ENV OPENALDIR
PATHS
"/usr"
"/usr/local"
"~/Library/Frameworks"
"/Library/Frameworks"
"/opt"
"$ENV{PROGRAMFILES}/openal"
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\Creative\ Labs\\OpenAL\ 1.1\ Software\ Development\ Kit\\1.00.0000;InstallDir]"
PATH_SUFFIXES
include/AL
AL/AL
include/OpenAL
include
AL
OpenAL
)
# Search for the library
FIND_LIBRARY(OPENAL_LIBRARY
NAMES
OpenAL al openal OpenAL32
HINTS
ENV OPENALDIR
PATHS
"/usr"
"/usr/local"
"~/Library/Frameworks"
"/Library/Frameworks"
"/opt"
"$ENV{PROGRAMFILES}/openal"
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\Creative\ Labs\\OpenAL\ 1.1\ Software\ Development\ Kit\\1.00.0000;InstallDir]"
PATH_SUFFIXES
lib
lib32
lib64
libs
${_OpenAL_ARCH_DIR}
)
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(
OpenAL
REQUIRED_VARS OPENAL_LIBRARY OPENAL_INCLUDE_DIR
)
mark_as_advanced(OPENAL_LIBRARY OPENAL_INCLUDE_DIR)

View File

@@ -1,14 +0,0 @@
# Copyright (c) 2022 Dominic Masters
#
# This software is released under the MIT License.
# https://opensource.org/licenses/MIT
# Now validate we have a build target for real
if(NOT DEFINED DAWN_BUILD_TARGET)
set(DAWN_BUILD_TARGET "target-rpg-linux-glfw" CACHE INTERNAL ${DAWN_CACHE_TARGET})
endif()
message("Building target ${DAWN_BUILD_TARGET}")
# Include the build target
add_subdirectory(${DAWN_BUILD_TARGET})

View File

@@ -1,40 +0,0 @@
# CMake Targets
CMake Targets decide what you are intending to build. Targets are (usually) a
specific system, like vita, 3ds, switch, or a specific OS with a library, e.g.
targetting vulkan on linux vs targetting opengl on linux, or targetting opengl
on windows, etc.
In addition the target also decides what project(s) to build. Usually this is
just the specific game and/or systems to be built, so if you are building a VN
game the target would need to let the build system know you want to rollup the
VN parts of the engine also.
Note this is one of the very few build args that is required during the
configuration of cmake to make it build properly, failure to specify a target
will result in a build error.
```
-DDAWN_BUILD_TARGET=target-helloworld-linux64-glfw
```
## Target Systems
- vita
- linux
- osx
- windows
- emscripten (Web)
## Target Libraries
- vita (Includes OGL)
- glfw (Includes OGL)
- sdl2 (Includes OGL)
## Target games
- liminal
- helloworld
## Target Arcitectures
- vita (form of armv7)
- linux (x64 only)
- windows (x64 only)
- osx (targetting arm64 currently)

View File

@@ -1,15 +0,0 @@
# Copyright (c) 2023 Dominic Masters
#
# This software is released under the MIT License.
# https://opensource.org/licenses/MIT
set(DAWN_BUILDING dawnhelloworld CACHE INTERNAL ${DAWN_CACHE_TARGET})
set(DAWN_BUILD_HOST_LIBS "" CACHE INTERNAL ${DAWN_CACHE_TARGET})
set(DAWN_TARGET_EMSCRIPTEN true CACHE INTERNAL ${DAWN_CACHE_TARGET})
set(DAWN_TARGET_GLFW true CACHE INTERNAL ${DAWN_CACHE_TARGET})
set(DAWN_TARGET_NAME "HelloWorld" CACHE INTERNAL ${DAWN_CACHE_TARGET})
set(DAWN_EMSCRIPTEN_FLAGS "" CACHE INTERNAL ${DAWN_CACHE_TARGET})
# Ensures a .HTML file is generated.
set(CMAKE_EXECUTABLE_SUFFIX ".html" CACHE INTERNAL ${DAWN_CACHE_TARGET})

View File

@@ -1,10 +0,0 @@
# Copyright (c) 2023 Dominic Masters
#
# This software is released under the MIT License.
# https://opensource.org/licenses/MIT
set(DAWN_BUILDING dawnhelloworld CACHE INTERNAL ${DAWN_CACHE_TARGET})
set(DAWN_TARGET_LINUX true CACHE INTERNAL ${DAWN_CACHE_TARGET})
set(DAWN_TARGET_GLFW true CACHE INTERNAL ${DAWN_CACHE_TARGET})
set(DAWN_TARGET_NAME "HelloWorld" CACHE INTERNAL ${DAWN_CACHE_TARGET})
set(DAWN_TARGET_ARCHIVE true CACHE INTERNAL ${DAWN_CACHE_TARGET})

View File

@@ -1,21 +0,0 @@
# Copyright (c) 2023 Dominic Masters
#
# This software is released under the MIT License.
# https://opensource.org/licenses/MIT
set(DAWN_BUILDING dawnhelloworld CACHE INTERNAL ${DAWN_CACHE_TARGET})
set(DAWN_TARGET_VITA true CACHE INTERNAL ${DAWN_CACHE_TARGET})
set(DAWN_BUILD_HOST_LIBS "" CACHE INTERNAL ${DAWN_CACHE_TARGET})
set(DAWN_TARGET_NAME "HelloWorld" CACHE INTERNAL ${DAWN_CACHE_TARGET})
# Properties
set(DAWN_VITA_APP_NAME "Hello Vita" CACHE INTERNAL ${DAWN_CACHE_TARGET})
set(DAWN_VITA_TITLEID "DAWN00000" CACHE INTERNAL ${DAWN_CACHE_TARGET})
set(DAWN_VITA_VERSION "01.00" CACHE INTERNAL ${DAWN_CACHE_TARGET})
# Toolchain
if(DEFINED ENV{VITASDK})
set(CMAKE_TOOLCHAIN_FILE "$ENV{VITASDK}/share/vita.toolchain.cmake" CACHE INTERNAL ${DAWN_CACHE_TARGET})
else()
message(FATAL_ERROR "VITASDK Environment variable is missing! Either you do not have the VITASDK installed, or it is not set up with the env vars correctly.")
endif()

View File

@@ -1,11 +0,0 @@
# Copyright (c) 2023 Dominic Masters
#
# This software is released under the MIT License.
# https://opensource.org/licenses/MIT
set(DAWN_BUILDING dawnrpg CACHE INTERNAL ${DAWN_CACHE_TARGET})
set(DAWN_TARGET_LINUX true CACHE INTERNAL ${DAWN_CACHE_TARGET})
set(DAWN_TARGET_GLFW true CACHE INTERNAL ${DAWN_CACHE_TARGET})
set(DAWN_TARGET_NAME "DawnRPG" CACHE INTERNAL ${DAWN_CACHE_TARGET})
set(DAWN_TARGET_ARCHIVE true CACHE INTERNAL ${DAWN_CACHE_TARGET})
set(DAWN_TARGET_TRUETYPE false CACHE INTERNAL ${DAWN_CACHE_TARGET})