From 5db2913e419d086d7ca5f68ae12376daf3a68a93 Mon Sep 17 00:00:00 2001 From: Matt Williams Date: Thu, 4 Mar 2010 22:01:06 +0000 Subject: [PATCH] Make it work slightly better in Windows. I tried with MinGW in Qt Creator and it now compiles. There's a crash though, possibly due to the TypeDef.h stuff. I need to recompile Qt in VS before I can try it in VS 2010. --- library/PolyVoxCore/CMakeLists.txt | 6 +++--- library/PolyVoxCore/include/PolyVoxImpl/TypeDef.h | 2 +- library/PolyVoxUtil/CMakeLists.txt | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/library/PolyVoxCore/CMakeLists.txt b/library/PolyVoxCore/CMakeLists.txt index 9791e00a..a594fe71 100644 --- a/library/PolyVoxCore/CMakeLists.txt +++ b/library/PolyVoxCore/CMakeLists.txt @@ -73,9 +73,9 @@ INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/include) #Build ADD_LIBRARY(PolyVoxCore SHARED ${CORE_SRC_FILES} ${CORE_INC_FILES} ${IMPL_SRC_FILES} ${IMPL_INC_FILES}) SET_TARGET_PROPERTIES(PolyVoxCore PROPERTIES VERSION ${POLYVOX_VERSION} SOVERSION ${POLYVOX_VERSION_MAJOR}) -IF(WIN32) - SET_TARGET_PROPERTIES(PolyVoxCore PROPERTIES COMPILE_FLAGS "/wd4251") #Disable warning on STL exports -ENDIF(WIN32) +IF(MSVC) + SET_TARGET_PROPERTIES(PolyVoxCore PROPERTIES COMPILE_FLAGS "/wd4251") #Disable warning on STL exports +ENDIF(MSVC) #Install IF(WIN32) diff --git a/library/PolyVoxCore/include/PolyVoxImpl/TypeDef.h b/library/PolyVoxCore/include/PolyVoxImpl/TypeDef.h index 727548a4..b68f7353 100644 --- a/library/PolyVoxCore/include/PolyVoxImpl/TypeDef.h +++ b/library/PolyVoxCore/include/PolyVoxImpl/TypeDef.h @@ -26,7 +26,7 @@ freely, subject to the following restrictions: #ifndef __PolyVox_TypeDef_H__ #define __PolyVox_TypeDef_H__ -#ifdef WIN32 +#ifdef WIN32 #Should be is Visual studio (to allow MinGW) #ifdef POLYVOXCORE_EXPORT #define POLYVOXCORE_API __declspec(dllexport) #else diff --git a/library/PolyVoxUtil/CMakeLists.txt b/library/PolyVoxUtil/CMakeLists.txt index a83a4ea2..9adcb9f2 100644 --- a/library/PolyVoxUtil/CMakeLists.txt +++ b/library/PolyVoxUtil/CMakeLists.txt @@ -35,9 +35,9 @@ LINK_DIRECTORIES(${PolyVoxCore_BINARY_DIR}/debug ${PolyVoxCore_BINARY_DIR}/relea ADD_LIBRARY(PolyVoxUtil SHARED ${UTIL_SRC_FILES} ${UTIL_INC_FILES}) TARGET_LINK_LIBRARIES(PolyVoxUtil debug PolyVoxCore_d optimized PolyVoxCore) SET_TARGET_PROPERTIES(PolyVoxUtil PROPERTIES VERSION ${POLYVOX_VERSION} SOVERSION ${POLYVOX_VERSION_MAJOR}) -IF(WIN32) +IF(MSVC) SET_TARGET_PROPERTIES(PolyVoxUtil PROPERTIES COMPILE_FLAGS "/wd4251") #Disable warning on STL exports -ENDIF(WIN32) +ENDIF(MSVC) #Install IF(WIN32) @@ -65,4 +65,4 @@ ELSE(WIN32) #Install the core header files, including the ones in the PolyVoxImpl subfolder. INSTALL(DIRECTORY include/ DESTINATION include/PolyVoxUtil COMPONENT development PATTERN "*.svn*" EXCLUDE) -ENDIF(WIN32) \ No newline at end of file +ENDIF(WIN32)