Dawn reset
This commit is contained in:
@ -1,8 +1 @@
|
||||
# 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)
|
@ -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})
|
@ -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.
|
@ -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})
|
@ -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})
|
@ -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})
|
@ -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)
|
@ -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)
|
@ -1,14 +1,7 @@
|
||||
# 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})
|
||||
if(DEFINED ENV{DAWN_BUILD_SYSTEM})
|
||||
set(DAWN_BUILD_SYSTEM $ENV{DAWN_BUILD_SYSTEM} CACHE INTERNAL ${DAWN_CACHE_TARGET})
|
||||
else()
|
||||
set(DAWN_BUILD_SYSTEM "linux" CACHE INTERNAL ${DAWN_CACHE_TARGET})
|
||||
endif()
|
||||
|
||||
add_subdirectory(${DAWN_BUILD_SYSTEM})
|
@ -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)
|
0
cmake/targets/linux/CMakeLists.txt
Normal file
0
cmake/targets/linux/CMakeLists.txt
Normal 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})
|
@ -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})
|
@ -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()
|
@ -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})
|
18
cmake/targets/vita/CMakeLists.txt
Normal file
18
cmake/targets/vita/CMakeLists.txt
Normal file
@ -0,0 +1,18 @@
|
||||
if(NOT DEFINED CMAKE_TOOLCHAIN_FILE)
|
||||
if(DEFINED ENV{VITASDK})
|
||||
set(CMAKE_TOOLCHAIN_FILE "$ENV{VITASDK}/share/vita.toolchain.cmake" CACHE PATH "toolchain file")
|
||||
else()
|
||||
message(FATAL_ERROR "Please define VITASDK to point to your SDK path!")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
include("$ENV{VITASDK}/share/vita.cmake" REQUIRED)
|
||||
|
||||
set(DAWN_VITA_APP_NAME "Hello World" CACHE INTERNAL ${DAWN_CACHE_TARGET})
|
||||
# Unique ID must be exactly 9 characters. Recommended: XXXXYYYYY where X =
|
||||
# unique string of developer and Y = a unique number for this app
|
||||
set(DAWN_VITA_TITLEID "VSDK00006" CACHE INTERNAL ${DAWN_CACHE_TARGET})
|
||||
# Optional version string to show in LiveArea's more info screen
|
||||
set(DAWN_VITA_VERSION "01.00" CACHE INTERNAL ${DAWN_CACHE_TARGET})
|
||||
# Optional. You can specify more param.sfo flags this way.
|
||||
set(VITA_MKSFOEX_FLAGS "${VITA_MKSFOEX_FLAGS} -d PARENTAL_LEVEL=1" CACHE INTERNAL ${DAWN_CACHE_TARGET})
|
Reference in New Issue
Block a user