1
0
Fork 0
mirror of https://github.com/gwm17/Specter.git synced 2024-11-22 18:28:52 -05:00

Fixed some pch nonsense, hopefully works properly on Unix.

This commit is contained in:
Gordon McCann 2021-12-19 12:58:03 -05:00
parent 2502e2a620
commit 45abdd122a
12 changed files with 348 additions and 14 deletions

3
.gitignore vendored
View File

@ -4,10 +4,13 @@
*.sublime-workspace
Makefile
*.make
*.user
Navigator/Makefile
NavProject/Makefile
.vs/
bin-int/
bin/
lib/

2
GenerateProjects.bat Normal file
View File

@ -0,0 +1,2 @@
call ..\Nova\vendor\bin\premake\premake5.exe vs2019
PAUSE

View File

@ -0,0 +1,104 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{6197989A-4D4F-DAE7-B656-B343A22D75D8}</ProjectGuid>
<IgnoreWarnCompileDuplicatedFilename>true</IgnoreWarnCompileDuplicatedFilename>
<Keyword>Win32Proj</Keyword>
<RootNamespace>NavProject</RootNamespace>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v142</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v142</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<LinkIncremental>true</LinkIncremental>
<OutDir>..\bin\Debug-windows-x86_64\NavProject\</OutDir>
<IntDir>..\bin-int\Debug-windows-x86_64\NavProject\</IntDir>
<TargetName>NavProject</TargetName>
<TargetExt>.exe</TargetExt>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<LinkIncremental>false</LinkIncremental>
<OutDir>..\bin\Release-windows-x86_64\NavProject\</OutDir>
<IntDir>..\bin-int\Release-windows-x86_64\NavProject\</IntDir>
<TargetName>NavProject</TargetName>
<TargetExt>.exe</TargetExt>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<PreprocessorDefinitions>NAV_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>..\Navigator\src;..\Navigator\vendor\spdlog\include;..\Navigator\vendor;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
<Optimization>Disabled</Optimization>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<LanguageStandard>stdcpp17</LanguageStandard>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<PreprocessorDefinitions>NAV_RELEASE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>..\Navigator\src;..\Navigator\vendor\spdlog\include;..\Navigator\vendor;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<Optimization>Full</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<MinimalRebuild>false</MinimalRebuild>
<StringPooling>true</StringPooling>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<LanguageStandard>stdcpp17</LanguageStandard>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="main.cpp" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Navigator\Navigator.vcxproj">
<Project>{1056BD6C-7CC0-71E3-C5FE-228931A84F38}</Project>
</ProjectReference>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

38
Navigator.sln Normal file
View File

@ -0,0 +1,38 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "NavProject", "NavProject\NavProject.vcxproj", "{6197989A-4D4F-DAE7-B656-B343A22D75D8}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "GLFW", "Navigator\vendor\glfw\GLFW.vcxproj", "{154B857C-0182-860D-AA6E-6C109684020F}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ImGui", "Navigator\vendor\imgui\ImGui.vcxproj", "{C0FF640D-2C14-8DBE-F595-301E616989EF}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Navigator", "Navigator\Navigator.vcxproj", "{1056BD6C-7CC0-71E3-C5FE-228931A84F38}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x64 = Debug|x64
Release|x64 = Release|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{6197989A-4D4F-DAE7-B656-B343A22D75D8}.Debug|x64.ActiveCfg = Debug|x64
{6197989A-4D4F-DAE7-B656-B343A22D75D8}.Debug|x64.Build.0 = Debug|x64
{6197989A-4D4F-DAE7-B656-B343A22D75D8}.Release|x64.ActiveCfg = Release|x64
{6197989A-4D4F-DAE7-B656-B343A22D75D8}.Release|x64.Build.0 = Release|x64
{154B857C-0182-860D-AA6E-6C109684020F}.Debug|x64.ActiveCfg = Debug|x64
{154B857C-0182-860D-AA6E-6C109684020F}.Debug|x64.Build.0 = Debug|x64
{154B857C-0182-860D-AA6E-6C109684020F}.Release|x64.ActiveCfg = Release|x64
{154B857C-0182-860D-AA6E-6C109684020F}.Release|x64.Build.0 = Release|x64
{C0FF640D-2C14-8DBE-F595-301E616989EF}.Debug|x64.ActiveCfg = Debug|x64
{C0FF640D-2C14-8DBE-F595-301E616989EF}.Debug|x64.Build.0 = Debug|x64
{C0FF640D-2C14-8DBE-F595-301E616989EF}.Release|x64.ActiveCfg = Release|x64
{C0FF640D-2C14-8DBE-F595-301E616989EF}.Release|x64.Build.0 = Release|x64
{1056BD6C-7CC0-71E3-C5FE-228931A84F38}.Debug|x64.ActiveCfg = Debug|x64
{1056BD6C-7CC0-71E3-C5FE-228931A84F38}.Debug|x64.Build.0 = Debug|x64
{1056BD6C-7CC0-71E3-C5FE-228931A84F38}.Release|x64.ActiveCfg = Release|x64
{1056BD6C-7CC0-71E3-C5FE-228931A84F38}.Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

132
Navigator/Navigator.vcxproj Normal file
View File

@ -0,0 +1,132 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{1056BD6C-7CC0-71E3-C5FE-228931A84F38}</ProjectGuid>
<IgnoreWarnCompileDuplicatedFilename>true</IgnoreWarnCompileDuplicatedFilename>
<Keyword>Win32Proj</Keyword>
<RootNamespace>Navigator</RootNamespace>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v142</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v142</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<OutDir>..\lib\Debug-windows-x86_64\Navigator\</OutDir>
<IntDir>..\bin-int\Debug-windows-x86_64\Navigator\</IntDir>
<TargetName>Navigator</TargetName>
<TargetExt>.lib</TargetExt>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<OutDir>..\lib\Release-windows-x86_64\Navigator\</OutDir>
<IntDir>..\bin-int\Release-windows-x86_64\Navigator\</IntDir>
<TargetName>Navigator</TargetName>
<TargetExt>.lib</TargetExt>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<PrecompiledHeader>Use</PrecompiledHeader>
<PrecompiledHeaderFile>navpch.h</PrecompiledHeaderFile>
<WarningLevel>Level3</WarningLevel>
<PreprocessorDefinitions>NAV_WINDOWS;_CRT_SECURE_NO_WARNINGS;GLFW_INCLUDE_NONE;NAV_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>src;vendor\spdlog\include;vendor\glfw\include;vendor\imgui;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<ForcedIncludeFiles>navpch.h</ForcedIncludeFiles>
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
<Optimization>Disabled</Optimization>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<LanguageStandard>stdcpp17</LanguageStandard>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
<Lib>
<AdditionalDependencies>opengl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Lib>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<PrecompiledHeader>Use</PrecompiledHeader>
<PrecompiledHeaderFile>navpch.h</PrecompiledHeaderFile>
<WarningLevel>Level3</WarningLevel>
<PreprocessorDefinitions>NAV_WINDOWS;_CRT_SECURE_NO_WARNINGS;GLFW_INCLUDE_NONE;NAV_RELEASE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>src;vendor\spdlog\include;vendor\glfw\include;vendor\imgui;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<ForcedIncludeFiles>navpch.h</ForcedIncludeFiles>
<Optimization>Full</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<MinimalRebuild>false</MinimalRebuild>
<StringPooling>true</StringPooling>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<LanguageStandard>stdcpp17</LanguageStandard>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
</Link>
<Lib>
<AdditionalDependencies>opengl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Lib>
</ItemDefinitionGroup>
<ItemGroup>
<ClInclude Include="src\Navigator.h" />
<ClInclude Include="src\Navigator\Application.h" />
<ClInclude Include="src\Navigator\CompassFile.h" />
<ClInclude Include="src\Navigator\CompassHit.h" />
<ClInclude Include="src\Navigator\CompassRun.h" />
<ClInclude Include="src\Navigator\Logger.h" />
<ClInclude Include="src\Navigator\ShiftMap.h" />
<ClInclude Include="src\navpch.h" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="src\Navigator\Application.cpp" />
<ClCompile Include="src\Navigator\CompassFile.cpp" />
<ClCompile Include="src\Navigator\CompassRun.cpp" />
<ClCompile Include="src\Navigator\Logger.cpp" />
<ClCompile Include="src\Navigator\ShiftMap.cpp" />
<ClCompile Include="src\navpch.cpp">
<PrecompiledHeader>Create</PrecompiledHeader>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="vendor\glfw\GLFW.vcxproj">
<Project>{154B857C-0182-860D-AA6E-6C109684020F}</Project>
</ProjectReference>
<ProjectReference Include="vendor\imgui\ImGui.vcxproj">
<Project>{C0FF640D-2C14-8DBE-F595-301E616989EF}</Project>
</ProjectReference>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View File

@ -0,0 +1,48 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Navigator">
<UniqueIdentifier>{1056BD6C-7CC0-71E3-C5FE-228931A84F38}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<ClInclude Include="src\Navigator.h" />
<ClInclude Include="src\Navigator\Application.h">
<Filter>Navigator</Filter>
</ClInclude>
<ClInclude Include="src\Navigator\CompassFile.h">
<Filter>Navigator</Filter>
</ClInclude>
<ClInclude Include="src\Navigator\CompassHit.h">
<Filter>Navigator</Filter>
</ClInclude>
<ClInclude Include="src\Navigator\CompassRun.h">
<Filter>Navigator</Filter>
</ClInclude>
<ClInclude Include="src\Navigator\Logger.h">
<Filter>Navigator</Filter>
</ClInclude>
<ClInclude Include="src\Navigator\ShiftMap.h">
<Filter>Navigator</Filter>
</ClInclude>
<ClInclude Include="src\navpch.h" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="src\Navigator\Application.cpp">
<Filter>Navigator</Filter>
</ClCompile>
<ClCompile Include="src\Navigator\CompassFile.cpp">
<Filter>Navigator</Filter>
</ClCompile>
<ClCompile Include="src\Navigator\CompassRun.cpp">
<Filter>Navigator</Filter>
</ClCompile>
<ClCompile Include="src\Navigator\Logger.cpp">
<Filter>Navigator</Filter>
</ClCompile>
<ClCompile Include="src\Navigator\ShiftMap.cpp">
<Filter>Navigator</Filter>
</ClCompile>
<ClCompile Include="src\navpch.cpp" />
</ItemGroup>
</Project>

View File

@ -1,4 +1,3 @@
#include <navpch.h>
#include "Application.h"
namespace Navigator {

View File

@ -8,7 +8,6 @@
Written by G.W. McCann Oct. 2020
*/
#include <navpch.h>
#include "CompassFile.h"
namespace Navigator {

View File

@ -9,7 +9,6 @@
Updated to also handle scaler data. -- GWM Oct. 2020
*/
#include <navpch.h>
#include "CompassRun.h"
namespace Navigator {

View File

@ -1,4 +1,3 @@
#include <navpch.h>
#include "Logger.h"
#include "spdlog/sinks/stdout_color_sinks.h"

View File

@ -9,7 +9,6 @@
Written by G.W. McCann Oct. 2020
*/
#include <navpch.h>
#include "ShiftMap.h"
namespace Navigator {

View File

@ -1,4 +1,4 @@
workspace "Nova"
workspace "Navigator"
architecture "x64"
configurations {
"Debug",
@ -25,7 +25,26 @@ project "Navigator"
targetdir ("lib/" .. outputdir .. "/%{prj.name}")
objdir ("bin-int/" .. outputdir .. "/%{prj.name}")
pchheader "navpch.h"
pchsource "src/navpch.cpp"
pchsource "Navigator/src/navpch.cpp"
filter "system:windows"
defines "NAV_WINDOWS"
forceincludes {"navpch.h"}
includedirs {
"%{prj.name}/src/",
"%{prj.name}/vendor/spdlog/include/",
"%{IncludeDirs.glfw}",
"%{IncludeDirs.ImGui}",
}
filter "system:linux or macosx"
defines "NAV_UNIX"
defines "NAV_PCH"
includedirs {
"%{prj.name}/vendor/spdlog/include/",
"%{IncludeDirs.glfw}",
"%{IncludeDirs.ImGui}",
}
filter {}
files {
"%{prj.name}/src/**.h",
@ -36,13 +55,6 @@ project "Navigator"
"_CRT_SECURE_NO_WARNINGS"
}
includedirs {
"%{prj.name}/src/",
"%{prj.name}/vendor/spdlog/include/",
"%{IncludeDirs.glfw}",
"%{IncludeDirs.ImGui}",
}
links {
"GLFW",
"ImGui",