Fix qt pro for windows
parent
38b1290b22
commit
6bd08068b2
|
@ -2,6 +2,15 @@ WIP...
|
||||||
|
|
||||||
Build
|
Build
|
||||||
--------
|
--------
|
||||||
|
Mac
|
||||||
```
|
```
|
||||||
$ qmake -spec macx-xcode
|
$ qmake -spec macx-xcode
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Windows
|
||||||
|
```
|
||||||
|
From Start Menu, Open Visual Studio 2017 Tools Command Prompt:
|
||||||
|
C:\Program Files\Microsoft Visual Studio\2017\Community>cd C:\Users\IEUser\Desktop\dust3d
|
||||||
|
C:\Users\IEUser\Desktop\dust3d>qmake DEFINES+=BOOST_INCLUDEDIR=C:\dev\boost_1_55_0\boost_1_55_0 DEFINES+=CGAL_DIR=C:\dev\CGAL-4.11.1
|
||||||
|
C:\Users\IEUser\Desktop\dust3d>nmake -f Makefile.Release
|
||||||
|
```
|
66
dust3d.pro
66
dust3d.pro
|
@ -1,7 +1,18 @@
|
||||||
QT += core widgets opengl
|
QT += core widgets opengl
|
||||||
CONFIG += debug
|
CONFIG += release
|
||||||
RESOURCES += resources.qrc
|
RESOURCES += resources.qrc
|
||||||
|
|
||||||
|
BOOST_INCLUDEDIR = $$(BOOST_INCLUDEDIR)
|
||||||
|
CGAL_DIR = $$(CGAL_DIR)
|
||||||
|
|
||||||
|
isEmpty(BOOST_INCLUDEDIR) {
|
||||||
|
error("No BOOST_INCLUDEDIR define found in enviroment variables")
|
||||||
|
}
|
||||||
|
|
||||||
|
isEmpty(CGAL_DIR) {
|
||||||
|
error("No CGAL_DIR define found in enviroment variables")
|
||||||
|
}
|
||||||
|
|
||||||
HUMAN_VERSION = "0.0-alpha1"
|
HUMAN_VERSION = "0.0-alpha1"
|
||||||
REPOSITORY_URL = "https://github.com/huxingyi/dust3d"
|
REPOSITORY_URL = "https://github.com/huxingyi/dust3d"
|
||||||
ISSUES_URL = "https://github.com/huxingyi/dust3d/issues"
|
ISSUES_URL = "https://github.com/huxingyi/dust3d/issues"
|
||||||
|
@ -85,19 +96,54 @@ SOURCES += src/main.cpp
|
||||||
|
|
||||||
HEADERS += src/version.h
|
HEADERS += src/version.h
|
||||||
|
|
||||||
INCLUDEPATH += ../meshlite/include
|
win32 {
|
||||||
LIBS += -L../meshlite/target/debug -lmeshlite
|
contains(QMAKE_TARGET.arch, x86_64) {
|
||||||
|
MESHLITE_DIR = thirdparty/meshlite/meshlite_unstable_vc14_x64
|
||||||
|
} else {
|
||||||
|
MESHLITE_DIR = thirdparty/meshlite/meshlite_unstable_vc14_x86
|
||||||
|
}
|
||||||
|
MESHLITE_LIBNAME = meshlite.dll
|
||||||
|
GMP_LIBNAME = libgmp-10
|
||||||
|
MPFR_LIBNAME = libmpfr-4
|
||||||
|
CGAL_LIBNAME = CGAL-vc140-mt-4.11.1
|
||||||
|
CGAL_INCLUDEDIR = $$CGAL_DIR\include
|
||||||
|
CGAL_BUILDINCLUDEDIR = $$CGAL_DIR\build\include
|
||||||
|
CGAL_LIBDIR = $$CGAL_DIR\build\lib
|
||||||
|
GMP_INCLUDEDIR = $$CGAL_DIR\auxiliary\gmp\include
|
||||||
|
GMP_LIBDIR = $$CGAL_DIR\auxiliary\gmp\lib
|
||||||
|
MPFR_INCLUDEDIR = $$GMP_INCLUDEDIR
|
||||||
|
MPFR_LIBDIR = $$GMP_LIBDIR
|
||||||
|
}
|
||||||
|
|
||||||
INCLUDEPATH += /usr/local/opt/boost/include
|
unix {
|
||||||
|
MESHLITE_DIR = thirdparty/meshlite
|
||||||
|
MESHLITE_LIBNAME = meshlite
|
||||||
|
GMP_LIBNAME = gmp
|
||||||
|
MPFR_LIBNAME = mpfr
|
||||||
|
CGAL_LIBNAME = cgal
|
||||||
|
CGAL_INCLUDEDIR = $$CGAL_DIR/include
|
||||||
|
CGAL_BUILDINCLUDEDIR = $$CGAL_DIR/build/include
|
||||||
|
CGAL_LIBDIR = $$CGAL_DIR/build/lib
|
||||||
|
GMP_INCLUDEDIR = $$CGAL_DIR/auxiliary/gmp/include
|
||||||
|
GMP_LIBDIR = $$CGAL_DIR/auxiliary/gmp/lib
|
||||||
|
MPFR_INCLUDEDIR = $$GMP_INCLUDEDIR
|
||||||
|
MPFR_LIBDIR = $$GMP_LIBDIR
|
||||||
|
}
|
||||||
|
|
||||||
INCLUDEPATH += /usr/local/opt/gmp/include
|
INCLUDEPATH += $$MESHLITE_DIR
|
||||||
LIBS += -L/usr/local/opt/gmp/lib -lgmp
|
LIBS += -L$$MESHLITE_DIR -l$$MESHLITE_LIBNAME
|
||||||
|
|
||||||
INCLUDEPATH += /usr/local/opt/mpfr/include
|
INCLUDEPATH += $$BOOST_INCLUDEDIR
|
||||||
LIBS += -L/usr/local/opt/mpfr/lib -lmpfr
|
|
||||||
|
|
||||||
INCLUDEPATH += /usr/local/opt/cgal/include
|
INCLUDEPATH += $$GMP_INCLUDEDIR
|
||||||
LIBS += -L/usr/local/opt/cgal/lib -lCGAL
|
LIBS += -L$$GMP_LIBDIR -l$$GMP_LIBNAME
|
||||||
|
|
||||||
|
INCLUDEPATH += $$MPFR_INCLUDEDIR
|
||||||
|
LIBS += -L$$MPFR_LIBDIR -l$$MPFR_LIBNAME
|
||||||
|
|
||||||
|
INCLUDEPATH += $$CGAL_INCLUDEDIR
|
||||||
|
INCLUDEPATH += $$CGAL_BUILDINCLUDEDIR
|
||||||
|
LIBS += -L$$CGAL_LIBDIR -l$$CGAL_LIBNAME
|
||||||
|
|
||||||
target.path = ./
|
target.path = ./
|
||||||
INSTALLS += target
|
INSTALLS += target
|
||||||
|
|
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1,50 @@
|
||||||
|
#ifndef MESHLITE_H
|
||||||
|
#define MESHLITE_H
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
void *meshlite_create_context(void);
|
||||||
|
int meshlite_destroy_context(void *context);
|
||||||
|
int meshlite_merge(void *context, int first_mesh_id, int second_mesh_id);
|
||||||
|
int meshlite_import(void *context, const char *filename);
|
||||||
|
int meshlite_export(void *context, int mesh_id, const char *filename);
|
||||||
|
int meshlite_clone(void *context, int from_mesh_id);
|
||||||
|
int meshlite_triangulate(void *context, int mesh_id);
|
||||||
|
int meshlite_is_triangulated_manifold(void *context, int mesh_id);
|
||||||
|
int meshlite_subdivide(void *context, int mesh_id);
|
||||||
|
int meshlite_union(void *context, int first_mesh_id, int second_mesh_id);
|
||||||
|
int meshlite_diff(void *context, int first_mesh_id, int second_mesh_id);
|
||||||
|
int meshlite_intersect(void *context, int first_mesh_id, int second_mesh_id);
|
||||||
|
int meshlite_scale(void *context, int mesh_id, float value);
|
||||||
|
int meshlite_get_vertex_count(void *context, int mesh_id);
|
||||||
|
int meshlite_get_vertex_position_array(void *context, int mesh_id, float *buffer, int max_buffer_len);
|
||||||
|
int meshlite_get_face_count(void *context, int mesh_id);
|
||||||
|
int meshlite_get_face_index_array(void *context, int mesh_id, int *buffer, int max_buffer_len);
|
||||||
|
int meshlite_get_triangle_index_array(void *context, int mesh_id, int *buffer, int max_buffer_len);
|
||||||
|
int meshlite_get_triangle_normal_array(void *context, int mesh_id, float *buffer, int max_buffer_len);
|
||||||
|
int meshlite_get_edge_count(void *context, int mesh_id);
|
||||||
|
int meshlite_get_edge_index_array(void *context, int mesh_id, int *buffer, int max_buffer_len);
|
||||||
|
int meshlite_get_edge_normal_array(void *context, int mesh_id, float *buffer, int max_buffer_len);
|
||||||
|
int meshlite_get_halfedge_count(void *context, int mesh_id);
|
||||||
|
int meshlite_get_halfedge_index_array(void *context, int mesh_id, int *buffer, int max_buffer_len);
|
||||||
|
int meshlite_get_halfedge_normal_array(void *context, int mesh_id, float *buffer, int max_buffer_len);
|
||||||
|
int meshlite_build(void *context, float *vertex_position_buffer, int vertex_count, int *face_index_buffer, int face_index_buffer_len);
|
||||||
|
int meshlite_bmesh_create(void *context);
|
||||||
|
int meshlite_bmesh_enable_debug(void *context, int bmesh_id, int enable);
|
||||||
|
int meshlite_bmesh_add_node(void *context, int bmesh_id, float x, float y, float z, float radius);
|
||||||
|
int meshlite_bmesh_add_edge(void *context, int bmesh_id, int first_node_id, int second_node_id);
|
||||||
|
int meshlite_bmesh_generate_mesh(void *context, int bmesh_id);
|
||||||
|
int meshlite_bmesh_get_node_base_norm(void *context, int bmesh_id, int node_id, float *norm_buffer);
|
||||||
|
int meshlite_bmesh_destroy(void *context, int bmesh_id);
|
||||||
|
int meshlite_bmesh_error_count(void *context, int bmesh_id);
|
||||||
|
int meshlite_combine_adj_faces(void *context, int mesh_id);
|
||||||
|
int meshlite_combine_coplanar_faces(void *context, int mesh_id);
|
||||||
|
int meshlite_trim(void *context, int mesh_id, int normalize);
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif
|
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1,50 @@
|
||||||
|
#ifndef MESHLITE_H
|
||||||
|
#define MESHLITE_H
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
void *meshlite_create_context(void);
|
||||||
|
int meshlite_destroy_context(void *context);
|
||||||
|
int meshlite_merge(void *context, int first_mesh_id, int second_mesh_id);
|
||||||
|
int meshlite_import(void *context, const char *filename);
|
||||||
|
int meshlite_export(void *context, int mesh_id, const char *filename);
|
||||||
|
int meshlite_clone(void *context, int from_mesh_id);
|
||||||
|
int meshlite_triangulate(void *context, int mesh_id);
|
||||||
|
int meshlite_is_triangulated_manifold(void *context, int mesh_id);
|
||||||
|
int meshlite_subdivide(void *context, int mesh_id);
|
||||||
|
int meshlite_union(void *context, int first_mesh_id, int second_mesh_id);
|
||||||
|
int meshlite_diff(void *context, int first_mesh_id, int second_mesh_id);
|
||||||
|
int meshlite_intersect(void *context, int first_mesh_id, int second_mesh_id);
|
||||||
|
int meshlite_scale(void *context, int mesh_id, float value);
|
||||||
|
int meshlite_get_vertex_count(void *context, int mesh_id);
|
||||||
|
int meshlite_get_vertex_position_array(void *context, int mesh_id, float *buffer, int max_buffer_len);
|
||||||
|
int meshlite_get_face_count(void *context, int mesh_id);
|
||||||
|
int meshlite_get_face_index_array(void *context, int mesh_id, int *buffer, int max_buffer_len);
|
||||||
|
int meshlite_get_triangle_index_array(void *context, int mesh_id, int *buffer, int max_buffer_len);
|
||||||
|
int meshlite_get_triangle_normal_array(void *context, int mesh_id, float *buffer, int max_buffer_len);
|
||||||
|
int meshlite_get_edge_count(void *context, int mesh_id);
|
||||||
|
int meshlite_get_edge_index_array(void *context, int mesh_id, int *buffer, int max_buffer_len);
|
||||||
|
int meshlite_get_edge_normal_array(void *context, int mesh_id, float *buffer, int max_buffer_len);
|
||||||
|
int meshlite_get_halfedge_count(void *context, int mesh_id);
|
||||||
|
int meshlite_get_halfedge_index_array(void *context, int mesh_id, int *buffer, int max_buffer_len);
|
||||||
|
int meshlite_get_halfedge_normal_array(void *context, int mesh_id, float *buffer, int max_buffer_len);
|
||||||
|
int meshlite_build(void *context, float *vertex_position_buffer, int vertex_count, int *face_index_buffer, int face_index_buffer_len);
|
||||||
|
int meshlite_bmesh_create(void *context);
|
||||||
|
int meshlite_bmesh_enable_debug(void *context, int bmesh_id, int enable);
|
||||||
|
int meshlite_bmesh_add_node(void *context, int bmesh_id, float x, float y, float z, float radius);
|
||||||
|
int meshlite_bmesh_add_edge(void *context, int bmesh_id, int first_node_id, int second_node_id);
|
||||||
|
int meshlite_bmesh_generate_mesh(void *context, int bmesh_id);
|
||||||
|
int meshlite_bmesh_get_node_base_norm(void *context, int bmesh_id, int node_id, float *norm_buffer);
|
||||||
|
int meshlite_bmesh_destroy(void *context, int bmesh_id);
|
||||||
|
int meshlite_bmesh_error_count(void *context, int bmesh_id);
|
||||||
|
int meshlite_combine_adj_faces(void *context, int mesh_id);
|
||||||
|
int meshlite_combine_coplanar_faces(void *context, int mesh_id);
|
||||||
|
int meshlite_trim(void *context, int mesh_id, int normalize);
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif
|
Loading…
Reference in New Issue