Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/vs2022 build #85

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
85 changes: 85 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@

.vs/
Debug/
Release/

*.vcxproj.user

UpgradeLog*.htm

# backup files, etc.

*~
*.sw?

# autotools generated

aclocal.m4
autom4te.cache/output.0
autom4te.cache/output.1
autom4te.cache/requests
autom4te.cache/traces.0
autom4te.cache/traces.1
config.log
config.status
configure
include/carve/config.h
include/carve/stamp-h2
include/carve_config.h
include/carve_config.h.in
include/stamp-h1
libtool

# cmake generated

CMakeFiles

# debug info

*.dSYM

# regression test results

regression/*/test_*

# produced by compilation

*.la
*.o
*.lo
*.Plo
*.a
*.Po
*.dylib
*.so
Makefile.in
Makefile

.libs
.deps

# generated executables

src/convert
src/custom_collector
src/cutgraph
src/intersect
src/problem
src/test_aabb
src/test_aabb_tri
src/test_csg_interpolate
src/test_eigen
src/test_geom
src/test_hole_incorporate
src/test_interpolate
src/test_intersect
src/test_rescale
src/test_slice
src/test_slice_classify
src/test_spacetree
src/test_triangulate
src/tetrahedron
src/texture_example
src/triangulate
src/view

11 changes: 11 additions & 0 deletions external/GLOOP/include/gloop/image/radiance.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,24 @@
#pragma once

#if (defined WIN32) || (defined _WIN32)

// These definitions are already provided by Visual Studio 2022
#if (defined _MSC_VER) && _MSC_VER >= 1929

#include <stdint.h>

#else

typedef char int8_t;
typedef short int16_t;
typedef long int32_t;

typedef unsigned char uint8_t;
typedef unsigned short uint16_t;
typedef unsigned long uint32_t;

#endif

#else
#include <stdint.h>
#endif
Expand Down
9 changes: 9 additions & 0 deletions external/GLOOP/include/gloop/model/stream.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,13 @@

#ifdef WIN32

// These definitions are already provided by Visual Studio 2022
#if (defined _MSC_VER) && _MSC_VER >= 1929

#include <stdint.h>

#else

typedef char int8_t;
typedef short int16_t;
typedef long int32_t;
Expand All @@ -42,6 +49,8 @@ typedef unsigned char uint8_t;
typedef unsigned short uint16_t;
typedef unsigned long uint32_t;

#endif

#else

#include <stdint.h>
Expand Down
9 changes: 9 additions & 0 deletions external/GLOOP/src/model/ply_format.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,13 @@

#ifdef WIN32

#if (defined _MSC_VER) && _MSC_VER >= 1929

#include <stdint.h>
#include <cstring>

#else

typedef char int8_t;
typedef short int16_t;
typedef long int32_t;
Expand All @@ -44,6 +51,8 @@ typedef unsigned char uint8_t;
typedef unsigned short uint16_t;
typedef unsigned long uint32_t;

#endif

#else

#include <stdint.h>
Expand Down
1 change: 1 addition & 0 deletions include/carve/polyhedron_impl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@

#include <assert.h>
#include <list>
#include <algorithm>

namespace carve {
namespace poly {
Expand Down
9 changes: 9 additions & 0 deletions include/carve/vcpp_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,15 @@

#include <math.h>

// These definitions are already provided by Visual Studio 2022
#if (defined _MSC_VER) && _MSC_VER >= 1929

#else

static inline double round(double value) {
return (value >= 0) ? floor(value + 0.5) : ceil(value - 0.5);
}

#endif

typedef int ssize_t;
3 changes: 3 additions & 0 deletions lib/mesh.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@

#include <carve/poly.hpp>

#include <algorithm>
#include <functional>

namespace {
inline double CALC_X(const carve::geom::plane<3>& p, double y, double z) {
return -(p.d + p.N.y * y + p.N.z * z) / p.N.x;
Expand Down
80 changes: 32 additions & 48 deletions win32/Carve.sln
Original file line number Diff line number Diff line change
@@ -1,47 +1,28 @@

Microsoft Visual Studio Solution File, Format Version 10.00
# Visual Studio 2008
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "carvelib", "carvelib\carvelib.vcproj", "{21F77D6E-3E33-4EB0-8BC6-C0C86C7EE45B}"
ProjectSection(ProjectDependencies) = postProject
{B74F9D7B-8A9D-45A0-8D09-973D01314D80} = {B74F9D7B-8A9D-45A0-8D09-973D01314D80}
{A50234C1-A40D-4782-81CB-9D4549DC9474} = {A50234C1-A40D-4782-81CB-9D4549DC9474}
EndProjectSection
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.31729.503
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "carvelib", "carvelib\carvelib.vcxproj", "{21F77D6E-3E33-4EB0-8BC6-C0C86C7EE45B}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gloop", "gloop\gloop.vcproj", "{A50234C1-A40D-4782-81CB-9D4549DC9474}"
ProjectSection(ProjectDependencies) = postProject
{00B985EA-A5CD-4F24-8B62-5DC87CD4D080} = {00B985EA-A5CD-4F24-8B62-5DC87CD4D080}
EndProjectSection
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "fileformats", "fileformats\fileformats.vcxproj", "{B74F9D7B-8A9D-45A0-8D09-973D01314D80}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "intersect", "intersect\intersect.vcproj", "{FD8895D6-8EE2-4E37-8E76-A642FA1422C1}"
ProjectSection(ProjectDependencies) = postProject
{21F77D6E-3E33-4EB0-8BC6-C0C86C7EE45B} = {21F77D6E-3E33-4EB0-8BC6-C0C86C7EE45B}
{A50234C1-A40D-4782-81CB-9D4549DC9474} = {A50234C1-A40D-4782-81CB-9D4549DC9474}
EndProjectSection
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "texture_example", "texture_example\texture_example.vcxproj", "{9633062D-3A3A-4997-8754-8A21CD5A354C}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "view", "view\view.vcproj", "{2DCBE71A-A29A-4FE7-A23C-AFA762DF13E1}"
ProjectSection(ProjectDependencies) = postProject
{63A9D017-1F43-4F1E-8C04-56F8EAABBFC4} = {63A9D017-1F43-4F1E-8C04-56F8EAABBFC4}
{21F77D6E-3E33-4EB0-8BC6-C0C86C7EE45B} = {21F77D6E-3E33-4EB0-8BC6-C0C86C7EE45B}
{A50234C1-A40D-4782-81CB-9D4549DC9474} = {A50234C1-A40D-4782-81CB-9D4549DC9474}
{00B985EA-A5CD-4F24-8B62-5DC87CD4D080} = {00B985EA-A5CD-4F24-8B62-5DC87CD4D080}
EndProjectSection
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "glew", "glew\glew.vcxproj", "{00B985EA-A5CD-4F24-8B62-5DC87CD4D080}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "glew", "glew\glew.vcproj", "{00B985EA-A5CD-4F24-8B62-5DC87CD4D080}"
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gloop", "gloop\gloop.vcxproj", "{A50234C1-A40D-4782-81CB-9D4549DC9474}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "glui32", "glui\glui.vcproj", "{63A9D017-1F43-4F1E-8C04-56F8EAABBFC4}"
ProjectSection(ProjectDependencies) = postProject
{00B985EA-A5CD-4F24-8B62-5DC87CD4D080} = {00B985EA-A5CD-4F24-8B62-5DC87CD4D080}
EndProjectSection
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "glui32", "glui\glui.vcxproj", "{63A9D017-1F43-4F1E-8C04-56F8EAABBFC4}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "texture_example", "texture_example\texture_example.vcproj", "{9633062D-3A3A-4997-8754-8A21CD5A354C}"
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "intersect", "intersect\intersect.vcxproj", "{FD8895D6-8EE2-4E37-8E76-A642FA1422C1}"
ProjectSection(ProjectDependencies) = postProject
{63A9D017-1F43-4F1E-8C04-56F8EAABBFC4} = {63A9D017-1F43-4F1E-8C04-56F8EAABBFC4}
{21F77D6E-3E33-4EB0-8BC6-C0C86C7EE45B} = {21F77D6E-3E33-4EB0-8BC6-C0C86C7EE45B}
{B74F9D7B-8A9D-45A0-8D09-973D01314D80} = {B74F9D7B-8A9D-45A0-8D09-973D01314D80}
{A50234C1-A40D-4782-81CB-9D4549DC9474} = {A50234C1-A40D-4782-81CB-9D4549DC9474}
{00B985EA-A5CD-4F24-8B62-5DC87CD4D080} = {00B985EA-A5CD-4F24-8B62-5DC87CD4D080}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "fileformats", "fileformats\fileformats.vcproj", "{B74F9D7B-8A9D-45A0-8D09-973D01314D80}"
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "view", "view\view.vcxproj", "{2DCBE71A-A29A-4FE7-A23C-AFA762DF13E1}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand All @@ -53,10 +34,26 @@ Global
{21F77D6E-3E33-4EB0-8BC6-C0C86C7EE45B}.Debug|Win32.Build.0 = Debug|Win32
{21F77D6E-3E33-4EB0-8BC6-C0C86C7EE45B}.Release|Win32.ActiveCfg = Release|Win32
{21F77D6E-3E33-4EB0-8BC6-C0C86C7EE45B}.Release|Win32.Build.0 = Release|Win32
{B74F9D7B-8A9D-45A0-8D09-973D01314D80}.Debug|Win32.ActiveCfg = Debug|Win32
{B74F9D7B-8A9D-45A0-8D09-973D01314D80}.Debug|Win32.Build.0 = Debug|Win32
{B74F9D7B-8A9D-45A0-8D09-973D01314D80}.Release|Win32.ActiveCfg = Release|Win32
{B74F9D7B-8A9D-45A0-8D09-973D01314D80}.Release|Win32.Build.0 = Release|Win32
{9633062D-3A3A-4997-8754-8A21CD5A354C}.Debug|Win32.ActiveCfg = Debug|Win32
{9633062D-3A3A-4997-8754-8A21CD5A354C}.Debug|Win32.Build.0 = Debug|Win32
{9633062D-3A3A-4997-8754-8A21CD5A354C}.Release|Win32.ActiveCfg = Release|Win32
{9633062D-3A3A-4997-8754-8A21CD5A354C}.Release|Win32.Build.0 = Release|Win32
{00B985EA-A5CD-4F24-8B62-5DC87CD4D080}.Debug|Win32.ActiveCfg = Debug|Win32
{00B985EA-A5CD-4F24-8B62-5DC87CD4D080}.Debug|Win32.Build.0 = Debug|Win32
{00B985EA-A5CD-4F24-8B62-5DC87CD4D080}.Release|Win32.ActiveCfg = Release|Win32
{00B985EA-A5CD-4F24-8B62-5DC87CD4D080}.Release|Win32.Build.0 = Release|Win32
{A50234C1-A40D-4782-81CB-9D4549DC9474}.Debug|Win32.ActiveCfg = Debug|Win32
{A50234C1-A40D-4782-81CB-9D4549DC9474}.Debug|Win32.Build.0 = Debug|Win32
{A50234C1-A40D-4782-81CB-9D4549DC9474}.Release|Win32.ActiveCfg = Release|Win32
{A50234C1-A40D-4782-81CB-9D4549DC9474}.Release|Win32.Build.0 = Release|Win32
{63A9D017-1F43-4F1E-8C04-56F8EAABBFC4}.Debug|Win32.ActiveCfg = Debug|Win32
{63A9D017-1F43-4F1E-8C04-56F8EAABBFC4}.Debug|Win32.Build.0 = Debug|Win32
{63A9D017-1F43-4F1E-8C04-56F8EAABBFC4}.Release|Win32.ActiveCfg = Release|Win32
{63A9D017-1F43-4F1E-8C04-56F8EAABBFC4}.Release|Win32.Build.0 = Release|Win32
{FD8895D6-8EE2-4E37-8E76-A642FA1422C1}.Debug|Win32.ActiveCfg = Debug|Win32
{FD8895D6-8EE2-4E37-8E76-A642FA1422C1}.Debug|Win32.Build.0 = Debug|Win32
{FD8895D6-8EE2-4E37-8E76-A642FA1422C1}.Release|Win32.ActiveCfg = Release|Win32
Expand All @@ -65,24 +62,11 @@ Global
{2DCBE71A-A29A-4FE7-A23C-AFA762DF13E1}.Debug|Win32.Build.0 = Debug|Win32
{2DCBE71A-A29A-4FE7-A23C-AFA762DF13E1}.Release|Win32.ActiveCfg = Release|Win32
{2DCBE71A-A29A-4FE7-A23C-AFA762DF13E1}.Release|Win32.Build.0 = Release|Win32
{00B985EA-A5CD-4F24-8B62-5DC87CD4D080}.Debug|Win32.ActiveCfg = Debug|Win32
{00B985EA-A5CD-4F24-8B62-5DC87CD4D080}.Debug|Win32.Build.0 = Debug|Win32
{00B985EA-A5CD-4F24-8B62-5DC87CD4D080}.Release|Win32.ActiveCfg = Release|Win32
{00B985EA-A5CD-4F24-8B62-5DC87CD4D080}.Release|Win32.Build.0 = Release|Win32
{63A9D017-1F43-4F1E-8C04-56F8EAABBFC4}.Debug|Win32.ActiveCfg = Debug|Win32
{63A9D017-1F43-4F1E-8C04-56F8EAABBFC4}.Debug|Win32.Build.0 = Debug|Win32
{63A9D017-1F43-4F1E-8C04-56F8EAABBFC4}.Release|Win32.ActiveCfg = Release|Win32
{63A9D017-1F43-4F1E-8C04-56F8EAABBFC4}.Release|Win32.Build.0 = Release|Win32
{9633062D-3A3A-4997-8754-8A21CD5A354C}.Debug|Win32.ActiveCfg = Debug|Win32
{9633062D-3A3A-4997-8754-8A21CD5A354C}.Debug|Win32.Build.0 = Debug|Win32
{9633062D-3A3A-4997-8754-8A21CD5A354C}.Release|Win32.ActiveCfg = Release|Win32
{9633062D-3A3A-4997-8754-8A21CD5A354C}.Release|Win32.Build.0 = Release|Win32
{B74F9D7B-8A9D-45A0-8D09-973D01314D80}.Debug|Win32.ActiveCfg = Debug|Win32
{B74F9D7B-8A9D-45A0-8D09-973D01314D80}.Debug|Win32.Build.0 = Debug|Win32
{B74F9D7B-8A9D-45A0-8D09-973D01314D80}.Release|Win32.ActiveCfg = Release|Win32
{B74F9D7B-8A9D-45A0-8D09-973D01314D80}.Release|Win32.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {74050F9A-8D08-4A20-978A-DEECBCD4AB9A}
EndGlobalSection
EndGlobal
Loading