Mercurial > hg > orthanc
comparison CMakeLists.txt @ 1589:334d3a92ed83
improvements to the ServeFolders plugin
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 26 Aug 2015 17:43:00 +0200 |
parents | 09715095fc53 |
children | 292bce3f54ed |
comparison
equal
deleted
inserted
replaced
1588:b5bc87a7212d | 1589:334d3a92ed83 |
---|---|
27 SET(UNIT_TESTS_WITH_HTTP_CONNEXIONS ON CACHE BOOL "Allow unit tests to make HTTP requests") | 27 SET(UNIT_TESTS_WITH_HTTP_CONNEXIONS ON CACHE BOOL "Allow unit tests to make HTTP requests") |
28 SET(ENABLE_GOOGLE_LOG OFF CACHE BOOL "Enable Google Log (otherwise, an internal logger is used)") | 28 SET(ENABLE_GOOGLE_LOG OFF CACHE BOOL "Enable Google Log (otherwise, an internal logger is used)") |
29 SET(ENABLE_JPEG ON CACHE BOOL "Enable JPEG decompression") | 29 SET(ENABLE_JPEG ON CACHE BOOL "Enable JPEG decompression") |
30 SET(ENABLE_JPEG_LOSSLESS ON CACHE BOOL "Enable JPEG-LS (Lossless) decompression") | 30 SET(ENABLE_JPEG_LOSSLESS ON CACHE BOOL "Enable JPEG-LS (Lossless) decompression") |
31 SET(ENABLE_PLUGINS ON CACHE BOOL "Enable plugins") | 31 SET(ENABLE_PLUGINS ON CACHE BOOL "Enable plugins") |
32 SET(BUILD_SERVE_FOLDERS ON CACHE BOOL "Build the ServeFolders plugin") | |
32 | 33 |
33 # Advanced parameters to fine-tune linking against system libraries | 34 # Advanced parameters to fine-tune linking against system libraries |
34 SET(USE_SYSTEM_JSONCPP ON CACHE BOOL "Use the system version of JsonCpp") | 35 SET(USE_SYSTEM_JSONCPP ON CACHE BOOL "Use the system version of JsonCpp") |
35 SET(USE_SYSTEM_GOOGLE_LOG ON CACHE BOOL "Use the system version of Google Log") | 36 SET(USE_SYSTEM_GOOGLE_LOG ON CACHE BOOL "Use the system version of Google Log") |
36 SET(USE_SYSTEM_GOOGLE_TEST ON CACHE BOOL "Use the system version of Google Test") | 37 SET(USE_SYSTEM_GOOGLE_TEST ON CACHE BOOL "Use the system version of Google Test") |
219 ) | 220 ) |
220 | 221 |
221 list(APPEND ORTHANC_UNIT_TESTS_SOURCES | 222 list(APPEND ORTHANC_UNIT_TESTS_SOURCES |
222 UnitTestsSources/PluginsTests.cpp | 223 UnitTestsSources/PluginsTests.cpp |
223 ) | 224 ) |
224 | |
225 set(SERVE_FOLDERS_SOURCES | |
226 Plugins/Samples/ServeFolders/Plugin.cpp | |
227 ) | |
228 endif() | 225 endif() |
229 | 226 |
230 | 227 |
231 set(ORTHANC_EMBEDDED_FILES | 228 set(ORTHANC_EMBEDDED_FILES |
232 PREPARE_DATABASE ${CMAKE_CURRENT_SOURCE_DIR}/OrthancServer/PrepareDatabase.sql | 229 PREPARE_DATABASE ${CMAKE_CURRENT_SOURCE_DIR}/OrthancServer/PrepareDatabase.sql |
326 | 323 |
327 if (Failure) | 324 if (Failure) |
328 message(FATAL_ERROR "Error while computing the version information: ${Failure}") | 325 message(FATAL_ERROR "Error while computing the version information: ${Failure}") |
329 endif() | 326 endif() |
330 | 327 |
331 execute_process( | |
332 COMMAND | |
333 ${PYTHON_EXECUTABLE} ${ORTHANC_ROOT}/Resources/WindowsResources.py | |
334 ${ORTHANC_VERSION} ServeFolders ServeFolders.dll "Orthanc plugin to serve additional folders" | |
335 ERROR_VARIABLE Failure | |
336 OUTPUT_FILE ${AUTOGENERATED_DIR}/ServeFolders.rc | |
337 ) | |
338 | |
339 if (Failure) | |
340 message(FATAL_ERROR "Error while computing the version information: ${Failure}") | |
341 endif() | |
342 | |
343 list(APPEND ORTHANC_RESOURCES ${AUTOGENERATED_DIR}/Orthanc.rc) | 328 list(APPEND ORTHANC_RESOURCES ${AUTOGENERATED_DIR}/Orthanc.rc) |
344 list(APPEND SERVE_FOLDERS_SOURCES ${AUTOGENERATED_DIR}/ServeFolders.rc) | |
345 endif() | 329 endif() |
346 | 330 |
347 | 331 |
348 | 332 |
349 ##################################################################### | 333 ##################################################################### |
462 | 446 |
463 ##################################################################### | 447 ##################################################################### |
464 ## Build the "ServeFolders" plugin | 448 ## Build the "ServeFolders" plugin |
465 ##################################################################### | 449 ##################################################################### |
466 | 450 |
467 if (ENABLE_PLUGINS) | 451 if (ENABLE_PLUGINS AND BUILD_SERVE_FOLDERS) |
452 execute_process( | |
453 COMMAND | |
454 ${PYTHON_EXECUTABLE} ${ORTHANC_ROOT}/Resources/WindowsResources.py | |
455 ${ORTHANC_VERSION} ServeFolders ServeFolders.dll "Orthanc plugin to serve additional folders" | |
456 ERROR_VARIABLE Failure | |
457 OUTPUT_FILE ${AUTOGENERATED_DIR}/ServeFolders.rc | |
458 ) | |
459 | |
460 if (Failure) | |
461 message(FATAL_ERROR "Error while computing the version information: ${Failure}") | |
462 endif() | |
463 | |
468 add_definitions(-DSERVE_FOLDERS_VERSION="${ORTHANC_VERSION}") | 464 add_definitions(-DSERVE_FOLDERS_VERSION="${ORTHANC_VERSION}") |
469 | 465 |
470 include_directories(${CMAKE_SOURCE_DIR}/Plugins/Include) | 466 include_directories(${CMAKE_SOURCE_DIR}/Plugins/Include) |
471 | 467 |
472 add_library( | 468 add_library(ServeFolders SHARED |
473 ServeFolders SHARED | 469 ${BOOST_SOURCES} |
474 ${SERVE_FOLDERS_SOURCES} | |
475 ${JSONCPP_SOURCES} | 470 ${JSONCPP_SOURCES} |
471 Plugins/Samples/ServeFolders/Plugin.cpp | |
472 ${AUTOGENERATED_DIR}/ServeFolders.rc | |
476 ) | 473 ) |
477 | 474 |
478 set_target_properties( | 475 set_target_properties( |
479 ServeFolders PROPERTIES | 476 ServeFolders PROPERTIES |
480 VERSION ${ORTHANC_VERSION} | 477 VERSION ${ORTHANC_VERSION} |