Sophie

Sophie

distrib > Mageia > 6 > x86_64 > by-pkgid > 58ff6dc846f02f4228e7ebc72d1f04ec > files > 1

aseprite-1.1.7-2.mga6.src.rpm

Index: aseprite-1.1.4/CMakeLists.txt
===================================================================
--- aseprite-1.1.4/CMakeLists.txt
+++ aseprite-1.1.4/CMakeLists.txt	2016-04-12 21:35:52.976788718 +0200
@@ -41,6 +41,7 @@
 option(USE_STATIC_LIBC    "Use static version of C and C++ runtimes" off)
 option(USE_SHARED_CURL    "Use your installed copy of curl" off)
 option(USE_SHARED_GIFLIB  "Use your installed copy of giflib" off)
+option(USE_SHARED_GTEST   "Use your installed copy of gtest" off)
 option(USE_SHARED_JPEGLIB "Use your installed copy of jpeglib" off)
 option(USE_SHARED_ZLIB    "Use your installed copy of zlib" off)
 option(USE_SHARED_LIBPNG  "Use your installed copy of libpng" off)
@@ -235,6 +236,11 @@
 endif()
 include_directories(${GIF_INCLUDE_DIRS})
 
+if(USE_SHARED_GTEST)
+  find_package(GTest REQUIRED)
+endif()
+include_directories(${GTEST_INCLUDE_DIRS})
+
 if(USE_SHARED_JPEGLIB)
   find_package(JPEG REQUIRED)
 else()
Index: aseprite-1.1.4/third_party/CMakeLists.txt
===================================================================
--- aseprite-1.1.4/third_party/CMakeLists.txt
+++ aseprite-1.1.4/third_party/CMakeLists.txt	2016-04-12 21:36:22.835490395 +0200
@@ -43,13 +43,15 @@
   add_subdirectory(tinyxml)
 endif()
 
-if(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()
-  message(FATAL_ERROR "gtest/gtest.h is missing. Initialize submodules: git submodule update --init --recursive")
+if(NOT USE_SHARED_GTEST)
+  if(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()
+    message(FATAL_ERROR "gtest/gtest.h is missing. Initialize submodules: git submodule update --init --recursive")
+  endif()
 endif()
 
 if(NOT USE_SHARED_CURL)