mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-08-22 14:23:44 -07:00
add GameOverlay.*
This commit is contained in:
parent
061209ae21
commit
5c01904d72
1 changed files with 504 additions and 0 deletions
504
libultraship/libultraship/CMakeLists.txt
Normal file
504
libultraship/libultraship/CMakeLists.txt
Normal file
|
@ -0,0 +1,504 @@
|
|||
set(PROJECT_NAME libultraship)
|
||||
|
||||
################################################################################
|
||||
# Source groups
|
||||
################################################################################
|
||||
set(Header_Files__Resources__Factories
|
||||
"Factories/AnimationFactory.h"
|
||||
"Factories/ArrayFactory.h"
|
||||
"Factories/BlobFactory.h"
|
||||
"Factories/CollisionHeaderFactory.h"
|
||||
"Factories/CutsceneFactory.h"
|
||||
"Factories/DisplayListFactory.h"
|
||||
"Factories/MaterialFactory.h"
|
||||
"Factories/MtxFactory.h"
|
||||
"Factories/PathFactory.h"
|
||||
"Factories/PlayerAnimationFactory.h"
|
||||
"Factories/SceneFactory.h"
|
||||
"Factories/SkeletonFactory.h"
|
||||
"Factories/SkeletonLimbFactory.h"
|
||||
"Factories/TextFactory.h"
|
||||
"Factories/TextureFactory.h"
|
||||
"Factories/VtxFactory.h"
|
||||
)
|
||||
source_group("Header Files\\Resources\\Factories" FILES ${Header_Files__Resources__Factories})
|
||||
|
||||
set(Header_Files__Resources__Files
|
||||
"Animation.h"
|
||||
"Array.h"
|
||||
"Blob.h"
|
||||
"CollisionHeader.h"
|
||||
"Cutscene.h"
|
||||
"DisplayList.h"
|
||||
"Factories/ResourceLoader.h"
|
||||
"Material.h"
|
||||
"Matrix.h"
|
||||
"Model.h"
|
||||
"Path.h"
|
||||
"PlayerAnimation.h"
|
||||
"Scene.h"
|
||||
"Skeleton.h"
|
||||
"SkeletonLimb.h"
|
||||
"Text.h"
|
||||
"Texture.h"
|
||||
"Vertex.h"
|
||||
)
|
||||
source_group("Header Files\\Resources\\Files" FILES ${Header_Files__Resources__Files})
|
||||
|
||||
set(Source_Files__Audio
|
||||
"abi.h"
|
||||
"AudioPlayer.h"
|
||||
"mixer.c"
|
||||
"mixer.h"
|
||||
"SDLAudioPlayer.cpp"
|
||||
"SDLAudioPlayer.h"
|
||||
)
|
||||
|
||||
if (CMAKE_SYSTEM_NAME STREQUAL "Windows")
|
||||
set(Source_Files__Audio__Windows
|
||||
"WasapiAudioPlayer.cpp"
|
||||
"WasapiAudioPlayer.h"
|
||||
)
|
||||
endif ()
|
||||
|
||||
source_group("Source Files\\Audio" FILES ${Source_Files__Audio} ${Source_Files__Audio__Windows})
|
||||
|
||||
set(Source_Files__Config
|
||||
"ConfigFile.cpp"
|
||||
"ConfigFile.h"
|
||||
)
|
||||
source_group("Source Files\\Config" FILES ${Source_Files__Config})
|
||||
|
||||
set(Source_Files__Controller
|
||||
"Controller.cpp"
|
||||
"Controller.h"
|
||||
"KeyboardController.cpp"
|
||||
"KeyboardController.h"
|
||||
"SDLController.cpp"
|
||||
"SDLController.h"
|
||||
"UltraController.h"
|
||||
)
|
||||
source_group("Source Files\\Controller" FILES ${Source_Files__Controller})
|
||||
|
||||
set(Source_Files__Controller__Attachment
|
||||
"ControllerAttachment.cpp"
|
||||
"ControllerAttachment.h"
|
||||
"MemoryPack.cpp"
|
||||
"MemoryPack.h"
|
||||
"RumblePack.cpp"
|
||||
"RumblePack.h"
|
||||
)
|
||||
source_group("Source Files\\Controller\\Attachment" FILES ${Source_Files__Controller__Attachment})
|
||||
|
||||
set(Source_Files__CustomImpl
|
||||
"GameOverlay.cpp"
|
||||
"GameOverlay.h"
|
||||
"GameSettings.cpp"
|
||||
"GameSettings.h"
|
||||
"SohConsole.cpp"
|
||||
"SohConsole.h"
|
||||
"SohImGuiImpl.cpp"
|
||||
"SohImGuiImpl.h"
|
||||
)
|
||||
source_group("Source Files\\CustomImpl" FILES ${Source_Files__CustomImpl})
|
||||
|
||||
set(Source_Files__CustomImpl__Environment
|
||||
"Environment.cpp"
|
||||
"Environment.h"
|
||||
)
|
||||
source_group("Source Files\\CustomImpl\\Environment" FILES ${Source_Files__CustomImpl__Environment})
|
||||
|
||||
set(Source_Files__CustomImpl__Hooks
|
||||
"SohHooks.cpp"
|
||||
"SohHooks.h"
|
||||
)
|
||||
source_group("Source Files\\CustomImpl\\Hooks" FILES ${Source_Files__CustomImpl__Hooks})
|
||||
|
||||
set(Source_Files__CustomImpl__Utils
|
||||
"Utils.cpp"
|
||||
"Utils.h"
|
||||
)
|
||||
source_group("Source Files\\CustomImpl\\Utils" FILES ${Source_Files__CustomImpl__Utils})
|
||||
|
||||
set(Source_Files__Globals
|
||||
"Cvar.cpp"
|
||||
"Cvar.h"
|
||||
"GlobalCtx2.cpp"
|
||||
"GlobalCtx2.h"
|
||||
"LUSMacros.h"
|
||||
"Window.cpp"
|
||||
"Window.h"
|
||||
"WindowShim.cpp"
|
||||
"WindowShim.h"
|
||||
)
|
||||
source_group("Source Files\\Globals" FILES ${Source_Files__Globals})
|
||||
|
||||
set(Source_Files__Lib
|
||||
"Lib/mINI/src/mini/ini.h"
|
||||
"Lib/StrHash64.cpp"
|
||||
"Lib/StrHash64.h"
|
||||
"Lib/tinyxml2/tinyxml2.cpp"
|
||||
"stox.cpp"
|
||||
"stox.h"
|
||||
)
|
||||
source_group("Source Files\\Lib" FILES ${Source_Files__Lib})
|
||||
|
||||
set(Source_Files__Lib__Fast3D
|
||||
"Lib/Fast3D/gfx_cc.cpp"
|
||||
"Lib/Fast3D/gfx_cc.h"
|
||||
"Lib/Fast3D/gfx_direct3d11.cpp"
|
||||
"Lib/Fast3D/gfx_direct3d11.h"
|
||||
"Lib/Fast3D/gfx_direct3d12.cpp"
|
||||
"Lib/Fast3D/gfx_direct3d12.h"
|
||||
"Lib/Fast3D/gfx_direct3d12_guids.h"
|
||||
"Lib/Fast3D/gfx_direct3d_common.cpp"
|
||||
"Lib/Fast3D/gfx_direct3d_common.h"
|
||||
"Lib/Fast3D/gfx_dxgi.cpp"
|
||||
"Lib/Fast3D/gfx_dxgi.h"
|
||||
"Lib/Fast3D/gfx_glx.cpp"
|
||||
"Lib/Fast3D/gfx_glx.h"
|
||||
"Lib/Fast3D/gfx_opengl.cpp"
|
||||
"Lib/Fast3D/gfx_opengl.h"
|
||||
"Lib/Fast3D/gfx_pc.cpp"
|
||||
"Lib/Fast3D/gfx_pc.h"
|
||||
"Lib/Fast3D/gfx_rendering_api.h"
|
||||
"Lib/Fast3D/gfx_screen_config.h"
|
||||
"Lib/Fast3D/gfx_sdl.h"
|
||||
"Lib/Fast3D/gfx_sdl2.cpp"
|
||||
"Lib/Fast3D/gfx_window_manager_api.h"
|
||||
)
|
||||
source_group("Source Files\\Lib\\Fast3D" FILES ${Source_Files__Lib__Fast3D})
|
||||
|
||||
set(Source_Files__Lib__ImGui
|
||||
"Lib/ImGui/backends/imgui_impl_opengl3.cpp"
|
||||
"Lib/ImGui/backends/imgui_impl_opengl3.h"
|
||||
"Lib/ImGui/backends/imgui_impl_sdl.cpp"
|
||||
"Lib/ImGui/backends/imgui_impl_sdl.h"
|
||||
"Lib/ImGui/imconfig.h"
|
||||
"Lib/ImGui/imgui.cpp"
|
||||
"Lib/ImGui/imgui.h"
|
||||
"Lib/ImGui/imgui_demo.cpp"
|
||||
"Lib/ImGui/imgui_draw.cpp"
|
||||
"Lib/ImGui/imgui_internal.h"
|
||||
"Lib/ImGui/imgui_tables.cpp"
|
||||
"Lib/ImGui/imgui_widgets.cpp"
|
||||
"Lib/ImGui/imstb_rectpack.h"
|
||||
"Lib/ImGui/imstb_textedit.h"
|
||||
"Lib/ImGui/imstb_truetype.h"
|
||||
)
|
||||
if (CMAKE_SYSTEM_NAME STREQUAL "Windows")
|
||||
set(Source_Files__Lib__ImGui__Windows
|
||||
"Lib/ImGui/backends/imgui_impl_dx11.cpp"
|
||||
"Lib/ImGui/backends/imgui_impl_dx11.h"
|
||||
"Lib/ImGui/backends/imgui_impl_win32.cpp"
|
||||
"Lib/ImGui/backends/imgui_impl_win32.h"
|
||||
)
|
||||
endif ()
|
||||
source_group("Source Files\\Lib\\ImGui" FILES ${Source_Files__Lib__ImGui} ${Source_Files__Lib__ImGui__Windows})
|
||||
|
||||
set(Source_Files__Lib__stb
|
||||
"Lib/stb/stb_image.h"
|
||||
"Lib/stb/stb_image_write.h"
|
||||
"Lib/stb/stb_impl.c"
|
||||
)
|
||||
source_group("Source Files\\Lib\\stb" FILES ${Source_Files__Lib__stb})
|
||||
|
||||
set(Source_Files__Lib__tinyxml2
|
||||
"Lib/tinyxml2/tinyxml2.h"
|
||||
)
|
||||
source_group("Source Files\\Lib\\tinyxml2" FILES ${Source_Files__Lib__tinyxml2})
|
||||
|
||||
set(Source_Files__Logging
|
||||
"luslog.cpp"
|
||||
"luslog.h"
|
||||
)
|
||||
source_group("Source Files\\Logging" FILES ${Source_Files__Logging})
|
||||
|
||||
set(Source_Files__ModManager
|
||||
"ModManager.cpp"
|
||||
"ModManager.h"
|
||||
)
|
||||
source_group("Source Files\\ModManager" FILES ${Source_Files__ModManager})
|
||||
|
||||
set(Source_Files__ModManager__ModModule
|
||||
"ModModule.h"
|
||||
"TextureMod.cpp"
|
||||
"TextureMod.h"
|
||||
)
|
||||
source_group("Source Files\\ModManager\\ModModule" FILES ${Source_Files__ModManager__ModModule})
|
||||
|
||||
set(Source_Files__Resources
|
||||
"GameVersions.h"
|
||||
"Resource.cpp"
|
||||
"Resource.h"
|
||||
"ResourceMgr.cpp"
|
||||
"ResourceMgr.h"
|
||||
)
|
||||
source_group("Source Files\\Resources" FILES ${Source_Files__Resources})
|
||||
|
||||
set(Source_Files__Resources__Factories
|
||||
"Factories/AnimationFactory.cpp"
|
||||
"Factories/ArrayFactory.cpp"
|
||||
"Factories/BlobFactory.cpp"
|
||||
"Factories/CollisionHeaderFactory.cpp"
|
||||
"Factories/CutsceneFactory.cpp"
|
||||
"Factories/DisplayListFactory.cpp"
|
||||
"Factories/MaterialFactory.cpp"
|
||||
"Factories/MtxFactory.cpp"
|
||||
"Factories/PathFactory.cpp"
|
||||
"Factories/PlayerAnimationFactory.cpp"
|
||||
"Factories/ResourceLoader.cpp"
|
||||
"Factories/SceneFactory.cpp"
|
||||
"Factories/SkeletonFactory.cpp"
|
||||
"Factories/SkeletonLimbFactory.cpp"
|
||||
"Factories/TextFactory.cpp"
|
||||
"Factories/TextureFactory.cpp"
|
||||
"Factories/VtxFactory.cpp"
|
||||
)
|
||||
source_group("Source Files\\Resources\\Factories" FILES ${Source_Files__Resources__Factories})
|
||||
|
||||
set(Source_Files__Resources__Files
|
||||
"Animation.cpp"
|
||||
"Array.cpp"
|
||||
"Blob.cpp"
|
||||
"CollisionHeader.cpp"
|
||||
"Cutscene.cpp"
|
||||
"DisplayList.cpp"
|
||||
"Material.cpp"
|
||||
"Matrix.cpp"
|
||||
"Model.cpp"
|
||||
"Path.cpp"
|
||||
"PlayerAnimation.cpp"
|
||||
"Scene.cpp"
|
||||
"Skeleton.cpp"
|
||||
"SkeletonLimb.cpp"
|
||||
"Text.cpp"
|
||||
"Texture.cpp"
|
||||
"Vertex.cpp"
|
||||
)
|
||||
source_group("Source Files\\Resources\\Files" FILES ${Source_Files__Resources__Files})
|
||||
|
||||
set(Source_Files__Resources__mpq
|
||||
"Archive.cpp"
|
||||
"Archive.h"
|
||||
"File.cpp"
|
||||
"File.h"
|
||||
)
|
||||
source_group("Source Files\\Resources\\mpq" FILES ${Source_Files__Resources__mpq})
|
||||
|
||||
set(ALL_FILES
|
||||
${Header_Files__Resources__Factories}
|
||||
${Header_Files__Resources__Files}
|
||||
${Source_Files__Audio}
|
||||
${Source_Files__Audio__Windows}
|
||||
${Source_Files__Config}
|
||||
${Source_Files__Controller}
|
||||
${Source_Files__Controller__Attachment}
|
||||
${Source_Files__CustomImpl}
|
||||
${Source_Files__CustomImpl__Environment}
|
||||
${Source_Files__CustomImpl__Hooks}
|
||||
${Source_Files__CustomImpl__Utils}
|
||||
${Source_Files__Globals}
|
||||
${Source_Files__Lib}
|
||||
${Source_Files__Lib__Fast3D}
|
||||
${Source_Files__Lib__ImGui}
|
||||
${Source_Files__Lib__ImGui__Windows}
|
||||
${Source_Files__Lib__stb}
|
||||
${Source_Files__Lib__tinyxml2}
|
||||
${Source_Files__Logging}
|
||||
${Source_Files__ModManager}
|
||||
${Source_Files__ModManager__ModModule}
|
||||
${Source_Files__Resources}
|
||||
${Source_Files__Resources__Factories}
|
||||
${Source_Files__Resources__Files}
|
||||
${Source_Files__Resources__mpq}
|
||||
)
|
||||
|
||||
################################################################################
|
||||
# Target
|
||||
################################################################################
|
||||
add_library(${PROJECT_NAME} STATIC ${ALL_FILES})
|
||||
|
||||
use_props(${PROJECT_NAME} "${CMAKE_CONFIGURATION_TYPES}" "${DEFAULT_CXX_PROPS}")
|
||||
set(ROOT_NAMESPACE libultraship)
|
||||
|
||||
if (CMAKE_SYSTEM_NAME STREQUAL "Windows")
|
||||
set_target_properties(${PROJECT_NAME} PROPERTIES
|
||||
VS_GLOBAL_KEYWORD "Win32Proj"
|
||||
)
|
||||
if("${CMAKE_VS_PLATFORM_NAME}" STREQUAL "x64")
|
||||
set_target_properties(${PROJECT_NAME} PROPERTIES
|
||||
INTERPROCEDURAL_OPTIMIZATION_RELEASE "TRUE"
|
||||
)
|
||||
elseif("${CMAKE_VS_PLATFORM_NAME}" STREQUAL "Win32")
|
||||
set_target_properties(${PROJECT_NAME} PROPERTIES
|
||||
INTERPROCEDURAL_OPTIMIZATION_RELEASE "TRUE"
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
################################################################################
|
||||
# MSVC runtime library
|
||||
################################################################################
|
||||
if (CMAKE_SYSTEM_NAME STREQUAL "Windows")
|
||||
get_property(MSVC_RUNTIME_LIBRARY_DEFAULT TARGET ${PROJECT_NAME} PROPERTY MSVC_RUNTIME_LIBRARY)
|
||||
if("${CMAKE_VS_PLATFORM_NAME}" STREQUAL "x64")
|
||||
string(CONCAT "MSVC_RUNTIME_LIBRARY_STR"
|
||||
$<$<CONFIG:Debug>:
|
||||
MultiThreadedDebug
|
||||
>
|
||||
$<$<CONFIG:Release>:
|
||||
MultiThreaded
|
||||
>
|
||||
$<$<NOT:$<OR:$<CONFIG:Debug>,$<CONFIG:Release>>>:${MSVC_RUNTIME_LIBRARY_DEFAULT}>
|
||||
)
|
||||
elseif("${CMAKE_VS_PLATFORM_NAME}" STREQUAL "Win32")
|
||||
string(CONCAT "MSVC_RUNTIME_LIBRARY_STR"
|
||||
$<$<CONFIG:Debug>:
|
||||
MultiThreadedDebug
|
||||
>
|
||||
$<$<CONFIG:Release>:
|
||||
MultiThreaded
|
||||
>
|
||||
$<$<NOT:$<OR:$<CONFIG:Debug>,$<CONFIG:Release>>>:${MSVC_RUNTIME_LIBRARY_DEFAULT}>
|
||||
)
|
||||
endif()
|
||||
set_target_properties(${PROJECT_NAME} PROPERTIES MSVC_RUNTIME_LIBRARY ${MSVC_RUNTIME_LIBRARY_STR})
|
||||
endif()
|
||||
################################################################################
|
||||
# Compile definitions
|
||||
################################################################################
|
||||
if (CMAKE_SYSTEM_NAME STREQUAL "Windows")
|
||||
if("${CMAKE_VS_PLATFORM_NAME}" STREQUAL "x64")
|
||||
target_compile_definitions(${PROJECT_NAME} PRIVATE
|
||||
"$<$<CONFIG:Debug>:"
|
||||
"_DEBUG"
|
||||
">"
|
||||
"$<$<CONFIG:Release>:"
|
||||
"NDEBUG"
|
||||
">"
|
||||
"SPDLOG_ACTIVE_LEVEL=0;"
|
||||
"_CONSOLE;"
|
||||
"_CRT_SECURE_NO_WARNINGS;"
|
||||
"ENABLE_DX11;"
|
||||
"ENABLE_OPENGL;"
|
||||
"UNICODE;"
|
||||
"_UNICODE"
|
||||
)
|
||||
elseif("${CMAKE_VS_PLATFORM_NAME}" STREQUAL "Win32")
|
||||
target_compile_definitions(${PROJECT_NAME} PRIVATE
|
||||
"$<$<CONFIG:Debug>:"
|
||||
"_DEBUG"
|
||||
">"
|
||||
"$<$<CONFIG:Release>:"
|
||||
"NDEBUG"
|
||||
">"
|
||||
"SPDLOG_ACTIVE_LEVEL=0;"
|
||||
"WIN32;"
|
||||
"_CONSOLE;"
|
||||
"_CRT_SECURE_NO_WARNINGS;"
|
||||
"ENABLE_OPENGL;"
|
||||
"ENABLE_DX11;"
|
||||
"%(PreprocessorDefinitions)GLEW_STATIC;"
|
||||
"UNICODE;"
|
||||
"_UNICODE"
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
|
||||
target_compile_definitions(${PROJECT_NAME} PRIVATE
|
||||
"$<$<CONFIG:Debug>:"
|
||||
"_DEBUG"
|
||||
">"
|
||||
"$<$<CONFIG:Release>:"
|
||||
"NDEBUG"
|
||||
">"
|
||||
"ENABLE_OPENGL;"
|
||||
)
|
||||
endif()
|
||||
################################################################################
|
||||
# Compile and link options
|
||||
################################################################################
|
||||
|
||||
target_include_directories(${PROJECT_NAME} PRIVATE
|
||||
${PROJECT_SOURCE_DIR}/../libultraship/libultraship/Lib/spdlog/include/
|
||||
${PROJECT_SOURCE_DIR}/../libultraship/libultraship/Lib/Fast3D/U64/
|
||||
${PROJECT_SOURCE_DIR}/../libultraship/libultraship/Lib/Fast3D/U64/PR
|
||||
${PROJECT_SOURCE_DIR}/../libultraship/libultraship/Lib/SDL
|
||||
${PROJECT_SOURCE_DIR}/../libultraship/libultraship/Lib/GLEW/
|
||||
${PROJECT_SOURCE_DIR}/../ZAPDTR/ZAPDUtils
|
||||
.
|
||||
$(IncludePath)
|
||||
)
|
||||
|
||||
if(MSVC)
|
||||
if("${CMAKE_VS_PLATFORM_NAME}" STREQUAL "x64")
|
||||
target_compile_options(${PROJECT_NAME} PRIVATE
|
||||
$<$<CONFIG:Release>:
|
||||
/std:c++latest;
|
||||
/Oi;
|
||||
/Gy
|
||||
>
|
||||
/permissive-;
|
||||
/MP;
|
||||
/sdl;
|
||||
/W3;
|
||||
${DEFAULT_CXX_DEBUG_INFORMATION_FORMAT};
|
||||
${DEFAULT_CXX_EXCEPTION_HANDLING}
|
||||
)
|
||||
elseif("${CMAKE_VS_PLATFORM_NAME}" STREQUAL "Win32")
|
||||
target_compile_options(${PROJECT_NAME} PRIVATE
|
||||
$<$<CONFIG:Debug>:
|
||||
/Od;
|
||||
/Oi-;
|
||||
/W2
|
||||
>
|
||||
$<$<CONFIG:Release>:
|
||||
/Oi;
|
||||
/Gy;
|
||||
/W3
|
||||
>
|
||||
/permissive-;
|
||||
/MP;
|
||||
/sdl;
|
||||
${DEFAULT_CXX_DEBUG_INFORMATION_FORMAT};
|
||||
${DEFAULT_CXX_EXCEPTION_HANDLING}
|
||||
)
|
||||
endif()
|
||||
if("${CMAKE_VS_PLATFORM_NAME}" STREQUAL "x64")
|
||||
target_link_options(${PROJECT_NAME} PRIVATE
|
||||
$<$<CONFIG:Release>:
|
||||
/OPT:REF;
|
||||
/OPT:ICF
|
||||
>
|
||||
/SUBSYSTEM:CONSOLE
|
||||
)
|
||||
elseif("${CMAKE_VS_PLATFORM_NAME}" STREQUAL "Win32")
|
||||
target_link_options(${PROJECT_NAME} PRIVATE
|
||||
$<$<CONFIG:Release>:
|
||||
/OPT:REF;
|
||||
/OPT:ICF
|
||||
>
|
||||
/SUBSYSTEM:CONSOLE
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
|
||||
target_compile_options(${PROJECT_NAME} PRIVATE
|
||||
-Wall
|
||||
-Wextra
|
||||
-Wno-error
|
||||
-Wno-unused-variable
|
||||
-Wno-unused-parameter
|
||||
-Wno-unused-function
|
||||
-Wno-parentheses
|
||||
-Wno-narrowing
|
||||
-Wno-missing-field-initializers
|
||||
)
|
||||
endif()
|
||||
################################################################################
|
||||
# Dependencies
|
||||
################################################################################
|
||||
# Link with other targets.
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue