From 06ef752d05e863f642af110753ad2dc27dd58573 Mon Sep 17 00:00:00 2001 From: David Williams Date: Thu, 4 Mar 2010 23:37:38 +0000 Subject: [PATCH] Fixed windows build to install libraries and executables into the same folder. --- CMakeLists.txt | 8 ++++++++ library/PolyVoxCore/include/PolyVoxImpl/TypeDef.h | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 22e55669..07b7ca24 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -25,6 +25,14 @@ ENDIF() FIND_PACKAGE(Doxygen) +IF(WIN32) + #These are used on Windows to ensure that the .exe's and .dll get placed in the ame directory, so that we can run them. + #Note they are actually deprecated in favour of 'RUNTIME_OUTPUT_DIRECTORY' et al, but these replacements apparently don't + #work on Windows. See http://www.vtk.org/Bug/bug_view_advanced_page.php?bug_id=8366 + SET(EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR}) + SET(LIBRARY_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR}) +ENDIF(WIN32) + ADD_SUBDIRECTORY(library) OPTION(ENABLE_EXAMPLES "Should the examples be built" ON) diff --git a/library/PolyVoxCore/include/PolyVoxImpl/TypeDef.h b/library/PolyVoxCore/include/PolyVoxImpl/TypeDef.h index b68f7353..f011b159 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 #Should be is Visual studio (to allow MinGW) +#ifdef WIN32 //Should be is Visual studio (to allow MinGW) #ifdef POLYVOXCORE_EXPORT #define POLYVOXCORE_API __declspec(dllexport) #else