From a564a30c36f14b537f29318d9f8eab387feb6b4d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20M=C3=B6bius?= Date: Mon, 30 May 2016 13:51:08 +0200 Subject: [PATCH 1/4] Updated changelog --- Doc/changelog.docu | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Doc/changelog.docu b/Doc/changelog.docu index cefdae14..cdb14f60 100644 --- a/Doc/changelog.docu +++ b/Doc/changelog.docu @@ -11,6 +11,7 @@ General Core @@ -28,6 +29,17 @@
  • Some fixes for min gw (Thanks to Xan for the patch)
  • +Infrastructure + + +Documentation + + + From b2f3d5eac4474a1c9e5d2f69319788d5b1346d66 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20M=C3=B6bius?= Date: Mon, 30 May 2016 14:00:43 +0200 Subject: [PATCH 2/4] Several changes to make Mingw happy --- cmake/ACGCommon.cmake | 6 +++--- src/OpenMesh/Core/CMakeLists.txt | 2 +- src/OpenMesh/Tools/CMakeLists.txt | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/cmake/ACGCommon.cmake b/cmake/ACGCommon.cmake index 3eb69f5b..a4419084 100644 --- a/cmake/ACGCommon.cmake +++ b/cmake/ACGCommon.cmake @@ -619,7 +619,7 @@ function (acg_add_library _target _libtype) if (${_libtype} STREQUAL SHAREDANDSTATIC) set (_type SHARED) - if (NOT WIN32) + if (NOT WIN32 OR MINGW) set (_and_static 1) else () set (_and_static 0) @@ -649,7 +649,7 @@ function (acg_add_library _target _libtype) endif () endif () - if (WIN32 OR (APPLE AND NOT ACG_PROJECT_MACOS_BUNDLE)) + if ( (WIN32 AND MSVC) OR (APPLE AND NOT ACG_PROJECT_MACOS_BUNDLE)) if (${_type} STREQUAL SHARED) add_custom_command (TARGET ${_target} POST_BUILD COMMAND ${CMAKE_COMMAND} -E @@ -688,7 +688,7 @@ function (acg_add_library _target _libtype) ${CMAKE_BINARY_DIR}/Build/${ACG_PROJECT_BINDIR}/$) endif () - endif(WIN32 OR (APPLE AND NOT ACG_PROJECT_MACOS_BUNDLE)) + endif( (WIN32 AND MSVC) OR (APPLE AND NOT ACG_PROJECT_MACOS_BUNDLE)) if (_and_static) add_custom_command (TARGET ${_target}Static POST_BUILD diff --git a/src/OpenMesh/Core/CMakeLists.txt b/src/OpenMesh/Core/CMakeLists.txt index f74c41db..9c8c1670 100644 --- a/src/OpenMesh/Core/CMakeLists.txt +++ b/src/OpenMesh/Core/CMakeLists.txt @@ -35,7 +35,7 @@ if ( NOT ${PROJECT_NAME} MATCHES "OpenMesh") endif() -if (WIN32) +if (WIN32 AND NOT MINGW) if ( OPENMESH_BUILD_SHARED ) add_definitions( -DOPENMESHDLL -DBUILDOPENMESHDLL) diff --git a/src/OpenMesh/Tools/CMakeLists.txt b/src/OpenMesh/Tools/CMakeLists.txt index a37785b1..728a367a 100644 --- a/src/OpenMesh/Tools/CMakeLists.txt +++ b/src/OpenMesh/Tools/CMakeLists.txt @@ -25,9 +25,9 @@ acg_append_files (sources "*.cc" ${directories}) #Drop the template only cc files acg_drop_templates(sources) -IF(WIN32) +IF(WIN32 AND NOT MINGW) acg_append_files (sources "*.c" ${directories}) -ENDIF(WIN32) +ENDIF(WIN32 AND NOT MINGW) # Disable Library installation when not building OpenMesh on its own but as part of another project! if ( NOT ${PROJECT_NAME} MATCHES "OpenMesh") From ec12932e73f01e3823bc73ed0205d6dcf1f37d1d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20M=C3=B6bius?= Date: Mon, 30 May 2016 14:02:35 +0200 Subject: [PATCH 3/4] Updated changelog --- Doc/changelog.docu | 1 + 1 file changed, 1 insertion(+) diff --git a/Doc/changelog.docu b/Doc/changelog.docu index cdb14f60..52333fa9 100644 --- a/Doc/changelog.docu +++ b/Doc/changelog.docu @@ -27,6 +27,7 @@ Build System
    • Some fixes for min gw (Thanks to Xan for the patch)
    • +
    • Several changes to support mingw on windows again. (Thanks to Christian Feurer for the patches).
    Infrastructure From ec84b4750aa8a6045d78997d42ac4ac2970a2da3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20M=C3=B6bius?= Date: Mon, 30 May 2016 16:26:01 +0200 Subject: [PATCH 4/4] More MINGW compatibility changes --- src/OpenMesh/Tools/Utils/Timer.cc | 4 ++-- src/OpenMesh/Tools/Utils/getopt.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/OpenMesh/Tools/Utils/Timer.cc b/src/OpenMesh/Tools/Utils/Timer.cc index 122f985e..3a82f4c1 100644 --- a/src/OpenMesh/Tools/Utils/Timer.cc +++ b/src/OpenMesh/Tools/Utils/Timer.cc @@ -88,7 +88,7 @@ public: // compiler and os dependent implementation // ------------------------------------------------------------- windows 32 ---- -#if defined(WIN32) && (defined(_MSC_VER) || defined(__INTEL_COMPILER)) +#if defined(WIN32) && (defined(_MSC_VER) || defined(__INTEL_COMPILER) || defined (__MINGW32__) ) #ifndef DOXY_IGNORE_THIS #include @@ -263,7 +263,7 @@ void TimerImplStd::stop(void) Timer::Timer(void) { -#if defined(WIN32) && defined(_MSC_VER) +#if defined(WIN32) && (defined(_MSC_VER) || defined(__INTEL_COMPILER) || defined(__MINGW32__)) impl_ = new TimerImplWin32; #elif defined(__GNUC__) && defined(__POSIX__) // CLOCK_REALTIME diff --git a/src/OpenMesh/Tools/Utils/getopt.h b/src/OpenMesh/Tools/Utils/getopt.h index a156402e..59600d73 100644 --- a/src/OpenMesh/Tools/Utils/getopt.h +++ b/src/OpenMesh/Tools/Utils/getopt.h @@ -4,7 +4,7 @@ #include #include -#if defined(WIN32) +#if defined(_MSC_VER) #if defined(__cplusplus) extern "C" {