Updated base builds to work with local repo as well as with vcpkg
This commit is contained in:
parent
672c78d290
commit
80ff9f279d
4 changed files with 47 additions and 14 deletions
|
|
@ -1,6 +1,11 @@
|
|||
|
||||
enable_testing()
|
||||
find_package(GTest CONFIG REQUIRED)
|
||||
if(KOMPUTE_OPT_REPO_SUBMODULE_BUILD)
|
||||
add_subdirectory(${PROJECT_SOURCE_DIR}/external/googletest EXCLUDE_FROM_ALL
|
||||
${CMAKE_CURRENT_BINARY_DIR}/kompute_googletest)
|
||||
else()
|
||||
find_package(GTest CONFIG REQUIRED)
|
||||
endif()
|
||||
|
||||
file(GLOB test_kompute_CPP
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/*.cpp"
|
||||
|
|
@ -14,9 +19,17 @@ target_include_directories(
|
|||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/compiled_shaders_include>
|
||||
)
|
||||
|
||||
target_link_libraries(test_kompute PRIVATE
|
||||
GTest::gtest
|
||||
GTest::gmock)
|
||||
if(KOMPUTE_OPT_REPO_SUBMODULE_BUILD)
|
||||
target_include_directories(
|
||||
test_kompute PRIVATE
|
||||
${gtest_SOURCE_DIR}/include)
|
||||
|
||||
target_link_libraries(test_kompute PRIVATE
|
||||
gtest_main)
|
||||
else()
|
||||
target_link_libraries(test_kompute PRIVATE
|
||||
GTest::gtest)
|
||||
endif()
|
||||
|
||||
target_link_libraries(test_kompute PRIVATE kompute)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue