MinGW support

git-svn-id: http://www.openmesh.org/svnrepo/OpenMesh/trunk@471 fdac6126-5c0c-442c-9429-916003d36597
This commit is contained in:
Jan Möbius
2011-11-28 13:31:31 +00:00
parent a95789f417
commit 214bc1f278
8 changed files with 47 additions and 22 deletions

View File

@@ -16,7 +16,15 @@ add_subdirectory (VDProgMesh/mkbalancedpm)
add_subdirectory (VDProgMesh/Analyzer)
# Add non ui apps as dependency before fixbundle
if ( WIN32 OR APPLE)
if ( WIN32 )
if ( NOT "${CMAKE_GENERATOR}" MATCHES "MinGW Makefiles" )
# let bundle generation depend on all targets
add_dependencies (fixbundle commandlineDecimater Dualizer mconvert Smoothing commandlineAdaptiveSubdivider commandlineSubdivider mkbalancedpm Analyzer )
endif()
endif()
# Add non ui apps as dependency before fixbundle
if ( APPLE)
# let bundle generation depend on all targets
add_dependencies (fixbundle commandlineDecimater Dualizer mconvert Smoothing commandlineAdaptiveSubdivider commandlineSubdivider mkbalancedpm Analyzer )
endif()

View File

@@ -42,13 +42,14 @@ endif ()
# Add core as dependency before fixbundle
if ( ${PROJECT_NAME} MATCHES "OpenMesh")
# Add core as dependency before fixbundle
if ( WIN32 AND BUILD_APPS )
# let bundle generation depend on targets
add_dependencies (fixbundle OpenMeshCore)
if ( WIN32 AND BUILD_APPS)
if ( NOT "${CMAKE_GENERATOR}" MATCHES "MinGW Makefiles" )
add_dependencies (fixbundle OpenMeshCore)
endif()
endif()
# Add core as dependency before fixbundle
if ( APPLE)
# let bundle generation depend on targets
add_dependencies (fixbundle OpenMeshCore)

View File

@@ -49,9 +49,11 @@ ENDIF(NOT WIN32)
if ( ${PROJECT_NAME} MATCHES "OpenMesh")
if ( WIN32 AND BUILD_APPS )
# let bundle generation depend on target
add_dependencies (fixbundle OpenMeshTools)
if ( WIN32 AND BUILD_APPS)
if ( NOT "${CMAKE_GENERATOR}" MATCHES "MinGW Makefiles" )
# let bundle generation depend on target
add_dependencies (fixbundle OpenMeshTools)
endif()
endif()
@@ -59,12 +61,9 @@ if ( ${PROJECT_NAME} MATCHES "OpenMesh")
if (APPLE)
# let bundle generation depend on target
add_dependencies (fixbundle OpenMeshTools)
endif()
if ( APPLE)
# let bundle generation depend on target
add_dependencies (fixbundle OpenMeshToolsStatic)
endif()
endif()

View File

@@ -45,8 +45,13 @@
#endif
#ifndef WIN32
#include <stdlib.h>
#include <string.h>
#include <stdlib.h>
#include <string.h>
#else
#ifdef __MINGW32__
#include <stdlib.h>
#include <string.h>
#endif
#endif
using namespace std;

View File

@@ -181,7 +181,7 @@ protected:
};
// ----------------------------------------------------------- gettimeofday ----
#elif defined(__GNUC__) || (defined(__INTEL_COMPILER) && !defined(WIN32))
#elif (defined(__GNUC__) || (defined(__INTEL_COMPILER) && !defined(WIN32))) && !defined(__MINGW32__)
# include <sys/time.h>
# include <sys/resource.h>
@@ -268,7 +268,7 @@ Timer::Timer(void)
# else
impl_ = new TimerImplPosix<CLOCK_REALTIME>;
# endif
#elif defined(__GNUC__) || (defined(__INTEL_COMPILER) && !defined(WIN32))
#elif (defined(__GNUC__) || (defined(__INTEL_COMPILER) && !defined(WIN32)) ) && !defined(__MINGW32__)
impl_ = new TimerImplGToD;
#else
impl_ = new TimerImplStd;

View File

@@ -53,6 +53,11 @@
#ifndef WIN32
#include <string.h>
#include <cstdlib>
#else
#if defined(__MINGW32__)
#include <stdlib.h>
#include <string.h>
#endif
#endif
//== NAMESPACES ===============================================================