mirror of
https://github.com/microsoft/vcpkg.git
synced 2025-01-01 21:58:55 +08:00
595363d842
* [mathgl]Add function declare, change member function name, add link lib in Windows. * [mathgl]Determine whether there is a file then duplicate.
88 lines
3.2 KiB
Diff
88 lines
3.2 KiB
Diff
diff --git a/mgllab/CMakeLists.txt b/mgllab/CMakeLists.txt
|
|
index 1649104..eeec1c1 100644
|
|
--- a/mgllab/CMakeLists.txt
|
|
+++ b/mgllab/CMakeLists.txt
|
|
@@ -38,7 +38,11 @@ if(MGL_HAVE_FLTK)
|
|
set(mgllab_src ${mgllab_src} mgllab.rc)
|
|
endif(WIN32)
|
|
add_executable(mgllab ${mgllab_src} ${mgllab_hdr})
|
|
- target_link_libraries(mgllab mgl mgl-fltk ${FLTK_LIBRARIES})
|
|
+ if(WIN32)
|
|
+ target_link_libraries(mgllab mgl mgl-fltk mgl-fltk-static mgl-static getopt-static ${FLTK_LIBRARIES})
|
|
+ else(WIN32)
|
|
+ target_link_libraries(mgllab mgl mgl-fltk ${FLTK_LIBRARIES})
|
|
+ endif(WIN32)
|
|
install(
|
|
TARGETS mgllab
|
|
RUNTIME DESTINATION bin )
|
|
diff --git a/mgllab/table.cpp b/mgllab/table.cpp
|
|
index 5243549..23eebe5 100644
|
|
--- a/mgllab/table.cpp
|
|
+++ b/mgllab/table.cpp
|
|
@@ -559,8 +559,13 @@ public:
|
|
o->tooltip(_("Change data values and close this window"));
|
|
w->set_modal(); w->end();
|
|
}
|
|
- double min() { return wmin->value(); }
|
|
- double max() { return wmax->value(); }
|
|
+ #if WIN32
|
|
+ double _min() { return wmin->value(); }
|
|
+ double _max() { return wmax->value(); }
|
|
+ #else
|
|
+ double min() { return wmin->value(); }
|
|
+ double max() { return wmax->value(); }
|
|
+ #endif
|
|
int sym() { return wsym->value(); }
|
|
bool ok() { return !result.empty(); }
|
|
void cb_ok()
|
|
@@ -581,8 +586,14 @@ void fill_cb(Fl_Widget*, void*v)
|
|
HMDT d = dynamic_cast<HMDT>(e->var);
|
|
HADT c = dynamic_cast<HADT>(e->var);
|
|
char ch = nrm_dlg.result[0];
|
|
- if(d) { d->Fill(nrm_dlg.min(),nrm_dlg.max(),ch); e->refresh(); }
|
|
- if(c) { c->Fill(nrm_dlg.min(),nrm_dlg.max(),ch); e->refresh(); }
|
|
+ #if WIN32
|
|
+ if(d) { d->Fill(nrm_dlg._min(),nrm_dlg._max(),ch); e->refresh(); }
|
|
+ if(c) { c->Fill(nrm_dlg._min(),nrm_dlg._max(),ch); e->refresh(); }
|
|
+ #else
|
|
+ if(d) { d->Fill(nrm_dlg.min(),nrm_dlg.max(),ch); e->refresh(); }
|
|
+ if(c) { c->Fill(nrm_dlg.min(),nrm_dlg.max(),ch); e->refresh(); }
|
|
+ #endif
|
|
+
|
|
}
|
|
}
|
|
//-----------------------------------------------------------------------------
|
|
@@ -594,8 +605,13 @@ void normal_cb(Fl_Widget*, void*v)
|
|
{
|
|
HMDT d = dynamic_cast<HMDT>(e->var);
|
|
HADT c = dynamic_cast<HADT>(e->var);
|
|
- if(d) { d->Norm(nrm_dlg.min(),nrm_dlg.max(),nrm_dlg.sym()); e->refresh(); }
|
|
- if(c) { c->Fill(nrm_dlg.min(),nrm_dlg.max(),nrm_dlg.sym()); e->refresh(); }
|
|
+ #if WIN32
|
|
+ if(d) { d->Norm(nrm_dlg._min(),nrm_dlg._max(),nrm_dlg.sym()); e->refresh(); }
|
|
+ if(c) { c->Fill(nrm_dlg._min(),nrm_dlg._max(),nrm_dlg.sym()); e->refresh(); }
|
|
+ #else
|
|
+ if(d) { d->Norm(nrm_dlg.min(),nrm_dlg.max(),nrm_dlg.sym()); e->refresh(); }
|
|
+ if(c) { c->Fill(nrm_dlg.min(),nrm_dlg.max(),nrm_dlg.sym()); e->refresh(); }
|
|
+ #endif
|
|
}
|
|
}
|
|
//-----------------------------------------------------------------------------
|
|
diff --git a/utils/mglview.cpp b/utils/mglview.cpp
|
|
index d360df3..15eeb3e 100644
|
|
--- a/utils/mglview.cpp
|
|
+++ b/utils/mglview.cpp
|
|
@@ -29,6 +29,12 @@
|
|
#include "mgl2/qt.h"
|
|
#endif
|
|
//-----------------------------------------------------------------------------
|
|
+#if WIN32
|
|
+ MGL_EXPORT void (*mgl_ask_func)(const wchar_t *, wchar_t *)=0;
|
|
+ MGL_EXPORT void (*mgl_progress_func)(int value, int maximal, HMGL)=0;
|
|
+ MGL_EXPORT std::string mglGlobalMess;
|
|
+#endif
|
|
+//-----------------------------------------------------------------------------
|
|
std::wstring str, opt;
|
|
std::vector<std::string> anim;
|
|
mglParse p(true);
|