comparison Resources/CMake/PlustacheConfiguration.cmake @ 1024:a93867a94011 templating

smoother integration of plustache
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 10 Jul 2014 11:53:23 +0200
parents d8f5de5b9517
children 3a26bc6e4867
comparison
equal deleted inserted replaced
1023:226cfef3822e 1024:a93867a94011
1 set(PLUSTACHE_SOURCES_DIR ${CMAKE_BINARY_DIR}/plustache-0.3.0) 1 if (USE_PLUSTACHE)
2 DownloadPackage( 2 add_definitions(-DORTHANC_PLUSTACHE_ENABLED=1)
3 "6162946bdb3dccf3b2185fcf149671ee"
4 "http://www.montefiore.ulg.ac.be/~jodogne/Orthanc/ThirdPartyDownloads/plustache-0.3.0.tar.gz"
5 "${PLUSTACHE_SOURCES_DIR}")
6 3
7 list(APPEND THIRD_PARTY_SOURCES 4 if (STATIC_BUILD OR NOT USE_SYSTEM_PLUSTACHE)
8 ${PLUSTACHE_SOURCES_DIR}/src/context.cpp 5 set(PLUSTACHE_SOURCES_DIR ${CMAKE_BINARY_DIR}/plustache-0.3.0)
9 ${PLUSTACHE_SOURCES_DIR}/src/template.cpp 6 DownloadPackage(
10 ) 7 "6162946bdb3dccf3b2185fcf149671ee"
8 "http://www.montefiore.ulg.ac.be/~jodogne/Orthanc/ThirdPartyDownloads/plustache-0.3.0.tar.gz"
9 "${PLUSTACHE_SOURCES_DIR}")
11 10
12 include_directories( 11 list(APPEND THIRD_PARTY_SOURCES
13 ${PLUSTACHE_SOURCES_DIR} 12 ${PLUSTACHE_SOURCES_DIR}/src/context.cpp
14 ) 13 ${PLUSTACHE_SOURCES_DIR}/src/template.cpp
14 )
15 15
16 execute_process( 16 include_directories(
17 COMMAND patch -p0 -i ${CMAKE_SOURCE_DIR}/Resources/CMake/PlustacheConfiguration.patch 17 ${PLUSTACHE_SOURCES_DIR}
18 WORKING_DIRECTORY ${CMAKE_BINARY_DIR} 18 )
19 )
20 19
21 source_group(ThirdParty\\Plustache REGULAR_EXPRESSION ${PLUSTACHE_SOURCES_DIR}/.*) 20 execute_process(
21 COMMAND patch -p0 -i ${CMAKE_SOURCE_DIR}/Resources/CMake/PlustacheConfiguration.patch
22 WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
23 )
24
25 source_group(ThirdParty\\Plustache REGULAR_EXPRESSION ${PLUSTACHE_SOURCES_DIR}/.*)
26
27 else()
28 message(FATAL_ERROR "Dynamic linking against plustache not implemented (a patch is required)")
29 endif()
30
31 else()
32 add_definitions(-DORTHANC_PLUSTACHE_ENABLED=0)
33
34 endif()