Commit 0ab69b9cfd5bbcb1a32cb8227b0b31885e8395a8

Authored by Moritz W
Committed by Moritz Wirger
1 parent f3ba2022

Fix problem when installing with tests activated, so gtest and gmock are not installed

hueplusplus/test/CMakeLists.txt
... ... @@ -19,14 +19,14 @@ set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
19 19  
20 20 # Add googletest directly to our build. This defines
21 21 # the gtest and gtest_main targets.
22   -add_subdirectory(${CMAKE_BINARY_DIR}/googletest-src
23   - ${CMAKE_BINARY_DIR}/googletest-build)
  22 +add_subdirectory(${CMAKE_BINARY_DIR}/googletest-src EXCLUDE_FROM_ALL
  23 + ${CMAKE_BINARY_DIR}/googletest-build EXCLUDE_FROM_ALL)
24 24  
25 25 # The gtest/gtest_main targets carry header search path
26 26 # dependencies automatically when using CMake 2.8.11 or
27 27 # later. Otherwise we have to add them here ourselves.
28 28 if (CMAKE_VERSION VERSION_LESS 2.8.11)
29   - include_directories("${gtest_SOURCE_DIR}/include")
  29 + include_directories("${gtest_SOURCE_DIR}/include" EXCLUDE_FROM_ALL)
30 30 endif()
31 31  
32 32 file(GLOB TEST_SOURCES test_*)
... ...