annotate Resources/CMake/PlustacheConfiguration.cmake @ 1157:22ef457b7985 db-changes

db-changes branch
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 16 Sep 2014 14:22:22 +0200
parents 3a26bc6e4867
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1024
a93867a94011 smoother integration of plustache
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 825
diff changeset
1 if (USE_PLUSTACHE)
a93867a94011 smoother integration of plustache
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 825
diff changeset
2 add_definitions(-DORTHANC_PLUSTACHE_ENABLED=1)
823
da4c30a8bcdd plustache
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
3
1024
a93867a94011 smoother integration of plustache
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 825
diff changeset
4 if (STATIC_BUILD OR NOT USE_SYSTEM_PLUSTACHE)
a93867a94011 smoother integration of plustache
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 825
diff changeset
5 set(PLUSTACHE_SOURCES_DIR ${CMAKE_BINARY_DIR}/plustache-0.3.0)
a93867a94011 smoother integration of plustache
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 825
diff changeset
6 DownloadPackage(
a93867a94011 smoother integration of plustache
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 825
diff changeset
7 "6162946bdb3dccf3b2185fcf149671ee"
a93867a94011 smoother integration of plustache
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 825
diff changeset
8 "http://www.montefiore.ulg.ac.be/~jodogne/Orthanc/ThirdPartyDownloads/plustache-0.3.0.tar.gz"
a93867a94011 smoother integration of plustache
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 825
diff changeset
9 "${PLUSTACHE_SOURCES_DIR}")
a93867a94011 smoother integration of plustache
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 825
diff changeset
10
a93867a94011 smoother integration of plustache
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 825
diff changeset
11 list(APPEND THIRD_PARTY_SOURCES
a93867a94011 smoother integration of plustache
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 825
diff changeset
12 ${PLUSTACHE_SOURCES_DIR}/src/context.cpp
a93867a94011 smoother integration of plustache
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 825
diff changeset
13 ${PLUSTACHE_SOURCES_DIR}/src/template.cpp
a93867a94011 smoother integration of plustache
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 825
diff changeset
14 )
823
da4c30a8bcdd plustache
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
15
1024
a93867a94011 smoother integration of plustache
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 825
diff changeset
16 include_directories(
a93867a94011 smoother integration of plustache
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 825
diff changeset
17 ${PLUSTACHE_SOURCES_DIR}
a93867a94011 smoother integration of plustache
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 825
diff changeset
18 )
a93867a94011 smoother integration of plustache
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 825
diff changeset
19
a93867a94011 smoother integration of plustache
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 825
diff changeset
20 execute_process(
1057
3a26bc6e4867 more generic paths in CMake
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1024
diff changeset
21 COMMAND patch -p0 -i ${ORTHANC_ROOT}/Resources/CMake/PlustacheConfiguration.patch
1024
a93867a94011 smoother integration of plustache
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 825
diff changeset
22 WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
a93867a94011 smoother integration of plustache
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 825
diff changeset
23 )
823
da4c30a8bcdd plustache
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
24
1024
a93867a94011 smoother integration of plustache
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 825
diff changeset
25 source_group(ThirdParty\\Plustache REGULAR_EXPRESSION ${PLUSTACHE_SOURCES_DIR}/.*)
825
d8f5de5b9517 partials
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 823
diff changeset
26
1024
a93867a94011 smoother integration of plustache
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 825
diff changeset
27 else()
a93867a94011 smoother integration of plustache
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 825
diff changeset
28 message(FATAL_ERROR "Dynamic linking against plustache not implemented (a patch is required)")
a93867a94011 smoother integration of plustache
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 825
diff changeset
29 endif()
a93867a94011 smoother integration of plustache
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 825
diff changeset
30
a93867a94011 smoother integration of plustache
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 825
diff changeset
31 else()
a93867a94011 smoother integration of plustache
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 825
diff changeset
32 add_definitions(-DORTHANC_PLUSTACHE_ENABLED=0)
a93867a94011 smoother integration of plustache
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 825
diff changeset
33
a93867a94011 smoother integration of plustache
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 825
diff changeset
34 endif()