diff --git a/CMakeLists.txt b/CMakeLists.txt index 5516dbdb..4b117f00 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -175,6 +175,10 @@ if (NOT NO_DEBUG) set(CMAKE_VALA_FLAGS "${CMAKE_VALA_FLAGS} -g") endif (NOT NO_DEBUG) +if (WIN32) + set(CMAKE_VALA_FLAGS "${CMAKE_VALA_FLAGS} --define=_WIN32") +endif(WIN32) + set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}) set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}) diff --git a/libdino/src/service/util.vala b/libdino/src/service/util.vala index 9fe3029c..bb7198d3 100644 --- a/libdino/src/service/util.vala +++ b/libdino/src/service/util.vala @@ -29,7 +29,7 @@ public class Util { public static string get_content_type(FileInfo fileInfo) { -//#if WIN32 +#if _WIN32 string fileName = fileInfo.get_name(); int fileNameLength = fileName.length; int extIndex = fileName.index_of("."); @@ -42,8 +42,7 @@ public class Util { return mime_type; } } -//#endif - +#endif return fileInfo.get_content_type(); } }