mirror of https://github.com/CGAL/cgal
fix for windows
This commit is contained in:
parent
1d640c982f
commit
f6e27d411b
|
|
@ -745,9 +745,12 @@ namespace CGAL {
|
||||||
inline std::string data_file_path(const std::string& filename)
|
inline std::string data_file_path(const std::string& filename)
|
||||||
{
|
{
|
||||||
const char* cgal_dir=nullptr;
|
const char* cgal_dir=nullptr;
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
#ifdef _MSC_VER
|
||||||
_dupenv_s( &cgal_dir, nullptr, "CGAL_DATA_DIR");
|
char* cgal_dir_windows=nullptr;
|
||||||
|
_dupenv_s( &cgal_dir_windows, nullptr, "CGAL_DATA_DIR");
|
||||||
|
if (cgal_dir_windows!=nullptr)
|
||||||
|
{ cgal_dir=cgal_dir_windows; }
|
||||||
#else
|
#else
|
||||||
cgal_dir=getenv("CGAL_DATA_DIR");
|
cgal_dir=getenv("CGAL_DATA_DIR");
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -775,8 +778,8 @@ inline std::string data_file_path(const std::string& filename)
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
#ifdef _MSC_VER
|
||||||
if (cgal_dir!=nullptr)
|
if (cgal_dir_windows!=nullptr)
|
||||||
{ free(cgal_dir); }
|
{ free(cgal_dir_windows); }
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return res;
|
return res;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue