Mercurial > hg > orthanc
annotate Resources/CMake/PlustacheConfiguration.cmake @ 1191:d49505e377e3 db-changes
demo of OnChangeCallback in plugins
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Thu, 25 Sep 2014 17:50:06 +0200 |
parents | 3a26bc6e4867 |
children |
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 | 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 | 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 | 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 | 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() |