Base refactor
This commit is contained in:
@ -3,13 +3,6 @@
|
||||
# This software is released under the MIT License.
|
||||
# https://opensource.org/licenses/MIT
|
||||
|
||||
# Defines
|
||||
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
|
||||
set(DAWN_DEBUG_BUILD true CACHE INTERNAL ${DAWN_CACHE_TARGET})
|
||||
else()
|
||||
set(DAWN_DEBUG_BUILD false CACHE INTERNAL ${DAWN_CACHE_TARGET})
|
||||
endif()
|
||||
|
||||
# Includes
|
||||
add_subdirectory(hosts)
|
||||
add_subdirectory(targets)
|
@ -7,7 +7,7 @@
|
||||
if(WIN32)
|
||||
set(DAWN_BUILD_HOST "build-host-win32")
|
||||
elseif(UNIX AND NOT APPLE)
|
||||
set(DAWN_BUILD_HOST "build-host-linux64")
|
||||
set(DAWN_BUILD_HOST "build-host-linux")
|
||||
elseif(UNIX AND APPLE)
|
||||
set(DAWN_BUILD_HOST "build-host-osx")
|
||||
endif()
|
||||
|
4
cmake/hosts/README.md
Normal file
4
cmake/hosts/README.md
Normal file
@ -0,0 +1,4 @@
|
||||
# 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,45 +0,0 @@
|
||||
find_path(ALUT_INCLUDE_DIR AL/alut.h
|
||||
HINTS
|
||||
ENV ALUTDIR
|
||||
PATHS
|
||||
"/usr"
|
||||
"/usr/local"
|
||||
"~/Library/Frameworks"
|
||||
"/Library/Frameworks"
|
||||
"/opt"
|
||||
"$ENV{PROGRAMFILES}/alut"
|
||||
"$ENV{PROGRAMFILES}/freealut"
|
||||
PATH_SUFFIXES
|
||||
include
|
||||
alut
|
||||
freealut
|
||||
)
|
||||
|
||||
# Search for the library
|
||||
FIND_LIBRARY(ALUT_LIBRARY
|
||||
NAMES
|
||||
alut freealut
|
||||
HINTS
|
||||
ENV ALUTDIR
|
||||
PATHS
|
||||
"/usr"
|
||||
"/usr/local"
|
||||
"~/Library/Frameworks"
|
||||
"/Library/Frameworks"
|
||||
"/opt"
|
||||
"$ENV{PROGRAMFILES}/alut"
|
||||
"$ENV{PROGRAMFILES}/freealut"
|
||||
PATH_SUFFIXES
|
||||
lib
|
||||
lib32
|
||||
lib64
|
||||
libs
|
||||
)
|
||||
|
||||
INCLUDE(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(
|
||||
ALUT
|
||||
REQUIRED_VARS ALUT_LIBRARY ALUT_INCLUDE_DIR
|
||||
)
|
||||
|
||||
mark_as_advanced(ALUT_LIBRARY ALUT_INCLUDE_DIR)
|
40
cmake/targets/README.md
Normal file
40
cmake/targets/README.md
Normal file
@ -0,0 +1,40 @@
|
||||
# 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)
|
@ -4,7 +4,7 @@
|
||||
# https://opensource.org/licenses/MIT
|
||||
|
||||
set(DAWN_BUILDING dawnhelloworld CACHE INTERNAL ${DAWN_CACHE_TARGET})
|
||||
set(DAWN_TARGET_LINUX64 true 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,13 +0,0 @@
|
||||
# Copyright (c) 2023 Dominic Masters
|
||||
#
|
||||
# This software is released under the MIT License.
|
||||
# https://opensource.org/licenses/MIT
|
||||
|
||||
set(DAWN_BUILDING dawnliminal 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 "Liminal" CACHE INTERNAL ${DAWN_CACHE_TARGET})
|
||||
set(DAWN_VISUAL_NOVEL true CACHE INTERNAL ${DAWN_CACHE_TARGET})
|
||||
|
||||
set(DAWN_EMSCRIPTEN_FLAGS "" 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 dawnliminal CACHE INTERNAL ${DAWN_CACHE_TARGET})
|
||||
set(DAWN_TARGET_LINUX64 true CACHE INTERNAL ${DAWN_CACHE_TARGET})
|
||||
set(DAWN_TARGET_GLFW true CACHE INTERNAL ${DAWN_CACHE_TARGET})
|
||||
set(DAWN_TARGET_NAME "Liminal" CACHE INTERNAL ${DAWN_CACHE_TARGET})
|
||||
set(DAWN_VISUAL_NOVEL true 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 dawnliminal CACHE INTERNAL ${DAWN_CACHE_TARGET})
|
||||
set(DAWN_TARGET_OSX true CACHE INTERNAL ${DAWN_CACHE_TARGET})
|
||||
set(DAWN_TARGET_GLFW true CACHE INTERNAL ${DAWN_CACHE_TARGET})
|
||||
set(DAWN_TARGET_NAME "Liminal" CACHE INTERNAL ${DAWN_CACHE_TARGET})
|
||||
set(DAWN_VISUAL_NOVEL true 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 dawnliminal CACHE INTERNAL ${DAWN_CACHE_TARGET})
|
||||
set(DAWN_TARGET_WIN32 true CACHE INTERNAL ${DAWN_CACHE_TARGET})
|
||||
set(DAWN_TARGET_GLFW true CACHE INTERNAL ${DAWN_CACHE_TARGET})
|
||||
set(DAWN_TARGET_NAME "Liminal" CACHE INTERNAL ${DAWN_CACHE_TARGET})
|
||||
set(DAWN_VISUAL_NOVEL true CACHE INTERNAL ${DAWN_CACHE_TARGET})
|
@ -1,9 +0,0 @@
|
||||
# Copyright (c) 2023 Dominic Masters
|
||||
#
|
||||
# This software is released under the MIT License.
|
||||
# https://opensource.org/licenses/MIT
|
||||
|
||||
set(DAWN_BUILDING dawnrose CACHE INTERNAL ${DAWN_CACHE_TARGET})
|
||||
set(DAWN_TARGET_LINUX64 true CACHE INTERNAL ${DAWN_CACHE_TARGET})
|
||||
set(DAWN_TARGET_GLFW true CACHE INTERNAL ${DAWN_CACHE_TARGET})
|
||||
set(DAWN_TARGET_NAME "Rose" CACHE INTERNAL ${DAWN_CACHE_TARGET})
|
@ -1,9 +0,0 @@
|
||||
# Copyright (c) 2023 Dominic Masters
|
||||
#
|
||||
# This software is released under the MIT License.
|
||||
# https://opensource.org/licenses/MIT
|
||||
|
||||
set(DAWN_BUILDING dawnrose CACHE INTERNAL ${DAWN_CACHE_TARGET})
|
||||
set(DAWN_TARGET_WIN32 true CACHE INTERNAL ${DAWN_CACHE_TARGET})
|
||||
set(DAWN_TARGET_GLFW true CACHE INTERNAL ${DAWN_CACHE_TARGET})
|
||||
set(DAWN_TARGET_NAME "Rose" CACHE INTERNAL ${DAWN_CACHE_TARGET})
|
@ -1,7 +0,0 @@
|
||||
# Copyright (c) 2023 Dominic Masters
|
||||
#
|
||||
# This software is released under the MIT License.
|
||||
# https://opensource.org/licenses/MIT
|
||||
|
||||
# set(DAWN_BUILDING dawntools CACHE INTERNAL ${DAWN_CACHE_TARGET})
|
||||
set(DAWN_BUILD_TOOLS true CACHE INTERNAL ${DAWN_CACHE_TARGET})
|
Reference in New Issue
Block a user