mirror of
https://github.com/aseprite/aseprite.git
synced 2024-12-28 06:21:25 +00:00
Add option to compile using shared gtest library (thanks to Tobias Hansen).
This commit is contained in:
parent
c6ad4a94c1
commit
be82a49f86
@ -36,6 +36,7 @@ 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_ZLIB "Use your installed copy of zlib" off)
|
||||||
option(USE_SHARED_LIBPNG "Use your installed copy of libpng" off)
|
option(USE_SHARED_LIBPNG "Use your installed copy of libpng" off)
|
||||||
option(USE_SHARED_TINYXML "Use your installed copy of tinyxml" off)
|
option(USE_SHARED_TINYXML "Use your installed copy of tinyxml" off)
|
||||||
|
option(USE_SHARED_GTEST "Use your installed copy of gtest" off)
|
||||||
option(USE_SHARED_ALLEGRO4 "Use shared Allegro 4 library (without resize support)" off)
|
option(USE_SHARED_ALLEGRO4 "Use shared Allegro 4 library (without resize support)" off)
|
||||||
option(ENABLE_MEMLEAK "Enable memory-leaks detector (only for developers)" off)
|
option(ENABLE_MEMLEAK "Enable memory-leaks detector (only for developers)" off)
|
||||||
option(ENABLE_UPDATER "Enable automatic check for updates" on)
|
option(ENABLE_UPDATER "Enable automatic check for updates" on)
|
||||||
|
@ -417,8 +417,10 @@ function(find_unittests dir dependencies)
|
|||||||
file(GLOB tests ${CMAKE_CURRENT_SOURCE_DIR}/${dir}/*_unittest.cpp)
|
file(GLOB tests ${CMAKE_CURRENT_SOURCE_DIR}/${dir}/*_unittest.cpp)
|
||||||
list(REMOVE_AT ARGV 0)
|
list(REMOVE_AT ARGV 0)
|
||||||
|
|
||||||
# Add gtest include directory so we can #include <gtest/gtest.h> in tests source code
|
if(NOT USE_SHARED_GTEST)
|
||||||
include_directories(${CMAKE_SOURCE_DIR}/third_party/gtest/include)
|
# Add gtest include directory so we can #include <gtest/gtest.h> in tests source code
|
||||||
|
include_directories(${CMAKE_SOURCE_DIR}/third_party/gtest/include)
|
||||||
|
endif()
|
||||||
|
|
||||||
foreach(testsourcefile ${tests})
|
foreach(testsourcefile ${tests})
|
||||||
get_filename_component(testname ${testsourcefile} NAME_WE)
|
get_filename_component(testname ${testsourcefile} NAME_WE)
|
||||||
|
5
third_party/CMakeLists.txt
vendored
5
third_party/CMakeLists.txt
vendored
@ -28,9 +28,12 @@ if(NOT USE_SHARED_TINYXML)
|
|||||||
add_subdirectory(tinyxml)
|
add_subdirectory(tinyxml)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if(NOT USE_SHARED_GTEST)
|
||||||
|
add_subdirectory(gtest)
|
||||||
|
endif()
|
||||||
|
|
||||||
if(ENABLE_UPDATER AND NOT USE_SHARED_CURL)
|
if(ENABLE_UPDATER AND NOT USE_SHARED_CURL)
|
||||||
add_subdirectory(curl)
|
add_subdirectory(curl)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
add_subdirectory(gtest)
|
|
||||||
add_subdirectory(loadpng)
|
add_subdirectory(loadpng)
|
||||||
|
Loading…
Reference in New Issue
Block a user