comparison Resources/Samples/Tools/CMakeLists.txt @ 680:571583642ce2

Tool to recover compressed files
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 29 Jan 2014 16:20:05 +0100
parents
children 272cb2019a4c
comparison
equal deleted inserted replaced
678:3e4c2433f12b 680:571583642ce2
1 cmake_minimum_required(VERSION 2.8)
2
3 project(OrthancTools)
4
5 if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
6 # Linking with "pthread" is necessary, otherwise the software crashes
7 # http://sourceware.org/bugzilla/show_bug.cgi?id=10652#c17
8 link_libraries(pthread dl)
9 endif()
10
11 set(STATIC_BUILD ON)
12 set(ALLOW_DOWNLOADS ON)
13
14 set(ORTHANC_ROOT ${CMAKE_SOURCE_DIR}/../../..)
15
16 include(CheckIncludeFiles)
17 include(CheckIncludeFileCXX)
18 include(CheckLibraryExists)
19 include(${ORTHANC_ROOT}/Resources/CMake/Compiler.cmake)
20 include(${ORTHANC_ROOT}/Resources/CMake/DownloadPackage.cmake)
21 include(${ORTHANC_ROOT}/Resources/CMake/BoostConfiguration.cmake)
22 include(${ORTHANC_ROOT}/Resources/CMake/ZlibConfiguration.cmake)
23
24 add_library(CommonLibraries
25 ${BOOST_SOURCES}
26 ${THIRD_PARTY_SOURCES}
27 ${ORTHANC_ROOT}/Core/OrthancException.cpp
28 ${ORTHANC_ROOT}/Core/Toolbox.cpp
29 ${ORTHANC_ROOT}/Core/Uuid.cpp
30 ${ORTHANC_ROOT}/Resources/md5/md5.c
31 ${ORTHANC_ROOT}/Resources/base64/base64.cpp
32 )
33
34 add_executable(RecoverCompressedFile
35 RecoverCompressedFile.cpp
36 ${ORTHANC_ROOT}/Core/Compression/BufferCompressor.cpp
37 ${ORTHANC_ROOT}/Core/Compression/ZlibCompressor.cpp
38 )
39
40 target_link_libraries(RecoverCompressedFile CommonLibraries)