annotate Resources/Samples/RestApi/CMakeLists.txt @ 276:8af8754a7a8e

rest api demo
author Sebastien Jodogne <s.jodogne@gmail.com>
date Sun, 09 Dec 2012 14:45:10 +0100
parents
children eb5fb5501569
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
276
8af8754a7a8e rest api demo
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1 cmake_minimum_required(VERSION 2.8)
8af8754a7a8e rest api demo
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
2
8af8754a7a8e rest api demo
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
3 project(RestApiSample)
8af8754a7a8e rest api demo
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
4
8af8754a7a8e rest api demo
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
5 include(ExternalProject)
8af8754a7a8e rest api demo
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
6
8af8754a7a8e rest api demo
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
7 ExternalProject_Add(
8af8754a7a8e rest api demo
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
8 ORTHANC_CORE
8af8754a7a8e rest api demo
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
9 PREFIX ${CMAKE_BINARY_DIR}/Orthanc/
8af8754a7a8e rest api demo
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
10 DOWNLOAD_COMMAND hg clone https://code.google.com/p/orthanc/ -r Orthanc-0.3.1
8af8754a7a8e rest api demo
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
11 UPDATE_COMMAND ""
8af8754a7a8e rest api demo
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
12 SOURCE_DIR ${CMAKE_BINARY_DIR}/Orthanc/src/orthanc/
8af8754a7a8e rest api demo
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
13
8af8754a7a8e rest api demo
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
14 # Optional step, to reuse the third-party downloads
8af8754a7a8e rest api demo
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
15 PATCH_COMMAND ${CMAKE_COMMAND} -E create_symlink ${CMAKE_SOURCE_DIR}/../../../ThirdPartyDownloads ThirdPartyDownloads
8af8754a7a8e rest api demo
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
16
8af8754a7a8e rest api demo
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
17 CMAKE_COMMAND ${CMAKE_COMMAND}
8af8754a7a8e rest api demo
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
18 CMAKE_ARGS -DSTATIC_BUILD=ON -DSTANDALONE_BUILD=ON -DUSE_DYNAMIC_GOOGLE_LOG=OFF -DUSE_DYNAMIC_SQLITE=OFF -DONLY_CORE_LIBRARY=ON -DENABLE_SSL=OFF
8af8754a7a8e rest api demo
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
19 BUILD_COMMAND $(MAKE)
8af8754a7a8e rest api demo
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
20 INSTALL_COMMAND ""
8af8754a7a8e rest api demo
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
21 BUILD_IN_SOURCE 0
8af8754a7a8e rest api demo
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
22 )
8af8754a7a8e rest api demo
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
23
8af8754a7a8e rest api demo
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
24 ExternalProject_Get_Property(ORTHANC_CORE source_dir)
8af8754a7a8e rest api demo
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
25 include_directories(${source_dir})
8af8754a7a8e rest api demo
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
26
8af8754a7a8e rest api demo
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
27 ExternalProject_Get_Property(ORTHANC_CORE binary_dir)
8af8754a7a8e rest api demo
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
28 link_directories(${binary_dir})
8af8754a7a8e rest api demo
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
29 include_directories(${binary_dir}/jsoncpp-src-0.5.0/include)
8af8754a7a8e rest api demo
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
30 include_directories(${binary_dir}/glog-0.3.2/src)
8af8754a7a8e rest api demo
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
31
8af8754a7a8e rest api demo
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
32 add_executable(RestApiSample
8af8754a7a8e rest api demo
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
33 Sample.cpp
8af8754a7a8e rest api demo
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
34 )
8af8754a7a8e rest api demo
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
35
8af8754a7a8e rest api demo
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
36 add_dependencies(RestApiSample ORTHANC_CORE)
8af8754a7a8e rest api demo
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
37
8af8754a7a8e rest api demo
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
38 target_link_libraries(RestApiSample
8af8754a7a8e rest api demo
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
39 # From Orthanc
8af8754a7a8e rest api demo
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
40 CoreLibrary
8af8754a7a8e rest api demo
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
41 GoogleLog
8af8754a7a8e rest api demo
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
42 #OpenSSL
8af8754a7a8e rest api demo
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
43
8af8754a7a8e rest api demo
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
44 # System-wide libraries
8af8754a7a8e rest api demo
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
45 pthread
8af8754a7a8e rest api demo
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
46 )
8af8754a7a8e rest api demo
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
47