diff OrthancFramework/UnitTestsSources/CMakeLists.txt @ 4094:1c89208fbba9

fix build of orthanc framework
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 30 Jun 2020 17:00:18 +0200
parents e00f3d089991
children 99e2054d1e8d
line wrap: on
line diff
--- a/OrthancFramework/UnitTestsSources/CMakeLists.txt	Tue Jun 30 15:53:17 2020 +0200
+++ b/OrthancFramework/UnitTestsSources/CMakeLists.txt	Tue Jun 30 17:00:18 2020 +0200
@@ -5,7 +5,12 @@
 cmake_minimum_required(VERSION 2.8)
 project(UnitTestsProject)
 
-SET(UNIT_TESTS_WITH_HTTP_CONNEXIONS ON CACHE BOOL "Allow unit tests to make HTTP requests")
+set(ALLOW_DOWNLOADS OFF CACHE BOOL "Allow CMake to download packages")
+set(STATIC_BUILD OFF CACHE BOOL "Static build of the third-party libraries (necessary for Windows)")
+set(UNIT_TESTS_WITH_HTTP_CONNEXIONS ON CACHE BOOL "Allow unit tests to make HTTP requests")
+set(USE_GOOGLE_TEST_DEBIAN_PACKAGE OFF CACHE BOOL "Use the sources of Google Test shipped with libgtest-dev (Debian only)")
+set(USE_SYSTEM_GOOGLE_TEST ON CACHE BOOL "Use the system version of Google Test")
+set(USE_SYSTEM_JSONCPP ON CACHE BOOL "Use the system version of JsonCpp")
 
 if (UNIT_TESTS_WITH_HTTP_CONNEXIONS)
   add_definitions(-DUNIT_TESTS_WITH_HTTP_CONNEXIONS=1)
@@ -22,6 +27,8 @@
   
 set(ENABLE_GOOGLE_TEST ON)
 include(${CMAKE_SOURCE_DIR}/../Resources/CMake/DownloadOrthancFramework.cmake)
+include(${CMAKE_SOURCE_DIR}/../Resources/CMake/GoogleTestConfiguration.cmake)
+include(${CMAKE_SOURCE_DIR}/../Resources/CMake/JsonCppConfiguration.cmake)
 
 add_definitions(
   -DORTHANC_UNIT_TESTS_LINK_FRAMEWORK=1