Fix problems compiling unittests with a Visual Studio solution.

This commit is contained in:
David Capello 2010-12-11 10:03:59 -03:00
parent 73178cd452
commit bc22007455
2 changed files with 5 additions and 3 deletions

View File

@ -57,4 +57,7 @@ have the source code in a directory called "ase-source-dir"):
opening the solution, etc. opening the solution, etc.
4) When the project is compiled, you can copy "build/src/aseprite.exe" 4) When the project is compiled, you can copy "build/src/aseprite.exe"
file to "ase-source-dir" and execute it. file to "ase-source-dir" and execute it. If you have used a Visual
Studio project, you can copy the whole "data/" directory to
"build/src/RelWithDebInfo/" so you can run/debug the program
from Visual Studio IDE.

View File

@ -283,8 +283,7 @@ foreach(testsourcefile ${tests})
target_link_libraries(${testname} gtest ${all_libs}) target_link_libraries(${testname} gtest ${all_libs})
# Add gtest include directory so we can #include <gtest/gtest.h> in tests source code # Add gtest include directory so we can #include <gtest/gtest.h> in tests source code
set_target_properties(${testname} PROPERTIES include_directories(${CMAKE_SOURCE_DIR}/third_party/gtest/include)
COMPILE_FLAGS "-I${CMAKE_SOURCE_DIR}/third_party/gtest/include")
add_custom_target(run_${testname} add_custom_target(run_${testname}
COMMAND ${testname}) COMMAND ${testname})