forked from HarbourMasters/Shipwright
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* changes needed to run `ExtractAssets` * soh build stuff * Make some things public * dcvz changes * More fixes * fix pulseaudio * windows static lib stuff * fix soh build on windows * Don’t require Threads for Wii U * Wii U specific changes to upstream StormLib * Fix up storm linking * Add Wii U additions to spdlog * More Wii U updates to libultraship * Wii U specific import fixes * LUS Wii U fixes * STBI_NO_THREAD_LOCALS for Wii U * Disable threads for Wii U * Fixes OTR loading (tested in SoH) Previously it was failing with a file not found error on SFileOpenArchive, for some reason removing `UNICODE` and `_UNICODE` from the compile definitions of libultraship fixes it. It also fixes the issue of OTRExporter outputting an OTR with only the first character of the filename present. (Said OTR was still valid though, despite the odd name. Fixed by this regardless). * Re-adds missing Debug/Release cmake config and fixes Typos This re-enables debugging libultraship files on Windows. Also fixes some typos that previously weren't being compiled due to the missing Debug/Release configuration. * Consolidates compiler and linker flags in cmake. Several compiler options were duplicated across different systems unnecessarily. For example Windows "x64" and "Win32" were very nearly identical already, and the couple of differences didn't make much sense. We were passing /std:c++latest, but only to x64 Release. I just removed that one altogether since we already set `PROPERTY CXX_STANDARD 20` at the top of the file. We were also passing `/W3` regardless of configuration on "x64", but on "Win32" we were passing `/W2` to Debug and `/W3` to Release. If there's a reason for that let me know and it can be re-introduced. * Embed STB into LUS * Fixes Switch builds. (#4) * Restricts the stormlib compile definition change to switch (#5) * make tidy happy? * actually make tidy happy * checkout v3? * remove commented out lines from cmakelists * fontData not font_data * suppress error * add a space Co-authored-by: briaguya <briaguya@alice> Co-authored-by: David Chavez <david@dcvz.io> Co-authored-by: Christopher Leggett <chris@leggett.dev> Co-authored-by: David Chavez <davi@dcvz.io> Co-authored-by: briaguya <briaguya>
- Loading branch information
1 parent
c75c6b3
commit 9462f8f
Showing
27 changed files
with
288 additions
and
113 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
################################################################################ | ||
# Command for variable_watch. This command issues error message, if a variable | ||
# is changed. If variable PROPERTY_READER_GUARD_DISABLED is TRUE nothing happens | ||
# variable_watch(<variable> property_reader_guard) | ||
################################################################################ | ||
function(property_reader_guard VARIABLE ACCESS VALUE CURRENT_LIST_FILE STACK) | ||
if("${PROPERTY_READER_GUARD_DISABLED}") | ||
return() | ||
endif() | ||
|
||
if("${ACCESS}" STREQUAL "MODIFIED_ACCESS") | ||
message(FATAL_ERROR | ||
" Variable ${VARIABLE} is not supposed to be changed.\n" | ||
" It is used only for reading target property ${VARIABLE}.\n" | ||
" Use\n" | ||
" set_target_properties(\"<target>\" PROPERTIES \"${VARIABLE}\" \"<value>\")\n" | ||
" or\n" | ||
" set_target_properties(\"<target>\" PROPERTIES \"${VARIABLE}_<CONFIG>\" \"<value>\")\n" | ||
" instead.\n") | ||
endif() | ||
endfunction() | ||
|
||
################################################################################ | ||
# Create variable <name> with generator expression that expands to value of | ||
# target property <name>_<CONFIG>. If property is empty or not set then property | ||
# <name> is used instead. Variable <name> has watcher property_reader_guard that | ||
# doesn't allow to edit it. | ||
# create_property_reader(<name>) | ||
# Input: | ||
# name - Name of watched property and output variable | ||
################################################################################ | ||
function(create_property_reader NAME) | ||
set(PROPERTY_READER_GUARD_DISABLED TRUE) | ||
set(CONFIG_VALUE "$<TARGET_GENEX_EVAL:${PROPS_TARGET},$<TARGET_PROPERTY:${PROPS_TARGET},${NAME}_$<UPPER_CASE:$<CONFIG>>>>") | ||
set(IS_CONFIG_VALUE_EMPTY "$<STREQUAL:${CONFIG_VALUE},>") | ||
set(GENERAL_VALUE "$<TARGET_GENEX_EVAL:${PROPS_TARGET},$<TARGET_PROPERTY:${PROPS_TARGET},${NAME}>>") | ||
set("${NAME}" "$<IF:${IS_CONFIG_VALUE_EMPTY},${GENERAL_VALUE},${CONFIG_VALUE}>" PARENT_SCOPE) | ||
variable_watch("${NAME}" property_reader_guard) | ||
endfunction() | ||
|
||
################################################################################ | ||
# Set property $<name>_${PROPS_CONFIG_U} of ${PROPS_TARGET} to <value> | ||
# set_config_specific_property(<name> <value>) | ||
# Input: | ||
# name - Prefix of property name | ||
# value - New value | ||
################################################################################ | ||
function(set_config_specific_property NAME VALUE) | ||
set_target_properties("${PROPS_TARGET}" PROPERTIES "${NAME}_${PROPS_CONFIG_U}" "${VALUE}") | ||
endfunction() | ||
|
||
################################################################################ | ||
|
||
create_property_reader("TARGET_NAME") | ||
create_property_reader("OUTPUT_DIRECTORY") | ||
|
||
set_config_specific_property("TARGET_NAME" "${PROPS_TARGET}") | ||
set_config_specific_property("OUTPUT_NAME" "${TARGET_NAME}") | ||
set_config_specific_property("ARCHIVE_OUTPUT_NAME" "${TARGET_NAME}") | ||
set_config_specific_property("LIBRARY_OUTPUT_NAME" "${TARGET_NAME}") | ||
set_config_specific_property("RUNTIME_OUTPUT_NAME" "${TARGET_NAME}") | ||
|
||
set_config_specific_property("ARCHIVE_OUTPUT_DIRECTORY" "${OUTPUT_DIRECTORY}") | ||
set_config_specific_property("LIBRARY_OUTPUT_DIRECTORY" "${OUTPUT_DIRECTORY}") | ||
set_config_specific_property("RUNTIME_OUTPUT_DIRECTORY" "${OUTPUT_DIRECTORY}") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
include("${CMAKE_CURRENT_LIST_DIR}/Default.cmake") | ||
|
||
set_config_specific_property("OUTPUT_DIRECTORY" "${CMAKE_SOURCE_DIR}$<$<NOT:$<STREQUAL:${CMAKE_VS_PLATFORM_NAME},Win32>>:/${CMAKE_VS_PLATFORM_NAME}>/${PROPS_CONFIG}") | ||
|
||
if(MSVC) | ||
create_property_reader("DEFAULT_CXX_EXCEPTION_HANDLING") | ||
create_property_reader("DEFAULT_CXX_DEBUG_INFORMATION_FORMAT") | ||
|
||
# set_target_properties("${PROPS_TARGET}" PROPERTIES MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>DLL") | ||
set_config_specific_property("DEFAULT_CXX_EXCEPTION_HANDLING" "/EHsc") | ||
set_config_specific_property("DEFAULT_CXX_DEBUG_INFORMATION_FORMAT" "/Zi") | ||
endif() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.