Tell CTest the correct location of the test binaries on Windows.

This commit is contained in:
Matt Williams
2010-03-05 12:24:46 +00:00
parent 06ef752d05
commit 9d03360436
2 changed files with 9 additions and 1 deletions

View File

@ -31,6 +31,9 @@ IF(WIN32)
#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})
#These are what _should_ be set. If we require 2.8 then test it with these.
#SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
#SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
ENDIF(WIN32)
ADD_SUBDIRECTORY(library)

View File

@ -7,7 +7,12 @@ MACRO(CREATE_TEST headerfile sourcefile executablename)
QT4_WRAP_CPP(test_moc_SRCS ${headerfile})
ADD_EXECUTABLE(${executablename} ${sourcefile} ${test_moc_SRCS})
TARGET_LINK_LIBRARIES(${executablename} PolyVoxCore PolyVoxUtil ${QT_LIBRARIES})
#HACK. This is needed since everything is built in the base dir in Windows. As of 2.8 we should change this.
IF(WIN32)
SET(LATEST_TEST ${EXECUTABLE_OUTPUT_PATH}/${executablename})
ELSE(WIN32)
SET(LATEST_TEST ${CMAKE_CURRENT_BINARY_DIR}/${executablename})
ENDIF(WIN32)
ENDMACRO(CREATE_TEST)
# Find the QTestLib stuff