mirror of
https://github.com/aseprite/aseprite.git
synced 2024-12-25 15:18:23 +00:00
Move code to find gtest shared version into src/CMakeLists.txt
This commit is contained in:
parent
b03f6de006
commit
0c115e5567
@ -143,6 +143,22 @@ else()
|
||||
include_directories(${CMAKE_BINARY_DIR})
|
||||
endif()
|
||||
|
||||
if(USE_SHARED_GTEST)
|
||||
find_library(LIBGTEST_LIBRARY NAMES gtest)
|
||||
find_path(LIBGTEST_INCLUDE_DIR NAMES "gtest/gtest.h")
|
||||
|
||||
set(libs3rdparty ${libs3rdparty} ${LIBGTEST_LIBRARY})
|
||||
include_directories(${LIBGTEST_INCLUDE_DIR})
|
||||
|
||||
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()
|
||||
|
||||
set(libs3rdparty simpleini ${libs3rdparty})
|
||||
include_directories(${SIMPLEINI_DIR})
|
||||
|
||||
|
14
third_party/CMakeLists.txt
vendored
14
third_party/CMakeLists.txt
vendored
@ -35,20 +35,6 @@ if(NOT USE_SHARED_GTEST AND EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/gtest/CMakeLists.
|
||||
# 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(LIBGTEST_LIBRARY NAMES gtest)
|
||||
find_path(LIBGTEST_INCLUDE_DIR NAMES "gtest/gtest.h")
|
||||
|
||||
set(libs3rdparty ${libs3rdparty} ${LIBGTEST_LIBRARY})
|
||||
include_directories(${LIBGTEST_INCLUDE_DIR})
|
||||
|
||||
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…
Reference in New Issue
Block a user