Commit 1e4fc25f authored by Philip Quinn's avatar Philip Quinn

CMake: Fix paths to gtest libraries for the Xcode generator.

parent 4d452c37
......@@ -25,6 +25,9 @@ if(BUILD_TESTING)
if(CMAKE_GENERATOR MATCHES "Visual Studio.*")
set_target_properties(gtest PROPERTIES IMPORTED_LOCATION_DEBUG "${binary_dir}/Debug/gtest.lib")
set_target_properties(gtest PROPERTIES IMPORTED_LOCATION_RELEASE "${binary_dir}/Release/gtest.lib")
elseif(CMAKE_GENERATOR STREQUAL Xcode)
set_target_properties(gtest PROPERTIES IMPORTED_LOCATION_DEBUG "${binary_dir}/Debug/libgtest.a")
set_target_properties(gtest PROPERTIES IMPORTED_LOCATION_RELEASE "${binary_dir}/Release/libgtest.a")
else()
set_target_properties(gtest PROPERTIES IMPORTED_LOCATION "${binary_dir}/libgtest.a")
endif()
......@@ -35,6 +38,9 @@ if(BUILD_TESTING)
if(CMAKE_GENERATOR MATCHES "Visual Studio.*")
set_target_properties(gtest_main PROPERTIES IMPORTED_LOCATION_DEBUG "${binary_dir}/Debug/gtest_main.lib")
set_target_properties(gtest_main PROPERTIES IMPORTED_LOCATION_RELEASE "${binary_dir}/Release/gtest_main.lib")
elseif(CMAKE_GENERATOR STREQUAL Xcode)
set_target_properties(gtest_main PROPERTIES IMPORTED_LOCATION_DEBUG "${binary_dir}/Debug/libgtest_main.a")
set_target_properties(gtest_main PROPERTIES IMPORTED_LOCATION_RELEASE "${binary_dir}/Release/libgtest_main.a")
else()
set_target_properties(gtest_main PROPERTIES IMPORTED_LOCATION "${binary_dir}/libgtest_main.a")
endif()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment