Some little fixes for compilation on Windows

This commit is contained in:
David Sansome 2010-03-31 02:55:05 +00:00
parent 4c42813d9f
commit b8be261700
2 changed files with 8 additions and 3 deletions

View File

@ -80,7 +80,7 @@ if (WIN32)
# RC compiler
string(REPLACE "gcc" "windres" CMAKE_RC_COMPILER_INIT ${CMAKE_C_COMPILER})
enable_language(RC)
SET(CMAKE_RC_COMPILE_OBJECT "<CMAKE_RC_COMPILER> -O coff -o <OBJECT> <SOURCE>")
SET(CMAKE_RC_COMPILE_OBJECT "<CMAKE_RC_COMPILER> -O coff -o <OBJECT> <SOURCE> -I../../dist/windows")
endif(WIN32)
add_definitions(-DQXT_STATIC -DBUILD_QXT_GUI -DBUILD_QXT_CORE)

View File

@ -76,8 +76,13 @@ macro(add_test_file test_source gui_required)
target_link_libraries(${TEST_NAME} test_main)
endif (GUI_REQUIRED)
add_custom_command(TARGET test POST_BUILD
COMMAND ./${TEST_NAME})
if (WIN32)
add_custom_command(TARGET test POST_BUILD
COMMAND ./${TEST_NAME}.exe)
else (WIN32)
add_custom_command(TARGET test POST_BUILD
COMMAND ./${TEST_NAME})
endif (WIN32)
add_dependencies(build_tests ${TEST_NAME})
endmacro (add_test_file)