diff options
author | Daniil Cherednik <dan.cherednik@gmail.com> | 2023-11-18 22:29:30 +0100 |
---|---|---|
committer | Daniil Cherednik <dan.cherednik@gmail.com> | 2023-11-19 00:22:33 +0100 |
commit | 5a5274daecb00b0c4df1b25dc57a65f3f44fe9a8 (patch) | |
tree | 25acd680fa565ecd60cee3dfba1a85c0221cf430 /CMakeLists.txt | |
parent | 9d1c670a6ad2eefda7180640c5bf0fcdb01b3e0f (diff) | |
download | atracdenc-5a5274daecb00b0c4df1b25dc57a65f3f44fe9a8.tar.gz |
Get rid of gtest files. Use system package if available.
(cherry picked from commit ff401eccf9f4d37193751633c2cf9beada2fd754)
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 7d07bfa..13ac4f9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3,9 +3,13 @@ CMAKE_MINIMUM_REQUIRED(VERSION 3.1) project(atracdenc) if (UNIX) - add_subdirectory(3rd/gtest-1.7.0) - add_subdirectory(test) - enable_testing() + find_package(GTest) + if (GTest_FOUND) + add_subdirectory(test) + enable_testing() + else() + message("gtest library has not been found, skipping ut...") + endif() if (NOT DEFINED CMAKE_INSTALL_MANDIR) set(CMAKE_INSTALL_MANDIR ${CMAKE_INSTALL_PREFIX}/share/man) |