IF(WIN32)
    SET(gtest_force_shared_crt ON CACHE BOOL "")
    SET(BUILD_SHARED_LIBS ON)
ENDIF()
ADD_SUBDIRECTORY(${SUBJSON_GTEST} gtest)

INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/src)
INCLUDE_DIRECTORIES(${gtest_SOURCE_DIR} ${gtest_SOURCE_DIR}/include)

FILE(GLOB T_SUBJS_SRC t_*.cc)
ADD_EXECUTABLE(subjson-test ${T_SUBJS_SRC})

TARGET_LINK_LIBRARIES(subjson-test subjson gtest gtest_main)
ADD_TEST(NAME all-tests COMMAND $<TARGET_FILE:subjson-test>)

IF(WIN32)
    SET(gtest_force_shared_crt ON CACHE BOOL "")
    SET(BUILD_SHARED_LIBS ON)
ENDIF()
ADD_SUBDIRECTORY(${SUBJSON_GTEST} subjson_gtest)

INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/src)
INCLUDE_DIRECTORIES(${gtest_SOURCE_DIR} ${gtest_SOURCE_DIR}/include)

FILE(GLOB T_SUBJS_SRC t_*.cc)
ADD_EXECUTABLE(subjson-test ${T_SUBJS_SRC})

TARGET_LINK_LIBRARIES(subjson-test subjson gtest gtest_main)
ADD_TEST(NAME all-tests COMMAND $<TARGET_FILE:subjson-test>)

Add gtest as 'subjson_gtest' project.
Add gtest as 'subjson_gtest' project.
