comparison 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
comparison
equal deleted inserted replaced
4092:fb64d481940a 4094:1c89208fbba9
3 ## 3 ##
4 4
5 cmake_minimum_required(VERSION 2.8) 5 cmake_minimum_required(VERSION 2.8)
6 project(UnitTestsProject) 6 project(UnitTestsProject)
7 7
8 SET(UNIT_TESTS_WITH_HTTP_CONNEXIONS ON CACHE BOOL "Allow unit tests to make HTTP requests") 8 set(ALLOW_DOWNLOADS OFF CACHE BOOL "Allow CMake to download packages")
9 set(STATIC_BUILD OFF CACHE BOOL "Static build of the third-party libraries (necessary for Windows)")
10 set(UNIT_TESTS_WITH_HTTP_CONNEXIONS ON CACHE BOOL "Allow unit tests to make HTTP requests")
11 set(USE_GOOGLE_TEST_DEBIAN_PACKAGE OFF CACHE BOOL "Use the sources of Google Test shipped with libgtest-dev (Debian only)")
12 set(USE_SYSTEM_GOOGLE_TEST ON CACHE BOOL "Use the system version of Google Test")
13 set(USE_SYSTEM_JSONCPP ON CACHE BOOL "Use the system version of JsonCpp")
9 14
10 if (UNIT_TESTS_WITH_HTTP_CONNEXIONS) 15 if (UNIT_TESTS_WITH_HTTP_CONNEXIONS)
11 add_definitions(-DUNIT_TESTS_WITH_HTTP_CONNEXIONS=1) 16 add_definitions(-DUNIT_TESTS_WITH_HTTP_CONNEXIONS=1)
12 else() 17 else()
13 add_definitions(-DUNIT_TESTS_WITH_HTTP_CONNEXIONS=0) 18 add_definitions(-DUNIT_TESTS_WITH_HTTP_CONNEXIONS=0)
20 set(ENABLE_SQLITE ON) 25 set(ENABLE_SQLITE ON)
21 endif() 26 endif()
22 27
23 set(ENABLE_GOOGLE_TEST ON) 28 set(ENABLE_GOOGLE_TEST ON)
24 include(${CMAKE_SOURCE_DIR}/../Resources/CMake/DownloadOrthancFramework.cmake) 29 include(${CMAKE_SOURCE_DIR}/../Resources/CMake/DownloadOrthancFramework.cmake)
30 include(${CMAKE_SOURCE_DIR}/../Resources/CMake/GoogleTestConfiguration.cmake)
31 include(${CMAKE_SOURCE_DIR}/../Resources/CMake/JsonCppConfiguration.cmake)
25 32
26 add_definitions( 33 add_definitions(
27 -DORTHANC_UNIT_TESTS_LINK_FRAMEWORK=1 34 -DORTHANC_UNIT_TESTS_LINK_FRAMEWORK=1
28 -DORTHANC_BUILD_UNIT_TESTS=1 # For "HierarchicalZipWriter" tests 35 -DORTHANC_BUILD_UNIT_TESTS=1 # For "HierarchicalZipWriter" tests
29 ) 36 )