mirror of
https://github.com/aseprite/aseprite.git
synced 2025-04-16 23:42:57 +00:00
Add adjustments to third_party/CMakeLists.txt for the new gtest submodule
This commit is contained in:
parent
fd445e01f9
commit
283f9984bf
18
third_party/CMakeLists.txt
vendored
18
third_party/CMakeLists.txt
vendored
@ -1,6 +1,8 @@
|
||||
# ASEPRITE
|
||||
# Copyright (C) 2001-2015 David Capello
|
||||
|
||||
include(CheckCXXSourceCompiles)
|
||||
|
||||
include_directories(.)
|
||||
|
||||
if(MSVC)
|
||||
@ -28,8 +30,20 @@ if(NOT USE_SHARED_TINYXML)
|
||||
add_subdirectory(tinyxml)
|
||||
endif()
|
||||
|
||||
if(NOT USE_SHARED_GTEST)
|
||||
add_subdirectory(gtest)
|
||||
if(NOT USE_SHARED_GTEST AND EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/gtest/CMakeLists.txt)
|
||||
# We don't use add_subdirectory(gtest) because the gtest
|
||||
# CMakeLists.txt modifies some MSVC flags.
|
||||
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/gtest ${CMAKE_CURRENT_SOURCE_DIR}/gtest/include)
|
||||
add_library(gtest ${CMAKE_CURRENT_SOURCE_DIR}/gtest/src/gtest-all.cc)
|
||||
else()
|
||||
find_library(gtest)
|
||||
check_cxx_source_compiles("
|
||||
#include <gtest/gtest.h>
|
||||
int main() { }
|
||||
" HAVE_GTEST_GTEST_H)
|
||||
if(NOT HAVE_GTEST_GTEST_H)
|
||||
message(FATAL_ERROR "gtest/gtest.h is missing. Set USE_SHARED_GTEST=OFF and initialize submodules: git submodule update --init --recursive")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(NOT USE_SHARED_CURL)
|
||||
|
Loading…
x
Reference in New Issue
Block a user